search for: fb_is_primary_device

Displaying 2 results from an estimated 2 matches for "fb_is_primary_device".

2010 Jul 20
2
[PATCH] vga16fb: refuse to load in face of other driver controlling primary card
...6fb_device; static int __init vga16fb_init(void) { - int ret; + int ret, i; #ifndef MODULE char *option = NULL; @@ -1424,6 +1425,16 @@ static int __init vga16fb_init(void) vga16fb_setup(option); #endif + for (i = 0 ; i < FB_MAX; i++) { + if (!registered_fb[i]) + continue; + if (fb_is_primary_device(registered_fb[i])) { + printk(KERN_INFO "vga16fb: %s is driving the primary card, refusing to load\n", + registered_fb[i]->fix.id); + return -EBUSY; + } + } + ret = platform_driver_register(&vga16fb_driver); if (!ret) { -- 1.7.1
2010 May 16
0
[PATCH v2 3/3] vga16fb, drm: vga16fb->drm handoff
...gt;fix.id); @@ -1545,7 +1552,8 @@ register_framebuffer(struct fb_info *fb_info) if (fb_check_foreignness(fb_info)) return -ENOSYS; - remove_conflicting_framebuffers(fb_info->apertures, fb_info->fix.id); + remove_conflicting_framebuffers(fb_info->apertures, fb_info->fix.id, + fb_is_primary_device(fb_info)); num_registered_fb++; for (i = 0 ; i < FB_MAX; i++) diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index bf638a4..149c47a 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c @@ -1263,10 +1263,19 @@ static void vga16fb_imageblit(struct fb_info *info,...