summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/radeon/radeon_object.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2013-05-19 14:52:46 +0200
committerJonathan Gray <jsg@jsg.id.au>2013-08-12 10:39:37 +1000
commit4d159a72765f944a0ee8d9f9b0cb880f4fa91601 (patch)
tree4926e3e8f0e0313a8cf56804ed1111286b1a0c4d /sys/dev/pci/drm/radeon/radeon_object.c
parent2868ed0d045517eeeebd378a923f1627d1ef392f (diff)
replace rdev->drmdev with rdev->ddev
Diffstat (limited to 'sys/dev/pci/drm/radeon/radeon_object.c')
-rw-r--r--sys/dev/pci/drm/radeon/radeon_object.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_object.c b/sys/dev/pci/drm/radeon/radeon_object.c
index 6279992533e..c82ff13388f 100644
--- a/sys/dev/pci/drm/radeon/radeon_object.c
+++ b/sys/dev/pci/drm/radeon/radeon_object.c
@@ -116,7 +116,6 @@ int radeon_bo_create(struct radeon_device *rdev,
unsigned long size, int byte_align, bool kernel, u32 domain,
struct sg_table *sg, struct radeon_bo **bo_ptr)
{
- struct drm_device *ddev = (struct drm_device *)rdev->drmdev;
struct radeon_bo *bo;
struct drm_obj *drm_bo;
enum ttm_bo_type type;
@@ -141,7 +140,7 @@ int radeon_bo_create(struct radeon_device *rdev,
acc_size = ttm_bo_dma_acc_size(&rdev->mman.bdev, size,
sizeof(struct radeon_bo));
- drm_bo = drm_gem_object_alloc(ddev, size);
+ drm_bo = drm_gem_object_alloc(rdev->ddev, size);
if (drm_bo == NULL)
return -ENOMEM;
bo = gem_to_radeon_bo(drm_bo);
@@ -305,8 +304,8 @@ int radeon_bo_evict_vram(struct radeon_device *rdev)
void radeon_bo_force_delete(struct radeon_device *rdev)
{
+ struct drm_device *dev = rdev->ddev;
struct radeon_bo *bo, *n;
- struct drm_device *dev = (struct drm_device *)rdev->drmdev;
if (list_empty(&rdev->gem.objects)) {
return;
@@ -330,11 +329,10 @@ void radeon_bo_force_delete(struct radeon_device *rdev)
int radeon_bo_init(struct radeon_device *rdev)
{
- struct drm_device *dev = (struct drm_device *)rdev->drmdev;
struct drm_local_map *map;
/* Add an MTRR for the VRAM */
- drm_addmap(dev, rdev->mc.aper_base, rdev->mc.aper_size,
+ drm_addmap(rdev->ddev, rdev->mc.aper_base, rdev->mc.aper_size,
_DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING, &map);
/* fake a 'cookie', seems to be unused? */
rdev->mc.vram_mtrr = 1;