Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#69181 - [linux] Not setting CONFIG_FB_MODE_HELPERS breaks uvesafb

Attached to Project: Arch Linux
Opened by Jeff Hodd (jghodd) - Saturday, 02 January 2021, 17:26 GMT
Last edited by Jan Alexander Steffens (heftig) - Wednesday, 21 April 2021, 20:40 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Levente Polyak (anthraxx)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description: uvesafb cannot be linked without vesa_modes which is tied up in a CONFIG_FB_MODE_HELPERS #ifdef. CONFIG_FB_MODE_HELPERS has been enabled for years and its disappearance means the loss of 2 global variables - vesa_modes and dmt_modes.

I tested fixing this issue with a private build of linux-5.10.4 with CONFIG_FB_MODE_HELPERS set to 'y'. It did indeed fix the issue with uvesafb.

Please re-enable this config flag. I have users who need uvesafb and they cannot currently update their kernel from 5.9.x.


Additional info:
* 5.10.x

Steps to reproduce:

from uvesafb.c:

/* Add valid VESA modes to our modelist. */
for (i = 0; i < VESA_MODEDB_SIZE; i++) {
if (uvesafb_is_valid_mode((struct fb_videomode *)
&vesa_modes[i], info))
fb_add_videomode(&vesa_modes[i], &info->modelist);
}


from include/linux/fb.h:

extern const struct fb_videomode vesa_modes[];


from drivers/video/fbdev/core/modedb.c:

