diff --git a/Documentation/devicetree/bindings/display/msm/sde.txt b/Documentation/devicetree/bindings/display/msm/sde.txt index 7e96a05440e9..c9e7d7423d7f 100644 --- a/Documentation/devicetree/bindings/display/msm/sde.txt +++ b/Documentation/devicetree/bindings/display/msm/sde.txt @@ -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 diff --git a/arch/arm/boot/dts/qcom/msm8996-sde.dtsi b/arch/arm/boot/dts/qcom/msm8996-sde.dtsi index d59c8471418f..8aebac3b0e22 100644 --- a/arch/arm/boot/dts/qcom/msm8996-sde.dtsi +++ b/arch/arm/boot/dts/qcom/msm8996-sde.dtsi @@ -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>; diff --git a/drivers/gpu/drm/msm/sde/sde_hw_catalog.c b/drivers/gpu/drm/msm/sde/sde_hw_catalog.c index 1420ad67b28c..31a6d985c38f 100644 --- a/drivers/gpu/drm/msm/sde/sde_hw_catalog.c +++ b/drivers/gpu/drm/msm/sde/sde_hw_catalog.c @@ -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; - set_bit(SDE_SSPP_CSC, &sspp->features); - sblk->csc_blk.base = PROP_VALUE_ACCESS(prop_value, VIG_CSC_OFF, 0); + 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); + } 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); diff --git a/drivers/gpu/drm/msm/sde/sde_hw_catalog.h b/drivers/gpu/drm/msm/sde/sde_hw_catalog.h index f504aa25515a..a8f9169aaf35 100644 --- a/drivers/gpu/drm/msm/sde/sde_hw_catalog.h +++ b/drivers/gpu/drm/msm/sde/sde_hw_catalog.h @@ -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;