> -----Original Message----- > From: Intel-gfx <[email protected]> On Behalf Of Ville > Syrjala > Sent: Wednesday, October 8, 2025 11:56 PM > To: [email protected] > Cc: [email protected] > Subject: [RFC][PATCH 01/11] drm/i915: Reject modes with linetime > 64 usec > > From: Ville Syrjälä <[email protected]> > > Reject modes whose linetime exceeds 64 usec. > > First reason being that WM_LINETIME is limited to (nearly) 64 usec. > > Additionally knowing the linetime is bounded will help with determining > whether > overflows may be a concern during various calculations. > > I decided to round up, and accept the linetime==64 case. We use various > rounding > directions for this in other parts of the code, so I feel this provides the > most > consistent result all around.
Yeah, this seems fair given max can go upto only 63.875. Good to reject mode. Reviewed-by: Uma Shankar <[email protected]> > Signed-off-by: Ville Syrjälä <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > b/drivers/gpu/drm/i915/display/intel_display.c > index b57efd870774..afa78774eaeb 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -7967,6 +7967,14 @@ enum drm_mode_status intel_mode_valid(struct > drm_device *dev, > mode->vtotal > vtotal_max) > return MODE_V_ILLEGAL; > > + /* > + * WM_LINETIME only goes up to (almost) 64 usec, and also > + * knowing that the linetime is always bounded will ease the > + * mind during various calculations. > + */ > + if (DIV_ROUND_UP(mode->htotal * 1000, mode->clock) > 64) > + return MODE_H_ILLEGAL; > + > return MODE_OK; > } > > -- > 2.49.1
