[Intel-gfx] [PATCH 05/11] drm/i915: simplify wm->is_planar assignment

Paulo Zanoni paulo.r.zanoni at intel.com
Tue Oct 16 22:01:27 UTC 2018


We're currently doing it in two different ways, none of them based on
the wm_params struct. Both places are correct, so I chose to keep the
one in skl_compute_wm_levels() since it's the function that sets the
other values for the same struct. But I'm open to better suggestions
on the place to assign it.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index d1dd3ae408f9..7fd344b81d66 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4832,8 +4832,7 @@ skl_compute_wm_levels(const struct drm_i915_private *dev_priv,
 			return ret;
 	}
 
-	if (intel_pstate->base.fb->format->format == DRM_FORMAT_NV12)
-		wm->is_planar = true;
+	wm->is_planar = wm_params->is_planar;
 
 	return 0;
 }
@@ -4972,8 +4971,6 @@ static int skl_build_pipe_wm(struct intel_crtc_state *cstate,
 
 		/* uv plane watermarks must also be validated for NV12/Planar */
 		if (wm_params.is_planar) {
-			wm->is_planar = true;
-
 			ret = skl_compute_plane_wm_params(dev_priv, cstate,
 							  intel_pstate,
 							  &wm_params, 1);
-- 
2.14.4



More information about the Intel-gfx mailing list