On Fri, Sep 05, 2025 at 01:46:26PM +0300, Juha-Pekka Heikkila wrote: > 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.
As I said I don't think the div-by-zero is really possible. So should say here that this is just to shut up some static analysis noise. > > Signed-off-by: Juha-Pekka Heikkila <[email protected]> > Reviewed-by: Suraj Kandpal <[email protected]> > --- > 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 33885d619a97..bfcd700b95e4 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 -- Ville Syrjälä Intel
