diff mbox

[5/5] drm/cirrus: Return an error from connector dpms callback

Message ID 20170726205636.19144-6-tiwai@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Iwai July 26, 2017, 8:56 p.m. UTC
Although the cirrus drm driver handles DPMS and sets the register bits
accordingly, currently KVM/QEMU ignores it, resulting in the
non-functional console blank.  This patch makes the connector dpms
callback always returning an error so that the fbcon can fall back
to the generic blank mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index 53f6f0f84206..7412660bb014 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -506,13 +506,20 @@  static void cirrus_connector_destroy(struct drm_connector *connector)
 	kfree(connector);
 }
 
+static int cirrus_connector_dpms(struct drm_connector *connector, int mode)
+{
+	drm_helper_connector_dpms(connector, mode);
+	/* FIXME: return error to make fbcon generic blank working */
+	return -EINVAL;
+}
+
 static const struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = {
 	.get_modes = cirrus_vga_get_modes,
 	.best_encoder = cirrus_connector_best_encoder,
 };
 
 static const struct drm_connector_funcs cirrus_vga_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
+	.dpms = cirrus_connector_dpms,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.destroy = cirrus_connector_destroy,
 };