]> Git Repo - linux.git/commitdiff
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
authorDave Airlie <[email protected]>
Tue, 6 May 2014 23:06:21 +0000 (09:06 +1000)
committerDave Airlie <[email protected]>
Tue, 6 May 2014 23:06:21 +0000 (09:06 +1000)
nouveau fixes.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/gm107/gr: bump attrib cb size quite a bit
  drm/nouveau: fix another lock unbalance in nouveau_crtc_page_flip
  drm/nouveau/bios: fix shadowing from PROM on big-endian systems
  drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi

1  2 
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
drivers/gpu/drm/nouveau/nouveau_display.c

index fb0b6b2d1427f436f14666c3611d4d6807bd2d36,3de7d818be760f496d7ea41a4fde46d3d952d338..222e8ebb669dff496534331682e7a77c7e6bd9e0
@@@ -109,7 -109,7 +109,7 @@@ nouveau_bios_shadow_pramin(struct nouve
                        return;
                }
  
 -              addr = (u64)(addr >> 8) << 8;
 +              addr = (addr & 0xffffff00) << 8;
                if (!addr) {
                        addr  = (u64)nv_rd32(bios, 0x001700) << 16;
                        addr += 0xf0000;
@@@ -168,7 -168,8 +168,8 @@@ nouveau_bios_shadow_prom(struct nouveau
         */
        i = 16;
        do {
-               if ((nv_rd32(bios, 0x300000) & 0xffff) == 0xaa55)
+               u32 data = le32_to_cpu(nv_rd32(bios, 0x300000)) & 0xffff;
+               if (data == 0xaa55)
                        break;
        } while (i--);
  
                goto out;
  
        /* read entire bios image to system memory */
-       bios->size = ((nv_rd32(bios, 0x300000) >> 16) & 0xff) * 512;
+       bios->size = (le32_to_cpu(nv_rd32(bios, 0x300000)) >> 16) & 0xff;
+       bios->size = bios->size * 512;
        if (!bios->size)
                goto out;
  
        bios->data = kmalloc(bios->size, GFP_KERNEL);
        if (bios->data) {
-               for (i = 0; i < bios->size; i+=4)
-                       nv_wo32(bios, i, nv_rd32(bios, 0x300000 + i));
+               for (i = 0; i < bios->size; i += 4)
+                       ((u32 *)bios->data)[i/4] = nv_rd32(bios, 0x300000 + i);
        }
  
        /* check the PCI record header */
index 3ff030dc1ee35d34925b2fd5464f1236ad10d925,72e1571393e51d62233753f05ac55fa5cbfec0c2..da764a4ed9588273fe6cf02ed0d6c589aa2ebda0
@@@ -571,7 -571,7 +571,7 @@@ nouveau_display_suspend(struct drm_devi
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
                struct nouveau_framebuffer *nouveau_fb;
  
 -              nouveau_fb = nouveau_framebuffer(crtc->fb);
 +              nouveau_fb = nouveau_framebuffer(crtc->primary->fb);
                if (!nouveau_fb || !nouveau_fb->nvbo)
                        continue;
  
@@@ -598,7 -598,7 +598,7 @@@ nouveau_display_repin(struct drm_devic
        list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
                struct nouveau_framebuffer *nouveau_fb;
  
 -              nouveau_fb = nouveau_framebuffer(crtc->fb);
 +              nouveau_fb = nouveau_framebuffer(crtc->primary->fb);
                if (!nouveau_fb || !nouveau_fb->nvbo)
                        continue;
  
@@@ -695,7 -695,7 +695,7 @@@ nouveau_crtc_page_flip(struct drm_crtc 
        const int swap_interval = (flags & DRM_MODE_PAGE_FLIP_ASYNC) ? 0 : 1;
        struct drm_device *dev = crtc->dev;
        struct nouveau_drm *drm = nouveau_drm(dev);
 -      struct nouveau_bo *old_bo = nouveau_framebuffer(crtc->fb)->nvbo;
 +      struct nouveau_bo *old_bo = nouveau_framebuffer(crtc->primary->fb)->nvbo;
        struct nouveau_bo *new_bo = nouveau_framebuffer(fb)->nvbo;
        struct nouveau_page_flip_state *s;
        struct nouveau_channel *chan = drm->channel;
        }
  
        ret = nouveau_page_flip_emit(chan, old_bo, new_bo, s, &fence);
-       mutex_unlock(&chan->cli->mutex);
        if (ret)
                goto fail_unreserve;
+       mutex_unlock(&chan->cli->mutex);
  
        /* Update the crtc struct and cleanup */
 -      crtc->fb = fb;
 +      crtc->primary->fb = fb;
  
        nouveau_bo_fence(old_bo, fence);
        ttm_bo_unreserve(&old_bo->bo);
This page took 0.09464 seconds and 4 git commands to generate.