Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d67f891 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/hdmi: disable HDR state on bridge disable"

parents 0d7730d8 ff794021
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;