diff mbox

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

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

Commit Message

Takashi Iwai July 26, 2017, 8:56 p.m. UTC
The qxl drm driver doesn't treat with DPMS, so we should return an
error from the connector dpms callback so that the fbcon can fall back
to the generic blank mode.

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

Patch

diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 03fe182203ce..48db53d0285d 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -1019,8 +1019,15 @@  static void qxl_conn_destroy(struct drm_connector *connector)
 	kfree(qxl_output);
 }
 
+static int qxl_conn_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_funcs qxl_connector_funcs = {
-	.dpms = drm_helper_connector_dpms,
+	.dpms = qxl_conn_dpms,
 	.detect = qxl_conn_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.set_property = qxl_conn_set_property,