aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0770-drm-amdgpu-add-DC-feature-mask-module-parameter.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0770-drm-amdgpu-add-DC-feature-mask-module-parameter.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0770-drm-amdgpu-add-DC-feature-mask-module-parameter.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0770-drm-amdgpu-add-DC-feature-mask-module-parameter.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0770-drm-amdgpu-add-DC-feature-mask-module-parameter.patch
new file mode 100644
index 00000000..cde5f400
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0770-drm-amdgpu-add-DC-feature-mask-module-parameter.patch
@@ -0,0 +1,75 @@
+From 81e798c13ab3999341c2cd8cf61027ad2cbef7f2 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 6 Nov 2018 14:44:29 -0500
+Subject: [PATCH 0770/2940] drm/amdgpu: add DC feature mask module parameter
+
+Similar to ppfeaturemask. Allows you to selectively enable/disable
+DC features.
+
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++++++++++
+ drivers/gpu/drm/amd/include/amd_shared.h | 4 ++++
+ 3 files changed, 16 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+index 1e232eb46eb5..ae419c8bdc8d 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -156,6 +156,7 @@ extern int amdgpu_compute_multipipe;
+ extern int amdgpu_gpu_recovery;
+ extern int amdgpu_emu_mode;
+ extern uint amdgpu_smu_memory_pool_size;
++extern uint amdgpu_dc_feature_mask;
+ extern struct amdgpu_mgpu_info mgpu_info;
+
+ #ifdef CONFIG_DRM_AMDGPU_SI
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+index 3773c7c55729..0a7bffdb7f56 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+@@ -132,6 +132,9 @@ int amdgpu_compute_multipipe = -1;
+ int amdgpu_gpu_recovery = -1; /* auto */
+ int amdgpu_emu_mode = 0;
+ uint amdgpu_smu_memory_pool_size = 0;
++/* FBC (bit 0) disabled by default*/
++uint amdgpu_dc_feature_mask = 0;
++
+ struct amdgpu_mgpu_info mgpu_info = {
+ .mutex = __MUTEX_INITIALIZER(mgpu_info.mutex),
+ };
+@@ -547,6 +550,14 @@ MODULE_PARM_DESC(smu_memory_pool_size,
+ "0x1 = 256Mbyte, 0x2 = 512Mbyte, 0x4 = 1 Gbyte, 0x8 = 2GByte");
+ module_param_named(smu_memory_pool_size, amdgpu_smu_memory_pool_size, uint, 0444);
+
++/**
++ * DOC: dcfeaturemask (uint)
++ * Override display features enabled. See enum DC_FEATURE_MASK in drivers/gpu/drm/amd/include/amd_shared.h.
++ * The default is the current set of stable display features.
++ */
++MODULE_PARM_DESC(dcfeaturemask, "all stable DC features enabled (default))");
++module_param_named(dcfeaturemask, amdgpu_dc_feature_mask, uint, 0444);
++
+ static const struct pci_device_id pciidlist[] = {
+ #ifdef CONFIG_DRM_AMDGPU_SI
+ {0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI},
+diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
+index 2083c308007c..470d7b89071a 100644
+--- a/drivers/gpu/drm/amd/include/amd_shared.h
++++ b/drivers/gpu/drm/amd/include/amd_shared.h
+@@ -133,6 +133,10 @@ enum PP_FEATURE_MASK {
+ PP_AVFS_MASK = 0x40000,
+ };
+
++enum DC_FEATURE_MASK {
++ DC_FBC_MASK = 0x1,
++};
++
+ /**
+ * struct amd_ip_funcs - general hooks for managing amdgpu IP Blocks
+ */
+--
+2.17.1
+