#ifdef CONFIG_FB_MODE_HELPERS
const struct fb_videomode vesa_modes[] = {
/* 0 640x350-85 VESA */
{ NULL, 85, 640, 350, 31746, 96, 32, 60, 32, 64, 3,
FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA},
/* 1 640x400-85 VESA */
{ NULL, 85, 640, 400, 31746, 96, 32, 41, 01, 64, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 2 720x400-85 VESA */
{ NULL, 85, 721, 400, 28169, 108, 36, 42, 01, 72, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 3 640x480-60 VESA */
{ NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 4 640x480-72 VESA */
{ NULL, 72, 640, 480, 31746, 128, 24, 29, 9, 40, 2,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 5 640x480-75 VESA */
{ NULL, 75, 640, 480, 31746, 120, 16, 16, 01, 64, 3,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 6 640x480-85 VESA */
{ NULL, 85, 640, 480, 27777, 80, 56, 25, 01, 56, 3,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 7 800x600-56 VESA */
{ NULL, 56, 800, 600, 27777, 128, 24, 22, 01, 72, 2,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 8 800x600-60 VESA */
{ NULL, 60, 800, 600, 25000, 88, 40, 23, 01, 128, 4,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 9 800x600-72 VESA */
{ NULL, 72, 800, 600, 20000, 64, 56, 23, 37, 120, 6,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 10 800x600-75 VESA */
{ NULL, 75, 800, 600, 20202, 160, 16, 21, 01, 80, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 11 800x600-85 VESA */
{ NULL, 85, 800, 600, 17761, 152, 32, 27, 01, 64, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 12 1024x768i-43 VESA */
{ NULL, 43, 1024, 768, 22271, 56, 8, 41, 0, 176, 8,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_INTERLACED, FB_MODE_IS_VESA },
/* 13 1024x768-60 VESA */
{ NULL, 60, 1024, 768, 15384, 160, 24, 29, 3, 136, 6,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 14 1024x768-70 VESA */
{ NULL, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6,
0, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 15 1024x768-75 VESA */
{ NULL, 75, 1024, 768, 12690, 176, 16, 28, 1, 96, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 16 1024x768-85 VESA */
{ NULL, 85, 1024, 768, 10582, 208, 48, 36, 1, 96, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 17 1152x864-75 VESA */
{ NULL, 75, 1152, 864, 9259, 256, 64, 32, 1, 128, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 18 1280x960-60 VESA */
{ NULL, 60, 1280, 960, 9259, 312, 96, 36, 1, 112, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 19 1280x960-85 VESA */
{ NULL, 85, 1280, 960, 6734, 224, 64, 47, 1, 160, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 20 1280x1024-60 VESA */
{ NULL, 60, 1280, 1024, 9259, 248, 48, 38, 1, 112, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 21 1280x1024-75 VESA */
{ NULL, 75, 1280, 1024, 7407, 248, 16, 38, 1, 144, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 22 1280x1024-85 VESA */
{ NULL, 85, 1280, 1024, 6349, 224, 64, 44, 1, 160, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 23 1600x1200-60 VESA */
{ NULL, 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 24 1600x1200-65 VESA */
{ NULL, 65, 1600, 1200, 5698, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 25 1600x1200-70 VESA */
{ NULL, 70, 1600, 1200, 5291, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 26 1600x1200-75 VESA */
{ NULL, 75, 1600, 1200, 4938, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 27 1600x1200-85 VESA */
{ NULL, 85, 1600, 1200, 4357, 304, 64, 46, 1, 192, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 28 1792x1344-60 VESA */
{ NULL, 60, 1792, 1344, 4882, 328, 128, 46, 1, 200, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 29 1792x1344-75 VESA */
{ NULL, 75, 1792, 1344, 3831, 352, 96, 69, 1, 216, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 30 1856x1392-60 VESA */
{ NULL, 60, 1856, 1392, 4580, 352, 96, 43, 1, 224, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 31 1856x1392-75 VESA */
{ NULL, 75, 1856, 1392, 3472, 352, 128, 104, 1, 224, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 32 1920x1440-60 VESA */
{ NULL, 60, 1920, 1440, 4273, 344, 128, 56, 1, 200, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 33 1920x1440-75 VESA */
{ NULL, 75, 1920, 1440, 3367, 352, 144, 56, 1, 224, 3,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 34 1920x1200-60 RB VESA */
{ NULL, 60, 1920, 1200, 6493, 80, 48, 26, 3, 32, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 35 1920x1200-60 VESA */
{ NULL, 60, 1920, 1200, 5174, 336, 136, 36, 3, 200, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 36 1920x1200-75 VESA */
{ NULL, 75, 1920, 1200, 4077, 344, 136, 46, 3, 208, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 37 1920x1200-85 VESA */
{ NULL, 85, 1920, 1200, 3555, 352, 144, 53, 3, 208, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 38 2560x1600-60 RB VESA */
{ NULL, 60, 2560, 1600, 3724, 80, 48, 37, 3, 32, 6,
FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 39 2560x1600-60 VESA */
{ NULL, 60, 2560, 1600, 2869, 472, 192, 49, 3, 280, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 40 2560x1600-75 VESA */
{ NULL, 75, 2560, 1600, 2256, 488, 208, 63, 3, 280, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 41 2560x1600-85 VESA */
{ NULL, 85, 2560, 1600, 1979, 488, 208, 73, 3, 280, 6,
FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
/* 42 2560x1600-120 RB VESA */
{ NULL, 120, 2560, 1600, 1809, 80, 48, 85, 3, 32, 6,
FB_SYNC_HOR_HIGH_ACT, FB_VMODE_NONINTERLACED, FB_MODE_IS_VESA },
};
EXPORT_SYMBOL(vesa_modes);

const struct dmt_videomode dmt_modes[DMT_SIZE] = {
{ 0x01, 0x0000, 0x000000, &vesa_modes[0] },
{ 0x02, 0x3119, 0x000000, &vesa_modes[1] },
{ 0x03, 0x0000, 0x000000, &vesa_modes[2] },
{ 0x04, 0x3140, 0x000000, &vesa_modes[3] },
{ 0x05, 0x314c, 0x000000, &vesa_modes[4] },
{ 0x06, 0x314f, 0x000000, &vesa_modes[5] },
{ 0x07, 0x3159, 0x000000, &vesa_modes[6] },
{ 0x08, 0x0000, 0x000000, &vesa_modes[7] },
{ 0x09, 0x4540, 0x000000, &vesa_modes[8] },
{ 0x0a, 0x454c, 0x000000, &vesa_modes[9] },
{ 0x0b, 0x454f, 0x000000, &vesa_modes[10] },
{ 0x0c, 0x4559, 0x000000, &vesa_modes[11] },
{ 0x0d, 0x0000, 0x000000, NULL },
{ 0x0e, 0x0000, 0x000000, NULL },
{ 0x0f, 0x0000, 0x000000, &vesa_modes[12] },
{ 0x10, 0x6140, 0x000000, &vesa_modes[13] },
{ 0x11, 0x614a, 0x000000, &vesa_modes[14] },
{ 0x12, 0x614f, 0x000000, &vesa_modes[15] },
{ 0x13, 0x6159, 0x000000, &vesa_modes[16] },
{ 0x14, 0x0000, 0x000000, NULL },
{ 0x15, 0x714f, 0x000000, &vesa_modes[17] },
{ 0x16, 0x0000, 0x7f1c21, NULL },
{ 0x17, 0x0000, 0x7f1c28, NULL },
{ 0x18, 0x0000, 0x7f1c44, NULL },
{ 0x19, 0x0000, 0x7f1c62, NULL },
{ 0x1a, 0x0000, 0x000000, NULL },
{ 0x1b, 0x0000, 0x8f1821, NULL },
{ 0x1c, 0x8100, 0x8f1828, NULL },
{ 0x1d, 0x810f, 0x8f1844, NULL },
{ 0x1e, 0x8119, 0x8f1862, NULL },
{ 0x1f, 0x0000, 0x000000, NULL },
{ 0x20, 0x8140, 0x000000, &vesa_modes[18] },
{ 0x21, 0x8159, 0x000000, &vesa_modes[19] },
{ 0x22, 0x0000, 0x000000, NULL },
{ 0x23, 0x8180, 0x000000, &vesa_modes[20] },
{ 0x24, 0x818f, 0x000000, &vesa_modes[21] },
{ 0x25, 0x8199, 0x000000, &vesa_modes[22] },
{ 0x26, 0x0000, 0x000000, NULL },
{ 0x27, 0x0000, 0x000000, NULL },
{ 0x28, 0x0000, 0x000000, NULL },
{ 0x29, 0x0000, 0x0c2021, NULL },
{ 0x2a, 0x9040, 0x0c2028, NULL },
{ 0x2b, 0x904f, 0x0c2044, NULL },
{ 0x2c, 0x9059, 0x0c2062, NULL },
{ 0x2d, 0x0000, 0x000000, NULL },
{ 0x2e, 0x9500, 0xc11821, NULL },
{ 0x2f, 0x9500, 0xc11828, NULL },
{ 0x30, 0x950f, 0xc11844, NULL },
{ 0x31, 0x9519, 0xc11868, NULL },
{ 0x32, 0x0000, 0x000000, NULL },
{ 0x33, 0xa940, 0x000000, &vesa_modes[23] },
{ 0x34, 0xa945, 0x000000, &vesa_modes[24] },
{ 0x35, 0xa94a, 0x000000, &vesa_modes[25] },
{ 0x36, 0xa94f, 0x000000, &vesa_modes[26] },
{ 0x37, 0xa959, 0x000000, &vesa_modes[27] },
{ 0x38, 0x0000, 0x000000, NULL },
{ 0x39, 0x0000, 0x0c2821, NULL },
{ 0x3a, 0xb300, 0x0c2828, NULL },
{ 0x3b, 0xb30f, 0x0c2844, NULL },
{ 0x3c, 0xb319, 0x0c2868, NULL },
{ 0x3d, 0x0000, 0x000000, NULL },
{ 0x3e, 0xc140, 0x000000, &vesa_modes[28] },
{ 0x3f, 0xc14f, 0x000000, &vesa_modes[29] },
{ 0x40, 0x0000, 0x000000, NULL},
{ 0x41, 0xc940, 0x000000, &vesa_modes[30] },
{ 0x42, 0xc94f, 0x000000, &vesa_modes[31] },
{ 0x43, 0x0000, 0x000000, NULL },
{ 0x44, 0x0000, 0x572821, &vesa_modes[34] },
{ 0x45, 0xd100, 0x572828, &vesa_modes[35] },
{ 0x46, 0xd10f, 0x572844, &vesa_modes[36] },
{ 0x47, 0xd119, 0x572862, &vesa_modes[37] },
{ 0x48, 0x0000, 0x000000, NULL },
{ 0x49, 0xd140, 0x000000, &vesa_modes[32] },
{ 0x4a, 0xd14f, 0x000000, &vesa_modes[33] },
{ 0x4b, 0x0000, 0x000000, NULL },
{ 0x4c, 0x0000, 0x1f3821, &vesa_modes[38] },
{ 0x4d, 0x0000, 0x1f3828, &vesa_modes[39] },
{ 0x4e, 0x0000, 0x1f3844, &vesa_modes[40] },
{ 0x4f, 0x0000, 0x1f3862, &vesa_modes[41] },
{ 0x50, 0x0000, 0x000000, &vesa_modes[42] },
};
EXPORT_SYMBOL(dmt_modes);
#endif /* CONFIG_FB_MODE_HELPERS */
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Wednesday, 21 April 2021, 20:40 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 5.11.16.arch1-1

Loading...