]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Shuffle chv_cgm_gamma_pack() around a bit
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 25 Sep 2020 13:16:53 +0000 (16:16 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 28 Sep 2020 15:09:44 +0000 (18:09 +0300)
Move chv_cgm_gamma_pack() next to the other CGM gamma functions.
Right now it's stuck in the middle of the CGM degamma functions.

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

index 37a4fede7bc062a114309d71d47506a6e2b3b8d1..260bbbd5bbf2a63d088c008f9e52f9791f45931d 100644 (file)
@@ -1030,13 +1030,6 @@ static u32 chv_cgm_degamma_udw(const struct drm_color_lut *color)
        return drm_color_lut_extract(color->red, 14);
 }
 
-static void chv_cgm_gamma_pack(struct drm_color_lut *entry, u32 ldw, u32 udw)
-{
-       entry->green = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_GREEN_MASK, ldw), 10);
-       entry->blue = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_BLUE_MASK, ldw), 10);
-       entry->red = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_RED_MASK, udw), 10);
-}
-
 static void chv_load_cgm_degamma(struct intel_crtc *crtc,
                                 const struct drm_property_blob *blob)
 {
@@ -1064,6 +1057,13 @@ static u32 chv_cgm_gamma_udw(const struct drm_color_lut *color)
        return drm_color_lut_extract(color->red, 10);
 }
 
+static void chv_cgm_gamma_pack(struct drm_color_lut *entry, u32 ldw, u32 udw)
+{
+       entry->green = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_GREEN_MASK, ldw), 10);
+       entry->blue = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_BLUE_MASK, ldw), 10);
+       entry->red = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_RED_MASK, udw), 10);
+}
+
 static void chv_load_cgm_gamma(struct intel_crtc *crtc,
                               const struct drm_property_blob *blob)
 {