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

Commit 37204555 authored by Adrian Salido's avatar Adrian Salido Committed by Samantha Tran
Browse files

drm/msm: minimize qos remap updates



Updating qos remap updates requires reading registers to update values,
this adds additional CPU processing when in reality this update
is only needed once.

Bug: 142504774
Change-Id: Iec8d4dfd858b0602db7d2275b6b716dbcffe0d2f
(cherry picked from commit dbd1cfbc21db4b9bd4f1a4fc234cedc314fa1265)
Signed-off-by: default avatarAdrian Salido <salidoa@google.com>
Signed-off-by: default avatarSamantha Tran <samtran@codeaurora.org>
parent a1143d12
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -3104,6 +3104,8 @@ static void _sde_plane_update_properties(struct drm_plane *plane,
		psde->pipe_hw->ops.setup_sharpening)
		_sde_plane_update_sharpening(psde);

	if (pstate->dirty & (SDE_PLANE_DIRTY_QOS | SDE_PLANE_DIRTY_RECTS |
			SDE_PLANE_DIRTY_FORMAT))
		_sde_plane_set_qos_lut(plane, crtc, fb);

	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
@@ -3113,6 +3115,7 @@ static void _sde_plane_update_properties(struct drm_plane *plane,
			_sde_plane_set_ts_prefill(plane, pstate);
	}

	if (pstate->dirty & SDE_PLANE_DIRTY_QOS)
		_sde_plane_set_qos_remap(plane);

	/* clear dirty */
@@ -3130,6 +3133,7 @@ static int sde_plane_sspp_atomic_update(struct drm_plane *plane,
	struct drm_framebuffer *fb;
	int idx;
	int dirty_prop_flag;
	bool is_rt;

	if (!plane) {
		SDE_ERROR("invalid plane\n");
@@ -3206,12 +3210,17 @@ static int sde_plane_sspp_atomic_update(struct drm_plane *plane,

	_sde_plane_set_scanout(plane, pstate, &psde->pipe_cfg, fb);

	is_rt = sde_crtc_is_rt_client(crtc, crtc->state);
	if (is_rt != psde->is_rt_pipe) {
		psde->is_rt_pipe = is_rt;
		pstate->dirty |= SDE_PLANE_DIRTY_QOS;
	}

	/* early out if nothing dirty */
	if (!pstate->dirty)
		return 0;
	pstate->pending = true;

	psde->is_rt_pipe = sde_crtc_is_rt_client(crtc, crtc->state);
	_sde_plane_set_qos_ctrl(plane, false, SDE_PLANE_QOS_PANIC_CTRL);

	_sde_plane_update_properties(plane, crtc, fb);
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#define SDE_PLANE_DIRTY_VIG_IGC 0x40
#define SDE_PLANE_DIRTY_DMA_IGC 0x80
#define SDE_PLANE_DIRTY_DMA_GC 0x100
#define SDE_PLANE_DIRTY_QOS     0x200
#define SDE_PLANE_DIRTY_CP (SDE_PLANE_DIRTY_VIG_GAMUT |\
		SDE_PLANE_DIRTY_VIG_IGC | SDE_PLANE_DIRTY_DMA_IGC |\
		SDE_PLANE_DIRTY_DMA_GC)