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

Commit 8c176bf4 authored by Alan Kwong's avatar Alan Kwong
Browse files

drm/msm/sde: add clock/bandwidth control for inline rotation



Add new properties to support clock and bandwidth control for
inline rotation. New properties enable user mode to control
clock and bandwidth requirement for inline rotation on per
commit basis.

CRs-Fixed: 2009714
Change-Id: Ic30e316683abe0dd55119614edd6140c48bc9a42
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent d939be4f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -134,7 +134,10 @@ enum msm_mdp_crtc_property {
	CRTC_PROP_CORE_CLK,
	CRTC_PROP_CORE_AB,
	CRTC_PROP_CORE_IB,
	CRTC_PROP_MEM_AB,
	CRTC_PROP_MEM_IB,
	CRTC_PROP_ROT_PREFILL_BW,
	CRTC_PROP_ROT_CLK,

	/* total # of properties */
	CRTC_PROP_COUNT
+12 −0
Original line number Diff line number Diff line
@@ -1732,10 +1732,22 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
			"core_ib", 0x0, 0, U64_MAX,
			SDE_POWER_HANDLE_ENABLE_BUS_IB_QUOTA,
			CRTC_PROP_CORE_IB);
	msm_property_install_range(&sde_crtc->property_info,
			"mem_ab", 0x0, 0, U64_MAX,
			SDE_POWER_HANDLE_ENABLE_BUS_AB_QUOTA,
			CRTC_PROP_MEM_AB);
	msm_property_install_range(&sde_crtc->property_info,
			"mem_ib", 0x0, 0, U64_MAX,
			SDE_POWER_HANDLE_ENABLE_BUS_AB_QUOTA,
			CRTC_PROP_MEM_IB);
	msm_property_install_range(&sde_crtc->property_info,
			"rot_prefill_bw", 0, 0, U64_MAX,
			catalog->perf.max_bw_high * 1000ULL,
			CRTC_PROP_ROT_PREFILL_BW);
	msm_property_install_range(&sde_crtc->property_info,
			"rot_clk", 0, 0, U64_MAX,
			sde_kms->perf.max_core_clk_rate,
			CRTC_PROP_ROT_CLK);

	msm_property_install_blob(&sde_crtc->property_info, "capabilities",
		DRM_MODE_PROP_IMMUTABLE, CRTC_PROP_INFO);
+2 −0
Original line number Diff line number Diff line
@@ -1500,6 +1500,8 @@ static int sde_plane_rot_submit_command(struct drm_plane *plane,
	rot_cmd->secure = state->fb->flags & DRM_MODE_FB_SECURE ? true : false;
	rot_cmd->prefill_bw = sde_crtc_get_property(sde_cstate,
			CRTC_PROP_ROT_PREFILL_BW);
	rot_cmd->clkrate = sde_crtc_get_property(sde_cstate,
			CRTC_PROP_ROT_CLK);
	rot_cmd->dst_writeback = psde->sbuf_writeback;

	if (sde_crtc_get_intf_mode(state->crtc) == INTF_MODE_VIDEO)