Merge branch 'ast-updates' of ssh://people.freedesktop.org/~/linux into drm-next
[linux-2.6-block.git] / drivers / gpu / drm / ast / ast_mode.c
index 208dc45d0513e52210d3732c2cbaaecdbf56ac6b..114aee941d46b417f87a7aad1c20502374873ef8 100644 (file)
@@ -81,7 +81,7 @@ static bool ast_get_vbios_mode_info(struct drm_crtc *crtc, struct drm_display_mo
        u32 refresh_rate_index = 0, mode_id, color_index, refresh_rate;
        u32 hborder, vborder;
 
-       switch (crtc->fb->bits_per_pixel) {
+       switch (crtc->primary->fb->bits_per_pixel) {
        case 8:
                vbios_mode->std_table = &vbios_stdtable[VGAModeIndex];
                color_index = VGAModeIndex - 1;
@@ -184,7 +184,7 @@ static bool ast_get_vbios_mode_info(struct drm_crtc *crtc, struct drm_display_mo
                ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0x00);
                if (vbios_mode->enh_table->flags & NewModeInfo) {
                        ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0xa8);
-                       ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, crtc->fb->bits_per_pixel);
+                       ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, crtc->primary->fb->bits_per_pixel);
                        ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x93, adjusted_mode->clock / 1000);
                        ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x94, adjusted_mode->crtc_hdisplay);
                        ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x95, adjusted_mode->crtc_hdisplay >> 8);
@@ -349,7 +349,7 @@ static void ast_set_offset_reg(struct drm_crtc *crtc)
 
        u16 offset;
 
-       offset = crtc->fb->pitches[0] >> 3;
+       offset = crtc->primary->fb->pitches[0] >> 3;
        ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x13, (offset & 0xff));
        ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xb0, (offset >> 8) & 0x3f);
 }
@@ -374,7 +374,7 @@ static void ast_set_ext_reg(struct drm_crtc *crtc, struct drm_display_mode *mode
        struct ast_private *ast = crtc->dev->dev_private;
        u8 jregA0 = 0, jregA3 = 0, jregA8 = 0;
 
-       switch (crtc->fb->bits_per_pixel) {
+       switch (crtc->primary->fb->bits_per_pixel) {
        case 8:
                jregA0 = 0x70;
                jregA3 = 0x01;
@@ -427,7 +427,7 @@ static void ast_set_sync_reg(struct drm_device *dev, struct drm_display_mode *mo
 static bool ast_set_dac_reg(struct drm_crtc *crtc, struct drm_display_mode *mode,
                     struct ast_vbios_mode_info *vbios_mode)
 {
-       switch (crtc->fb->bits_per_pixel) {
+       switch (crtc->primary->fb->bits_per_pixel) {
        case 8:
                break;
        default:
@@ -503,7 +503,7 @@ static int ast_crtc_do_set_base(struct drm_crtc *crtc,
                ast_bo_unreserve(bo);
        }
 
-       ast_fb = to_ast_framebuffer(crtc->fb);
+       ast_fb = to_ast_framebuffer(crtc->primary->fb);
        obj = ast_fb->obj;
        bo = gem_to_ast_bo(obj);