Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: Reject modes with linetime > 64 usec

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.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251014191808.12326-3-ville.syrjala@linux.intel.com

+8
+8
drivers/gpu/drm/i915/display/intel_display.c
··· 7978 7978 mode->vtotal > vtotal_max) 7979 7979 return MODE_V_ILLEGAL; 7980 7980 7981 + /* 7982 + * WM_LINETIME only goes up to (almost) 64 usec, and also 7983 + * knowing that the linetime is always bounded will ease the 7984 + * mind during various calculations. 7985 + */ 7986 + if (DIV_ROUND_UP(mode->htotal * 1000, mode->clock) > 64) 7987 + return MODE_H_ILLEGAL; 7988 + 7981 7989 return MODE_OK; 7982 7990 } 7983 7991