From 552e67859c3ae9277ed26d5393d733207d129dae Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 6 Jun 2015 11:04:00 +0100 Subject: [PATCH] drm: bridge/dw_hdmi: avoid enabling interface in mode_set On a mode set, DRM makes the following sequence of calls: * for_each_encoder * bridge mode_fixup * encoder mode_fixup * crtc mode_fixup * for_each_encoder * bridge disable * encoder prepare * bridge post_disable * disable unused encoders * crtc prepare * crtc mode_set * for_each_encoder * encoder mode_set * bridge mode_set * crtc commit * for_each_encoder * bridge pre_enable * encoder commit * bridge enable dw_hdmi enables the HDMI output in both the bridge mode_set() and also the bridge enable() step. This is duplicated work - we can avoid the setup in mode_set() and just do it in the enable() stage. This simplifies the code a little. Signed-off-by: Russell King --- drivers/gpu/drm/bridge/dw_hdmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index cec5162e8e69..8efd61781f89 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1375,8 +1375,6 @@ static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge, { struct dw_hdmi *hdmi = bridge->driver_private; - dw_hdmi_setup(hdmi, mode); - /* Store the display mode for plugin/DKMS poweron events */ memcpy(&hdmi->previous_mode, mode, sizeof(hdmi->previous_mode)); } -- 2.39.5