mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-09-16 19:09:23 +00:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.43 Removed upstreamed: generic/backport-6.12/612-07-v6.17-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch[1] generic-backport/612-08-v6.17-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch[2] generic-backport/612-09-v6.17-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch[3] generic-backport/612-11-v6.17-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch[4] generic-backport/612-14-v6.17-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch[5] generic-backport/830-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch[6] bcm27xx/patches-6.12/950-0100-media-tc358743-Increase-FIFO-level-to-374.patch[7] bcm27xx/patches-6.12/950-0102-media-tc358743-Check-I2C-succeeded-during-probe.patch[8] bcm27xx/patches-6.12/950-0107-media-tc358743-Return-an-appropriate-colorspace-from.patch[9] bcm27xx/patches-6.12/950-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch[10] lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch[11] lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch[12] qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch[13] generic/backport-6.12/612-13-v6.17-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch[14] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f16f96ccfe56ef2d627c20ba47f6d9d7dea40f5b 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=394bd12d1f93ed2fa0fa1d8f31ffd3c344681e85 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=9f45e4858f8096bb27f9a2c75fc24a538dffad67 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=15cf46cc6ecc7a54b397294675d11c379ddf69ef 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=0d250ad617a035904744cef74a5d5dc43d0199b9 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=cb9bb872366e10fa42e1e0200a0c2e5d05a27bec 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f25d566c5674decd0051a3e624805fc1524729bf 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=3e03ee3b65baeac4c253b30650492ffffad9b608 9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=b42b107293b52ac8d46238815b1071138a47a7e4 10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=e285cdb9d2e4ba2e4515ae898f92e9f38be64eb3 11. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=1e9079ff83eac962bc3b1e2fbad73b2f7d5256f4 12. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=8520c843d9a2770012f23da08e4e2ccf1bb05ba6 13. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f1c5c55fb6cda312f5ed15505588caaf05a69043 14. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=757955c80663ac3df7053abaf6fcc75051ef7a7c Build system: x86/64 (Intel N150 based) Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19618 Signed-off-by: Robert Marko <robimarko@gmail.com>
89 lines
2.8 KiB
Diff
89 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 (i >= FB_MAX)
|
|
return -ENXIO;
|
|
@@ -414,7 +418,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);
|
|
@@ -445,7 +448,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
|
|
{
|
|
@@ -506,6 +509,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);
|