Commit 547ad072 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms: when pinning display-related buffers, force contig vram

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent ad76b3f7
...@@ -592,7 +592,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) ...@@ -592,7 +592,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime)
if (!nouveau_fb || !nouveau_fb->nvbo) if (!nouveau_fb || !nouveau_fb->nvbo)
continue; continue;
ret = nouveau_bo_pin(nouveau_fb->nvbo, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(nouveau_fb->nvbo, TTM_PL_FLAG_VRAM, true);
if (ret) if (ret)
NV_ERROR(drm, "Could not pin framebuffer\n"); NV_ERROR(drm, "Could not pin framebuffer\n");
} }
...@@ -600,7 +600,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) ...@@ -600,7 +600,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime)
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM, true);
if (!ret) if (!ret)
ret = nouveau_bo_map(nv_crtc->cursor.nvbo); ret = nouveau_bo_map(nv_crtc->cursor.nvbo);
if (ret) if (ret)
...@@ -713,7 +713,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ...@@ -713,7 +713,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
return -ENOMEM; return -ENOMEM;
if (new_bo != old_bo) { if (new_bo != old_bo) {
ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM, true);
if (ret) if (ret)
goto fail_free; goto fail_free;
} }
......
...@@ -1073,7 +1073,7 @@ nv50_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb) ...@@ -1073,7 +1073,7 @@ nv50_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb)
struct nv50_head *head = nv50_head(crtc); struct nv50_head *head = nv50_head(crtc);
int ret; int ret;
ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM, true);
if (ret == 0) { if (ret == 0) {
if (head->image) if (head->image)
nouveau_bo_unpin(head->image); nouveau_bo_unpin(head->image);
...@@ -1402,7 +1402,7 @@ nv50_crtc_create(struct drm_device *dev, int index) ...@@ -1402,7 +1402,7 @@ nv50_crtc_create(struct drm_device *dev, int index)
ret = nouveau_bo_new(dev, 8192, 0x100, TTM_PL_FLAG_VRAM, ret = nouveau_bo_new(dev, 8192, 0x100, TTM_PL_FLAG_VRAM,
0, 0x0000, NULL, NULL, &head->base.lut.nvbo); 0, 0x0000, NULL, NULL, &head->base.lut.nvbo);
if (!ret) { if (!ret) {
ret = nouveau_bo_pin(head->base.lut.nvbo, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(head->base.lut.nvbo, TTM_PL_FLAG_VRAM, true);
if (!ret) { if (!ret) {
ret = nouveau_bo_map(head->base.lut.nvbo); ret = nouveau_bo_map(head->base.lut.nvbo);
if (ret) if (ret)
...@@ -1425,7 +1425,7 @@ nv50_crtc_create(struct drm_device *dev, int index) ...@@ -1425,7 +1425,7 @@ nv50_crtc_create(struct drm_device *dev, int index)
ret = nouveau_bo_new(dev, 64 * 64 * 4, 0x100, TTM_PL_FLAG_VRAM, ret = nouveau_bo_new(dev, 64 * 64 * 4, 0x100, TTM_PL_FLAG_VRAM,
0, 0x0000, NULL, NULL, &head->base.cursor.nvbo); 0, 0x0000, NULL, NULL, &head->base.cursor.nvbo);
if (!ret) { if (!ret) {
ret = nouveau_bo_pin(head->base.cursor.nvbo, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(head->base.cursor.nvbo, TTM_PL_FLAG_VRAM, true);
if (!ret) { if (!ret) {
ret = nouveau_bo_map(head->base.cursor.nvbo); ret = nouveau_bo_map(head->base.cursor.nvbo);
if (ret) if (ret)
...@@ -2487,7 +2487,7 @@ nv50_display_create(struct drm_device *dev) ...@@ -2487,7 +2487,7 @@ nv50_display_create(struct drm_device *dev)
ret = nouveau_bo_new(dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, ret = nouveau_bo_new(dev, 4096, 0x1000, TTM_PL_FLAG_VRAM,
0, 0x0000, NULL, NULL, &disp->sync); 0, 0x0000, NULL, NULL, &disp->sync);
if (!ret) { if (!ret) {
ret = nouveau_bo_pin(disp->sync, TTM_PL_FLAG_VRAM, false); ret = nouveau_bo_pin(disp->sync, TTM_PL_FLAG_VRAM, true);
if (!ret) { if (!ret) {
ret = nouveau_bo_map(disp->sync); ret = nouveau_bo_map(disp->sync);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment