Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc32cdff authored by Narender Ankam's avatar Narender Ankam
Browse files

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 are 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: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: default avatarChirag Khurana <ckhurana@codeaurora.org>
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
parent d02c1474
Loading
Loading
Loading
Loading
+37 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -186,6 +186,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,},
	},
};

/**
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -396,6 +396,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
};