]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/nouveau/nv50_display.c
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / nv50_display.c
index 211e5e9565ce1c4cb2e32832842d9602571e9701..5c41612723b468cdaa5eab6fddeaeab8eae76948 100644 (file)
@@ -32,6 +32,7 @@
 #include "nouveau_fb.h"
 #include "nouveau_fbcon.h"
 #include "nouveau_ramht.h"
+#include "nouveau_software.h"
 #include "drm_crtc_helper.h"
 
 static void nv50_display_isr(struct drm_device *);
@@ -358,8 +359,11 @@ nv50_display_create(struct drm_device *dev)
        dev_priv->engine.display.priv = priv;
 
        /* Create CRTC objects */
-       for (i = 0; i < 2; i++)
-               nv50_crtc_create(dev, i);
+       for (i = 0; i < 2; i++) {
+               ret = nv50_crtc_create(dev, i);
+               if (ret)
+                       return ret;
+       }
 
        /* We setup the encoders from the BIOS table */
        for (i = 0 ; i < dcb->entries; i++) {
@@ -488,7 +492,7 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb,
                        else
                                OUT_RING  (chan, chan->vram_handle);
                } else {
-                       u64 offset = chan->dispc_vma[nv_crtc->index].offset;
+                       u64 offset = nvc0_software_crtc(chan, nv_crtc->index);
                        offset += dispc->sem.offset;
                        BEGIN_NVC0(chan, 0, 0x0010, 4);
                        OUT_RING  (chan, upper_32_bits(offset));
@@ -642,20 +646,7 @@ nv50_display_script_select(struct drm_device *dev, struct dcb_entry *dcb,
 static void
 nv50_display_vblank_crtc_handler(struct drm_device *dev, int crtc)
 {
-       struct drm_nouveau_private *dev_priv = dev->dev_private;
-       struct nouveau_channel *chan, *tmp;
-
-       list_for_each_entry_safe(chan, tmp, &dev_priv->vbl_waiting,
-                                nvsw.vbl_wait) {
-               if (chan->nvsw.vblsem_head != crtc)
-                       continue;
-
-               nouveau_bo_wr32(chan->notifier_bo, chan->nvsw.vblsem_offset,
-                                               chan->nvsw.vblsem_rval);
-               list_del(&chan->nvsw.vbl_wait);
-               drm_vblank_put(dev, crtc);
-       }
-
+       nouveau_software_vblank(dev, crtc);
        drm_handle_vblank(dev, crtc);
 }