drn/msm/sde: add BT709, BT2020 CSC matrix definitions

Currently only BT601 CSC matrix is available for use
in the SDE driver.

Add BT709, BT2020 CSC matrix definitions to SDE driver.
These shall be used during different use-cases such as
HDR video playback by switching the CSC matrix based on the
use-case.

Change-Id: I70a543193d08217cbdb6c4af739b3777dde4a25d
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This commit is contained in:
Abhinav Kumar 2017-07-26 23:11:54 -07:00 committed by Gerrit - the friendly Code Review server
parent 7c79cabfdf
commit 5e05fc53d8
2 changed files with 39 additions and 0 deletions

View file

@ -80,6 +80,42 @@ static struct sde_csc_cfg sde_csc_10bit_convert[SDE_MAX_CSC] = {
{ 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
{ 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
},
[SDE_CSC_RGB2YUV_709L] = {
{
TO_S15D16(0x005d), TO_S15D16(0x013a), TO_S15D16(0x0020),
TO_S15D16(0xffcc), TO_S15D16(0xff53), TO_S15D16(0x00e1),
TO_S15D16(0x00e1), TO_S15D16(0xff34), TO_S15D16(0xffeb),
},
{ 0x0, 0x0, 0x0,},
{ 0x0040, 0x0200, 0x0200,},
{ 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
{ 0x0040, 0x03ac, 0x0040, 0x03c0, 0x0040, 0x03c0,},
},
[SDE_CSC_RGB2YUV_2020L] = {
{
TO_S15D16(0x0073), TO_S15D16(0x0129), TO_S15D16(0x001a),
TO_S15D16(0xffc1), TO_S15D16(0xff5e), TO_S15D16(0x00e0),
TO_S15D16(0x00e0), TO_S15D16(0xff32), TO_S15D16(0xffee),
},
{ 0x0, 0x0, 0x0,},
{ 0x0040, 0x0200, 0x0200,},
{ 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
{ 0x0040, 0x03ac, 0x0040, 0x03c0, 0x0040, 0x03c0,},
},
[SDE_CSC_RGB2YUV_2020FR] = {
{
TO_S15D16(0x0086), TO_S15D16(0x015b), TO_S15D16(0x001e),
TO_S15D16(0xffb9), TO_S15D16(0xff47), TO_S15D16(0x0100),
TO_S15D16(0x0100), TO_S15D16(0xff15), TO_S15D16(0xffeb),
},
{ 0x0, 0x0, 0x0,},
{ 0x0, 0x0200, 0x0200,},
{ 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
{ 0x0, 0x3ff, 0x0, 0x3ff, 0x0, 0x3ff,},
},
};
/**

View file

@ -344,6 +344,9 @@ enum sde_3d_blend_mode {
enum sde_csc_type {
SDE_CSC_RGB2YUV_601L,
SDE_CSC_RGB2YUV_601FR,
SDE_CSC_RGB2YUV_709L,
SDE_CSC_RGB2YUV_2020L,
SDE_CSC_RGB2YUV_2020FR,
SDE_MAX_CSC
};