diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2010-05-16 11:27:03 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 02:19:27 -0400 |
commit | 1471ca9aa71cd37b6a7476bb6f06a3a8622ea1bd (patch) | |
tree | 3bf5ef9fea79b0b92220cfcc3842db7afb5cd63d /include/linux/fb.h | |
parent | 3da1f33e79a5922c1a31077e7b33aba1cec19b94 (diff) |
fbdev: allow passing more than one aperture for handoff
It removes a hack from nouveau code which had to detect which
region to pass to kick vesafb/efifb.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r-- | include/linux/fb.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index c10163b4c40e..de5ff5fa8380 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -403,6 +403,7 @@ struct fb_cursor { | |||
403 | #include <linux/notifier.h> | 403 | #include <linux/notifier.h> |
404 | #include <linux/list.h> | 404 | #include <linux/list.h> |
405 | #include <linux/backlight.h> | 405 | #include <linux/backlight.h> |
406 | #include <linux/slab.h> | ||
406 | #include <asm/io.h> | 407 | #include <asm/io.h> |
407 | 408 | ||
408 | struct vm_area_struct; | 409 | struct vm_area_struct; |
@@ -862,10 +863,22 @@ struct fb_info { | |||
862 | /* we need the PCI or similiar aperture base/size not | 863 | /* we need the PCI or similiar aperture base/size not |
863 | smem_start/size as smem_start may just be an object | 864 | smem_start/size as smem_start may just be an object |
864 | allocated inside the aperture so may not actually overlap */ | 865 | allocated inside the aperture so may not actually overlap */ |
865 | resource_size_t aperture_base; | 866 | struct apertures_struct { |
866 | resource_size_t aperture_size; | 867 | unsigned int count; |
868 | struct aperture { | ||
869 | resource_size_t base; | ||
870 | resource_size_t size; | ||
871 | } ranges[0]; | ||
872 | } *apertures; | ||
867 | }; | 873 | }; |
868 | 874 | ||
875 | static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { | ||
876 | struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct) | ||
877 | + max_num * sizeof(struct aperture), GFP_KERNEL); | ||
878 | a->count = max_num; | ||
879 | return a; | ||
880 | } | ||
881 | |||
869 | #ifdef MODULE | 882 | #ifdef MODULE |
870 | #define FBINFO_DEFAULT FBINFO_MODULE | 883 | #define FBINFO_DEFAULT FBINFO_MODULE |
871 | #else | 884 | #else |