All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: Avoid divide by zero
@ 2025-08-20 13:29 Juha-Pekka Heikkila
  2025-08-20 19:02 ` ✓ CI.KUnit: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Juha-Pekka Heikkila @ 2025-08-20 13:29 UTC (permalink / raw)
  To: intel-gfx, intel-xe; +Cc: Juha-Pekka Heikkila

skl_crtc_allocate_plane_ddb allow iter.data_rate to be zero
which could cause divide by zero in skl_allocate_plane_ddb,
check against that.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 drivers/gpu/drm/i915/display/skl_watermark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index def5150231a4..403783504ab3 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -1388,7 +1388,7 @@ skl_allocate_plane_ddb(struct skl_plane_ddb_iter *iter,
 {
 	u16 size, extra = 0;
 
-	if (data_rate) {
+	if (data_rate && iter->data_rate) {
 		extra = min_t(u16, iter->size,
 			      DIV64_U64_ROUND_UP(iter->size * data_rate,
 						 iter->data_rate));
-- 
2.43.0


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

end of thread, other threads:[~2025-08-26  9:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 13:29 [PATCH] drm/i915/display: Avoid divide by zero Juha-Pekka Heikkila
2025-08-20 19:02 ` ✓ CI.KUnit: success for " Patchwork
2025-08-20 20:04 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-08-21  4:19 ` [PATCH] " Kandpal, Suraj
2025-08-21  8:01 ` ✓ i915.CI.BAT: success for " Patchwork
2025-08-21  9:55 ` ✗ i915.CI.Full: failure " Patchwork
2025-08-21 13:05 ` [PATCH] " Ville Syrjälä
2025-08-26  9:21   ` Juha-Pekka Heikkilä
2025-08-21 19:24 ` ✗ Xe.CI.Full: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.