]> Git Repo - linux.git/commitdiff
drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack()
authorVille Syrjälä <[email protected]>
Fri, 13 Oct 2023 13:14:01 +0000 (16:14 +0300)
committerVille Syrjälä <[email protected]>
Thu, 23 Nov 2023 13:11:47 +0000 (15:11 +0200)
Use min() instead of clamp() since the color values
involved are unsigned. No functional changes.

Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Chaitanya Kumar Borah <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
drivers/gpu/drm/i915/display/intel_color.c

index 1e734e9329170b8a5293c12cc38f5ff4ef89c763..91f92844e213414de323aa0af425c112fbaa4d22 100644 (file)
@@ -909,7 +909,7 @@ static void i965_lut_10p6_pack(struct drm_color_lut *entry, u32 ldw, u32 udw)
 static u16 i965_lut_11p6_max_pack(u32 val)
 {
        /* PIPEGCMAX is 11.6, clamp to 10.6 */
-       return clamp_val(val, 0, 0xffff);
+       return min(val, 0xffffu);
 }
 
 static u32 ilk_lut_10(const struct drm_color_lut *color)
This page took 0.062647 seconds and 4 git commands to generate.