Revert "drm: Update fbdev fb_fix_screeninfo"

This reverts commit dfe63bb0ad9810db13aab0058caba97866e0a681.

This commit was causing nouveau not to work properly, for -rc1 I'd
prefer it worked and we can look if this is useful for 2.6.39.

Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Dave Airlie and committed by Linus Torvalds 3632ef89 8473dbb4

+27 -21
+20 -21
drivers/gpu/drm/drm_fb_helper.c
··· 607 607 } 608 608 EXPORT_SYMBOL(drm_fb_helper_fini); 609 609 610 - void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb) 611 - { 612 - info->fix.type = FB_TYPE_PACKED_PIXELS; 613 - info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR : 614 - FB_VISUAL_TRUECOLOR; 615 - info->fix.mmio_start = 0; 616 - info->fix.mmio_len = 0; 617 - info->fix.type_aux = 0; 618 - info->fix.xpanstep = 1; /* doing it in hw */ 619 - info->fix.ypanstep = 1; /* doing it in hw */ 620 - info->fix.ywrapstep = 0; 621 - info->fix.accel = FB_ACCEL_NONE; 622 - info->fix.type_aux = 0; 623 - 624 - info->fix.line_length = fb->pitch; 625 - return; 626 - } 627 - EXPORT_SYMBOL(drm_fb_helper_fill_fix); 628 - 629 610 static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green, 630 611 u16 blue, u16 regno, struct fb_info *info) 631 612 { ··· 816 835 mutex_unlock(&dev->mode_config.mutex); 817 836 return ret; 818 837 } 819 - drm_fb_helper_fill_fix(info, fb_helper->fb); 820 838 } 821 839 mutex_unlock(&dev->mode_config.mutex); 822 840 ··· 953 973 954 974 if (new_fb) { 955 975 info->var.pixclock = 0; 956 - drm_fb_helper_fill_fix(info, fb_helper->fb); 957 976 if (register_framebuffer(info) < 0) { 958 977 return -EINVAL; 959 978 } ··· 978 999 return 0; 979 1000 } 980 1001 EXPORT_SYMBOL(drm_fb_helper_single_fb_probe); 1002 + 1003 + void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, 1004 + uint32_t depth) 1005 + { 1006 + info->fix.type = FB_TYPE_PACKED_PIXELS; 1007 + info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR : 1008 + FB_VISUAL_TRUECOLOR; 1009 + info->fix.mmio_start = 0; 1010 + info->fix.mmio_len = 0; 1011 + info->fix.type_aux = 0; 1012 + info->fix.xpanstep = 1; /* doing it in hw */ 1013 + info->fix.ypanstep = 1; /* doing it in hw */ 1014 + info->fix.ywrapstep = 0; 1015 + info->fix.accel = FB_ACCEL_NONE; 1016 + info->fix.type_aux = 0; 1017 + 1018 + info->fix.line_length = pitch; 1019 + return; 1020 + } 1021 + EXPORT_SYMBOL(drm_fb_helper_fill_fix); 981 1022 982 1023 void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, 983 1024 uint32_t fb_width, uint32_t fb_height)
+1
drivers/gpu/drm/i915/intel_fb.c
··· 148 148 149 149 // memset(info->screen_base, 0, size); 150 150 151 + drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); 151 152 drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); 152 153 153 154 info->pixmap.size = 64*1024;
+1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
··· 359 359 info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo); 360 360 info->screen_size = size; 361 361 362 + drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); 362 363 drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, sizes->fb_height); 363 364 364 365 /* Set aperture base/size for vesafb takeover */
+2
drivers/gpu/drm/radeon/radeon_fb.c
··· 225 225 226 226 strcpy(info->fix.id, "radeondrmfb"); 227 227 228 + drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); 229 + 228 230 info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; 229 231 info->fbops = &radeonfb_ops; 230 232
+3
include/drm/drm_fb_helper.h
··· 121 121 void drm_fb_helper_restore(void); 122 122 void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, 123 123 uint32_t fb_width, uint32_t fb_height); 124 + void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, 125 + uint32_t depth); 126 + 124 127 int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); 125 128 126 129 bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);