difos/target/linux/bcm27xx/patches-6.12/950-0392-fbdev-Allow-client-to-request-a-particular-dev-fbN-n.patch
Shiji Yang 9ddeb30499 kernel: bump 6.12 to 6.12.35
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.35

Remove upstreamed patches:
  bcm27xx/patches-6.12/950-0961-media-imx335-Use-correct-register-width-for-HNUM.patch [1]
  bcm27xx/patches-6.12/950-1003-drivers-media-i2c-imx335-Fix-frame-size-enumeration.patch [2]
  gemini/patches-6.12/0001-net-ethernet-cortina-Use-TOE-TSO-on-all-TCP.patch [3]
  generic/backport-6.12/300-v6.16-mips-Add-std-flag-specified.patch [4]
  mvebu/patches-6.12/0004-v6.16-pinctrl-armada-37xx-propagate-error-from-armada_37xx.patch [5]
  mvebu/patches-6.12/0005-v6.16-pinctrl-armada-37xx-propagate-error-from-armada_37xx.patch [6]
  mvebu/patches-6.12/0006-v6.16-pinctrl-armada-37xx-propagate-error-from-armada_37xx.patch [7]
  mvebu/patches-6.12/0007-v6.16-pinctrl-armada-37xx-propagate-error-from-armada_37xx.patch [8]

Manually rebased patches:
  bcm27xx/patches-6.12/950-0392-fbdev-Allow-client-to-request-a-particular-dev-fbN-n.patch [9]

All other patches are automatically refreshed.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=b93864e0865f235a791e69dc9ef4f896e559ef77
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=1f78790d988c9d55cf8d4b4d511d4b3e38ecb81d
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=2bd434bb0eeb680c2b3dd6c68ca319b30cb8d47f
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=6dbda47fe8bd6aa978c150bc9d321a286d2cc3f4
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=2cd2022c38fa26257cc6eec100ae122de9c1541c
[6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=133f17922b3dbae44fe583fb898b92b03558a657
[7] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=aefe45843ea667366e35df4fcfef5ff9051a86c9
[8] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=461d5a73ae45fbe6c300a6e64600f9792684eb52
[9] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.35&id=3f2098f4fba7718eb2501207ca6e99d22427f25a

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19249
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-28 22:47:48 +02:00

88 lines
2.8 KiB
Diff

From e8402a640a37c3a20523a9c95091a86511995b0c Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Mon, 9 Oct 2023 16:32:45 +0100
Subject: [PATCH] fbdev: Allow client to request a particular /dev/fbN node
Add a flag custom_fb_num to denote that the client has
requested a specific fbdev node number via node.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/video/fbdev/core/fbmem.c | 19 ++++++++++++++-----
include/linux/fb.h | 2 ++
2 files changed, 16 insertions(+), 5 deletions(-)
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -31,6 +31,7 @@ struct class *fb_class;
DEFINE_MUTEX(registration_lock);
struct fb_info *registered_fb[FB_MAX] __read_mostly;
int num_registered_fb __read_mostly;
+int min_dynamic_fb __read_mostly;
#define for_each_registered_fb(i) \
for (i = 0; i < FB_MAX; i++) \
if (!registered_fb[i]) {} else
@@ -399,9 +400,12 @@ static int do_register_framebuffer(struc
if (num_registered_fb == FB_MAX)
return -ENXIO;
- for (i = 0 ; i < FB_MAX; i++)
- if (!registered_fb[i])
- break;
+ if (!fb_info->custom_fb_num || fb_info->node >= FB_MAX || registered_fb[fb_info->node]) {
+ for (i = min_dynamic_fb ; i < FB_MAX; i++)
+ if (!registered_fb[i])
+ break;
+ fb_info->node = i;
+ }
if (!fb_info->modelist.prev || !fb_info->modelist.next)
INIT_LIST_HEAD(&fb_info->modelist);
@@ -411,7 +415,6 @@ static int do_register_framebuffer(struc
if (err < 0)
return err;
- fb_info->node = i;
refcount_set(&fb_info->count, 1);
mutex_init(&fb_info->lock);
mutex_init(&fb_info->mm_lock);
@@ -442,7 +445,7 @@ static int do_register_framebuffer(struc
pm_vt_switch_required(fb_info->device, true);
num_registered_fb++;
- registered_fb[i] = fb_info;
+ registered_fb[fb_info->node] = fb_info;
#ifdef CONFIG_GUMSTIX_AM200EPD
{
@@ -503,6 +506,12 @@ static void do_unregister_framebuffer(st
put_fb_info(fb_info);
}
+void fb_set_lowest_dynamic_fb(int min_fb_dev)
+{
+ min_dynamic_fb = min_fb_dev;
+}
+EXPORT_SYMBOL(fb_set_lowest_dynamic_fb);
+
/**
* register_framebuffer - registers a frame buffer device
* @fb_info: frame buffer info structure
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -511,6 +511,7 @@ struct fb_info {
bool skip_vt_switch; /* no VT switch on suspend/resume required */
bool skip_panic; /* Do not write to the fb after a panic */
+ bool custom_fb_num; /* Use value in node as the preferred node number */
};
/* This will go away
@@ -600,6 +601,7 @@ extern ssize_t fb_sys_write(struct fb_in
.fb_imageblit = sys_imageblit
/* fbmem.c */
+extern void fb_set_lowest_dynamic_fb(int min_fb_dev);
extern int register_framebuffer(struct fb_info *fb_info);
extern void unregister_framebuffer(struct fb_info *fb_info);
extern int devm_register_framebuffer(struct device *dev, struct fb_info *fb_info);