aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_state.c
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2009-02-14 04:51:07 -0500
committerDave Airlie <airlied@redhat.com>2009-03-13 00:24:02 -0400
commit6abf6bb0ff90bb77f9429bd0d90fc841c358daf3 (patch)
treebb291ce9a51dc8f8df33db5774d089ee8907ad33 /drivers/gpu/drm/radeon/radeon_state.c
parente8a894372b4ea05dc266ba7d7a7634315b6230e8 (diff)
drm: radeon: Use surface for PCI GART table.
This allocates a physical surface for the PCI GART table, this way no matter what other surface configurations exist the GART table will always be seen by the hardware properly. We encode the file pointer of the virtual surface allocate using a special cookie value, called PCIGART_FILE_PRIV. On the last close, we release that surface. Just to be doubly safe, we run the pcigart table setup with the main surface control register clear. Based upon ideas from David Airlie and Ben Benjamin Herrenschmidt. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_state.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
index 03fea43dae75..043293ae6e48 100644
--- a/drivers/gpu/drm/radeon/radeon_state.c
+++ b/drivers/gpu/drm/radeon/radeon_state.c
@@ -3155,6 +3155,7 @@ void radeon_driver_preclose(struct drm_device *dev, struct drm_file *file_priv)
3155 3155
3156void radeon_driver_lastclose(struct drm_device *dev) 3156void radeon_driver_lastclose(struct drm_device *dev)
3157{ 3157{
3158 radeon_surfaces_release(PCIGART_FILE_PRIV, dev->dev_private);
3158 radeon_do_release(dev); 3159 radeon_do_release(dev);
3159} 3160}
3160 3161