fb: fixup the offset by getting it from the right place
authorDave Airlie <airlied@redhat.com>
Fri, 15 Feb 2008 06:42:44 +0000 (16:42 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 15 Feb 2008 06:42:44 +0000 (16:42 +1000)
linux-core/drm_crtc.c
linux-core/intel_display.c

index 3a0dd9c..aceb31b 100644 (file)
@@ -1754,7 +1754,6 @@ int drm_mode_addfb(struct drm_device *dev,
        fb->pitch = r->pitch;
        fb->bits_per_pixel = r->bpp;
        fb->depth = r->depth;
-       fb->offset = bo->offset;
        fb->bo = bo;
 
        r->buffer_id = fb->id;
index db3aee8..6a9d980 100644 (file)
@@ -370,7 +370,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y)
        int dspbase = (pipe == 0 ? DSPABASE : DSPBBASE);
        int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF);
 
-       Start = crtc->fb->offset;
+       Start = crtc->fb->bo->offset;
        Offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8);
 
        DRM_DEBUG("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y);
@@ -814,6 +814,7 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc,
                else
                        dspcntr |= DISPPLANE_16BPP;
                break;
+       case 24:
        case 32:
                dspcntr |= DISPPLANE_32BPP_NO_ALPHA;
                break;