@@ -187,7 +187,6 @@ int amdgpu_mes_kiq;
187187int amdgpu_noretry = -1 ;
188188int amdgpu_force_asic_type = -1 ;
189189int amdgpu_tmz = -1 ; /* auto */
190- uint amdgpu_freesync_vid_mode ;
191190int amdgpu_reset_method = -1 ; /* auto */
192191int amdgpu_num_kcq = -1 ;
193192int amdgpu_smartshift_bias ;
@@ -348,8 +347,9 @@ module_param_named(aspm, amdgpu_aspm, int, 0444);
348347 * Override for runtime power management control for dGPUs. The amdgpu driver can dynamically power down
349348 * the dGPUs when they are idle if supported. The default is -1 (auto enable).
350349 * Setting the value to 0 disables this functionality.
350+ * Setting the value to -2 is auto enabled with power down when displays are attached.
351351 */
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 )" );
353353module_param_named (runpm , amdgpu_runtime_pm , int , 0444 );
354354
355355/**
@@ -871,32 +871,6 @@ module_param_named(backlight, amdgpu_backlight, bint, 0444);
871871MODULE_PARM_DESC (tmz , "Enable TMZ feature (-1 = auto (default), 0 = off, 1 = on)" );
872872module_param_named (tmz , amdgpu_tmz , int , 0444 );
873873
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-
900874/**
901875 * DOC: reset_method (int)
902876 * 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)
25232497 struct drm_connector_list_iter iter ;
25242498 int ret = 0 ;
25252499
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+ }
25372513 }
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 );
25412516
2542- if (ret )
2543- return ret ;
2517+ if (ret )
2518+ return ret ;
2519+ }
25442520
25452521 if (adev -> dc_enabled ) {
25462522 struct drm_crtc * crtc ;
0 commit comments