summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYuchou Gan <yuchou.gan@nxp.com>2017-12-12 00:24:13 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commita1e546fa0c9435ba1072079580e5da4abb264dbc (patch)
tree7cf90acbba12c048ce6d8aa28688fe83ea484d6f /drivers
parentf14c78de846ae923635ced923a6c70f8d303da62 (diff)
MGS-2914 [#imx-587] [8QM/qxp] Disable depth compression only for 8QM
Disable the depth compression on device tree for 8qm/8qxp/mscale when the ddr4 is enabled. Date: Dec 11, 2017 Signed-off-by Yuchou Gan yuchou.gan@nxp.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c2
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
index 05474e78553d..b96e26068ef6 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
@@ -915,7 +915,7 @@ static int gpu_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
memcpy(moduleParam.registerBases, registerBases, gcmSIZEOF(gctUINT) * gcvCORE_COUNT);
memcpy(moduleParam.registerSizes, registerSizes, gcmSIZEOF(gctUINT) * gcvCORE_COUNT);
memcpy(moduleParam.chipIDs, chipIDs, gcmSIZEOF(gctUINT) * gcvCORE_COUNT);
- moduleParam.compression = (compression == -1) ? gcvCOMPRESSION_OPTION_DEFAULT : (gceCOMPRESSION_OPTION)compression;
+ moduleParam.compression = compression;
platform->device = pdev;
#if USE_LINUX_PCIE
if (pci_enable_device(pdev)) {
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c
index 9869fc1e4ba3..b9b7633e90d6 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c
@@ -857,6 +857,18 @@ static int patch_param(struct platform_device *pdev,
#endif
patch_param_imx6(pdev, args);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+ if(args->compression == -1)
+ {
+ const u32 *property;
+ args->compression = gcvCOMPRESSION_OPTION_DEFAULT;
+ property = of_get_property(pdev->dev.of_node, "depth-compression", NULL);
+ if (property && *property == 0)
+ {
+ args->compression &= ~gcvCOMPRESSION_OPTION_DEPTH;
+ }
+ }
+#endif
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phys_baseaddr");
if (res && !args->baseAddress && !args->physSize) {