summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_display.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-21 03:14:03 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-21 03:14:03 +0100
commite219aafe50fd546b8686582ddbafd24c3c2eda04 (patch)
treea665e08ca8d42f20ac8e5dcc8565d666cffb26bd /drivers/gpu/drm/qxl/qxl_display.c
parentffe12855a5f7f195589130197558e6a5c276caa4 (diff)
parent24c96dc79c5e76d3cff7a33f955a4d3244644766 (diff)
Merge back earlier 'pm-domains' material for v4.5.
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_display.c')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 4649bd2ed340..183aea1abebc 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -244,6 +244,10 @@ static int qxl_crtc_page_flip(struct drm_crtc *crtc,
ret = qxl_bo_reserve(bo, false);
if (ret)
return ret;
+ ret = qxl_bo_pin(bo, bo->type, NULL);
+ qxl_bo_unreserve(bo);
+ if (ret)
+ return ret;
qxl_draw_dirty_fb(qdev, qfb_src, bo, 0, 0,
&norect, one_clip_rect, inc);
@@ -257,7 +261,11 @@ static int qxl_crtc_page_flip(struct drm_crtc *crtc,
}
drm_vblank_put(dev, qcrtc->index);
- qxl_bo_unreserve(bo);
+ ret = qxl_bo_reserve(bo, false);
+ if (!ret) {
+ qxl_bo_unpin(bo);
+ qxl_bo_unreserve(bo);
+ }
return 0;
}