Skip to content

Commit 7875a22

Browse files
committed
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>
1 parent 689e7b3 commit 7875a22

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ extern int amdgpu_compute_multipipe;
151151
extern int amdgpu_gpu_recovery;
152152
extern int amdgpu_emu_mode;
153153
extern uint amdgpu_smu_memory_pool_size;
154+
extern uint amdgpu_dc_feature_mask;
154155
extern struct amdgpu_mgpu_info mgpu_info;
155156

156157
#ifdef CONFIG_DRM_AMDGPU_SI

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ int amdgpu_compute_multipipe = -1;
127127
int amdgpu_gpu_recovery = -1; /* auto */
128128
int amdgpu_emu_mode = 0;
129129
uint amdgpu_smu_memory_pool_size = 0;
130+
/* FBC (bit 0) disabled by default*/
131+
uint amdgpu_dc_feature_mask = 0;
132+
130133
struct amdgpu_mgpu_info mgpu_info = {
131134
.mutex = __MUTEX_INITIALIZER(mgpu_info.mutex),
132135
};
@@ -631,6 +634,14 @@ module_param(halt_if_hws_hang, int, 0644);
631634
MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (default), 1 = on)");
632635
#endif
633636

637+
/**
638+
* DOC: dcfeaturemask (uint)
639+
* Override display features enabled. See enum DC_FEATURE_MASK in drivers/gpu/drm/amd/include/amd_shared.h.
640+
* The default is the current set of stable display features.
641+
*/
642+
MODULE_PARM_DESC(dcfeaturemask, "all stable DC features enabled (default))");
643+
module_param_named(dcfeaturemask, amdgpu_dc_feature_mask, uint, 0444);
644+
634645
static const struct pci_device_id pciidlist[] = {
635646
#ifdef CONFIG_DRM_AMDGPU_SI
636647
{0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI},

drivers/gpu/drm/amd/include/amd_shared.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ enum PP_FEATURE_MASK {
133133
PP_AVFS_MASK = 0x40000,
134134
};
135135

136+
enum DC_FEATURE_MASK {
137+
DC_FBC_MASK = 0x1,
138+
};
139+
136140
/**
137141
* struct amd_ip_funcs - general hooks for managing amdgpu IP Blocks
138142
*/

0 commit comments

Comments
 (0)