Skip to content

Commit

Permalink
drm/nv30/fb: start bashing zcomp registers with 'disabled' (for now)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Nov 28, 2012
1 parent 7e0f992 commit 268d5a3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/nouveau/core/include/subdev/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ int nouveau_fb_bios_memtype(struct nouveau_bios *);

bool nv04_fb_memtype_valid(struct nouveau_fb *, u32 memtype);

void nv10_fb_tile_prog(struct nouveau_fb *, int, struct nouveau_fb_tile *);

void nv20_fb_tile_init(struct nouveau_fb *, int i, u32 addr, u32 size,
u32 pitch, u32 flags, struct nouveau_fb_tile *);
void nv20_fb_tile_fini(struct nouveau_fb *, int i, struct nouveau_fb_tile *);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 9 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
}

Expand Down
10 changes: 9 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}

Expand Down

0 comments on commit 268d5a3

Please sign in to comment.