aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_crtc.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-04-02 06:53:06 -0400
committerDave Airlie <airlied@redhat.com>2012-05-23 05:46:55 -0400
commit22b33e8ed0e38b8ddcf082e35580f2e67a3a0262 (patch)
treed6e51cc2c960d8ee5f0b2fa598971d985031532e /drivers/gpu/drm/nouveau/nv50_crtc.c
parent129b78bfca591e736e56a294f0e357d73d938f7e (diff)
nouveau: add PRIME support
This adds prime->fd and fd->prime support to nouveau, it passes the SG object to TTM, and then populates the GART entries using it. v2: add stubbed kmap + use new function to fill out pages array for faulting + add reimport test. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_crtc.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_crtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
index 701b927998bf..cad2abd11756 100644
--- a/drivers/gpu/drm/nouveau/nv50_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
@@ -769,7 +769,7 @@ nv50_crtc_create(struct drm_device *dev, int index)
769 nv_crtc->lut.depth = 0; 769 nv_crtc->lut.depth = 0;
770 770
771 ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM, 771 ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM,
772 0, 0x0000, &nv_crtc->lut.nvbo); 772 0, 0x0000, NULL, &nv_crtc->lut.nvbo);
773 if (!ret) { 773 if (!ret) {
774 ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); 774 ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM);
775 if (!ret) 775 if (!ret)
@@ -795,7 +795,7 @@ nv50_crtc_create(struct drm_device *dev, int index)
795 drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); 795 drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256);
796 796
797 ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, 797 ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM,
798 0, 0x0000, &nv_crtc->cursor.nvbo); 798 0, 0x0000, NULL, &nv_crtc->cursor.nvbo);
799 if (!ret) { 799 if (!ret) {
800 ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); 800 ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM);
801 if (!ret) 801 if (!ret)