On Wed, Jul 26, 2017 at 10:56:33PM +0200, Takashi Iwai wrote: > The bochs 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@xxxxxxx> > --- > drivers/gpu/drm/bochs/bochs_kms.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c > index 6a91e62da2f4..a60d1a05950f 100644 > --- a/drivers/gpu/drm/bochs/bochs_kms.c > +++ b/drivers/gpu/drm/bochs/bochs_kms.c > @@ -217,6 +217,13 @@ bochs_connector_best_encoder(struct drm_connector *connector) > return NULL; > } > > +static int bochs_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; Thought about this some more, disabling the screen and return -EINVAL (to userspace even) feels like rather bad semantics. Could we just do an -EINVAL instead? I thought the DPMS off change doesn't do anything anyway, so this is pure dead code. -Daniel > +} > + > static const struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = { > .get_modes = bochs_connector_get_modes, > .mode_valid = bochs_connector_mode_valid, > @@ -224,7 +231,7 @@ static const struct drm_connector_helper_funcs bochs_connector_connector_helper_ > }; > > static const struct drm_connector_funcs bochs_connector_connector_funcs = { > - .dpms = drm_helper_connector_dpms, > + .dpms = bochs_connector_dpms, > .fill_modes = drm_helper_probe_single_connector_modes, > .destroy = drm_connector_cleanup, > }; > -- > 2.13.3 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel