Commit e800cab3 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

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
parents bee6bd0a 67e26e41
...@@ -113,6 +113,8 @@ ...@@ -113,6 +113,8 @@
#define IS_NVA3F(x) (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf) #define IS_NVA3F(x) (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf)
#define IS_NVAAF(x) ((x) >= 0xaa && (x) <= 0xac) #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 * 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 * the GPU itself that does context-switching, but it needs a special
...@@ -569,8 +571,12 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) ...@@ -569,8 +571,12 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx)
gr_def(ctx, 0x407d08, 0x00010040); gr_def(ctx, 0x407d08, 0x00010040);
else if (device->chipset < 0xa0) else if (device->chipset < 0xa0)
gr_def(ctx, 0x407d08, 0x00390040); gr_def(ctx, 0x407d08, 0x00390040);
else else {
gr_def(ctx, 0x407d08, 0x003d0040); 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); gr_def(ctx, 0x407d0c, 0x00000022);
} }
......
...@@ -400,15 +400,20 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device, ...@@ -400,15 +400,20 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
struct nouveau_channel **pchan) struct nouveau_channel **pchan)
{ {
struct nouveau_cli *cli = (void *)nvif_client(&device->base); struct nouveau_cli *cli = (void *)nvif_client(&device->base);
bool super;
int ret; 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); ret = nouveau_channel_ind(drm, device, handle, arg0, pchan);
if (ret) { if (ret) {
NV_PRINTK(debug, cli, "ib channel create, %d\n", ret); NV_PRINTK(debug, cli, "ib channel create, %d\n", ret);
ret = nouveau_channel_dma(drm, device, handle, pchan); ret = nouveau_channel_dma(drm, device, handle, pchan);
if (ret) { if (ret) {
NV_PRINTK(debug, cli, "dma channel create, %d\n", 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, ...@@ -416,8 +421,9 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
if (ret) { if (ret) {
NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret); NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret);
nouveau_channel_del(pchan); nouveau_channel_del(pchan);
return ret;
} }
return 0; done:
cli->base.super = super;
return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment