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

Commit c7ce0b02 authored by Narender Ankam's avatar Narender Ankam
Browse files

drm/msm: only set need cdm for INTF_0



Only DP INTF_0 should need cdm block, other
INTFs do not need cdm.

Change-Id: Iff355dae456ed432efd84dff72ec85b83dbb93f2
Signed-off-by: default avatarYuan Zhao <yzhao@codeaurora.org>
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
Signed-off-by: default avatarChirag Khurana <ckhurana@codeaurora.org>
parent 1afbd178
Loading
Loading
Loading
Loading
+16 −5
Original line number Diff line number Diff line
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -838,21 +838,32 @@ static void sde_encoder_phys_vid_get_hw_resources(
		struct drm_connector_state *conn_state)
{
	struct sde_encoder_phys_vid *vid_enc;
	struct sde_mdss_cfg *vid_catalog;

	if (!phys_enc || !hw_res) {
		SDE_ERROR("invalid arg(s), enc %d hw_res %d conn_state %d\n",
				phys_enc != 0, hw_res != 0, conn_state != 0);
			phys_enc != NULL, hw_res != NULL, conn_state != NULL);
		return;
	}

	vid_catalog = phys_enc->sde_kms->catalog;
	vid_enc = to_sde_encoder_phys_vid(phys_enc);
	if (!vid_enc->hw_intf) {
		SDE_ERROR("invalid arg(s), hw_intf\n");
	if (!vid_enc->hw_intf || !vid_catalog) {
		SDE_ERROR("invalid arg(s), hw_intf %d vid_catalog %d\n",
			  vid_enc->hw_intf != NULL, vid_catalog != NULL);
		return;
	}

	SDE_DEBUG_VIDENC(vid_enc, "\n");
	if (vid_enc->hw_intf->idx > INTF_MAX) {
		SDE_ERROR("invalid arg(s), idx %d\n",
			  vid_enc->hw_intf->idx);
		return;
	}
	hw_res->intfs[vid_enc->hw_intf->idx - INTF_0] = INTF_MODE_VIDEO;

	if (vid_catalog->intf[vid_enc->hw_intf->idx - INTF_0].type
			== INTF_DP)
		hw_res->needs_cdm = true;
	SDE_DEBUG_DRIVER("[vid] needs_cdm=%d\n", hw_res->needs_cdm);
}
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2348,7 +2348,7 @@ static int sde_cdm_parse_dt(struct device_node *np,

		/* intf3 and wb2 for cdm block */
		cdm->wb_connect = sde_cfg->wb_count ? BIT(WB_2) : BIT(31);
		cdm->intf_connect = sde_cfg->intf_count ? BIT(INTF_3) : BIT(31);
		cdm->intf_connect = sde_cfg->intf_count ? BIT(INTF_0) : BIT(31);
	}

end: