Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Fix WARN_ON condition for cursor plane ddb allocation
@ 2019-12-16  8:06 Vandita Kulkarni
  2019-12-16 16:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fix WARN_ON condition for cursor plane ddb allocation (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vandita Kulkarni @ 2019-12-16  8:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

In some cases like latency[level]==0, wm[level].res_lines>31,
min_ddb_alloc can be U16_MAX, exclude it from the WARN_ON.

v2: Specify the cases in which we hit U16_MAX, indentation (Ville)

Fixes: 10a7e07b68b9 ("drm/i915: Make sure cursor has enough ddb for the selected wm level")
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index ccbbdf4a6aab..7cdca06be3bd 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4312,8 +4312,8 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *crtc_state,
 				&crtc_state->wm.skl.optimal.planes[plane_id];
 
 			if (plane_id == PLANE_CURSOR) {
-				if (WARN_ON(wm->wm[level].min_ddb_alloc >
-					    total[PLANE_CURSOR])) {
+				if (wm->wm[level].min_ddb_alloc > total[PLANE_CURSOR]) {
+					WARN_ON(wm->wm[level].min_ddb_alloc != U16_MAX);
 					blocks = U32_MAX;
 					break;
 				}
-- 
2.21.0.5.gaeb582a

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [Intel-gfx] [PATCH] drm/i915: Fix WARN_ON condition for cursor plane ddb allocation
@ 2019-12-13 15:45 Vandita Kulkarni
  2019-12-13 17:03 ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Vandita Kulkarni @ 2019-12-13 15:45 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

In some cases min_ddb_alloc can be U16_MAX, exclude it
from the WARN_ON.

Fixes: 10a7e07b68b9 ("drm/i915: Make sure cursor has enough ddb for the selected wm level")
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index ccbbdf4a6aab..cec4fa79422c 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4312,8 +4312,10 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *crtc_state,
 				&crtc_state->wm.skl.optimal.planes[plane_id];
 
 			if (plane_id == PLANE_CURSOR) {
-				if (WARN_ON(wm->wm[level].min_ddb_alloc >
-					    total[PLANE_CURSOR])) {
+				if (wm->wm[level].min_ddb_alloc >
+				    total[PLANE_CURSOR]) {
+					WARN_ON(wm->wm[level].min_ddb_alloc !=
+						U16_MAX);
 					blocks = U32_MAX;
 					break;
 				}
-- 
2.21.0.5.gaeb582a

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-16 22:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-16  8:06 [Intel-gfx] [PATCH] drm/i915: Fix WARN_ON condition for cursor plane ddb allocation Vandita Kulkarni
2019-12-16 16:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fix WARN_ON condition for cursor plane ddb allocation (rev2) Patchwork
2019-12-16 18:43 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2019-12-16 21:23 ` [Intel-gfx] [PATCH] drm/i915: Fix WARN_ON condition for cursor plane ddb allocation Ville Syrjälä
  -- strict thread matches above, loose matches on Subject: below --
2019-12-13 15:45 Vandita Kulkarni
2019-12-13 17:03 ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox