From a07102f1cce6ebf11f8d880665eb6f6353b16177 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
Date: Fri, 3 Mar 2017 17:19:27 +0200
Subject: [PATCH] drm/i915: Use intel_wm_plane_visible() on VLV/CHV as well
Mime-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8bit
Git-commit: a07102f1cce6ebf11f8d880665eb6f6353b16177
Patch-mainline: v4.13-rc1
References: FATE#322643 bsc#1055900
VLV/CHV don't have double buffered watermarks so they need to consider
the cursor visibility as a special case just like ILK-BDW. Let's use
the helper we have for that.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170303151928.23053-4-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Takashi Iwai <tiwai@suse.de>
---
drivers/gpu/drm/i915/intel_pm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1029,7 +1029,7 @@ static uint16_t vlv_compute_wm_level(con
if (dev_priv->wm.pri_latency[level] == 0)
return USHRT_MAX;
- if (!plane_state->base.visible)
+ if (!intel_wm_plane_visible(crtc_state, plane_state))
return 0;
cpp = plane_state->base.fb->format->cpp[0];
@@ -1203,7 +1203,7 @@ static bool vlv_plane_wm_compute(struct
int level;
bool dirty = false;
- if (!plane_state->base.visible) {
+ if (!intel_wm_plane_visible(crtc_state, plane_state)) {
dirty |= vlv_raw_plane_wm_set(crtc_state, 0, plane_id, 0);
goto out;
}