aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fb_helper.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-01-14 18:27:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 19:10:28 -0500
commit3632ef8909118db9584e1bed9538dc180adb32f8 (patch)
tree033925e11aef3c700492b4da0a1332f710de1299 /drivers/gpu/drm/drm_fb_helper.c
parent8473dbb43db92fa8de7c24d1973aaf1e0276a89f (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/drm_fb_helper.c')
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 0307d601f5e5..5c4f9b9ecdc0 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -607,25 +607,6 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
607} 607}
608EXPORT_SYMBOL(drm_fb_helper_fini); 608EXPORT_SYMBOL(drm_fb_helper_fini);
609 609
610void 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}
627EXPORT_SYMBOL(drm_fb_helper_fill_fix);
628
629static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green, 610static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
630 u16 blue, u16 regno, struct fb_info *info) 611 u16 blue, u16 regno, struct fb_info *info)
631{ 612{
@@ -835,7 +816,6 @@ int drm_fb_helper_set_par(struct fb_info *info)
835 mutex_unlock(&dev->mode_config.mutex); 816 mutex_unlock(&dev->mode_config.mutex);
836 return ret; 817 return ret;
837 } 818 }
838 drm_fb_helper_fill_fix(info, fb_helper->fb);
839 } 819 }
840 mutex_unlock(&dev->mode_config.mutex); 820 mutex_unlock(&dev->mode_config.mutex);
841 821
@@ -973,7 +953,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
973 953
974 if (new_fb) { 954 if (new_fb) {
975 info->var.pixclock = 0; 955 info->var.pixclock = 0;
976 drm_fb_helper_fill_fix(info, fb_helper->fb);
977 if (register_framebuffer(info) < 0) { 956 if (register_framebuffer(info) < 0) {
978 return -EINVAL; 957 return -EINVAL;
979 } 958 }
@@ -1000,6 +979,26 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
1000} 979}
1001EXPORT_SYMBOL(drm_fb_helper_single_fb_probe); 980EXPORT_SYMBOL(drm_fb_helper_single_fb_probe);
1002 981
982void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
983 uint32_t depth)
984{
985 info->fix.type = FB_TYPE_PACKED_PIXELS;
986 info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
987 FB_VISUAL_TRUECOLOR;
988 info->fix.mmio_start = 0;
989 info->fix.mmio_len = 0;
990 info->fix.type_aux = 0;
991 info->fix.xpanstep = 1; /* doing it in hw */
992 info->fix.ypanstep = 1; /* doing it in hw */
993 info->fix.ywrapstep = 0;
994 info->fix.accel = FB_ACCEL_NONE;
995 info->fix.type_aux = 0;
996
997 info->fix.line_length = pitch;
998 return;
999}
1000EXPORT_SYMBOL(drm_fb_helper_fill_fix);
1001
1003void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, 1002void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
1004 uint32_t fb_width, uint32_t fb_height) 1003 uint32_t fb_width, uint32_t fb_height)
1005{ 1004{