diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2018-05-08 20:39:48 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2018-05-18 15:01:46 +1000 |
commit | facaed62b4cba3a6334fc1798fa8f51ea6a1962d (patch) | |
tree | 5c05fb78990e9a0b920312974c8d2ab61411b3bb /drivers/gpu/drm/nouveau/dispnv50/head.c | |
parent | 290ffeafcc1a953aa287c8a7bf7f6d9af25b7e77 (diff) |
drm/nouveau/kms/gv100: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/head.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/head.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c index ca83006510b7..4f57e5379796 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/head.c +++ b/drivers/gpu/drm/nouveau/dispnv50/head.c @@ -475,7 +475,16 @@ nv50_head_create(struct drm_device *dev, int index) head->func = disp->core->func->head; head->base.index = index; - ret = nv50_base_new(drm, head->base.index, &wndw); + + if (disp->disp->object.oclass < GV100_DISP) { + ret = nv50_ovly_new(drm, head->base.index, &wndw); + ret = nv50_base_new(drm, head->base.index, &wndw); + } else { + ret = nv50_wndw_new(drm, DRM_PLANE_TYPE_OVERLAY, + head->base.index * 2 + 1, &wndw); + ret = nv50_wndw_new(drm, DRM_PLANE_TYPE_PRIMARY, + head->base.index * 2 + 0, &wndw); + } if (ret == 0) ret = nv50_curs_new(drm, head->base.index, &curs); if (ret) { @@ -495,8 +504,6 @@ nv50_head_create(struct drm_device *dev, int index) goto out; } - /* allocate overlay resources */ - ret = nv50_ovly_new(drm, head->base.index, &wndw); out: if (ret) nv50_head_destroy(crtc); |