OSDN Git Service

drm/msm: Clear the mode private flags before setting
authorAbhinav Kumar <abhinavk@codeaurora.org>
Tue, 7 Aug 2018 02:30:10 +0000 (19:30 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 8 Aug 2018 23:35:24 +0000 (16:35 -0700)
Clear the display mode private flags before assigning
the new value. These flags retain the values from the
previous mode set which could be stale in cases where
the mode is different across the hotplugs.

Change-Id: I4bd7021970737e5ae22bade3074d8debfeddc7b3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_bridge.c

index 37e76e9..120a6de 100644 (file)
@@ -1000,6 +1000,9 @@ static bool _sde_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,
        struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
        struct hdmi *hdmi = sde_hdmi_bridge->hdmi;
 
+       /* Clear the private flags before assigning new one */
+       adjusted_mode->private_flags = 0;
+
        adjusted_mode->private_flags |=
                _sde_hdmi_choose_best_format(hdmi, adjusted_mode);
        SDE_DEBUG("Adjusted mode private flags: 0x%x\n",