drm: mali-dp: enable gamma support
authorMihail Atanassov <mihail.atanassov@arm.com>
Wed, 1 Feb 2017 14:48:50 +0000 (14:48 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 24 Apr 2017 09:45:34 +0000 (10:45 +0100)
commit02725d31371b66b97bc58b2a81f0c6dc40970598
treed9fca8bbd977ed6b7c368e394cd0910756e62e11
parent99665d07218345647875fea9ad4979bbe297c104
drm: mali-dp: enable gamma support

Add gamma via the DRM GAMMA_LUT/GAMMA_LUT_SIZE CRTC
properties. The expected LUT size is 4096 in order
to produce as accurate a set of segments as possible.

This version uses only the green channel's gamma curve
to set the hardware curve on DP550/650. For the sake of
simplicity, it uses the same table of coefficients for
all 3 curves on DP500.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/malidp_crtc.c
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/arm/malidp_drv.h
drivers/gpu/drm/arm/malidp_hw.c
drivers/gpu/drm/arm/malidp_hw.h
drivers/gpu/drm/arm/malidp_regs.h