From: Maxime Ripard Date: Fri, 11 Jan 2019 15:32:10 +0000 (+0100) Subject: Merge drm/drm-next into drm-misc-next X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=23d19ba06b9c5614d6457f5fed349ec8f6d4dac9;p=openwrt%2Fstaging%2Fblogic.git Merge drm/drm-next into drm-misc-next drm-next has been forwarded to 5.0-rc1, and we need it to apply the damage helper for dirtyfb series from Noralf Trønnes. Signed-off-by: Maxime Ripard --- 23d19ba06b9c5614d6457f5fed349ec8f6d4dac9 diff --cc drivers/gpu/drm/omapdrm/omap_encoder.c index 4566e0a75cb8,933ebc9f9faa..148b6b20274f --- a/drivers/gpu/drm/omapdrm/omap_encoder.c +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c @@@ -52,6 -52,37 +52,37 @@@ static const struct drm_encoder_funcs o .destroy = omap_encoder_destroy, }; + static void omap_encoder_hdmi_mode_set(struct drm_encoder *encoder, + struct drm_display_mode *adjusted_mode) + { + struct drm_device *dev = encoder->dev; + struct omap_encoder *omap_encoder = to_omap_encoder(encoder); + struct omap_dss_device *dssdev = omap_encoder->output; + struct drm_connector *connector; + bool hdmi_mode; + + hdmi_mode = false; + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { + if (connector->encoder == encoder) { + hdmi_mode = omap_connector_get_hdmi_mode(connector); + break; + } + } + + if (dssdev->ops->hdmi.set_hdmi_mode) + dssdev->ops->hdmi.set_hdmi_mode(dssdev, hdmi_mode); + + if (hdmi_mode && dssdev->ops->hdmi.set_infoframe) { + struct hdmi_avi_infoframe avi; + int r; + - r = drm_hdmi_avi_infoframe_from_display_mode(&avi, adjusted_mode, - false); ++ r = drm_hdmi_avi_infoframe_from_display_mode(&avi, connector, ++ adjusted_mode); + if (r == 0) + dssdev->ops->hdmi.set_infoframe(dssdev, &avi); + } + } + static void omap_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)