@@ -187,7 +187,6 @@ int amdgpu_mes_kiq;
187
187
int amdgpu_noretry = -1 ;
188
188
int amdgpu_force_asic_type = -1 ;
189
189
int amdgpu_tmz = -1 ; /* auto */
190
- uint amdgpu_freesync_vid_mode ;
191
190
int amdgpu_reset_method = -1 ; /* auto */
192
191
int amdgpu_num_kcq = -1 ;
193
192
int amdgpu_smartshift_bias ;
@@ -348,8 +347,9 @@ module_param_named(aspm, amdgpu_aspm, int, 0444);
348
347
* Override for runtime power management control for dGPUs. The amdgpu driver can dynamically power down
349
348
* the dGPUs when they are idle if supported. The default is -1 (auto enable).
350
349
* Setting the value to 0 disables this functionality.
350
+ * Setting the value to -2 is auto enabled with power down when displays are attached.
351
351
*/
352
- MODULE_PARM_DESC (runpm , "PX runtime pm (2 = force enable with BAMACO, 1 = force enable with BACO, 0 = disable, -1 = auto)" );
352
+ MODULE_PARM_DESC (runpm , "PX runtime pm (2 = force enable with BAMACO, 1 = force enable with BACO, 0 = disable, -1 = auto, -2 = autowith displays )" );
353
353
module_param_named (runpm , amdgpu_runtime_pm , int , 0444 );
354
354
355
355
/**
@@ -871,32 +871,6 @@ module_param_named(backlight, amdgpu_backlight, bint, 0444);
871
871
MODULE_PARM_DESC (tmz , "Enable TMZ feature (-1 = auto (default), 0 = off, 1 = on)" );
872
872
module_param_named (tmz , amdgpu_tmz , int , 0444 );
873
873
874
- /**
875
- * DOC: freesync_video (uint)
876
- * Enable the optimization to adjust front porch timing to achieve seamless
877
- * mode change experience when setting a freesync supported mode for which full
878
- * modeset is not needed.
879
- *
880
- * The Display Core will add a set of modes derived from the base FreeSync
881
- * video mode into the corresponding connector's mode list based on commonly
882
- * used refresh rates and VRR range of the connected display, when users enable
883
- * this feature. From the userspace perspective, they can see a seamless mode
884
- * change experience when the change between different refresh rates under the
885
- * same resolution. Additionally, userspace applications such as Video playback
886
- * can read this modeset list and change the refresh rate based on the video
887
- * frame rate. Finally, the userspace can also derive an appropriate mode for a
888
- * particular refresh rate based on the FreeSync Mode and add it to the
889
- * connector's mode list.
890
- *
891
- * Note: This is an experimental feature.
892
- *
893
- * The default value: 0 (off).
894
- */
895
- MODULE_PARM_DESC (
896
- freesync_video ,
897
- "Enable freesync modesetting optimization feature (0 = off (default), 1 = on)" );
898
- module_param_named (freesync_video , amdgpu_freesync_vid_mode , uint , 0444 );
899
-
900
874
/**
901
875
* DOC: reset_method (int)
902
876
* GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)
@@ -2523,24 +2497,26 @@ static int amdgpu_runtime_idle_check_display(struct device *dev)
2523
2497
struct drm_connector_list_iter iter ;
2524
2498
int ret = 0 ;
2525
2499
2526
- /* XXX: Return busy if any displays are connected to avoid
2527
- * possible display wakeups after runtime resume due to
2528
- * hotplug events in case any displays were connected while
2529
- * the GPU was in suspend. Remove this once that is fixed.
2530
- */
2531
- mutex_lock (& drm_dev -> mode_config .mutex );
2532
- drm_connector_list_iter_begin (drm_dev , & iter );
2533
- drm_for_each_connector_iter (list_connector , & iter ) {
2534
- if (list_connector -> status == connector_status_connected ) {
2535
- ret = - EBUSY ;
2536
- break ;
2500
+ if (amdgpu_runtime_pm != -2 ) {
2501
+ /* XXX: Return busy if any displays are connected to avoid
2502
+ * possible display wakeups after runtime resume due to
2503
+ * hotplug events in case any displays were connected while
2504
+ * the GPU was in suspend. Remove this once that is fixed.
2505
+ */
2506
+ mutex_lock (& drm_dev -> mode_config .mutex );
2507
+ drm_connector_list_iter_begin (drm_dev , & iter );
2508
+ drm_for_each_connector_iter (list_connector , & iter ) {
2509
+ if (list_connector -> status == connector_status_connected ) {
2510
+ ret = - EBUSY ;
2511
+ break ;
2512
+ }
2537
2513
}
2538
- }
2539
- drm_connector_list_iter_end (& iter );
2540
- mutex_unlock (& drm_dev -> mode_config .mutex );
2514
+ drm_connector_list_iter_end (& iter );
2515
+ mutex_unlock (& drm_dev -> mode_config .mutex );
2541
2516
2542
- if (ret )
2543
- return ret ;
2517
+ if (ret )
2518
+ return ret ;
2519
+ }
2544
2520
2545
2521
if (adev -> dc_enabled ) {
2546
2522
struct drm_crtc * crtc ;
0 commit comments