drm/i915/display: Extract i9xx_read_luts()
authorSwati Sharma <swati2.sharma@intel.com>
Tue, 3 Sep 2019 19:22:55 +0000 (00:52 +0530)
committerJani Nikula <jani.nikula@intel.com>
Wed, 4 Sep 2019 08:55:45 +0000 (11:55 +0300)
commit1af22383829864299102ca0c2eab458f755a9971
treee46acec42d81a750abb9312aa671569b4a9ef281
parent7e764059cf708f262aa3c406af91f9f8f79e7f52
drm/i915/display: Extract i9xx_read_luts()

For the legacy(gen < 4) gamma, add hw read out to create hw blob of gamma
lut values. Also, add function intel_color_lut_pack to convert hw value
with given bit precision to lut property val.

v4:  -No need to initialize *blob [Jani]
     -Removed right shifts [Jani]
     -Dropped dev local var [Jani]
v5:  -Returned blob instead of assigning it internally within the
      function [Ville]
     -Renamed function i9xx_get_color_config() to i9xx_read_luts()
     -Renamed i9xx_get_config_internal() to i9xx_read_lut_8() [Ville]
v9:  -Change in commit message [Jani, Uma]
     -Wrap commit within 75 characters [Uma]
     -Use macro for 256 [Uma]
     -Made read func para as const [Ville, Uma]
v10: -Made i9xx_read_luts() static [Jani]

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-6-git-send-email-swati2.sharma@intel.com
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/i915_reg.h