diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2008-03-10 23:35:07 +0100 |
---|---|---|
committer | John Doe <glisse@freedesktop.org> | 2008-03-10 23:35:07 +0100 |
commit | a7dc4d08b9b4f8fe6fcaa4c778f6dd3718d1e36a (patch) | |
tree | b287fd9fbbcc9d546552863f93f264c4e48bdffd /linux-core | |
parent | 75c9e0d3462f04766d490fac5cc93569957a8365 (diff) |
rradeon_ms: rework fence code and bring radeon ms up to date
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/radeon_ms_drv.c | 4 | ||||
-rw-r--r-- | linux-core/radeon_ms_fb.c | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/linux-core/radeon_ms_drv.c b/linux-core/radeon_ms_drv.c index d7b0eecc..cf9699f4 100644 --- a/linux-core/radeon_ms_drv.c +++ b/linux-core/radeon_ms_drv.c @@ -28,7 +28,7 @@ #include "drm_pciids.h" #include "radeon_ms.h" -extern struct drm_fence_driver radeon_ms_fence_driver; +extern struct drm_fence_driver r3xx_fence_driver; extern struct drm_bo_driver radeon_ms_bo_driver; extern struct drm_ioctl_desc radeon_ms_ioctls[]; extern int radeon_ms_num_ioctls; @@ -71,7 +71,7 @@ static struct drm_driver driver = { .set_version = NULL, .fb_probe = radeonfb_probe, .fb_remove = radeonfb_remove, - .fence_driver = &radeon_ms_fence_driver, + .fence_driver = &r3xx_fence_driver, .bo_driver = &radeon_ms_bo_driver, .major = DRIVER_MAJOR, .minor = DRIVER_MINOR, diff --git a/linux-core/radeon_ms_fb.c b/linux-core/radeon_ms_fb.c index d7fb39e6..a8fba712 100644 --- a/linux-core/radeon_ms_fb.c +++ b/linux-core/radeon_ms_fb.c @@ -345,12 +345,11 @@ int radeonfb_probe(struct drm_device *dev, struct drm_crtc *crtc) DRM_INFO("[radeon_ms] fb physical start : 0x%lX\n", info->fix.smem_start); DRM_INFO("[radeon_ms] fb physical size : %d\n", info->fix.smem_len); - ret = drm_mem_reg_ioremap(dev, &fb->bo->mem, &fb->virtual_base); - if (ret) { - DRM_ERROR("error mapping fb: %d\n", ret); + ret = drm_bo_kmap(fb->bo, 0, fb->bo->num_pages, &fb->kmap); + if (ret) { + DRM_ERROR("error mapping fb: %d\n", ret); } - - info->screen_base = fb->virtual_base; + info->screen_base = fb->kmap.virtual; info->screen_size = info->fix.smem_len; /* FIXME */ info->pseudo_palette = fb->pseudo_palette; info->var.xres_virtual = fb->width; @@ -445,10 +444,10 @@ int radeonfb_remove(struct drm_device *dev, struct drm_crtc *crtc) if (info) { unregister_framebuffer(info); - framebuffer_release(info); - drm_mem_reg_iounmap(dev, &fb->bo->mem, fb->virtual_base); + drm_bo_kunmap(&fb->kmap); drm_bo_usage_deref_unlocked(&fb->bo); drm_framebuffer_destroy(fb); + framebuffer_release(info); } return 0; } |