Skip to content

Commit 5d76c81

Browse files
committed
drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack()
Use min() instead of clamp() since the color values involved are unsigned. No functional changes. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231013131402.24072-4-ville.syrjala@linux.intel.com Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
1 parent edc2b74 commit 5d76c81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/i915/display/intel_color.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ static void i965_lut_10p6_pack(struct drm_color_lut *entry, u32 ldw, u32 udw)
909909
static u16 i965_lut_11p6_max_pack(u32 val)
910910
{
911911
/* PIPEGCMAX is 11.6, clamp to 10.6 */
912-
return clamp_val(val, 0, 0xffff);
912+
return min(val, 0xffffu);
913913
}
914914

915915
static u32 ilk_lut_10(const struct drm_color_lut *color)

0 commit comments

Comments
 (0)