Skip to content

Commit 1bc9d39

Browse files
Sakari Ailusalexdeucher
authored andcommitted
drm/radeon: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-redundant explicit call to pm_runtime_mark_last_busy(). Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent ef4a4b8 commit 1bc9d39

6 files changed

Lines changed: 5 additions & 26 deletions

File tree

drivers/gpu/drm/radeon/radeon_acpi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ static int radeon_atif_handler(struct radeon_device *rdev,
408408
pm_runtime_get_sync(rdev_to_drm(rdev)->dev);
409409
/* Just fire off a uevent and let userspace tell us what to do */
410410
drm_helper_hpd_irq_event(rdev_to_drm(rdev));
411-
pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
412411
pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
413412
}
414413
}

drivers/gpu/drm/radeon/radeon_connectors.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,8 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
875875

876876
radeon_connector_update_scratch_regs(connector, ret);
877877

878-
if (!drm_kms_helper_is_poll_worker()) {
879-
pm_runtime_mark_last_busy(connector->dev->dev);
878+
if (!drm_kms_helper_is_poll_worker())
880879
pm_runtime_put_autosuspend(connector->dev->dev);
881-
}
882880

883881
return ret;
884882
}
@@ -1066,10 +1064,8 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
10661064
radeon_connector_update_scratch_regs(connector, ret);
10671065

10681066
out:
1069-
if (!drm_kms_helper_is_poll_worker()) {
1070-
pm_runtime_mark_last_busy(connector->dev->dev);
1067+
if (!drm_kms_helper_is_poll_worker())
10711068
pm_runtime_put_autosuspend(connector->dev->dev);
1072-
}
10731069

10741070
return ret;
10751071
}
@@ -1154,10 +1150,8 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
11541150
ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, false);
11551151
radeon_connector_update_scratch_regs(connector, ret);
11561152

1157-
if (!drm_kms_helper_is_poll_worker()) {
1158-
pm_runtime_mark_last_busy(connector->dev->dev);
1153+
if (!drm_kms_helper_is_poll_worker())
11591154
pm_runtime_put_autosuspend(connector->dev->dev);
1160-
}
11611155

11621156
return ret;
11631157
}
@@ -1402,10 +1396,8 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
14021396
}
14031397

14041398
exit:
1405-
if (!drm_kms_helper_is_poll_worker()) {
1406-
pm_runtime_mark_last_busy(connector->dev->dev);
1399+
if (!drm_kms_helper_is_poll_worker())
14071400
pm_runtime_put_autosuspend(connector->dev->dev);
1408-
}
14091401

14101402
return ret;
14111403
}
@@ -1714,10 +1706,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
17141706
}
17151707

17161708
out:
1717-
if (!drm_kms_helper_is_poll_worker()) {
1718-
pm_runtime_mark_last_busy(connector->dev->dev);
1709+
if (!drm_kms_helper_is_poll_worker())
17191710
pm_runtime_put_autosuspend(connector->dev->dev);
1720-
}
17211711

17221712
return ret;
17231713
}

drivers/gpu/drm/radeon/radeon_display.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,6 @@ radeon_crtc_set_config(struct drm_mode_set *set,
644644
if (crtc->enabled)
645645
active = true;
646646

647-
pm_runtime_mark_last_busy(dev->dev);
648-
649647
rdev = dev->dev_private;
650648
/* if we have active crtcs and we don't have a power ref,
651649
take the current one */

drivers/gpu/drm/radeon/radeon_drv.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ static int radeon_pmops_runtime_idle(struct device *dev)
462462
}
463463
}
464464

465-
pm_runtime_mark_last_busy(dev);
466465
pm_runtime_autosuspend(dev);
467466
/* we don't want the main rpm_idle to call suspend - we want to autosuspend */
468467
return 1;
@@ -484,7 +483,6 @@ long radeon_drm_ioctl(struct file *filp,
484483

485484
ret = drm_ioctl(filp, cmd, arg);
486485

487-
pm_runtime_mark_last_busy(dev->dev);
488486
pm_runtime_put_autosuspend(dev->dev);
489487
return ret;
490488
}

drivers/gpu/drm/radeon/radeon_fbdev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ static int radeon_fbdev_fb_open(struct fb_info *info, int user)
154154
return 0;
155155

156156
err_pm_runtime_mark_last_busy:
157-
pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
158157
pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
159158
return ret;
160159
}
@@ -164,7 +163,6 @@ static int radeon_fbdev_fb_release(struct fb_info *info, int user)
164163
struct drm_fb_helper *fb_helper = info->par;
165164
struct radeon_device *rdev = fb_helper->dev->dev_private;
166165

167-
pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
168166
pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
169167

170168
return 0;

drivers/gpu/drm/radeon/radeon_kms.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
169169
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
170170
pm_runtime_set_active(dev->dev);
171171
pm_runtime_allow(dev->dev);
172-
pm_runtime_mark_last_busy(dev->dev);
173172
pm_runtime_put_autosuspend(dev->dev);
174173
}
175174

@@ -676,7 +675,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
676675
file_priv->driver_priv = fpriv;
677676
}
678677

679-
pm_runtime_mark_last_busy(dev->dev);
680678
pm_runtime_put_autosuspend(dev->dev);
681679
return 0;
682680

@@ -686,7 +684,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
686684
kfree(fpriv);
687685

688686
err_suspend:
689-
pm_runtime_mark_last_busy(dev->dev);
690687
pm_runtime_put_autosuspend(dev->dev);
691688
return r;
692689
}
@@ -736,7 +733,6 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
736733
kfree(fpriv);
737734
file_priv->driver_priv = NULL;
738735
}
739-
pm_runtime_mark_last_busy(dev->dev);
740736
pm_runtime_put_autosuspend(dev->dev);
741737
}
742738

0 commit comments

Comments
 (0)