drm/i915: Extract out gamma table and CSC to their own file
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 16 Mar 2016 10:57:14 +0000 (10:57 +0000)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 21 Mar 2016 18:39:08 +0000 (11:39 -0700)
commit8563b1e8ef88c8bdb824ab1c00ebb7d66308fef0
tree90ef6e9d589530e1d590bb4928e2a9e573efc4bb
parent2e85ab4fed5762f86ae12c0347e64b89412191ca
drm/i915: Extract out gamma table and CSC to their own file

The moves a couple of functions programming the gamma LUT and CSC
units into their own file.

On generations prior to Haswell there is only a gamma LUT. From
haswell on there is also a new enhanced color correction unit that
isn't used yet. This is why we need to set the GAMMA_MODE register,
either we're using the legacy 8bits LUT or enhanced LUTs (of 10 or
12bits).

The CSC unit is only available from Haswell on.

We also need to make a special case for CherryView which is recognized
as a gen 8 but doesn't have the same enhanced color correction unit
from Haswell on.

v2: Fix access to GAMMA_MODE register on older generations than
    Haswell (from Matt Roper's comments)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1458125837-2576-2-git-send-email-lionel.g.landwerlin@intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_color.c [new file with mode: 0644]
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h