[PATCH 24/24] semi-hax: drm/i915: Always verify ddb allocation, v3.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Tue Oct 8 09:03:23 UTC 2019
And only verify cursor allocation when the planes are active.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 3960d35dc94d..75e8476429db 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -13312,6 +13312,9 @@ static void verify_wm_state(struct intel_crtc *crtc,
hw_plane_wm = &hw->wm.planes[plane];
sw_plane_wm = &sw_wm->planes[plane];
+ if (!(I915_READ(PLANE_CTL(pipe, plane)) & PLANE_CTL_ENABLE))
+ continue;
+
/* Watermarks */
for (level = 0; level <= max_level; level++) {
if (skl_wm_level_equals(&hw_plane_wm->wm[level],
@@ -13358,7 +13361,7 @@ static void verify_wm_state(struct intel_crtc *crtc,
* allocation. In that case since the ddb allocation will be updated
* once the plane becomes visible, we can skip this check
*/
- if (1) {
+ if (I915_READ(CURCNTR(pipe)) & MCURSOR_MODE) {
struct skl_plane_wm *hw_plane_wm, *sw_plane_wm;
hw_plane_wm = &hw->wm.planes[PLANE_CURSOR];
@@ -13654,10 +13657,11 @@ intel_modeset_verify_crtc(struct intel_crtc *crtc,
struct intel_crtc_state *old_crtc_state,
struct intel_crtc_state *new_crtc_state)
{
+ verify_wm_state(crtc, new_crtc_state);
+
if (!needs_modeset(new_crtc_state) && !new_crtc_state->update_pipe)
return;
- verify_wm_state(crtc, new_crtc_state);
verify_connector_state(state, crtc);
verify_crtc_state(crtc, old_crtc_state, new_crtc_state);
verify_shared_dpll_state(crtc, old_crtc_state, new_crtc_state);
--
2.23.0
More information about the Intel-gfx-trybot
mailing list