Skip to content

Commit 777c1e0

Browse files
committed
Merge tag 'amd-drm-fixes-6.2-2023-02-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.2-2023-02-09: amdgpu: - Add a parameter to disable S/G display - Re-enable S/G display on all DCNs Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 0ed9041 + e7d6364 commit 777c1e0

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ extern int amdgpu_num_kcq;
243243

244244
#define AMDGPU_VCNFW_LOG_SIZE (32 * 1024)
245245
extern int amdgpu_vcnfw_log;
246+
extern int amdgpu_sg_display;
246247

247248
#define AMDGPU_VM_MAX_NUM_CTX 4096
248249
#define AMDGPU_SG_THRESHOLD (256*1024*1024)

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ int amdgpu_num_kcq = -1;
186186
int amdgpu_smartshift_bias;
187187
int amdgpu_use_xgmi_p2p = 1;
188188
int amdgpu_vcnfw_log;
189+
int amdgpu_sg_display = -1; /* auto */
189190

190191
static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work);
191192

@@ -931,6 +932,16 @@ module_param_named(num_kcq, amdgpu_num_kcq, int, 0444);
931932
MODULE_PARM_DESC(vcnfw_log, "Enable vcnfw log(0 = disable (default value), 1 = enable)");
932933
module_param_named(vcnfw_log, amdgpu_vcnfw_log, int, 0444);
933934

935+
/**
936+
* DOC: sg_display (int)
937+
* Disable S/G (scatter/gather) display (i.e., display from system memory).
938+
* This option is only relevant on APUs. Set this option to 0 to disable
939+
* S/G display if you experience flickering or other issues under memory
940+
* pressure and report the issue.
941+
*/
942+
MODULE_PARM_DESC(sg_display, "S/G Display (-1 = auto (default), 0 = disable)");
943+
module_param_named(sg_display, amdgpu_sg_display, int, 0444);
944+
934945
/**
935946
* DOC: smu_pptable_id (int)
936947
* Used to override pptable id. id = 0 use VBIOS pptable.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,8 +1513,12 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
15131513
(adev->apu_flags & AMD_APU_IS_PICASSO))
15141514
init_data.flags.gpu_vm_support = true;
15151515
break;
1516+
case IP_VERSION(2, 1, 0):
15161517
case IP_VERSION(3, 0, 1):
1518+
case IP_VERSION(3, 1, 2):
1519+
case IP_VERSION(3, 1, 3):
15171520
case IP_VERSION(3, 1, 4):
1521+
case IP_VERSION(3, 1, 5):
15181522
case IP_VERSION(3, 1, 6):
15191523
init_data.flags.gpu_vm_support = true;
15201524
break;
@@ -1523,6 +1527,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
15231527
}
15241528
break;
15251529
}
1530+
if (init_data.flags.gpu_vm_support &&
1531+
(amdgpu_sg_display == 0))
1532+
init_data.flags.gpu_vm_support = false;
15261533

15271534
if (init_data.flags.gpu_vm_support)
15281535
adev->mode_info.gpu_vm_support = true;

0 commit comments

Comments
 (0)