]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm: Inline drm_color_lut_extract()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 8 Nov 2019 13:56:54 +0000 (15:56 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 29 Nov 2019 19:29:17 +0000 (21:29 +0200)
commit65b2f7c43c6f087784db309e8a75bae3d2266520
treeaba0d0936f2fca09745b8642a7260da083d1e095
parent2c81bdc8024ef6f81dfecab86bcb97a8694dcd1e
drm: Inline drm_color_lut_extract()

This thing can get called several thousand times per LUT
so seems like we want to inline it to:
- avoid the function call overhead
- allow constant folding

A quick synthetic test (w/o any hardware interaction) with
a ridiculously large LUT size shows about 50% reduction in
runtime on my HSW and BSW boxes. Slightly less with more
reasonable LUT size but still easily measurable in tens
of microseconds.

v2: Include drm_color_mgmt.h in the .rst (Daniel)

Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191108135654.12907-1-ville.syrjala@linux.intel.com
Documentation/gpu/drm-kms.rst
drivers/gpu/drm/drm_color_mgmt.c
include/drm/drm_color_mgmt.h