drm/fb: get rid of offset from structure use bo offset
authorDave Airlie <airlied@redhat.com>
Wed, 20 Feb 2008 00:51:19 +0000 (10:51 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 20 Feb 2008 01:27:22 +0000 (11:27 +1000)
linux-core/drm_crtc.h
linux-core/intel_fb.c
linux-core/radeon_ms_fb.c
shared-core/radeon_ms_crtc.c

index 43ef95e..3097057 100644 (file)
@@ -235,7 +235,6 @@ struct drm_framebuffer {
        struct list_head head;
        int id; /* idr assigned */
        unsigned int pitch;
-       unsigned long offset;
        unsigned int width;
        unsigned int height;
        /* depth can be 15 or 16 */
index 6df243b..5640399 100644 (file)
@@ -612,7 +612,6 @@ int intelfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
                return -EINVAL;
        }
 
-       fb->offset = fbo->offset;
        fb->bo = fbo;
        printk("allocated %dx%d fb: 0x%08lx, bo %p\n", fb->width,
                       fb->height, fbo->offset, fbo);
@@ -639,7 +638,7 @@ int intelfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
        info->fix.mmio_start = 0;
        info->fix.mmio_len = 0;
        info->fix.line_length = fb->pitch;
-       info->fix.smem_start = fb->offset + dev->mode_config.fb_base;
+       info->fix.smem_start = fb->bo->offset + dev->mode_config.fb_base;
        info->fix.smem_len = info->fix.line_length * fb->height;
 
        info->flags = FBINFO_DEFAULT;
index fc9e99e..d7fb39e 100644 (file)
@@ -319,7 +319,6 @@ int radeonfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
                return -EINVAL;
        }
 
-       fb->offset = fb->bo->offset;
        DRM_INFO("[radeon_ms] framebuffer %dx%d at 0x%08lX\n",
                 fb->width, fb->height, fb->bo->offset);
 
@@ -340,7 +339,7 @@ int radeonfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
        info->fix.mmio_start = 0;
        info->fix.mmio_len = 0;
        info->fix.line_length = fb->pitch;
-       info->fix.smem_start = fb->offset + dev->mode_config.fb_base;
+       info->fix.smem_start = fb->bo->offset + dev->mode_config.fb_base;
        info->fix.smem_len = info->fix.line_length * fb->height;
        info->flags = FBINFO_DEFAULT;
        DRM_INFO("[radeon_ms] fb physical start : 0x%lX\n", info->fix.smem_start);
index 0da5a5a..b238385 100644 (file)
@@ -556,7 +556,7 @@ static void radeon_ms_crtc1_mode_set(struct drm_crtc *crtc,
        }
        radeon_pll1_compute(crtc, adjusted_mode);
 
-       state->crtc_offset = REG_S(CRTC_OFFSET, CRTC_OFFSET, crtc->fb->offset);
+       state->crtc_offset = REG_S(CRTC_OFFSET, CRTC_OFFSET, crtc->fb->bo->offset);
        state->crtc_gen_cntl = CRTC_GEN_CNTL__CRTC_EXT_DISP_EN |
                CRTC_GEN_CNTL__CRTC_EN |
                REG_S(CRTC_GEN_CNTL, CRTC_PIX_WIDTH, format);