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 <mario.kleiner.de@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: michel@daenzer.net Cc: dri-devel@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: christian.koenig@amd.com Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
bb74fc1bf3
commit
e0b34e3857
|
@ -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 New Issue