OSDN Git Service

drm/i915: Stop loading linear degamma LUT on glk needlessly
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 24 Oct 2022 16:15:14 +0000 (19:15 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 25 Oct 2022 22:38:52 +0000 (01:38 +0300)
commit0701c285087d79b44546e04dd13b9056443571a3
tree9222892ded6c123175e0d44e823a354f3861b64f
parent48205f42ae9bad5783e3cee780ce1a670f5b0f83
drm/i915: Stop loading linear degamma LUT on glk needlessly

Make glk_load_luts() a bit lighter for the common case
where neither the degamma LUT nor pipe CSC are enabled
by not loading the linear degamma LUT. Making .load_luts()
as lightweight as possible is a good idea since it may need
to execute from a vblank worker under tight deadlines.

My earlier reasoning for always loading the linear degamma LUT
was to avoid an extra LUT load when just enabling/disabling the
pipe CSC, but that is nonsense since we load the LUTs on every
flagged color management change/modeset anyway (either of which
is needed for a pipe CSC toggle).

We can also get rid of the glk_can_preload_luts() special
case since the presence of the degamma LUT will now always
match csc_enable.

v2: Fix typos (Uma)

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/20221024161514.5340-6-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_color.c