summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/subdev/fb
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-10-10 01:18:00 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2012-11-28 23:56:30 (GMT)
commit268d5a30173a77a6e762d98adb8d411ccd714b25 (patch)
treef2bc7def05ed4aa09a008b789f52accc96a7fac4 /drivers/gpu/drm/nouveau/core/subdev/fb
parent7e0f992b796e102d32b75392fba38be7cab1c5a9 (diff)
downloadlinux-fsl-qoriq-268d5a30173a77a6e762d98adb8d411ccd714b25.tar.xz
drm/nv30/fb: start bashing zcomp registers with 'disabled' (for now)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/subdev/fb')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c2
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c10
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c10
3 files changed, 19 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
index 1ecd703..12193d9 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
@@ -48,7 +48,7 @@ nv10_fb_tile_fini(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
tile->zcomp = 0;
}
-void
+static void
nv10_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
{
nv_wr32(pfb, 0x100244 + (i * 0x10), tile->limit);
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
index 83e3a88..d6ed18c 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
@@ -44,6 +44,13 @@ nv30_fb_tile_init(struct nouveau_fb *pfb, int i, u32 addr, u32 size, u32 pitch,
tile->pitch = pitch;
}
+static void
+nv30_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
+ struct nouveau_fb_tile *tile)
+{
+ tile->zcomp = 0x00000000;
+}
+
void
nv30_fb_tile_fini(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
{
@@ -136,8 +143,9 @@ nv30_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv->base.memtype_valid = nv04_fb_memtype_valid;
priv->base.tile.regions = 8;
priv->base.tile.init = nv30_fb_tile_init;
+ priv->base.tile.comp = nv30_fb_tile_comp;
priv->base.tile.fini = nv30_fb_tile_fini;
- priv->base.tile.prog = nv10_fb_tile_prog;
+ priv->base.tile.prog = nv20_fb_tile_prog;
return nouveau_fb_created(&priv->base);
}
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
index 4978702..1c313db 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
@@ -30,6 +30,13 @@ struct nv35_fb_priv {
struct nouveau_fb base;
};
+static void
+nv35_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
+ struct nouveau_fb_tile *tile)
+{
+ tile->zcomp = 0x00000000;
+}
+
static int
nv35_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nouveau_oclass *oclass, void *data, u32 size,
@@ -56,8 +63,9 @@ nv35_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv->base.memtype_valid = nv04_fb_memtype_valid;
priv->base.tile.regions = 8;
priv->base.tile.init = nv30_fb_tile_init;
+ priv->base.tile.comp = nv35_fb_tile_comp;
priv->base.tile.fini = nv30_fb_tile_fini;
- priv->base.tile.prog = nv10_fb_tile_prog;
+ priv->base.tile.prog = nv20_fb_tile_prog;
return nouveau_fb_created(&priv->base);
}