From 6f068beb87895277224246b11809c078d6639085 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 10 Oct 2012 11:18:00 +1000 Subject: [PATCH] --- yaml --- r: 345380 b: refs/heads/master c: 268d5a30173a77a6e762d98adb8d411ccd714b25 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/nouveau/core/include/subdev/fb.h | 2 -- trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c | 2 +- trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c | 10 +++++++++- trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c | 10 +++++++++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 2b580bc44dd0..c2f8b40a67eb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e0f992b796e102d32b75392fba38be7cab1c5a9 +refs/heads/master: 268d5a30173a77a6e762d98adb8d411ccd714b25 diff --git a/trunk/drivers/gpu/drm/nouveau/core/include/subdev/fb.h b/trunk/drivers/gpu/drm/nouveau/core/include/subdev/fb.h index e8d0d73db51c..3108f19ef505 100644 --- a/trunk/drivers/gpu/drm/nouveau/core/include/subdev/fb.h +++ b/trunk/drivers/gpu/drm/nouveau/core/include/subdev/fb.h @@ -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 *); diff --git a/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c b/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c index 1ecd7033514e..12193d9dd2a6 100644 --- a/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c +++ b/trunk/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/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c b/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c index 83e3a88c41fb..d6ed18cc8e84 100644 --- a/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c +++ b/trunk/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/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c b/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c index 49787022ff11..1c313db8a560 100644 --- a/trunk/drivers/gpu/drm/nouveau/core/subdev/fb/nv35.c +++ b/trunk/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); }