drm/msm/sde: parse csc type dtsi entry to select valid csc

msm8998 supports 10bit csc while msm8996 supports csc only.
This patch adds the dtsi entry to select the correct csc
type while parsing hardware catalog to configure the
valid csc hardware block.

Change-Id: I376f1e485a5de4a95d03e395e06d10b043036cb0
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel 2017-01-12 09:59:31 -08:00
parent 58ec3c6b05
commit c58bfaf5bb
4 changed files with 27 additions and 6 deletions

View file

@ -102,10 +102,13 @@ Optional properties:
- qcom,sde-sspp-scale-size: A u32 value indicates the scaling block size on sspp.
- qcom,sde-mixer-blendstages: A u32 value indicates the max mixer blend stages for
alpha blending.
- qcom,sde-qseed-type: A string entry indiates qseed support on sspp and wb.
- qcom,sde-qseed-type: A string entry indicates qseed support on sspp and wb.
It supports "qssedv3" and "qseedv2" entries for qseed
type. By default "qseedv2" is used if this optional property
is not defined.
- qcom,sde-csc-type: A string entry indicates csc support on sspp and wb.
It supports "csc" and "csc-10bit" entries for csc
type.
- qcom,sde-highest-bank-bit: A u32 property to indicate GPU/Camera/Video highest memory
bank bit used for tile format buffers.
- qcom,sde-panic-per-pipe: Boolean property to indicate if panic signal

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2017, 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
@ -96,6 +96,7 @@
<0x2c4 4>, <0x2ac 8>, <0x2b4 8>, <0x3a8 16>,
<0x3b0 16>;
qcom,sde-qseed-type = "qseedv2";
qcom,sde-csc-type = "csc";
qcom,sde-mixer-linewidth = <2560>;
qcom,sde-sspp-linewidth = <2560>;
qcom,sde-mixer-blendstages = <0x7>;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, 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
@ -101,6 +101,7 @@ enum sde_prop {
WB_LINEWIDTH,
BANK_BIT,
QSEED_TYPE,
CSC_TYPE,
PANIC_PER_PIPE,
CDP,
SRC_SPLIT,
@ -268,6 +269,7 @@ static struct sde_prop_type sde_prop[] = {
{WB_LINEWIDTH, "qcom,sde-wb-linewidth", false, PROP_TYPE_U32},
{BANK_BIT, "qcom,sde-highest-bank-bit", false, PROP_TYPE_U32},
{QSEED_TYPE, "qcom,sde-qseed-type", false, PROP_TYPE_STRING},
{CSC_TYPE, "qcom,sde-csc-type", false, PROP_TYPE_STRING},
{PANIC_PER_PIPE, "qcom,sde-panic-per-pipe", false, PROP_TYPE_BOOL},
{CDP, "qcom,sde-has-cdp", false, PROP_TYPE_BOOL},
{SRC_SPLIT, "qcom,sde-has-src-split", false, PROP_TYPE_BOOL},
@ -674,8 +676,15 @@ static void _sde_sspp_setup_vig(struct sde_mdss_cfg *sde_cfg,
}
sblk->csc_blk.id = SDE_SSPP_CSC;
if (sde_cfg->csc_type == SDE_SSPP_CSC) {
set_bit(SDE_SSPP_CSC, &sspp->features);
sblk->csc_blk.base = PROP_VALUE_ACCESS(prop_value, VIG_CSC_OFF, 0);
sblk->csc_blk.base = PROP_VALUE_ACCESS(prop_value,
VIG_CSC_OFF, 0);
} else if (sde_cfg->csc_type == SDE_SSPP_CSC_10BIT) {
set_bit(SDE_SSPP_CSC_10BIT, &sspp->features);
sblk->csc_blk.base = PROP_VALUE_ACCESS(prop_value,
VIG_CSC_OFF, 0);
}
sblk->hsic_blk.id = SDE_SSPP_HSIC;
if (prop_exists[VIG_HSIC_PROP]) {
@ -1822,6 +1831,12 @@ static int sde_parse_dt(struct device_node *np, struct sde_mdss_cfg *cfg)
else if (!rc && !strcmp(type, "qseedv2"))
cfg->qseed_type = SDE_SSPP_SCALER_QSEED2;
rc = of_property_read_string(np, sde_prop[CSC_TYPE].prop_name, &type);
if (!rc && !strcmp(type, "csc"))
cfg->csc_type = SDE_SSPP_CSC;
else if (!rc && !strcmp(type, "csc-10bit"))
cfg->csc_type = SDE_SSPP_CSC_10BIT;
cfg->has_src_split = PROP_VALUE_ACCESS(prop_value, SRC_SPLIT, 0);
end:
kfree(prop_value);

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, 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
@ -620,6 +620,7 @@ struct sde_perf_cfg {
* @max_wb_linewidth max writeback line width support.
* @highest_bank_bit highest memory bit setting for tile buffers.
* @qseed_type qseed2 or qseed3 support.
* @csc_type csc or csc_10bit support.
* @has_src_split source split feature status
* @has_cdp Client driver prefetch feature status
*/
@ -632,6 +633,7 @@ struct sde_mdss_cfg {
u32 max_wb_linewidth;
u32 highest_bank_bit;
u32 qseed_type;
u32 csc_type;
bool has_src_split;
bool has_cdp;