]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6...
authorDave Airlie <airlied@redhat.com>
Mon, 20 Oct 2014 06:14:19 +0000 (16:14 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 20 Oct 2014 06:14:19 +0000 (16:14 +1000)
two nouveau fixes.

* 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix regression on agp boards
  drm/gt215/gr: fix initialisation on gddr5 boards

drivers/gpu/drm/nouveau/core/engine/graph/ctxnv50.c
drivers/gpu/drm/nouveau/nouveau_chan.c

index 552fdbd45ebe9e389c9e017d793959a6333a69e4..1d0e33fb5f617ac20b7610be037fa552722de078 100644 (file)
 #define IS_NVA3F(x) (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf)
 #define IS_NVAAF(x) ((x) >= 0xaa && (x) <= 0xac)
 
+#include <subdev/fb.h>
+
 /*
  * This code deals with PGRAPH contexts on NV50 family cards. Like NV40, it's
  * the GPU itself that does context-switching, but it needs a special
@@ -569,8 +571,12 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx)
                        gr_def(ctx, 0x407d08, 0x00010040);
                else if (device->chipset < 0xa0)
                        gr_def(ctx, 0x407d08, 0x00390040);
-               else
-                       gr_def(ctx, 0x407d08, 0x003d0040);
+               else {
+                       if (nouveau_fb(device)->ram->type != NV_MEM_TYPE_GDDR5)
+                               gr_def(ctx, 0x407d08, 0x003d0040);
+                       else
+                               gr_def(ctx, 0x407d08, 0x003c0040);
+               }
                gr_def(ctx, 0x407d0c, 0x00000022);
        }
 
index 589dbb582da200c543b2ee04e9296d58e0d70e1f..fd3dbd59d73e18113a6ef357e658570c113155be 100644 (file)
@@ -400,15 +400,20 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
                    struct nouveau_channel **pchan)
 {
        struct nouveau_cli *cli = (void *)nvif_client(&device->base);
+       bool super;
        int ret;
 
+       /* hack until fencenv50 is fixed, and agp access relaxed */
+       super = cli->base.super;
+       cli->base.super = true;
+
        ret = nouveau_channel_ind(drm, device, handle, arg0, pchan);
        if (ret) {
                NV_PRINTK(debug, cli, "ib channel create, %d\n", ret);
                ret = nouveau_channel_dma(drm, device, handle, pchan);
                if (ret) {
                        NV_PRINTK(debug, cli, "dma channel create, %d\n", ret);
-                       return ret;
+                       goto done;
                }
        }
 
@@ -416,8 +421,9 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
        if (ret) {
                NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret);
                nouveau_channel_del(pchan);
-               return ret;
        }
 
-       return 0;
+done:
+       cli->base.super = super;
+       return ret;
 }