Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: Nuke FBINFO_MODULE

Instead check info->ops->owner, which amounts to the same.

Spotted because I want to remove the pile of broken and cargo-culted
fb_info->flags assignments in drm drivers.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Daniel Vetter and committed by
Bartlomiej Zolnierkiewicz
376b3ff5 6104c370

+5 -15
+1 -1
drivers/video/fbdev/core/fbcon.c
··· 564 564 unsigned short *save = NULL, *r, *q; 565 565 int logo_height; 566 566 567 - if (info->flags & FBINFO_MODULE) { 567 + if (info->fbops->owner) { 568 568 logo_shown = FBCON_LOGO_DONTSHOW; 569 569 return; 570 570 }
+2 -2
drivers/video/fbdev/core/fbmem.c
··· 463 463 464 464 /* Return if the frame buffer is not mapped or suspended */ 465 465 if (logo == NULL || info->state != FBINFO_STATE_RUNNING || 466 - info->flags & FBINFO_MODULE) 466 + info->fbops->owner) 467 467 return 0; 468 468 469 469 image.depth = 8; ··· 601 601 memset(&fb_logo, 0, sizeof(struct logo_data)); 602 602 603 603 if (info->flags & FBINFO_MISC_TILEBLITTING || 604 - info->flags & FBINFO_MODULE) 604 + info->fbops->owner) 605 605 return 0; 606 606 607 607 if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
+1 -3
drivers/video/fbdev/matrox/matroxfb_base.c
··· 1794 1794 minfo->fbops = matroxfb_ops; 1795 1795 minfo->fbcon.fbops = &minfo->fbops; 1796 1796 minfo->fbcon.pseudo_palette = minfo->cmap; 1797 - /* after __init time we are like module... no logo */ 1798 - minfo->fbcon.flags = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT; 1799 - minfo->fbcon.flags |= FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ 1797 + minfo->fbcon.flags = FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ 1800 1798 FBINFO_HWACCEL_COPYAREA | /* We have hw-assisted bmove */ 1801 1799 FBINFO_HWACCEL_FILLRECT | /* And fillrect */ 1802 1800 FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */
+1 -9
include/linux/fb.h
··· 400 400 #endif /* CONFIG_FB_TILEBLITTING */ 401 401 402 402 /* FBINFO_* = fb_info.flags bit flags */ 403 - #define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ 403 + #define FBINFO_DEFAULT 0 404 404 #define FBINFO_HWACCEL_DISABLED 0x0002 405 405 /* When FBINFO_HWACCEL_DISABLED is set: 406 406 * Hardware acceleration is turned off. Software implementations ··· 533 533 return a; 534 534 } 535 535 536 - #ifdef MODULE 537 - #define FBINFO_DEFAULT FBINFO_MODULE 538 - #else 539 - #define FBINFO_DEFAULT 0 540 - #endif 541 - 542 - // This will go away 543 - #define FBINFO_FLAG_MODULE FBINFO_MODULE 544 536 #define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT 545 537 546 538 /* This will go away