fbdev: udlfb: make CONFIG_FB_DEVICE optional
PATCH 1/1 fbdev: udlfb: make CONFIG_FB_DEVICE optional
The udlfb driver exposes sysfs attributes thus depends upon CONFIG_FB_DEVICE. This patch work wraps relavent code blocks with #ifdef CONFIG_FB_DEVICE so that the driver can still be built even when CONFIG_FB_DEVICE is not selected.
This addresses an item in Documentation/gpu/TODO.rst.
---
Note: this change has only been compile-tested.
drivers/video/fbdev/Kconfig | 1 - drivers/video/fbdev/udlfb.c | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/video/fbdev/Kconfig +0 -1
@@ -1596,7 +1596,6 @@ config FB_SMSCUFX config FB_UDL tristate "Displaylink USB Framebuffer support" depends on FB && USB - depends on FB_DEVICE select FB_MODE_HELPERS select FB_SYSMEM_HELPERS_DEFERRED help
drivers/video/fbdev/udlfb.c +8 -0
@@ -1382,6 +1382,7 @@ static int dlfb_setup_modes(struct dlfb_data *dlfb,return result; } +#ifdef CONFIG_FB_DEVICE static ssize_t metrics_bytes_rendered_show (struct device *fbdev,struct device_attribute *a,char *buf) {struct fb_info *fb_info =dev_get_drvdata (fbdev);
@@ -1413,6 +1414,7 @@ static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev,return sysfs_emit (buf,"%u\n" ,atomic_read (&dlfb->cpu_kcycles_used)); } +#endif static ssize_t edid_show( struct file *filp,
@@ -1486,6 +1488,7 @@ static const struct bin_attribute edid_attr = { .write = edid_store }; +#ifdef CONFIG_FB_DEVICE static const struct device_attribute fb_device_attrs[] = {__ATTR_RO (metrics_bytes_rendered), __ATTR_RO(metrics_bytes_identical),
@@ -1493,6 +1496,7 @@ static const struct device_attribute fb_device_attrs[] = {__ATTR_RO (metrics_cpu_kcycles_used), __ATTR(metrics_reset, S_IWUSR, NULL, metrics_reset_store), }; +#endif /* * This is necessary before we can communicate with the display controller.
@@ -1702,6 +1706,7 @@ static int dlfb_usb_probe(struct usb_interface *intf, goto error; } +#ifdef CONFIG_FB_DEVICE for (i =0 ; i <ARRAY_SIZE (fb_device_attrs); i++) { attr = &fb_device_attrs[i]; retval =device_create_file (info->dev, attr);
@@ -1710,6 +1715,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,"failed to create '%s' attribute: %d\n" , attr->attr.name, retval); } +#endif retval =device_create_bin_file (info->dev, &edid_attr);if (retval)
@@ -1753,9 +1759,11 @@ static void dlfb_usb_disconnect(struct usb_interface *intf)/* this function will wait for all in-flight urbs to complete */ dlfb_free_urb_list (dlfb); +#ifdef CONFIG_FB_DEVICE /* remove udlfb's sysfs interfaces */ for (i =0 ; i <ARRAY_SIZE (fb_device_attrs); i++)device_remove_file (info->dev, &fb_device_attrs[i]); +#endif device_remove_bin_file (info->dev, &edid_attr);unregister_framebuffer (info);
Signature · 1 line
2.43.0
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Sukrut,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master v6.17-rc7 next-20250926] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sukrut-Heroorkar/fbdev-udlfb-make-CONFIG_FB_DEVICE-optional/20250925-015939 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20250924175743.6790-1-hsukrut3%40gmail.com patch subject: [PATCH] fbdev: udlfb: make CONFIG_FB_DEVICE optional config: x86_64-randconfig-075-20250927 (https://download.01.org/0day-ci/archive/20250927/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250927/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
933 | dev_dbg(info->dev, "open, user=%d fb_info=%p count=%d\n",
| ^~
include/linux/dynamic_debug.h:224:29: note: in definition of macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:9: note: in expansion of macro '_dynamic_func_call_cls'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:273:9: note: in expansion of macro '_dynamic_func_call'
273 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:165:9: note: in expansion of macro 'dynamic_dev_dbg'
165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/video/fbdev/udlfb.c:933:9: note: in expansion of macro 'dev_dbg'
933 | dev_dbg(info->dev, "open, user=%d fb_info=%p count=%d\n",
| ^~~~~~~
drivers/video/fbdev/udlfb.c: In function 'dlfb_ops_release':
drivers/video/fbdev/udlfb.c:986:21: error: 'struct fb_info' has no member named 'dev'
986 | dev_dbg(info->dev, "release, user=%d count=%d\n", user, dlfb->fb_count);
| ^~
include/linux/dynamic_debug.h:224:29: note: in definition of macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:9: note: in expansion of macro '_dynamic_func_call_cls'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:273:9: note: in expansion of macro '_dynamic_func_call'
273 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:165:9: note: in expansion of macro 'dynamic_dev_dbg'
165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/video/fbdev/udlfb.c:986:9: note: in expansion of macro 'dev_dbg'
986 | dev_dbg(info->dev, "release, user=%d count=%d\n", user, dlfb->fb_count);
| ^~~~~~~
drivers/video/fbdev/udlfb.c: In function 'dlfb_ops_blank':
drivers/video/fbdev/udlfb.c:1099:21: error: 'struct fb_info' has no member named 'dev'
1099 | dev_dbg(info->dev, "blank, mode %d --> %d\n",
| ^~
include/linux/dynamic_debug.h:224:29: note: in definition of macro '__dynamic_func_call_cls'
224 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:250:9: note: in expansion of macro '_dynamic_func_call_cls'
250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:273:9: note: in expansion of macro '_dynamic_func_call'
273 | _dynamic_func_call(fmt, __dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:165:9: note: in expansion of macro 'dynamic_dev_dbg'
165 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/video/fbdev/udlfb.c:1099:9: note: in expansion of macro 'dev_dbg'
1099 | dev_dbg(info->dev, "blank, mode %d --> %d\n",
| ^~~~~~~
In file included from include/linux/device.h:15,
from include/linux/usb.h:19,
from drivers/video/fbdev/udlfb.c:19:
drivers/video/fbdev/udlfb.c: In function 'dlfb_realloc_framebuffer':
drivers/video/fbdev/udlfb.c:1193:37: error: 'struct fb_info' has no member named 'dev'
1193 | dev_err(info->dev, "Virtual framebuffer alloc failed\n");
| ^~
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:1193:25: note: in expansion of macro 'dev_err'
1193 | dev_err(info->dev, "Virtual framebuffer alloc failed\n");
| ^~~~~~~
drivers/video/fbdev/udlfb.c:1217:38: error: 'struct fb_info' has no member named 'dev'
1217 | dev_info(info->dev,
| ^~
include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:1217:25: note: in expansion of macro 'dev_info'
1217 | dev_info(info->dev,
| ^~~~~~~~
drivers/video/fbdev/udlfb.c: In function 'dlfb_setup_modes':
drivers/video/fbdev/udlfb.c:1251:17: error: 'struct fb_info' has no member named 'dev'
1251 | if (info->dev) {
| ^~
drivers/video/fbdev/udlfb.c:1255:27: error: 'struct fb_info' has no member named 'dev'
1255 | dev = info->dev;
| ^~
drivers/video/fbdev/udlfb.c:1379:17: error: 'struct fb_info' has no member named 'dev'
1379 | if (info->dev)
| ^~
drivers/video/fbdev/udlfb.c: In function 'dlfb_usb_probe':
drivers/video/fbdev/udlfb.c:1720:45: error: 'struct fb_info' has no member named 'dev'
1720 | retval = device_create_bin_file(info->dev, &edid_attr);
| ^~
drivers/video/fbdev/udlfb.c:1727:31: error: 'struct fb_info' has no member named 'dev'
1727 | dev_name(info->dev), info->var.xres, info->var.yres,
| ^~
include/linux/dev_printk.h:110:37: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/video/fbdev/udlfb.c:1725:9: note: in expansion of macro 'dev_info'
1725 | dev_info(info->device,
| ^~~~~~~~
>> drivers/video/fbdev/udlfb.c:1605:40: warning: unused variable 'attr' [-Wunused-variable]
1605 | const struct device_attribute *attr;
| ^~~~
>> drivers/video/fbdev/udlfb.c:1604:13: warning: unused variable 'i' [-Wunused-variable]
1604 | int i;
| ^
drivers/video/fbdev/udlfb.c: In function 'dlfb_usb_disconnect':
drivers/video/fbdev/udlfb.c:1767:36: error: 'struct fb_info' has no member named 'dev'
1767 | device_remove_bin_file(info->dev, &edid_attr);
| ^~
drivers/video/fbdev/udlfb.c:1746:13: warning: unused variable 'i' [-Wunused-variable]
1746 | int i;
| ^
drivers/video/fbdev/udlfb.c: At top level:
>> drivers/video/fbdev/udlfb.c:1468:16: warning: 'metrics_reset_store' defined but not used [-Wunused-function] 1468 | static ssize_t metrics_reset_store(struct device *fbdev,
| ^~~~~~~~~~~~~~~~~~~
vim +/attr +1605 drivers/video/fbdev/udlfb.c
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1467
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 @1468 static ssize_t metrics_reset_store(struct device *fbdev,
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1469 struct device_attribute *attr,
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1470 const char *buf, size_t count)
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1471 {
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1472 struct fb_info *fb_info = dev_get_drvdata(fbdev);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1473 struct dlfb_data *dlfb = fb_info->par;
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1474
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1475 atomic_set(&dlfb->bytes_rendered, 0);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1476 atomic_set(&dlfb->bytes_identical, 0);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1477 atomic_set(&dlfb->bytes_sent, 0);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1478 atomic_set(&dlfb->cpu_kcycles_used, 0);
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1479
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1480 return count;
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1481 }
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1482
598b2eedfc3fbe drivers/video/fbdev/udlfb.c Bhumika Goyal 2017-08-18 1483 static const struct bin_attribute edid_attr = {
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1484 .attr.name = "edid",
8ef8cc4fca4a92 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1485 .attr.mode = 0666,
b9f03a3cd06c6f drivers/video/udlfb.c Paul Mundt 2011-01-06 1486 .size = EDID_LENGTH,
2fbe82037ab251 drivers/video/fbdev/udlfb.c Thomas Weißschuh 2025-05-30 1487 .read = edid_show,
2fbe82037ab251 drivers/video/fbdev/udlfb.c Thomas Weißschuh 2025-05-30 1488 .write = edid_store
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1489 };
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1490
00bab805c21a22 drivers/video/fbdev/udlfb.c Sukrut Heroorkar 2025-09-24 1491 #ifdef CONFIG_FB_DEVICE
fa738a5c4b2a6b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1492 static const struct device_attribute fb_device_attrs[] = {
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1493 __ATTR_RO(metrics_bytes_rendered),
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1494 __ATTR_RO(metrics_bytes_identical),
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1495 __ATTR_RO(metrics_bytes_sent),
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1496 __ATTR_RO(metrics_cpu_kcycles_used),
926c11151e3b82 drivers/staging/udlfb/udlfb.c Greg Kroah-Hartman 2010-11-18 1497 __ATTR(metrics_reset, S_IWUSR, NULL, metrics_reset_store),
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1498 };
00bab805c21a22 drivers/video/fbdev/udlfb.c Sukrut Heroorkar 2025-09-24 1499 #endif
7d9485e2c53caa drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1500
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1501 /*
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1502 * This is necessary before we can communicate with the display controller.
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1503 */
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1504 static int dlfb_select_std_channel(struct dlfb_data *dlfb)
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1505 {
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1506 int ret;
45f580c42e5c12 drivers/video/fbdev/udlfb.c Maksim Salau 2017-05-02 1507 static const u8 set_def_chn[] = {
45f580c42e5c12 drivers/video/fbdev/udlfb.c Maksim Salau 2017-05-02 1508 0x57, 0xCD, 0xDC, 0xA7,
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1509 0x1C, 0x88, 0x5E, 0x15,
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1510 0x60, 0xFE, 0xC6, 0x97,
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1511 0x16, 0x3D, 0x47, 0xF2 };
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1512
537adba4083ed8 drivers/video/fbdev/udlfb.c Helge Deller 2023-05-19 1513 ret = usb_control_msg_send(dlfb->udev, 0, NR_USB_REQUEST_CHANNEL,
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1514 (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0,
537adba4083ed8 drivers/video/fbdev/udlfb.c Helge Deller 2023-05-19 1515 &set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT,
537adba4083ed8 drivers/video/fbdev/udlfb.c Helge Deller 2023-05-19 1516 GFP_KERNEL);
45f580c42e5c12 drivers/video/fbdev/udlfb.c Maksim Salau 2017-05-02 1517
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1518 return ret;
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1519 }
cc403dc67d10b8 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1520
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1521 static int dlfb_parse_vendor_descriptor(struct dlfb_data *dlfb,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1522 struct usb_interface *intf)
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1523 {
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1524 char *desc;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1525 char *buf;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1526 char *desc_end;
f63cb8d7aa31e7 drivers/video/fbdev/udlfb.c Alexey Klimov 2015-06-08 1527 int total_len;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1528
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1529 buf = kzalloc(MAX_VENDOR_DESCRIPTOR_SIZE, GFP_KERNEL);
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1530 if (!buf)
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1531 return false;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1532 desc = buf;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1533
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1534 total_len = usb_get_descriptor(interface_to_usbdev(intf),
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1535 0x5f, /* vendor specific */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1536 0, desc, MAX_VENDOR_DESCRIPTOR_SIZE);
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1537
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1538 /* if not found, look in configuration descriptor */
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1539 if (total_len < 0) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1540 if (0 == usb_get_extra_descriptor(intf->cur_altsetting,
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1541 0x5f, &desc))
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1542 total_len = (int) desc[0];
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1543 }
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1544
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1545 if (total_len > 5) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1546 dev_info(&intf->dev,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1547 "vendor descriptor length: %d data: %11ph\n",
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1548 total_len, desc);
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1549
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1550 if ((desc[0] != total_len) || /* descriptor length */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1551 (desc[1] != 0x5f) || /* vendor descriptor type */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1552 (desc[2] != 0x01) || /* version (2 bytes) */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1553 (desc[3] != 0x00) ||
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1554 (desc[4] != total_len - 2)) /* length after type */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1555 goto unrecognized;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1556
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1557 desc_end = desc + total_len;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1558 desc += 5; /* the fixed header we've already parsed */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1559
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1560 while (desc < desc_end) {
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1561 u8 length;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1562 u16 key;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1563
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1564 key = *desc++;
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1565 key |= (u16)*desc++ << 8;
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1566 length = *desc++;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1567
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1568 switch (key) {
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1569 case 0x0200: { /* max_area */
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1570 u32 max_area = *desc++;
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1571 max_area |= (u32)*desc++ << 8;
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1572 max_area |= (u32)*desc++ << 16;
115e77597efcc9 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-03-12 1573 max_area |= (u32)*desc++ << 24;
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1574 dev_warn(&intf->dev,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1575 "DL chip limited to %d pixel modes\n",
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1576 max_area);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1577 dlfb->sku_pixel_limit = max_area;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1578 break;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1579 }
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1580 default:
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1581 break;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1582 }
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1583 desc += length;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1584 }
f2e1fc9d5d12fb drivers/video/udlfb.c Andrew Kephart 2011-08-21 1585 } else {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1586 dev_info(&intf->dev, "vendor descriptor not available (%d)\n",
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1587 total_len);
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1588 }
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1589
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1590 goto success;
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1591
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1592 unrecognized:
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1593 /* allow udlfb to load for now even if firmware unrecognized */
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1594 dev_err(&intf->dev, "Unrecognized vendor firmware descriptor\n");
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1595
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1596 success:
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1597 kfree(buf);
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1598 return true;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1599 }
8d21547d3c9c3b drivers/video/udlfb.c Bernie Thompson 2012-03-01 1600
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1601 static int dlfb_usb_probe(struct usb_interface *intf,
59277b679f8b5c drivers/staging/udlfb/udlfb.c Bernie Thompson 2009-11-24 1602 const struct usb_device_id *id)
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1603 {
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 @1604 int i;
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 @1605 const struct device_attribute *attr;
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1606 struct dlfb_data *dlfb;
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1607 struct fb_info *info;
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1608 int retval;
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1609 struct usb_device *usbdev = interface_to_usbdev(intf);
ed9de4ed398757 drivers/video/fbdev/udlfb.c Alan Stern 2023-05-19 1610 static u8 out_ep[] = {OUT_EP_NUM + USB_DIR_OUT, 0};
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1611
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1612 /* usb initialization */
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1613 dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1614 if (!dlfb) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1615 dev_err(&intf->dev, "%s: failed to allocate dlfb\n", __func__);
c143a559b073ae drivers/video/fbdev/udlfb.c Dan Carpenter 2018-12-20 1616 return -ENOMEM;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1617 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1618
7433914efd584b drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-07-25 1619 INIT_LIST_HEAD(&dlfb->deferred_free);
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1620
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1621 dlfb->udev = usb_get_dev(usbdev);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1622 usb_set_intfdata(intf, dlfb);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1623
ed9de4ed398757 drivers/video/fbdev/udlfb.c Alan Stern 2023-05-19 1624 if (!usb_check_bulk_endpoints(intf, out_ep)) {
ed9de4ed398757 drivers/video/fbdev/udlfb.c Alan Stern 2023-05-19 1625 dev_err(&intf->dev, "Invalid DisplayLink device!\n");
ed9de4ed398757 drivers/video/fbdev/udlfb.c Alan Stern 2023-05-19 1626 retval = -EINVAL;
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1627 goto error;
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1628 }
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1629
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1630 dev_dbg(&intf->dev, "console enable=%d\n", console);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1631 dev_dbg(&intf->dev, "fb_defio enable=%d\n", fb_defio);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1632 dev_dbg(&intf->dev, "shadow enable=%d\n", shadow);
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1633
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1634 dlfb->sku_pixel_limit = 2048 * 1152; /* default to maximum */
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1635
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1636 if (!dlfb_parse_vendor_descriptor(dlfb, intf)) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1637 dev_err(&intf->dev,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1638 "firmware not recognized, incompatible device?\n");
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1639 retval = -ENODEV;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1640 goto error;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1641 }
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1642
664c5f18490f25 drivers/video/udlfb.c Ben Collins 2012-03-03 1643 if (pixel_limit) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1644 dev_warn(&intf->dev,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1645 "DL chip limit of %d overridden to %d\n",
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1646 dlfb->sku_pixel_limit, pixel_limit);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1647 dlfb->sku_pixel_limit = pixel_limit;
664c5f18490f25 drivers/video/udlfb.c Ben Collins 2012-03-03 1648 }
664c5f18490f25 drivers/video/udlfb.c Ben Collins 2012-03-03 1649
664c5f18490f25 drivers/video/udlfb.c Ben Collins 2012-03-03 1650
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1651 /* allocates framebuffer driver structure, not framebuffer memory */
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1652 info = framebuffer_alloc(0, &dlfb->udev->dev);
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1653 if (!info) {
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1654 retval = -ENOMEM;
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1655 goto error;
aaf7dbe07385e0 drivers/video/fbdev/udlfb.c Pavel Skripkin 2022-03-22 1656 }
33077b8d3042e0 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1657
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1658 dlfb->info = info;
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1659 info->par = dlfb;
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1660 info->pseudo_palette = dlfb->pseudo_palette;
2c29cfc3eaf117 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-07-25 1661 dlfb->ops = dlfb_ops;
2c29cfc3eaf117 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-07-25 1662 info->fbops = &dlfb->ops;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1663
babc250e278eac drivers/video/fbdev/udlfb.c Mikulas Patocka 2019-04-01 1664 mutex_init(&dlfb->render_mutex);
6b11f9d8433b47 drivers/video/fbdev/udlfb.c Mikulas Patocka 2019-04-01 1665 dlfb_init_damage(dlfb);
6b11f9d8433b47 drivers/video/fbdev/udlfb.c Mikulas Patocka 2019-04-01 1666 spin_lock_init(&dlfb->damage_lock);
6b11f9d8433b47 drivers/video/fbdev/udlfb.c Mikulas Patocka 2019-04-01 1667 INIT_WORK(&dlfb->damage_work, dlfb_damage_work);
6b11f9d8433b47 drivers/video/fbdev/udlfb.c Mikulas Patocka 2019-04-01 1668
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1669 INIT_LIST_HEAD(&info->modelist);
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1670
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1671 if (!dlfb_alloc_urb_list(dlfb, WRITES_IN_FLIGHT, MAX_TRANSFER)) {
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1672 retval = -ENOMEM;
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1673 dev_err(&intf->dev, "unable to allocate urb list\n");
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1674 goto error;
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1675 }
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1676
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1677 /* We don't register a new USB class. Our client interface is dlfbev */
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1678
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1679 retval = fb_alloc_cmap(&info->cmap, 256, 0);
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1680 if (retval < 0) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1681 dev_err(info->device, "cmap allocation failed: %d\n", retval);
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1682 goto error;
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1683 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1684
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1685 retval = dlfb_setup_modes(dlfb, info, NULL, 0);
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1686 if (retval != 0) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1687 dev_err(info->device,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1688 "unable to find common mode for display and adapter\n");
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1689 goto error;
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1690 }
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1691
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1692 /* ready to begin using device */
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1693
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1694 atomic_set(&dlfb->usb_active, 1);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1695 dlfb_select_std_channel(dlfb);
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1696
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1697 dlfb_ops_check_var(&info->var, info);
7433914efd584b drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-07-25 1698 retval = dlfb_ops_set_par(info);
7433914efd584b drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-07-25 1699 if (retval)
7433914efd584b drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-07-25 1700 goto error;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1701
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1702 retval = register_framebuffer(info);
59277b679f8b5c drivers/staging/udlfb/udlfb.c Bernie Thompson 2009-11-24 1703 if (retval < 0) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1704 dev_err(info->device, "unable to register framebuffer: %d\n",
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1705 retval);
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1706 goto error;
7316bc55ed20c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-10 1707 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1708
00bab805c21a22 drivers/video/fbdev/udlfb.c Sukrut Heroorkar 2025-09-24 1709 #ifdef CONFIG_FB_DEVICE
94cd1ae2fd251f drivers/video/udlfb.c Liu Yuan 2011-04-18 1710 for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) {
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1711 attr = &fb_device_attrs[i];
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1712 retval = device_create_file(info->dev, attr);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1713 if (retval)
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1714 dev_warn(info->device,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1715 "failed to create '%s' attribute: %d\n",
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1716 attr->attr.name, retval);
94cd1ae2fd251f drivers/video/udlfb.c Liu Yuan 2011-04-18 1717 }
00bab805c21a22 drivers/video/fbdev/udlfb.c Sukrut Heroorkar 2025-09-24 1718 #endif
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1719
94cd1ae2fd251f drivers/video/udlfb.c Liu Yuan 2011-04-18 1720 retval = device_create_bin_file(info->dev, &edid_attr);
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1721 if (retval)
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1722 dev_warn(info->device, "failed to create '%s' attribute: %d\n",
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1723 edid_attr.attr.name, retval);
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1724
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 @1725 dev_info(info->device,
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1726 "%s is DisplayLink USB device (%dx%d, %dK framebuffer memory)\n",
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 @1727 dev_name(info->dev), info->var.xres, info->var.yres,
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1728 ((dlfb->backing_buffer) ?
18dffdf8913ab9 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1729 info->fix.smem_len * 2 : info->fix.smem_len) >> 10);
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1730 return 0;
94cd1ae2fd251f drivers/video/udlfb.c Liu Yuan 2011-04-18 1731
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1732 error:
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1733 if (dlfb->info) {
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1734 dlfb_ops_destroy(dlfb->info);
c143a559b073ae drivers/video/fbdev/udlfb.c Dan Carpenter 2018-12-20 1735 } else {
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1736 usb_put_dev(dlfb->udev);
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1737 kfree(dlfb);
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1738 }
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1739 return retval;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1740 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1741
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1742 static void dlfb_usb_disconnect(struct usb_interface *intf)
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1743 {
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1744 struct dlfb_data *dlfb;
59277b679f8b5c drivers/staging/udlfb/udlfb.c Bernie Thompson 2009-11-24 1745 struct fb_info *info;
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1746 int i;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1747
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1748 dlfb = usb_get_intfdata(intf);
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1749 info = dlfb->info;
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1750
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 1751 dev_dbg(&intf->dev, "USB disconnect starting\n");
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1752
33077b8d3042e0 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1753 /* we virtualize until all fb clients release. Then we free */
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1754 dlfb->virtualized = true;
33077b8d3042e0 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1755
33077b8d3042e0 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1756 /* When non-active we'll update virtual framebuffer, but no new urbs */
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1757 atomic_set(&dlfb->usb_active, 0);
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1758
8d21547d3c9c3b drivers/video/udlfb.c Bernie Thompson 2012-03-01 1759 /* this function will wait for all in-flight urbs to complete */
7ea46206d1706b drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-15 1760 dlfb_free_urb_list(dlfb);
8d21547d3c9c3b drivers/video/udlfb.c Bernie Thompson 2012-03-01 1761
00bab805c21a22 drivers/video/fbdev/udlfb.c Sukrut Heroorkar 2025-09-24 1762 #ifdef CONFIG_FB_DEVICE
33077b8d3042e0 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 1763 /* remove udlfb's sysfs interfaces */
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1764 for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++)
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 1765 device_remove_file(info->dev, &fb_device_attrs[i]);
00bab805c21a22 drivers/video/fbdev/udlfb.c Sukrut Heroorkar 2025-09-24 1766 #endif
2469d5dbcafe06 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 @1767 device_remove_bin_file(info->dev, &edid_attr);
8d21547d3c9c3b drivers/video/udlfb.c Bernie Thompson 2012-03-01 1768
68a958a915ca91 drivers/video/fbdev/udlfb.c Mikulas Patocka 2018-10-08 1769 unregister_framebuffer(info);
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1770 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 1771 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botkernel test robot noticed the following build errors:
Hi Sukrut,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on linus/master v6.17-rc7 next-20250926] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sukrut-Heroorkar/fbdev-udlfb-make-CONFIG_FB_DEVICE-optional/20250925-015939 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20250924175743.6790-1-hsukrut3%40gmail.com patch subject: [PATCH] fbdev: udlfb: make CONFIG_FB_DEVICE optional config: x86_64-randconfig-001-20250927 (https://download.01.org/0day-ci/archive/20250927/[email protected]/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250927/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> drivers/video/fbdev/udlfb.c:345:16: error: no member named 'dev' in 'struct fb_info'
345 | dev_dbg(info->dev, "mmap() framebuffer addr:%lu size:%lu\n",
| ~~~~ ^
include/linux/dev_printk.h:171:28: note: expanded from macro 'dev_dbg'
171 | dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:139:23: note: expanded from macro 'dev_no_printk'
139 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:933:16: error: no member named 'dev' in 'struct fb_info'
933 | dev_dbg(info->dev, "open, user=%d fb_info=%p count=%d\n",
| ~~~~ ^
include/linux/dev_printk.h:171:28: note: expanded from macro 'dev_dbg'
171 | dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:139:23: note: expanded from macro 'dev_no_printk'
139 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:986:16: error: no member named 'dev' in 'struct fb_info'
986 | dev_dbg(info->dev, "release, user=%d count=%d\n", user, dlfb->fb_count);
| ~~~~ ^
include/linux/dev_printk.h:171:28: note: expanded from macro 'dev_dbg'
171 | dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:139:23: note: expanded from macro 'dev_no_printk'
139 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:1099:16: error: no member named 'dev' in 'struct fb_info'
1099 | dev_dbg(info->dev, "blank, mode %d --> %d\n",
| ~~~~ ^
include/linux/dev_printk.h:171:28: note: expanded from macro 'dev_dbg'
171 | dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:139:23: note: expanded from macro 'dev_no_printk'
139 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:1193:18: error: no member named 'dev' in 'struct fb_info'
1193 | dev_err(info->dev, "Virtual framebuffer alloc failed\n");
| ~~~~ ^
include/linux/dev_printk.h:154:44: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:1217:19: error: no member named 'dev' in 'struct fb_info'
1217 | dev_info(info->dev,
| ~~~~ ^
include/linux/dev_printk.h:160:46: note: expanded from macro 'dev_info'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~
include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
drivers/video/fbdev/udlfb.c:1251:12: error: no member named 'dev' in 'struct fb_info'
1251 | if (info->dev) {
| ~~~~ ^
drivers/video/fbdev/udlfb.c:1255:15: error: no member named 'dev' in 'struct fb_info'
1255 | dev = info->dev;
| ~~~~ ^
drivers/video/fbdev/udlfb.c:1379:12: error: no member named 'dev' in 'struct fb_info'
1379 | if (info->dev)
| ~~~~ ^
drivers/video/fbdev/udlfb.c:1720:40: error: no member named 'dev' in 'struct fb_info'
1720 | retval = device_create_bin_file(info->dev, &edid_attr);
| ~~~~ ^
drivers/video/fbdev/udlfb.c:1727:19: error: no member named 'dev' in 'struct fb_info'
1727 | dev_name(info->dev), info->var.xres, info->var.yres,
| ~~~~ ^
include/linux/dev_printk.h:160:67: note: expanded from macro 'dev_info'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~ drivers/video/fbdev/udlfb.c:1767:31: error: no member named 'dev' in 'struct fb_info'
1767 | device_remove_bin_file(info->dev, &edid_attr);
| ~~~~ ^
12 errors generated.
vim +345 drivers/video/fbdev/udlfb.c
59277b679f8b5c drivers/staging/udlfb/udlfb.c Bernie Thompson 2009-11-24 323
4574203f45eb26 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-02-15 324 static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 325 {
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 326 unsigned long start = vma->vm_start;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 327 unsigned long size = vma->vm_end - vma->vm_start;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 328 unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 329 unsigned long page, pos;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 330
5905585103276b drivers/video/fbdev/udlfb.c Thomas Zimmermann 2022-04-29 331 if (info->fbdefio)
5905585103276b drivers/video/fbdev/udlfb.c Thomas Zimmermann 2022-04-29 332 return fb_deferred_io_mmap(info, vma);
5905585103276b drivers/video/fbdev/udlfb.c Thomas Zimmermann 2022-04-29 333
76f92201b821dd drivers/video/fbdev/udlfb.c Thomas Zimmermann 2023-11-27 334 vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
76f92201b821dd drivers/video/fbdev/udlfb.c Thomas Zimmermann 2023-11-27 335
04f8afbec37f63 drivers/video/udlfb.c Tomi Valkeinen 2013-04-18 336 if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
04f8afbec37f63 drivers/video/udlfb.c Tomi Valkeinen 2013-04-18 337 return -EINVAL;
04f8afbec37f63 drivers/video/udlfb.c Tomi Valkeinen 2013-04-18 338 if (size > info->fix.smem_len)
04f8afbec37f63 drivers/video/udlfb.c Tomi Valkeinen 2013-04-18 339 return -EINVAL;
04f8afbec37f63 drivers/video/udlfb.c Tomi Valkeinen 2013-04-18 340 if (offset > info->fix.smem_len - size)
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 341 return -EINVAL;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 342
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 343 pos = (unsigned long)info->fix.smem_start + offset;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 344
5865889fe43194 drivers/video/fbdev/udlfb.c Ladislav Michl 2018-01-16 @345 dev_dbg(info->dev, "mmap() framebuffer addr:%lu size:%lu\n",
2685cffa9e7992 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 346 pos, size);
2685cffa9e7992 drivers/staging/udlfb/udlfb.c Bernie Thompson 2010-09-05 347
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 348 while (size > 0) {
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 349 page = vmalloc_to_pfn((void *)pos);
f05e0575ed334a drivers/staging/udlfb/udlfb.c Greg Kroah-Hartman 2009-06-03 350 if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 351 return -EAGAIN;
f05e0575ed334a drivers/staging/udlfb/udlfb.c Greg Kroah-Hartman 2009-06-03 352
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 353 start += PAGE_SIZE;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 354 pos += PAGE_SIZE;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 355 if (size > PAGE_SIZE)
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 356 size -= PAGE_SIZE;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 357 else
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 358 size = 0;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 359 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 360
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 361 return 0;
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 362 }
88e58b1a42f8c1 drivers/staging/udlfb/udlfb.c Roberto De Ioris 2009-06-03 363 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 4 lines · kernel test robot
Hi Sukrut,
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Hi David,
Apologies for the late reply,
Quoted 10 lines · David Hunter
Quoted 4 lines · kernel test robot
Hi Sukrut,
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed
in this case.
Helge Deller
maintainerQuoted 6 lines
Quoted 3 lines
Quoted 1 line
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed in this case.
Look at the reported build error, which seems to happen in dev_dbg(). So, maybe in your testing you did not have debugging enabled? The report contains the .config file with which you can test.
Helge
Hi
Am 02.10.25 um 08:41 schrieb Helge Deller:
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed in this case.
Look at the reported build error, which seems to happen in
dev_dbg(). So, maybe in your testing you did not have debugging enabled? The report contains the .config file with which you can test.
Can we rather make an effort to remove the udlfb driver entirely? A few years back, there was one user who was still using it because of some problems with the DRM udl driver. But I think we've addressed them. The discussion is at [1].
[1] https://lore.kernel.org/dri-devel/[email protected]/
Best regards
Thomas
Quoted 2 lines
Helge
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Hi
Quoted 11 lines · Thomas Zimmermann
Hi
Am 02.10.25 um 08:41 schrieb Helge Deller:
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed in this case.
Quoted 8 lines
Quoted 3 lines
Look at the reported build error, which seems to happen in
dev_dbg(). So, maybe in your testing you did not have debugging enabled? The report contains the .config file with which you can test.Can we rather make an effort to remove the udlfb driver entirely? A few years back, there was one user who was still using it because of some problems with the DRM udl driver. But I think we've addressed them. The discussion is at [1].
Should I send a patch series to completely remove udlfb, since [1] echoed that DRM udl driver is good enough?
Quoted 20 lines
[1]
https://lore.kernel.org/dri-devel/[email protected]/Best regards
ThomasQuoted 2 lines
Helge
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Helge Deller
maintainerQuoted 9 lines · sukrut heroorkar
Quoted 8 lines · Thomas Zimmermann
Am 02.10.25 um 08:41 schrieb Helge Deller:
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed in this case.
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Look at the reported build error, which seems to happen in
dev_dbg(). So, maybe in your testing you did not have debugging enabled? The report contains the .config file with which you can test.Can we rather make an effort to remove the udlfb driver entirely? A few years back, there was one user who was still using it because of some problems with the DRM udl driver. But I think we've addressed them. The discussion is at [1].
Would be good to know if they issues/crashes really have been solved. In [1] it seems the crashes still happened with DRM.
Quoted 1 line
Should I send a patch series to completely remove udlfb,
No. (at least not yet)
Quoted 2 lines
since [1] echoed that DRM udl driver is good enough?
Quoted 1 line
Well, some people who do *NOT* actively use fbdev with the old
cards say the DRM replacements are "good enough".
For tThose people who really depend on fbdev and the speed it has over DRM, the DRM "basic-drivers" are simply a nice-to-have-but-not-really-useable type of drivers.
So, unless the really affected people say the DRM replacement
is fully usable, we need to keep the fbdev driver.
Helge
Hi
Am 03.10.25 um 21:50 schrieb Helge Deller:
Quoted 14 lines · sukrut heroorkar
Quoted 13 lines · Thomas Zimmermann
Quoted 12 lines
Am 02.10.25 um 08:41 schrieb Helge Deller:
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed in this case.
Look at the reported build error, which seems to happen in
dev_dbg(). So, maybe in your testing you did not have debugging enabled? The report contains the .config file with which you can test.
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Can we rather make an effort to remove the udlfb driver entirely? A few years back, there was one user who was still using it because of some problems with the DRM udl driver. But I think we've addressed them. The discussion is at [1].
Would be good to know if they issues/crashes really have been solved. In [1] it seems the crashes still happened with DRM.
The thread at [1] was the original removal attempt. And that was 5 years ago. I think we could retry and take the reporter (Mikulas) into cc.
Best regards
Thomas
Quoted 17 lines
Quoted 2 lines
Should I send a patch series to completely remove udlfb,
No. (at least not yet)
Quoted 2 lines
since [1] echoed that DRM udl driver is good enough?
Quoted 1 line
Well, some people who do *NOT* actively use fbdev with the old
cards say the DRM replacements are "good enough".
For tThose people who really depend on fbdev and the speed it has over DRM, the DRM "basic-drivers" are simply a nice-to-have-but-not-really-useable type of drivers.
So, unless the really affected people say the DRM replacement
is fully usable, we need to keep the fbdev driver.Helge
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Quoted 22 lines · Thomas Zimmermann
Hi
Am 03.10.25 um 21:50 schrieb Helge Deller:
Quoted 19 lines · sukrut heroorkar
Quoted 18 lines
Quoted 16 lines · Thomas Zimmermann
Am 02.10.25 um 08:41 schrieb Helge Deller:
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed in this case.
Look at the reported build error, which seems to happen in
dev_dbg(). So, maybe in your testing you did not have debugging enabled? The report contains the .config file with which you can test.Can we rather make an effort to remove the udlfb driver entirely? A few years back, there was one user who was still using it because of some problems with the DRM udl driver. But I think we've addressed them. The discussion is at [1].
It was me - and I am still using it on an ARM64 MacchiatoBIN board because the board doesn't have graphics output.
The problems with the UDL DRM driver were:
* crashes with full-screen framebuffer applications, such as "links2 -g", "fbi" or "fbgs". On UDLFB, there are no crashes.
* worse performance - the UDL DRM driver updates everything in a given rectangle, while the UDLFB driver keeps back-buffer and front-buffer and updates only differences between them.
* crash when you unplug the card while Xorg was running (already fixed)
Mikulas
Quoted 8 lines · sukrut heroorkar
Quoted 5 lines
Quoted 2 lines
kernel test robot noticed the following build errors:
Did you compile and test this code before submitting this patch?
Yes, I had compiled & loaded the udlfb module with no errors. Please let me know how to proceed
in this case.
Hey Sukrut,
When you make code that deletes something from the kernel, you need to make sure that all other code that references that code will still function properly.
When you surround things in the #ifdev, depending on the config file, the compiler strips those things out and compiles without them. That means that you actually need to compile and test under two conditions. Once when CONFIG_FB_DEVICE=y and another time when CONFIG_FB_DEVICE=n.
The test robot gave you a sample config file that you can use. Please ensure that you have the proper version of Clang on your Host machine for that particular config file, if you choose to use it.
Also, I strongly recommend that you run the code on a sufficient hardware or emulator after you test it so that you can verify that the code does what you think it does.
Thanks,
David Hunter