]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix Limited Range Color Handling
authorJohnson Lin <johnson.lin@intel.com>
Tue, 30 Jan 2018 15:51:29 +0000 (21:21 +0530)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Feb 2018 15:38:30 +0000 (17:38 +0200)
commitb0d6f5feba18b9bc3c93a15f6d2330a3010277bd
treeced63999a272e1d85e9b4947eec610f7deba88f3
parentcada8a34930e2c54275f4d73399dc6158fcd72d9
drm/i915: Fix Limited Range Color Handling

Some panels support limited range output (16-235) compared
to full range RGB values (0-255). Also userspace can control
the RGB range using "Broadcast RGB" property. Currently the
code to handle full range to limited range is broken. This
patch fixes the same by properly scaling down all the full
range co-efficients with limited range scaling factor.

v2: Fixed Ville's review comments.

v3: Changed input to const and used correct data types as
    suggested by Ville

v4: Fixed some missing data type corrections.

Signed-off-by: Johnson Lin <johnson.lin@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1517327489-26128-1-git-send-email-uma.shankar@intel.com
drivers/gpu/drm/i915/intel_color.c