diff options
author | Dave Airlie <airlied@redhat.com> | 2011-01-14 18:27:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 19:10:28 -0500 |
commit | 3632ef8909118db9584e1bed9538dc180adb32f8 (patch) | |
tree | 033925e11aef3c700492b4da0a1332f710de1299 /drivers/gpu | |
parent | 8473dbb43db92fa8de7c24d1973aaf1e0276a89f (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')
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 41 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_fb.c | 2 |
4 files changed, 24 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 | } |
608 | EXPORT_SYMBOL(drm_fb_helper_fini); | 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 | static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green, | 610 | static 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 | } |
1001 | EXPORT_SYMBOL(drm_fb_helper_single_fb_probe); | 980 | EXPORT_SYMBOL(drm_fb_helper_single_fb_probe); |
1002 | 981 | ||
982 | void 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 | } | ||
1000 | EXPORT_SYMBOL(drm_fb_helper_fill_fix); | ||
1001 | |||
1003 | void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, | 1002 | void 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 | { |
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index ee145a257287..512782728e51 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -148,6 +148,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev, | |||
148 | 148 | ||
149 | // memset(info->screen_base, 0, size); | 149 | // memset(info->screen_base, 0, size); |
150 | 150 | ||
151 | drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); | ||
151 | drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); | 152 | drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); |
152 | 153 | ||
153 | info->pixmap.size = 64*1024; | 154 | info->pixmap.size = 64*1024; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index a26d04740c88..6d56a54b6e2e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -359,6 +359,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev, | |||
359 | info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo); | 359 | info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo); |
360 | info->screen_size = size; | 360 | info->screen_size = size; |
361 | 361 | ||
362 | drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); | ||
362 | drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, sizes->fb_height); | 363 | drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, sizes->fb_height); |
363 | 364 | ||
364 | /* Set aperture base/size for vesafb takeover */ | 365 | /* Set aperture base/size for vesafb takeover */ |
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index ca32e9c1e91d..66324b5bb5ba 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c | |||
@@ -225,6 +225,8 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev, | |||
225 | 225 | ||
226 | strcpy(info->fix.id, "radeondrmfb"); | 226 | strcpy(info->fix.id, "radeondrmfb"); |
227 | 227 | ||
228 | drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); | ||
229 | |||
228 | info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; | 230 | info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT; |
229 | info->fbops = &radeonfb_ops; | 231 | info->fbops = &radeonfb_ops; |
230 | 232 | ||