3 #include "nouveau_drv.h"
4 #include "nouveau_drm.h"
7 nv10_fb_set_region_tiling(struct drm_device
*dev
, int i
, uint32_t addr
,
8 uint32_t size
, uint32_t pitch
)
10 struct drm_nouveau_private
*dev_priv
= dev
->dev_private
;
11 uint32_t limit
= max(1u, addr
+ size
) - 1;
14 if (dev_priv
->card_type
>= NV_20
)
20 nv_wr32(dev
, NV10_PFB_TLIMIT(i
), limit
);
21 nv_wr32(dev
, NV10_PFB_TSIZE(i
), pitch
);
22 nv_wr32(dev
, NV10_PFB_TILE(i
), addr
);
26 nv10_fb_init(struct drm_device
*dev
)
28 struct drm_nouveau_private
*dev_priv
= dev
->dev_private
;
29 struct nouveau_fb_engine
*pfb
= &dev_priv
->engine
.fb
;
32 pfb
->num_tiles
= NV10_PFB_TILE__SIZE
;
34 /* Turn all the tiling regions off. */
35 for (i
= 0; i
< pfb
->num_tiles
; i
++)
36 pfb
->set_region_tiling(dev
, i
, 0, 0, 0);
42 nv10_fb_takedown(struct drm_device
*dev
)