summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavid Bahrani <nbahrani@codeaurora.org>2018-11-27 18:02:39 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-12-03 17:05:43 -0800
commitff7940216ebfa4c1bdcd334c9d6272e28cb50d42 (patch)
tree1e426df3425cff4837e86bf0406f48bade5ce865
parent7daef91bee21338b504ddd8290e1133faef42c43 (diff)
drm/msm/hdmi: disable HDR state on bridge disable
HDR info frames were not disabled after a hotplug and app closure or in the event of an unexpected termination of the userspace driver. Fixed the issue by resetting to HDR_DISABLE state in hdmi bridge disable. Change-Id: Iead5cfe11512a8c49b6a2183561de427ce16f393 Signed-off-by: Navid Bahrani <nbahrani@codeaurora.org>
-rw-r--r--drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_bridge.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_bridge.c
index 4df6c0af1707..b874d8dbf454 100644
--- a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_bridge.c
+++ b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_bridge.c
@@ -663,7 +663,9 @@ static void _sde_hdmi_bridge_enable(struct drm_bridge *bridge)
static void _sde_hdmi_bridge_disable(struct drm_bridge *bridge)
{
struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
+ struct hdmi *hdmi = sde_hdmi_bridge->hdmi;
struct sde_hdmi *display = sde_hdmi_bridge->display;
+ struct sde_connector_state *c_state;
mutex_lock(&display->display_lock);
@@ -673,6 +675,17 @@ static void _sde_hdmi_bridge_disable(struct drm_bridge *bridge)
return;
}
+ hdmi->connector->hdr_eotf = 0;
+ hdmi->connector->hdr_metadata_type_one = 0;
+ hdmi->connector->hdr_max_luminance = 0;
+ hdmi->connector->hdr_avg_luminance = 0;
+ hdmi->connector->hdr_min_luminance = 0;
+
+ c_state = to_sde_connector_state(hdmi->connector->state);
+ memset(&c_state->hdr_ctrl.hdr_meta,
+ 0, sizeof(c_state->hdr_ctrl.hdr_meta));
+ c_state->hdr_ctrl.hdr_state = HDR_DISABLE;
+
display->pll_update_enable = false;
display->sink_hdcp_ver = SDE_HDMI_HDCP_NONE;
display->sink_hdcp22_support = false;