drm/i915: Add support for the YCbCr COLOR_ENCODING property
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 14 Feb 2018 19:23:25 +0000 (21:23 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 2 Mar 2018 12:46:18 +0000 (14:46 +0200)
commitb0f5c0badc5b54cc6308f21a65f6ebf69087d557
tree4d325a3469b8799bc9be50fa571b580cc8b9db3e
parent38f24f21ae9bb0f2b7ebb42e828f7f8fe5190d89
drm/i915: Add support for the YCbCr COLOR_ENCODING property

Add support for the COLOR_ENCODING plane property which selects
the matrix coefficients used for the YCbCr->RGB conversion. Our
hardware can generally handle BT.601 and BT.709.

CHV pipe B sprites have a fully programmable matrix, so in theory
we could handle anything, but it doesn't seem all that useful to
expose anything beyond BT.601 and BT.709 at this time.

GLK can supposedly do BT.2020, but let's leave enabling that for
the future as well.

v2: Rename bit defines to match the spec more closely (Shashank)

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180214192327.3250-7-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c