diff mbox series

[24/24] semi-hax: drm/i915: Always verify ddb allocation

Message ID 20191004113514.17064-25-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Enable bigjoiner support, second approach. | expand

Commit Message

Maarten Lankhorst Oct. 4, 2019, 11:35 a.m. UTC
And only verify cursor allocation when cursor plane is active.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 46e3e8296251..34c4a558a56b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -13369,7 +13369,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 (CURCNTR(pipe) & MCURSOR_MODE) {
 		struct skl_plane_wm *hw_plane_wm, *sw_plane_wm;
 
 		hw_plane_wm = &hw->wm.planes[PLANE_CURSOR];
@@ -13665,10 +13665,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);