]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Clamp linetime wm to <64usec
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 25 Jun 2020 20:00:03 +0000 (23:00 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 29 Jun 2020 16:05:07 +0000 (19:05 +0300)
commitf4734a5077c40919532bac171d4db6cd38778ac0
treecc30a7098b80a09ec233526d949cbc7bc0e800c9
parenta9ea6ef0fad073de85b58c526d1409c2765794bc
drm/i915: Clamp linetime wm to <64usec

The linetime watermark is a 9 bit value, which gives us
a maximum linetime of just below 64 usec. If the linetime
exceeds that value we currently just discard the high bits
and program the rest into the register, which angers the
state checker.

To avoid that let's just clamp the value to the max. I believe
it should be perfectly fine to program a smaller linetime wm
than strictly required, just means the hardware may fetch data
sooner than strictly needed. We are further reassured by the
fact that with DRRS the spec tells us to program the smaller
of the two linetimes corresponding to the two refresh rates.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200625200003.12436-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_display.c