summaryrefslogtreecommitdiff
path: root/linux-core/radeon_legacy_crtc.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-09-23 16:47:34 +1000
committerDave Airlie <airlied@redhat.com>2008-09-23 16:49:32 +1000
commit5fdfbee22acb8eaaa834457c30e6f68883ab1353 (patch)
tree0e9b12245edb3915e29a32fea8cfb5fcb806be87 /linux-core/radeon_legacy_crtc.c
parenta2216491c619082ad9a01bc949648834dc5a0d2f (diff)
Store the buffer object backing the fb as a void pointer, not a handle.
This lets us defer handle creation until userspace acutally asks for one, at which point we also have a drm_file to associate it with.
Diffstat (limited to 'linux-core/radeon_legacy_crtc.c')
-rw-r--r--linux-core/radeon_legacy_crtc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/linux-core/radeon_legacy_crtc.c b/linux-core/radeon_legacy_crtc.c
index d51fc52d..bc28c436 100644
--- a/linux-core/radeon_legacy_crtc.c
+++ b/linux-core/radeon_legacy_crtc.c
@@ -176,6 +176,7 @@ static bool radeon_set_crtc1_base(struct drm_crtc *crtc, int x, int y)
struct drm_device *dev = crtc->dev;
struct drm_radeon_private *dev_priv = dev->dev_private;
struct radeon_framebuffer *radeon_fb;
+ struct drm_gem_object *obj;
struct drm_radeon_gem_object *obj_priv;
uint32_t base;
uint32_t crtc_offset, crtc_offset_cntl, crtc_tile_x0_y0 = 0;
@@ -185,7 +186,8 @@ static bool radeon_set_crtc1_base(struct drm_crtc *crtc, int x, int y)
radeon_fb = to_radeon_framebuffer(crtc->fb);
- obj_priv = radeon_fb->obj->driver_private;
+ obj = radeon_fb->base.mm_private;
+ obj_priv = obj->driver_private;
crtc_offset = obj_priv->bo->offset;
@@ -599,6 +601,7 @@ static bool radeon_set_crtc2_base(struct drm_crtc *crtc, int x, int y)
struct drm_device *dev = crtc->dev;
struct drm_radeon_private *dev_priv = dev->dev_private;
struct radeon_framebuffer *radeon_fb;
+ struct drm_gem_object *obj;
struct drm_radeon_gem_object *obj_priv;
uint32_t base;
uint32_t crtc2_offset, crtc2_offset_cntl, crtc2_tile_x0_y0 = 0;
@@ -608,7 +611,8 @@ static bool radeon_set_crtc2_base(struct drm_crtc *crtc, int x, int y)
radeon_fb = to_radeon_framebuffer(crtc->fb);
- obj_priv = radeon_fb->obj->driver_private;
+ obj = radeon_fb->base.mm_private;
+ obj_priv = obj->driver_private;
crtc2_offset = obj_priv->bo->offset;