mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
drm/radeon/pm: Handle failure of drm_vblank_get.
Make sure that drm_vblank_get/put() stay balanced in case drm_vblank_get fails, by skipping the corresponding put. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
This commit is contained in:
parent
bb74fc1bf3
commit
e0b34e3857
1 changed files with 6 additions and 2 deletions
|
|
@ -276,8 +276,12 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
|
|||
if (rdev->irq.installed) {
|
||||
for (i = 0; i < rdev->num_crtc; i++) {
|
||||
if (rdev->pm.active_crtcs & (1 << i)) {
|
||||
rdev->pm.req_vblank |= (1 << i);
|
||||
drm_vblank_get(rdev->ddev, i);
|
||||
/* This can fail if a modeset is in progress */
|
||||
if (drm_vblank_get(rdev->ddev, i) == 0)
|
||||
rdev->pm.req_vblank |= (1 << i);
|
||||
else
|
||||
DRM_DEBUG_DRIVER("crtc %d no vblank, can glitch\n",
|
||||
i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue