drm/i915: Standardize auto-increment LUT load procedure
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 23 Nov 2022 15:26:30 +0000 (17:26 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 13 Dec 2022 03:14:18 +0000 (05:14 +0200)
commit26886082fbba1c438f88b1efed2f4dfd5612fefc
treee4f27d299c762d4885f03b8f6301130be008e456
parentbb0409f40ffab331f660a742c59953f5ae7698a0
drm/i915: Standardize auto-increment LUT load procedure

Various gamma units on various platforms have some problems loading
the LUT index and auto-increment bit at the same time. We have to
do this in two steps. The first known case was the glk degamma LUT,
but at least ADL has another known case.

We're not going to suffer too badly from a couple of extra register
writes here, so let's just standardize on this practice for all
auto-increment LUT loads/reads. This way we never have to worry about
this specific issue again. And for good measure always reset the
index back to zero at the end (we already did this in a few places).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221123152638.20622-6-ville.syrjala@linux.intel.com
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
drivers/gpu/drm/i915/display/intel_color.c