* Re: [PATCH 01/12] platform/x86: dell-uart-backlight: Use blacklight power constant
From: Ilpo Järvinen @ 2025-06-24 11:36 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: lee, danielt, jingoohan1, neil.armstrong, jessica.zhang,
maarten.lankhorst, mripard, airlied, simona, fnkl.kernel, j,
Hans de Goede, sven, alyssa, neal, deller, support.opensource,
duje.mihanovic, dri-devel, asahi, platform-driver-x86,
linux-arm-kernel, linux-fbdev
In-Reply-To: <20250618122436.379013-2-tzimmermann@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
On Wed, 18 Jun 2025, Thomas Zimmermann wrote:
> The backlight subsystem has gotten its own power constants. Replace
> FB_BLANK_UNBLANK with BACKLIGHT_POWER_ON.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/platform/x86/dell/dell-uart-backlight.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dell/dell-uart-backlight.c b/drivers/platform/x86/dell/dell-uart-backlight.c
> index 8f868f845350..f323a667dc2d 100644
> --- a/drivers/platform/x86/dell/dell-uart-backlight.c
> +++ b/drivers/platform/x86/dell/dell-uart-backlight.c
> @@ -305,7 +305,7 @@ static int dell_uart_bl_serdev_probe(struct serdev_device *serdev)
> dev_dbg(dev, "Firmware version: %.*s\n", resp[RESP_LEN] - 3, resp + RESP_DATA);
>
> /* Initialize bl_power to a known value */
> - ret = dell_uart_set_bl_power(dell_bl, FB_BLANK_UNBLANK);
> + ret = dell_uart_set_bl_power(dell_bl, BACKLIGHT_POWER_ON);
> if (ret)
> return ret;
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
^ permalink raw reply
* [PATCH 6.12 161/414] dummycon: Trigger redraw when switching consoles with deferred takeover
From: Greg Kroah-Hartman @ 2025-06-23 13:04 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Zimmermann, Andrei Borzenkov,
Javier Martinez Canillas, Hans de Goede, linux-fbdev, dri-devel
In-Reply-To: <20250623130642.015559452@linuxfoundation.org>
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Zimmermann <tzimmermann@suse.de>
commit 03bcbbb3995ba5df43af9aba45334e35f2dfe27b upstream.
Signal vt subsystem to redraw console when switching to dummycon
with deferred takeover enabled. Makes the console switch to fbcon
and displays the available output.
With deferred takeover enabled, dummycon acts as the placeholder
until the first output to the console happens. At that point, fbcon
takes over. If the output happens while dummycon is not active, it
cannot inform fbcon. This is the case if the vt subsystem runs in
graphics mode.
A typical graphical boot starts plymouth, a display manager and a
compositor; all while leaving out dummycon. Switching to a text-mode
console leaves the console with dummycon even if a getty terminal
has been started.
Returning true from dummycon's con_switch helper signals the vt
subsystem to redraw the screen. If there's output available dummycon's
con_putc{s} helpers trigger deferred takeover of fbcon, which sets a
display mode and displays the output. If no output is available,
dummycon remains active.
v2:
- make the comment slightly more verbose (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: Andrei Borzenkov <arvidjaar@gmail.com>
Closes: https://bugzilla.suse.com/show_bug.cgi?id=1242191
Tested-by: Andrei Borzenkov <arvidjaar@gmail.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Fixes: 83d83bebf401 ("console/fbcon: Add support for deferred console takeover")
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.19+
Link: https://lore.kernel.org/r/20250520071418.8462-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/console/dummycon.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -85,6 +85,15 @@ static bool dummycon_blank(struct vc_dat
/* Redraw, so that we get putc(s) for output done while blanked */
return true;
}
+
+static bool dummycon_switch(struct vc_data *vc)
+{
+ /*
+ * Redraw, so that we get putc(s) for output done while switched
+ * away. Informs deferred consoles to take over the display.
+ */
+ return true;
+}
#else
static void dummycon_putc(struct vc_data *vc, u16 c, unsigned int y,
unsigned int x) { }
@@ -95,6 +104,10 @@ static bool dummycon_blank(struct vc_dat
{
return false;
}
+static bool dummycon_switch(struct vc_data *vc)
+{
+ return false;
+}
#endif
static const char *dummycon_startup(void)
@@ -123,11 +136,6 @@ static bool dummycon_scroll(struct vc_da
{
return false;
}
-
-static bool dummycon_switch(struct vc_data *vc)
-{
- return false;
-}
/*
* The console `switch' structure for the dummy console
^ permalink raw reply
* [PATCH 6.15 196/592] dummycon: Trigger redraw when switching consoles with deferred takeover
From: Greg Kroah-Hartman @ 2025-06-23 13:02 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Zimmermann, Andrei Borzenkov,
Javier Martinez Canillas, Hans de Goede, linux-fbdev, dri-devel
In-Reply-To: <20250623130700.210182694@linuxfoundation.org>
6.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Zimmermann <tzimmermann@suse.de>
commit 03bcbbb3995ba5df43af9aba45334e35f2dfe27b upstream.
Signal vt subsystem to redraw console when switching to dummycon
with deferred takeover enabled. Makes the console switch to fbcon
and displays the available output.
With deferred takeover enabled, dummycon acts as the placeholder
until the first output to the console happens. At that point, fbcon
takes over. If the output happens while dummycon is not active, it
cannot inform fbcon. This is the case if the vt subsystem runs in
graphics mode.
A typical graphical boot starts plymouth, a display manager and a
compositor; all while leaving out dummycon. Switching to a text-mode
console leaves the console with dummycon even if a getty terminal
has been started.
Returning true from dummycon's con_switch helper signals the vt
subsystem to redraw the screen. If there's output available dummycon's
con_putc{s} helpers trigger deferred takeover of fbcon, which sets a
display mode and displays the output. If no output is available,
dummycon remains active.
v2:
- make the comment slightly more verbose (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reported-by: Andrei Borzenkov <arvidjaar@gmail.com>
Closes: https://bugzilla.suse.com/show_bug.cgi?id=1242191
Tested-by: Andrei Borzenkov <arvidjaar@gmail.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Fixes: 83d83bebf401 ("console/fbcon: Add support for deferred console takeover")
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.19+
Link: https://lore.kernel.org/r/20250520071418.8462-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/console/dummycon.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -85,6 +85,15 @@ static bool dummycon_blank(struct vc_dat
/* Redraw, so that we get putc(s) for output done while blanked */
return true;
}
+
+static bool dummycon_switch(struct vc_data *vc)
+{
+ /*
+ * Redraw, so that we get putc(s) for output done while switched
+ * away. Informs deferred consoles to take over the display.
+ */
+ return true;
+}
#else
static void dummycon_putc(struct vc_data *vc, u16 c, unsigned int y,
unsigned int x) { }
@@ -95,6 +104,10 @@ static bool dummycon_blank(struct vc_dat
{
return false;
}
+static bool dummycon_switch(struct vc_data *vc)
+{
+ return false;
+}
#endif
static const char *dummycon_startup(void)
@@ -123,11 +136,6 @@ static bool dummycon_scroll(struct vc_da
{
return false;
}
-
-static bool dummycon_switch(struct vc_data *vc)
-{
- return false;
-}
/*
* The console `switch' structure for the dummy console
^ permalink raw reply
* Re: [PATCH v2 0/5] Add interconnent support for simpledrm/simplefb
From: Hans de Goede @ 2025-06-23 8:17 UTC (permalink / raw)
To: Luca Weiss, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Javier Martinez Canillas, Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <20250623-simple-drm-fb-icc-v2-0-f69b86cd3d7d@fairphone.com>
Hi,
On 23-Jun-25 08:44, Luca Weiss wrote:
> Some devices might require keeping an interconnect path alive so that
> the framebuffer continues working. Add support for that by setting the
> bandwidth requirements appropriately for all provided interconnect
> paths.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Changes in v2:
> - Sort the headers before adding the new interconnect header, in
> separate commits.
> - Use the correct #if guards for new interconnect code
> - Pick up tags
> - Link to v1: https://lore.kernel.org/r/20250620-simple-drm-fb-icc-v1-0-d92142e8f74f@fairphone.com
Thanks, the entire series looks good to me:
Reviewed-by: Hans de Goede <hansg@kernel.org>
for the series.
Regards,
Hans
>
> ---
> Luca Weiss (5):
> dt-bindings: display: simple-framebuffer: Add interconnects property
> drm/sysfb: simpledrm: Sort headers correctly
> drm/sysfb: simpledrm: Add support for interconnect paths
> fbdev/simplefb: Sort headers correctly
> fbdev/simplefb: Add support for interconnect paths
>
> .../bindings/display/simple-framebuffer.yaml | 3 +
> drivers/gpu/drm/sysfb/simpledrm.c | 85 ++++++++++++++++++++-
> drivers/video/fbdev/simplefb.c | 89 +++++++++++++++++++++-
> 3 files changed, 173 insertions(+), 4 deletions(-)
> ---
> base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
> change-id: 20250617-simple-drm-fb-icc-89461c559913
>
> Best regards,
^ permalink raw reply
* [PATCH v2 5/5] fbdev/simplefb: Add support for interconnect paths
From: Luca Weiss @ 2025-06-23 6:44 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250623-simple-drm-fb-icc-v2-0-f69b86cd3d7d@fairphone.com>
Some devices might require keeping an interconnect path alive so that
the framebuffer continues working. Add support for that by setting the
bandwidth requirements appropriately for all provided interconnect
paths.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
index db27d51046af5cc3c46a0bc81ad9d9ed9a0783cc..b7e2f2374e3149866fd6f1803931e7f34dbbd75f 100644
--- a/drivers/video/fbdev/simplefb.c
+++ b/drivers/video/fbdev/simplefb.c
@@ -16,6 +16,7 @@
#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/fb.h>
+#include <linux/interconnect.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -89,6 +90,10 @@ struct simplefb_par {
u32 regulator_count;
struct regulator **regulators;
#endif
+#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
+ unsigned int icc_count;
+ struct icc_path **icc_paths;
+#endif
};
static void simplefb_clocks_destroy(struct simplefb_par *par);
@@ -525,6 +530,80 @@ static int simplefb_attach_genpds(struct simplefb_par *par,
}
#endif
+#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
+/*
+ * Generic interconnect path handling code.
+ */
+static void simplefb_detach_icc(void *res)
+{
+ struct simplefb_par *par = res;
+ int i;
+
+ for (i = par->icc_count - 1; i >= 0; i--) {
+ if (!IS_ERR_OR_NULL(par->icc_paths[i]))
+ icc_put(par->icc_paths[i]);
+ }
+}
+
+static int simplefb_attach_icc(struct simplefb_par *par,
+ struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ int ret, count, i;
+
+ count = of_count_phandle_with_args(dev->of_node, "interconnects",
+ "#interconnect-cells");
+ if (count < 0)
+ return 0;
+
+ /* An interconnect path consists of two elements */
+ if (count % 2) {
+ dev_err(dev, "invalid interconnects value\n");
+ return -EINVAL;
+ }
+ par->icc_count = count / 2;
+
+ par->icc_paths = devm_kcalloc(dev, par->icc_count,
+ sizeof(*par->icc_paths),
+ GFP_KERNEL);
+ if (!par->icc_paths)
+ return -ENOMEM;
+
+ for (i = 0; i < par->icc_count; i++) {
+ par->icc_paths[i] = of_icc_get_by_index(dev, i);
+ if (IS_ERR_OR_NULL(par->icc_paths[i])) {
+ ret = PTR_ERR(par->icc_paths[i]);
+ if (ret == -EPROBE_DEFER)
+ goto err;
+ dev_err(dev, "failed to get interconnect path %u: %d\n", i, ret);
+ continue;
+ }
+
+ ret = icc_set_bw(par->icc_paths[i], 0, UINT_MAX);
+ if (ret) {
+ dev_err(dev, "failed to set interconnect bandwidth %u: %d\n", i, ret);
+ continue;
+ }
+ }
+
+ return devm_add_action_or_reset(dev, simplefb_detach_icc, par);
+
+err:
+ while (i) {
+ --i;
+ if (!IS_ERR_OR_NULL(par->icc_paths[i]))
+ icc_put(par->icc_paths[i]);
+ }
+ return ret;
+}
+#else
+static int simplefb_attach_icc(struct simplefb_par *par,
+ struct platform_device *pdev)
+{
+ return 0;
+}
+#endif
+
static int simplefb_probe(struct platform_device *pdev)
{
int ret;
@@ -615,6 +694,10 @@ static int simplefb_probe(struct platform_device *pdev)
if (ret < 0)
goto error_regulators;
+ ret = simplefb_attach_icc(par, pdev);
+ if (ret < 0)
+ goto error_regulators;
+
simplefb_clocks_enable(par, pdev);
simplefb_regulators_enable(par, pdev);
--
2.50.0
^ permalink raw reply related
* [PATCH v2 4/5] fbdev/simplefb: Sort headers correctly
From: Luca Weiss @ 2025-06-23 6:44 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250623-simple-drm-fb-icc-v2-0-f69b86cd3d7d@fairphone.com>
Make sure the headers are sorted alphabetically to ensure consistent
code.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/video/fbdev/simplefb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
index be95fcddce4c8ca794826b805cd7dad2985bd637..db27d51046af5cc3c46a0bc81ad9d9ed9a0783cc 100644
--- a/drivers/video/fbdev/simplefb.c
+++ b/drivers/video/fbdev/simplefb.c
@@ -13,18 +13,18 @@
*/
#include <linux/aperture.h>
+#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/fb.h>
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/platform_data/simplefb.h>
-#include <linux/platform_device.h>
-#include <linux/clk.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_clk.h>
#include <linux/of_platform.h>
#include <linux/parser.h>
+#include <linux/platform_data/simplefb.h>
+#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
--
2.50.0
^ permalink raw reply related
* [PATCH v2 3/5] drm/sysfb: simpledrm: Add support for interconnect paths
From: Luca Weiss @ 2025-06-23 6:44 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250623-simple-drm-fb-icc-v2-0-f69b86cd3d7d@fairphone.com>
Some devices might require keeping an interconnect path alive so that
the framebuffer continues working. Add support for that by setting the
bandwidth requirements appropriately for all provided interconnect
paths.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/gpu/drm/sysfb/simpledrm.c | 83 +++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c
index 349219330314e3421a6bb26ad5cf39a679a5cb7a..47d213e20cab1dd1e19528674a95edea00f4bb30 100644
--- a/drivers/gpu/drm/sysfb/simpledrm.c
+++ b/drivers/gpu/drm/sysfb/simpledrm.c
@@ -2,6 +2,7 @@
#include <linux/aperture.h>
#include <linux/clk.h>
+#include <linux/interconnect.h>
#include <linux/minmax.h>
#include <linux/of_address.h>
#include <linux/of_clk.h>
@@ -225,6 +226,10 @@ struct simpledrm_device {
struct device **pwr_dom_devs;
struct device_link **pwr_dom_links;
#endif
+#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
+ unsigned int icc_count;
+ struct icc_path **icc_paths;
+#endif
/* modesetting */
u32 formats[DRM_SYSFB_PLANE_NFORMATS(1)];
@@ -547,6 +552,81 @@ static int simpledrm_device_attach_genpd(struct simpledrm_device *sdev)
}
#endif
+#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
+/*
+ * Generic interconnect path handling code.
+ */
+static void simpledrm_device_detach_icc(void *res)
+{
+ struct simpledrm_device *sdev = res;
+ int i;
+
+ for (i = sdev->icc_count - 1; i >= 0; i--) {
+ if (!IS_ERR_OR_NULL(sdev->icc_paths[i]))
+ icc_put(sdev->icc_paths[i]);
+ }
+}
+
+static int simpledrm_device_attach_icc(struct simpledrm_device *sdev)
+{
+ struct device *dev = sdev->sysfb.dev.dev;
+ int ret, count, i;
+
+ count = of_count_phandle_with_args(dev->of_node, "interconnects",
+ "#interconnect-cells");
+ if (count < 0)
+ return 0;
+
+ /* An interconnect path consists of two elements */
+ if (count % 2) {
+ drm_err(&sdev->sysfb.dev,
+ "invalid interconnects value\n");
+ return -EINVAL;
+ }
+ sdev->icc_count = count / 2;
+
+ sdev->icc_paths = devm_kcalloc(dev, sdev->icc_count,
+ sizeof(*sdev->icc_paths),
+ GFP_KERNEL);
+ if (!sdev->icc_paths)
+ return -ENOMEM;
+
+ for (i = 0; i < sdev->icc_count; i++) {
+ sdev->icc_paths[i] = of_icc_get_by_index(dev, i);
+ if (IS_ERR_OR_NULL(sdev->icc_paths[i])) {
+ ret = PTR_ERR(sdev->icc_paths[i]);
+ if (ret == -EPROBE_DEFER)
+ goto err;
+ drm_err(&sdev->sysfb.dev, "failed to get interconnect path %u: %d\n",
+ i, ret);
+ continue;
+ }
+
+ ret = icc_set_bw(sdev->icc_paths[i], 0, UINT_MAX);
+ if (ret) {
+ drm_err(&sdev->sysfb.dev, "failed to set interconnect bandwidth %u: %d\n",
+ i, ret);
+ continue;
+ }
+ }
+
+ return devm_add_action_or_reset(dev, simpledrm_device_detach_icc, sdev);
+
+err:
+ while (i) {
+ --i;
+ if (!IS_ERR_OR_NULL(sdev->icc_paths[i]))
+ icc_put(sdev->icc_paths[i]);
+ }
+ return ret;
+}
+#else
+static int simpledrm_device_attach_icc(struct simpledrm_device *sdev)
+{
+ return 0;
+}
+#endif
+
/*
* Modesetting
*/
@@ -633,6 +713,9 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
if (ret)
return ERR_PTR(ret);
ret = simpledrm_device_attach_genpd(sdev);
+ if (ret)
+ return ERR_PTR(ret);
+ ret = simpledrm_device_attach_icc(sdev);
if (ret)
return ERR_PTR(ret);
--
2.50.0
^ permalink raw reply related
* [PATCH v2 2/5] drm/sysfb: simpledrm: Sort headers correctly
From: Luca Weiss @ 2025-06-23 6:44 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250623-simple-drm-fb-icc-v2-0-f69b86cd3d7d@fairphone.com>
Make sure the headers are sorted alphabetically to ensure consistent
code.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/gpu/drm/sysfb/simpledrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c
index a1c3119330deffc9e122b83941f3697e5b87f277..349219330314e3421a6bb26ad5cf39a679a5cb7a 100644
--- a/drivers/gpu/drm/sysfb/simpledrm.c
+++ b/drivers/gpu/drm/sysfb/simpledrm.c
@@ -2,9 +2,9 @@
#include <linux/aperture.h>
#include <linux/clk.h>
-#include <linux/of_clk.h>
#include <linux/minmax.h>
#include <linux/of_address.h>
+#include <linux/of_clk.h>
#include <linux/platform_data/simplefb.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
--
2.50.0
^ permalink raw reply related
* [PATCH v2 1/5] dt-bindings: display: simple-framebuffer: Add interconnects property
From: Luca Weiss @ 2025-06-23 6:44 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250623-simple-drm-fb-icc-v2-0-f69b86cd3d7d@fairphone.com>
Document the interconnects property which is a list of interconnect
paths that is used by the framebuffer and therefore needs to be kept
alive when the framebuffer is being used.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/display/simple-framebuffer.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
index 296500f9da05e296dbbeec50ba5186b6b30aaffc..f0fa0ef23d91043dfb2b220c654b80e2e80850cd 100644
--- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
@@ -79,6 +79,9 @@ properties:
power-domains:
description: List of power domains used by the framebuffer.
+ interconnects:
+ description: List of interconnect paths used by the framebuffer.
+
width:
$ref: /schemas/types.yaml#/definitions/uint32
description: Width of the framebuffer in pixels
--
2.50.0
^ permalink raw reply related
* [PATCH v2 0/5] Add interconnent support for simpledrm/simplefb
From: Luca Weiss @ 2025-06-23 6:44 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
Some devices might require keeping an interconnect path alive so that
the framebuffer continues working. Add support for that by setting the
bandwidth requirements appropriately for all provided interconnect
paths.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v2:
- Sort the headers before adding the new interconnect header, in
separate commits.
- Use the correct #if guards for new interconnect code
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20250620-simple-drm-fb-icc-v1-0-d92142e8f74f@fairphone.com
---
Luca Weiss (5):
dt-bindings: display: simple-framebuffer: Add interconnects property
drm/sysfb: simpledrm: Sort headers correctly
drm/sysfb: simpledrm: Add support for interconnect paths
fbdev/simplefb: Sort headers correctly
fbdev/simplefb: Add support for interconnect paths
.../bindings/display/simple-framebuffer.yaml | 3 +
drivers/gpu/drm/sysfb/simpledrm.c | 85 ++++++++++++++++++++-
drivers/video/fbdev/simplefb.c | 89 +++++++++++++++++++++-
3 files changed, 173 insertions(+), 4 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250617-simple-drm-fb-icc-89461c559913
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: kernel test robot @ 2025-06-22 2:21 UTC (permalink / raw)
To: Luca Weiss, Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: oe-kbuild-all, linux-fbdev, dri-devel, devicetree, linux-kernel,
Luca Weiss
In-Reply-To: <20250620-simple-drm-fb-icc-v1-3-d92142e8f74f@fairphone.com>
Hi Luca,
kernel test robot noticed the following build errors:
[auto build test ERROR on 19272b37aa4f83ca52bdf9c16d5d81bdd1354494]
url: https://github.com/intel-lab-lkp/linux/commits/Luca-Weiss/dt-bindings-display-simple-framebuffer-Add-interconnects-property/20250620-183302
base: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
patch link: https://lore.kernel.org/r/20250620-simple-drm-fb-icc-v1-3-d92142e8f74f%40fairphone.com
patch subject: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
config: sparc-randconfig-r063-20250622 (https://download.01.org/0day-ci/archive/20250622/202506221019.ooLo1xBw-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250622/202506221019.ooLo1xBw-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506221019.ooLo1xBw-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/video/fbdev/simplefb.c: In function 'simplefb_detach_icc':
>> drivers/video/fbdev/simplefb.c:542:14: error: 'struct simplefb_par' has no member named 'icc_count'
542 | for (i = par->icc_count - 1; i >= 0; i--) {
| ^~
>> drivers/video/fbdev/simplefb.c:543:26: error: 'struct simplefb_par' has no member named 'icc_paths'
543 | if (!IS_ERR_OR_NULL(par->icc_paths[i]))
| ^~
drivers/video/fbdev/simplefb.c:544:15: error: 'struct simplefb_par' has no member named 'icc_paths'
544 | icc_put(par->icc_paths[i]);
| ^~
drivers/video/fbdev/simplefb.c: In function 'simplefb_attach_icc':
drivers/video/fbdev/simplefb.c:564:5: error: 'struct simplefb_par' has no member named 'icc_count'
564 | par->icc_count = count / 2;
| ^~
drivers/video/fbdev/simplefb.c:566:5: error: 'struct simplefb_par' has no member named 'icc_paths'
566 | par->icc_paths = devm_kcalloc(dev, par->icc_count,
| ^~
drivers/video/fbdev/simplefb.c:566:40: error: 'struct simplefb_par' has no member named 'icc_count'
566 | par->icc_paths = devm_kcalloc(dev, par->icc_count,
| ^~
drivers/video/fbdev/simplefb.c:567:22: error: 'struct simplefb_par' has no member named 'icc_paths'
567 | sizeof(*par->icc_paths),
| ^~
drivers/video/fbdev/simplefb.c:569:10: error: 'struct simplefb_par' has no member named 'icc_paths'
569 | if (!par->icc_paths)
| ^~
drivers/video/fbdev/simplefb.c:572:21: error: 'struct simplefb_par' has no member named 'icc_count'
572 | for (i = 0; i < par->icc_count; i++) {
| ^~
drivers/video/fbdev/simplefb.c:573:6: error: 'struct simplefb_par' has no member named 'icc_paths'
573 | par->icc_paths[i] = of_icc_get_by_index(dev, i);
| ^~
drivers/video/fbdev/simplefb.c:574:25: error: 'struct simplefb_par' has no member named 'icc_paths'
574 | if (IS_ERR_OR_NULL(par->icc_paths[i])) {
| ^~
drivers/video/fbdev/simplefb.c:575:21: error: 'struct simplefb_par' has no member named 'icc_paths'
575 | ret = PTR_ERR(par->icc_paths[i]);
| ^~
drivers/video/fbdev/simplefb.c:582:23: error: 'struct simplefb_par' has no member named 'icc_paths'
582 | ret = icc_set_bw(par->icc_paths[i], 0, UINT_MAX);
| ^~
drivers/video/fbdev/simplefb.c:594:26: error: 'struct simplefb_par' has no member named 'icc_paths'
594 | if (!IS_ERR_OR_NULL(par->icc_paths[i]))
| ^~
drivers/video/fbdev/simplefb.c:595:15: error: 'struct simplefb_par' has no member named 'icc_paths'
595 | icc_put(par->icc_paths[i]);
| ^~
vim +542 drivers/video/fbdev/simplefb.c
532
533 #if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
534 /*
535 * Generic interconnect path handling code.
536 */
537 static void simplefb_detach_icc(void *res)
538 {
539 struct simplefb_par *par = res;
540 int i;
541
> 542 for (i = par->icc_count - 1; i >= 0; i--) {
> 543 if (!IS_ERR_OR_NULL(par->icc_paths[i]))
544 icc_put(par->icc_paths[i]);
545 }
546 }
547
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [PATCH v2] staging: sm750fb: remove function pointer proc_setBLANK
From: Kisub Choe @ 2025-06-20 16:54 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh
Cc: linux-fbdev, linux-staging, linux-kernel, kisub.choe.0x1
Call a function based on sm750_dev->revid
instead of using this indirection
Signed-off-by: Kisub Choe <kisub.choe.0x1@gmail.com>
---
Changes in v2:
- removed the function pointer in accordance with the feedback
---
drivers/staging/sm750fb/sm750.c | 10 +++++++---
drivers/staging/sm750fb/sm750.h | 2 --
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 1d929aca399c..b65a527314f1 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -571,13 +571,19 @@ static int lynxfb_ops_setcolreg(unsigned int regno,
static int lynxfb_ops_blank(int blank, struct fb_info *info)
{
+ struct sm750_dev *sm750_dev;
struct lynxfb_par *par;
struct lynxfb_output *output;
pr_debug("blank = %d.\n", blank);
par = info->par;
output = &par->output;
- return output->proc_setBLANK(output, blank);
+ sm750_dev = par->dev;
+
+ if (sm750_dev->revid == SM750LE_REVISION_ID)
+ return hw_sm750le_set_blank(output, blank);
+ else
+ return hw_sm750_set_blank(output, blank);
}
static int sm750fb_set_drv(struct lynxfb_par *par)
@@ -605,8 +611,6 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
crtc->ypanstep = 1;
crtc->ywrapstep = 0;
- output->proc_setBLANK = (sm750_dev->revid == SM750LE_REVISION_ID) ?
- hw_sm750le_set_blank : hw_sm750_set_blank;
/* chip specific phase */
sm750_dev->accel.de_wait = (sm750_dev->revid == SM750LE_REVISION_ID) ?
hw_sm750le_de_wait : hw_sm750_de_wait;
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 9cf8b3d30aac..640bff625052 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -169,8 +169,6 @@ struct lynxfb_output {
* output->channel ==> &crtc->channel
*/
void *priv;
-
- int (*proc_setBLANK)(struct lynxfb_output *output, int blank);
};
struct lynxfb_par {
--
2.34.1
^ permalink raw reply related
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Luca Weiss @ 2025-06-20 13:09 UTC (permalink / raw)
To: Thomas Zimmermann, Hans de Goede, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <8874b905-dd1a-4bcc-9572-edcf5451f400@suse.de>
On Fri Jun 20, 2025 at 2:36 PM CEST, Thomas Zimmermann wrote:
> Hi
>
> Am 20.06.25 um 14:07 schrieb Luca Weiss:
>> On Fri Jun 20, 2025 at 1:28 PM CEST, Thomas Zimmermann wrote:
>>> Hi
>>>
>>> Am 20.06.25 um 13:07 schrieb Luca Weiss:
>>>> Hi Thomas,
>>>>
>>>> On Fri Jun 20, 2025 at 1:02 PM CEST, Thomas Zimmermann wrote:
>>>>> Hi
>>>>>
>>>>> Am 20.06.25 um 12:31 schrieb Luca Weiss:
>>>>>> Some devices might require keeping an interconnect path alive so that
>>>>>> the framebuffer continues working. Add support for that by setting the
>>>>>> bandwidth requirements appropriately for all provided interconnect
>>>>>> paths.
>>>>>>
>>>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>>>>> ---
>>>>>> drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
>>>>>> 1 file changed, 83 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
>>>>>> index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
>>>>>> --- a/drivers/video/fbdev/simplefb.c
>>>>>> +++ b/drivers/video/fbdev/simplefb.c
>>>>>> @@ -27,6 +27,7 @@
>>>>>> #include <linux/parser.h>
>>>>>> #include <linux/pm_domain.h>
>>>>>> #include <linux/regulator/consumer.h>
>>>>>> +#include <linux/interconnect.h>
>>>>> With alphabetical sorting:
>>>>>
>>>>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>>> Thanks for the reviews!
>>>>
>>>> For both simpledrm.c and simplefb.c, the includes are not strictly
>>>> alphabetically sorted (1 mis-sort in simpledrm, 3 in simplefb), shall I
>>>> just try and slot it into the best fitting place, or make them sorted in
>>>> my patch? Or I can add a separate commit for each driver before to sort
>>>> them.
>>>>
>>>> Let me know!
>>> Best is to try to fit it into the <linux/*> block. In simpledrm, it's
>>> probably my mistake. Don't bother with sending an extra cleanup if you
>>> don't want to.
>> I was mostly asking whether this diff is okay as part of my patch (for
>> just adding <linux/interconnect.h>)
>>
>> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
>> index be95fcddce4c..f2efa4b51401 100644
>> --- a/drivers/video/fbdev/simplefb.c
>> +++ b/drivers/video/fbdev/simplefb.c
>> @@ -13,18 +13,19 @@
>> */
>>
>> #include <linux/aperture.h>
>> +#include <linux/clk.h>
>> #include <linux/errno.h>
>> #include <linux/fb.h>
>> +#include <linux/interconnect.h>
>> #include <linux/io.h>
>> #include <linux/module.h>
>> -#include <linux/platform_data/simplefb.h>
>> -#include <linux/platform_device.h>
>> -#include <linux/clk.h>
>> #include <linux/of.h>
>> #include <linux/of_address.h>
>> #include <linux/of_clk.h>
>> #include <linux/of_platform.h>
>> #include <linux/parser.h>
>> +#include <linux/platform_data/simplefb.h>
>> +#include <linux/platform_device.h>
>> #include <linux/pm_domain.h>
>> #include <linux/regulator/consumer.h>
>>
>>
>> Or if you want this churn to be a separate commit. Either way is fine
>> with me, just trying to figure out the preferences of this subsystem :)
>
> If you want to resort the entries, please do so in a separate patch.
Ack, will do in v2!
Regards
Luca
>
> Best regards
> Thomas
>
>>
>> Regards
>> Luca
>>
^ permalink raw reply
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Thomas Zimmermann @ 2025-06-20 12:36 UTC (permalink / raw)
To: Luca Weiss, Hans de Goede, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Javier Martinez Canillas, Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <DARCJEWMK6C2.21Y93IPCZO7NM@fairphone.com>
Hi
Am 20.06.25 um 14:07 schrieb Luca Weiss:
> On Fri Jun 20, 2025 at 1:28 PM CEST, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 20.06.25 um 13:07 schrieb Luca Weiss:
>>> Hi Thomas,
>>>
>>> On Fri Jun 20, 2025 at 1:02 PM CEST, Thomas Zimmermann wrote:
>>>> Hi
>>>>
>>>> Am 20.06.25 um 12:31 schrieb Luca Weiss:
>>>>> Some devices might require keeping an interconnect path alive so that
>>>>> the framebuffer continues working. Add support for that by setting the
>>>>> bandwidth requirements appropriately for all provided interconnect
>>>>> paths.
>>>>>
>>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>>>> ---
>>>>> drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
>>>>> 1 file changed, 83 insertions(+)
>>>>>
>>>>> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
>>>>> index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
>>>>> --- a/drivers/video/fbdev/simplefb.c
>>>>> +++ b/drivers/video/fbdev/simplefb.c
>>>>> @@ -27,6 +27,7 @@
>>>>> #include <linux/parser.h>
>>>>> #include <linux/pm_domain.h>
>>>>> #include <linux/regulator/consumer.h>
>>>>> +#include <linux/interconnect.h>
>>>> With alphabetical sorting:
>>>>
>>>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> Thanks for the reviews!
>>>
>>> For both simpledrm.c and simplefb.c, the includes are not strictly
>>> alphabetically sorted (1 mis-sort in simpledrm, 3 in simplefb), shall I
>>> just try and slot it into the best fitting place, or make them sorted in
>>> my patch? Or I can add a separate commit for each driver before to sort
>>> them.
>>>
>>> Let me know!
>> Best is to try to fit it into the <linux/*> block. In simpledrm, it's
>> probably my mistake. Don't bother with sending an extra cleanup if you
>> don't want to.
> I was mostly asking whether this diff is okay as part of my patch (for
> just adding <linux/interconnect.h>)
>
> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
> index be95fcddce4c..f2efa4b51401 100644
> --- a/drivers/video/fbdev/simplefb.c
> +++ b/drivers/video/fbdev/simplefb.c
> @@ -13,18 +13,19 @@
> */
>
> #include <linux/aperture.h>
> +#include <linux/clk.h>
> #include <linux/errno.h>
> #include <linux/fb.h>
> +#include <linux/interconnect.h>
> #include <linux/io.h>
> #include <linux/module.h>
> -#include <linux/platform_data/simplefb.h>
> -#include <linux/platform_device.h>
> -#include <linux/clk.h>
> #include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_clk.h>
> #include <linux/of_platform.h>
> #include <linux/parser.h>
> +#include <linux/platform_data/simplefb.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <linux/regulator/consumer.h>
>
>
> Or if you want this churn to be a separate commit. Either way is fine
> with me, just trying to figure out the preferences of this subsystem :)
If you want to resort the entries, please do so in a separate patch.
Best regards
Thomas
>
> Regards
> Luca
>
--
--
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)
^ permalink raw reply
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Luca Weiss @ 2025-06-20 12:07 UTC (permalink / raw)
To: Thomas Zimmermann, Hans de Goede, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <4475251a-ede7-42d1-a95e-497e09beba0d@suse.de>
On Fri Jun 20, 2025 at 1:28 PM CEST, Thomas Zimmermann wrote:
> Hi
>
> Am 20.06.25 um 13:07 schrieb Luca Weiss:
>> Hi Thomas,
>>
>> On Fri Jun 20, 2025 at 1:02 PM CEST, Thomas Zimmermann wrote:
>>> Hi
>>>
>>> Am 20.06.25 um 12:31 schrieb Luca Weiss:
>>>> Some devices might require keeping an interconnect path alive so that
>>>> the framebuffer continues working. Add support for that by setting the
>>>> bandwidth requirements appropriately for all provided interconnect
>>>> paths.
>>>>
>>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>>> ---
>>>> drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
>>>> 1 file changed, 83 insertions(+)
>>>>
>>>> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
>>>> index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
>>>> --- a/drivers/video/fbdev/simplefb.c
>>>> +++ b/drivers/video/fbdev/simplefb.c
>>>> @@ -27,6 +27,7 @@
>>>> #include <linux/parser.h>
>>>> #include <linux/pm_domain.h>
>>>> #include <linux/regulator/consumer.h>
>>>> +#include <linux/interconnect.h>
>>> With alphabetical sorting:
>>>
>>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Thanks for the reviews!
>>
>> For both simpledrm.c and simplefb.c, the includes are not strictly
>> alphabetically sorted (1 mis-sort in simpledrm, 3 in simplefb), shall I
>> just try and slot it into the best fitting place, or make them sorted in
>> my patch? Or I can add a separate commit for each driver before to sort
>> them.
>>
>> Let me know!
>
> Best is to try to fit it into the <linux/*> block. In simpledrm, it's
> probably my mistake. Don't bother with sending an extra cleanup if you
> don't want to.
I was mostly asking whether this diff is okay as part of my patch (for
just adding <linux/interconnect.h>)
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
index be95fcddce4c..f2efa4b51401 100644
--- a/drivers/video/fbdev/simplefb.c
+++ b/drivers/video/fbdev/simplefb.c
@@ -13,18 +13,19 @@
*/
#include <linux/aperture.h>
+#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/fb.h>
+#include <linux/interconnect.h>
#include <linux/io.h>
#include <linux/module.h>
-#include <linux/platform_data/simplefb.h>
-#include <linux/platform_device.h>
-#include <linux/clk.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_clk.h>
#include <linux/of_platform.h>
#include <linux/parser.h>
+#include <linux/platform_data/simplefb.h>
+#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
Or if you want this churn to be a separate commit. Either way is fine
with me, just trying to figure out the preferences of this subsystem :)
Regards
Luca
^ permalink raw reply related
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Thomas Zimmermann @ 2025-06-20 11:28 UTC (permalink / raw)
To: Luca Weiss, Hans de Goede, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Javier Martinez Canillas, Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <DARBA03BEQA1.3KLHCBFNTVXKJ@fairphone.com>
Hi
Am 20.06.25 um 13:07 schrieb Luca Weiss:
> Hi Thomas,
>
> On Fri Jun 20, 2025 at 1:02 PM CEST, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 20.06.25 um 12:31 schrieb Luca Weiss:
>>> Some devices might require keeping an interconnect path alive so that
>>> the framebuffer continues working. Add support for that by setting the
>>> bandwidth requirements appropriately for all provided interconnect
>>> paths.
>>>
>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>> ---
>>> drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 83 insertions(+)
>>>
>>> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
>>> index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
>>> --- a/drivers/video/fbdev/simplefb.c
>>> +++ b/drivers/video/fbdev/simplefb.c
>>> @@ -27,6 +27,7 @@
>>> #include <linux/parser.h>
>>> #include <linux/pm_domain.h>
>>> #include <linux/regulator/consumer.h>
>>> +#include <linux/interconnect.h>
>> With alphabetical sorting:
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> Thanks for the reviews!
>
> For both simpledrm.c and simplefb.c, the includes are not strictly
> alphabetically sorted (1 mis-sort in simpledrm, 3 in simplefb), shall I
> just try and slot it into the best fitting place, or make them sorted in
> my patch? Or I can add a separate commit for each driver before to sort
> them.
>
> Let me know!
Best is to try to fit it into the <linux/*> block. In simpledrm, it's
probably my mistake. Don't bother with sending an extra cleanup if you
don't want to.
Best regards
Thomas
>
> Regards
> Luca
>
>
>> Best regards
>> Thomas
>>
>>
>>>
>>> static const struct fb_fix_screeninfo simplefb_fix = {
>>> .id = "simple",
>>> @@ -89,6 +90,10 @@ struct simplefb_par {
>>> u32 regulator_count;
>>> struct regulator **regulators;
>>> #endif
>>> +#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
>>> + unsigned int icc_count;
>>> + struct icc_path **icc_paths;
>>> +#endif
>>> };
>>>
>>> static void simplefb_clocks_destroy(struct simplefb_par *par);
>>> @@ -525,6 +530,80 @@ static int simplefb_attach_genpds(struct simplefb_par *par,
>>> }
>>> #endif
>>>
>>> +#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
>>> +/*
>>> + * Generic interconnect path handling code.
>>> + */
>>> +static void simplefb_detach_icc(void *res)
>>> +{
>>> + struct simplefb_par *par = res;
>>> + int i;
>>> +
>>> + for (i = par->icc_count - 1; i >= 0; i--) {
>>> + if (!IS_ERR_OR_NULL(par->icc_paths[i]))
>>> + icc_put(par->icc_paths[i]);
>>> + }
>>> +}
>>> +
>>> +static int simplefb_attach_icc(struct simplefb_par *par,
>>> + struct platform_device *pdev)
>>> +{
>>> + struct device *dev = &pdev->dev;
>>> + int ret, count, i;
>>> +
>>> + count = of_count_phandle_with_args(dev->of_node, "interconnects",
>>> + "#interconnect-cells");
>>> + if (count < 0)
>>> + return 0;
>>> +
>>> + /* An interconnect path consists of two elements */
>>> + if (count % 2) {
>>> + dev_err(dev, "invalid interconnects value\n");
>>> + return -EINVAL;
>>> + }
>>> + par->icc_count = count / 2;
>>> +
>>> + par->icc_paths = devm_kcalloc(dev, par->icc_count,
>>> + sizeof(*par->icc_paths),
>>> + GFP_KERNEL);
>>> + if (!par->icc_paths)
>>> + return -ENOMEM;
>>> +
>>> + for (i = 0; i < par->icc_count; i++) {
>>> + par->icc_paths[i] = of_icc_get_by_index(dev, i);
>>> + if (IS_ERR_OR_NULL(par->icc_paths[i])) {
>>> + ret = PTR_ERR(par->icc_paths[i]);
>>> + if (ret == -EPROBE_DEFER)
>>> + goto err;
>>> + dev_err(dev, "failed to get interconnect path %u: %d\n", i, ret);
>>> + continue;
>>> + }
>>> +
>>> + ret = icc_set_bw(par->icc_paths[i], 0, UINT_MAX);
>>> + if (ret) {
>>> + dev_err(dev, "failed to set interconnect bandwidth %u: %d\n", i, ret);
>>> + continue;
>>> + }
>>> + }
>>> +
>>> + return devm_add_action_or_reset(dev, simplefb_detach_icc, par);
>>> +
>>> +err:
>>> + while (i) {
>>> + --i;
>>> + if (!IS_ERR_OR_NULL(par->icc_paths[i]))
>>> + icc_put(par->icc_paths[i]);
>>> + }
>>> + return ret;
>>> +}
>>> +#else
>>> +static int simplefb_attach_icc(struct simplefb_par *par,
>>> + struct platform_device *pdev)
>>> +{
>>> + return 0;
>>> +}
>>> +#endif
>>> +
>>> static int simplefb_probe(struct platform_device *pdev)
>>> {
>>> int ret;
>>> @@ -615,6 +694,10 @@ static int simplefb_probe(struct platform_device *pdev)
>>> if (ret < 0)
>>> goto error_regulators;
>>>
>>> + ret = simplefb_attach_icc(par, pdev);
>>> + if (ret < 0)
>>> + goto error_regulators;
>>> +
>>> simplefb_clocks_enable(par, pdev);
>>> simplefb_regulators_enable(par, pdev);
>>>
>>>
--
--
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)
^ permalink raw reply
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Luca Weiss @ 2025-06-20 11:07 UTC (permalink / raw)
To: Thomas Zimmermann, Hans de Goede, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <cf29862b-496b-4825-aa0f-493eb44838a5@suse.de>
Hi Thomas,
On Fri Jun 20, 2025 at 1:02 PM CEST, Thomas Zimmermann wrote:
> Hi
>
> Am 20.06.25 um 12:31 schrieb Luca Weiss:
>> Some devices might require keeping an interconnect path alive so that
>> the framebuffer continues working. Add support for that by setting the
>> bandwidth requirements appropriately for all provided interconnect
>> paths.
>>
>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>> ---
>> drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 83 insertions(+)
>>
>> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
>> index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
>> --- a/drivers/video/fbdev/simplefb.c
>> +++ b/drivers/video/fbdev/simplefb.c
>> @@ -27,6 +27,7 @@
>> #include <linux/parser.h>
>> #include <linux/pm_domain.h>
>> #include <linux/regulator/consumer.h>
>> +#include <linux/interconnect.h>
>
> With alphabetical sorting:
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks for the reviews!
For both simpledrm.c and simplefb.c, the includes are not strictly
alphabetically sorted (1 mis-sort in simpledrm, 3 in simplefb), shall I
just try and slot it into the best fitting place, or make them sorted in
my patch? Or I can add a separate commit for each driver before to sort
them.
Let me know!
Regards
Luca
>
> Best regards
> Thomas
>
>
>>
>> static const struct fb_fix_screeninfo simplefb_fix = {
>> .id = "simple",
>> @@ -89,6 +90,10 @@ struct simplefb_par {
>> u32 regulator_count;
>> struct regulator **regulators;
>> #endif
>> +#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
>> + unsigned int icc_count;
>> + struct icc_path **icc_paths;
>> +#endif
>> };
>>
>> static void simplefb_clocks_destroy(struct simplefb_par *par);
>> @@ -525,6 +530,80 @@ static int simplefb_attach_genpds(struct simplefb_par *par,
>> }
>> #endif
>>
>> +#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
>> +/*
>> + * Generic interconnect path handling code.
>> + */
>> +static void simplefb_detach_icc(void *res)
>> +{
>> + struct simplefb_par *par = res;
>> + int i;
>> +
>> + for (i = par->icc_count - 1; i >= 0; i--) {
>> + if (!IS_ERR_OR_NULL(par->icc_paths[i]))
>> + icc_put(par->icc_paths[i]);
>> + }
>> +}
>> +
>> +static int simplefb_attach_icc(struct simplefb_par *par,
>> + struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + int ret, count, i;
>> +
>> + count = of_count_phandle_with_args(dev->of_node, "interconnects",
>> + "#interconnect-cells");
>> + if (count < 0)
>> + return 0;
>> +
>> + /* An interconnect path consists of two elements */
>> + if (count % 2) {
>> + dev_err(dev, "invalid interconnects value\n");
>> + return -EINVAL;
>> + }
>> + par->icc_count = count / 2;
>> +
>> + par->icc_paths = devm_kcalloc(dev, par->icc_count,
>> + sizeof(*par->icc_paths),
>> + GFP_KERNEL);
>> + if (!par->icc_paths)
>> + return -ENOMEM;
>> +
>> + for (i = 0; i < par->icc_count; i++) {
>> + par->icc_paths[i] = of_icc_get_by_index(dev, i);
>> + if (IS_ERR_OR_NULL(par->icc_paths[i])) {
>> + ret = PTR_ERR(par->icc_paths[i]);
>> + if (ret == -EPROBE_DEFER)
>> + goto err;
>> + dev_err(dev, "failed to get interconnect path %u: %d\n", i, ret);
>> + continue;
>> + }
>> +
>> + ret = icc_set_bw(par->icc_paths[i], 0, UINT_MAX);
>> + if (ret) {
>> + dev_err(dev, "failed to set interconnect bandwidth %u: %d\n", i, ret);
>> + continue;
>> + }
>> + }
>> +
>> + return devm_add_action_or_reset(dev, simplefb_detach_icc, par);
>> +
>> +err:
>> + while (i) {
>> + --i;
>> + if (!IS_ERR_OR_NULL(par->icc_paths[i]))
>> + icc_put(par->icc_paths[i]);
>> + }
>> + return ret;
>> +}
>> +#else
>> +static int simplefb_attach_icc(struct simplefb_par *par,
>> + struct platform_device *pdev)
>> +{
>> + return 0;
>> +}
>> +#endif
>> +
>> static int simplefb_probe(struct platform_device *pdev)
>> {
>> int ret;
>> @@ -615,6 +694,10 @@ static int simplefb_probe(struct platform_device *pdev)
>> if (ret < 0)
>> goto error_regulators;
>>
>> + ret = simplefb_attach_icc(par, pdev);
>> + if (ret < 0)
>> + goto error_regulators;
>> +
>> simplefb_clocks_enable(par, pdev);
>> simplefb_regulators_enable(par, pdev);
>>
>>
^ permalink raw reply
* Re: [PATCH 1/3] dt-bindings: display: simple-framebuffer: Add interconnects property
From: Thomas Zimmermann @ 2025-06-20 11:03 UTC (permalink / raw)
To: Luca Weiss, Hans de Goede, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Javier Martinez Canillas, Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <20250620-simple-drm-fb-icc-v1-1-d92142e8f74f@fairphone.com>
Hi
Am 20.06.25 um 12:31 schrieb Luca Weiss:
> Document the interconnects property which is a list of interconnect
> paths that is used by the framebuffer and therefore needs to be kept
> alive when the framebuffer is being used.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Maybe also get someone with DT expertise to look over this patch as well.
Best regards
Thomas
> ---
> Documentation/devicetree/bindings/display/simple-framebuffer.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
> index 296500f9da05e296dbbeec50ba5186b6b30aaffc..f0fa0ef23d91043dfb2b220c654b80e2e80850cd 100644
> --- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
> +++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
> @@ -79,6 +79,9 @@ properties:
> power-domains:
> description: List of power domains used by the framebuffer.
>
> + interconnects:
> + description: List of interconnect paths used by the framebuffer.
> +
> width:
> $ref: /schemas/types.yaml#/definitions/uint32
> description: Width of the framebuffer in pixels
>
--
--
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)
^ permalink raw reply
* Re: [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Thomas Zimmermann @ 2025-06-20 11:02 UTC (permalink / raw)
To: Luca Weiss, Hans de Goede, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Javier Martinez Canillas, Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <20250620-simple-drm-fb-icc-v1-3-d92142e8f74f@fairphone.com>
Hi
Am 20.06.25 um 12:31 schrieb Luca Weiss:
> Some devices might require keeping an interconnect path alive so that
> the framebuffer continues working. Add support for that by setting the
> bandwidth requirements appropriately for all provided interconnect
> paths.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 83 insertions(+)
>
> diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
> index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
> --- a/drivers/video/fbdev/simplefb.c
> +++ b/drivers/video/fbdev/simplefb.c
> @@ -27,6 +27,7 @@
> #include <linux/parser.h>
> #include <linux/pm_domain.h>
> #include <linux/regulator/consumer.h>
> +#include <linux/interconnect.h>
With alphabetical sorting:
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Best regards
Thomas
>
> static const struct fb_fix_screeninfo simplefb_fix = {
> .id = "simple",
> @@ -89,6 +90,10 @@ struct simplefb_par {
> u32 regulator_count;
> struct regulator **regulators;
> #endif
> +#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
> + unsigned int icc_count;
> + struct icc_path **icc_paths;
> +#endif
> };
>
> static void simplefb_clocks_destroy(struct simplefb_par *par);
> @@ -525,6 +530,80 @@ static int simplefb_attach_genpds(struct simplefb_par *par,
> }
> #endif
>
> +#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
> +/*
> + * Generic interconnect path handling code.
> + */
> +static void simplefb_detach_icc(void *res)
> +{
> + struct simplefb_par *par = res;
> + int i;
> +
> + for (i = par->icc_count - 1; i >= 0; i--) {
> + if (!IS_ERR_OR_NULL(par->icc_paths[i]))
> + icc_put(par->icc_paths[i]);
> + }
> +}
> +
> +static int simplefb_attach_icc(struct simplefb_par *par,
> + struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + int ret, count, i;
> +
> + count = of_count_phandle_with_args(dev->of_node, "interconnects",
> + "#interconnect-cells");
> + if (count < 0)
> + return 0;
> +
> + /* An interconnect path consists of two elements */
> + if (count % 2) {
> + dev_err(dev, "invalid interconnects value\n");
> + return -EINVAL;
> + }
> + par->icc_count = count / 2;
> +
> + par->icc_paths = devm_kcalloc(dev, par->icc_count,
> + sizeof(*par->icc_paths),
> + GFP_KERNEL);
> + if (!par->icc_paths)
> + return -ENOMEM;
> +
> + for (i = 0; i < par->icc_count; i++) {
> + par->icc_paths[i] = of_icc_get_by_index(dev, i);
> + if (IS_ERR_OR_NULL(par->icc_paths[i])) {
> + ret = PTR_ERR(par->icc_paths[i]);
> + if (ret == -EPROBE_DEFER)
> + goto err;
> + dev_err(dev, "failed to get interconnect path %u: %d\n", i, ret);
> + continue;
> + }
> +
> + ret = icc_set_bw(par->icc_paths[i], 0, UINT_MAX);
> + if (ret) {
> + dev_err(dev, "failed to set interconnect bandwidth %u: %d\n", i, ret);
> + continue;
> + }
> + }
> +
> + return devm_add_action_or_reset(dev, simplefb_detach_icc, par);
> +
> +err:
> + while (i) {
> + --i;
> + if (!IS_ERR_OR_NULL(par->icc_paths[i]))
> + icc_put(par->icc_paths[i]);
> + }
> + return ret;
> +}
> +#else
> +static int simplefb_attach_icc(struct simplefb_par *par,
> + struct platform_device *pdev)
> +{
> + return 0;
> +}
> +#endif
> +
> static int simplefb_probe(struct platform_device *pdev)
> {
> int ret;
> @@ -615,6 +694,10 @@ static int simplefb_probe(struct platform_device *pdev)
> if (ret < 0)
> goto error_regulators;
>
> + ret = simplefb_attach_icc(par, pdev);
> + if (ret < 0)
> + goto error_regulators;
> +
> simplefb_clocks_enable(par, pdev);
> simplefb_regulators_enable(par, pdev);
>
>
--
--
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)
^ permalink raw reply
* Re: [PATCH 2/3] drm/sysfb: simpledrm: Add support for interconnect paths
From: Thomas Zimmermann @ 2025-06-20 11:01 UTC (permalink / raw)
To: Luca Weiss, Hans de Goede, Maarten Lankhorst, Maxime Ripard,
David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Javier Martinez Canillas, Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel
In-Reply-To: <20250620-simple-drm-fb-icc-v1-2-d92142e8f74f@fairphone.com>
Hi
Am 20.06.25 um 12:31 schrieb Luca Weiss:
> Some devices might require keeping an interconnect path alive so that
> the framebuffer continues working. Add support for that by setting the
> bandwidth requirements appropriately for all provided interconnect
> paths.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> drivers/gpu/drm/sysfb/simpledrm.c | 83 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 83 insertions(+)
>
> diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c
> index a1c3119330deffc9e122b83941f3697e5b87f277..9643f7c1734ab558d52779d7c45465dbe1d85762 100644
> --- a/drivers/gpu/drm/sysfb/simpledrm.c
> +++ b/drivers/gpu/drm/sysfb/simpledrm.c
> @@ -9,6 +9,7 @@
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <linux/regulator/consumer.h>
> +#include <linux/interconnect.h>
Alphabetical sorting please.
Apart from this nitpick, the patch looks good. For the update:
Reviewed-by: Thomas Zimmermann <tzimmermann>
Best regards
Thomas
>
> #include <drm/clients/drm_client_setup.h>
> #include <drm/drm_atomic.h>
> @@ -225,6 +226,10 @@ struct simpledrm_device {
> struct device **pwr_dom_devs;
> struct device_link **pwr_dom_links;
> #endif
> +#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
> + unsigned int icc_count;
> + struct icc_path **icc_paths;
> +#endif
>
> /* modesetting */
> u32 formats[DRM_SYSFB_PLANE_NFORMATS(1)];
> @@ -547,6 +552,81 @@ static int simpledrm_device_attach_genpd(struct simpledrm_device *sdev)
> }
> #endif
>
> +#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
> +/*
> + * Generic interconnect path handling code.
> + */
> +static void simpledrm_device_detach_icc(void *res)
> +{
> + struct simpledrm_device *sdev = res;
> + int i;
> +
> + for (i = sdev->icc_count - 1; i >= 0; i--) {
> + if (!IS_ERR_OR_NULL(sdev->icc_paths[i]))
> + icc_put(sdev->icc_paths[i]);
> + }
> +}
> +
> +static int simpledrm_device_attach_icc(struct simpledrm_device *sdev)
> +{
> + struct device *dev = sdev->sysfb.dev.dev;
> + int ret, count, i;
> +
> + count = of_count_phandle_with_args(dev->of_node, "interconnects",
> + "#interconnect-cells");
> + if (count < 0)
> + return 0;
> +
> + /* An interconnect path consists of two elements */
> + if (count % 2) {
> + drm_err(&sdev->sysfb.dev,
> + "invalid interconnects value\n");
> + return -EINVAL;
> + }
> + sdev->icc_count = count / 2;
> +
> + sdev->icc_paths = devm_kcalloc(dev, sdev->icc_count,
> + sizeof(*sdev->icc_paths),
> + GFP_KERNEL);
> + if (!sdev->icc_paths)
> + return -ENOMEM;
> +
> + for (i = 0; i < sdev->icc_count; i++) {
> + sdev->icc_paths[i] = of_icc_get_by_index(dev, i);
> + if (IS_ERR_OR_NULL(sdev->icc_paths[i])) {
> + ret = PTR_ERR(sdev->icc_paths[i]);
> + if (ret == -EPROBE_DEFER)
> + goto err;
> + drm_err(&sdev->sysfb.dev, "failed to get interconnect path %u: %d\n",
> + i, ret);
> + continue;
> + }
> +
> + ret = icc_set_bw(sdev->icc_paths[i], 0, UINT_MAX);
> + if (ret) {
> + drm_err(&sdev->sysfb.dev, "failed to set interconnect bandwidth %u: %d\n",
> + i, ret);
> + continue;
> + }
> + }
> +
> + return devm_add_action_or_reset(dev, simpledrm_device_detach_icc, sdev);
> +
> +err:
> + while (i) {
> + --i;
> + if (!IS_ERR_OR_NULL(sdev->icc_paths[i]))
> + icc_put(sdev->icc_paths[i]);
> + }
> + return ret;
> +}
> +#else
> +static int simpledrm_device_attach_icc(struct simpledrm_device *sdev)
> +{
> + return 0;
> +}
> +#endif
> +
> /*
> * Modesetting
> */
> @@ -633,6 +713,9 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
> if (ret)
> return ERR_PTR(ret);
> ret = simpledrm_device_attach_genpd(sdev);
> + if (ret)
> + return ERR_PTR(ret);
> + ret = simpledrm_device_attach_icc(sdev);
> if (ret)
> return ERR_PTR(ret);
>
>
--
--
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)
^ permalink raw reply
* [PATCH 3/3] fbdev/simplefb: Add support for interconnect paths
From: Luca Weiss @ 2025-06-20 10:31 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250620-simple-drm-fb-icc-v1-0-d92142e8f74f@fairphone.com>
Some devices might require keeping an interconnect path alive so that
the framebuffer continues working. Add support for that by setting the
bandwidth requirements appropriately for all provided interconnect
paths.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
index be95fcddce4c8ca794826b805cd7dad2985bd637..ca73e079fd13550ddc779e84db80f7f9b743d074 100644
--- a/drivers/video/fbdev/simplefb.c
+++ b/drivers/video/fbdev/simplefb.c
@@ -27,6 +27,7 @@
#include <linux/parser.h>
#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
+#include <linux/interconnect.h>
static const struct fb_fix_screeninfo simplefb_fix = {
.id = "simple",
@@ -89,6 +90,10 @@ struct simplefb_par {
u32 regulator_count;
struct regulator **regulators;
#endif
+#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
+ unsigned int icc_count;
+ struct icc_path **icc_paths;
+#endif
};
static void simplefb_clocks_destroy(struct simplefb_par *par);
@@ -525,6 +530,80 @@ static int simplefb_attach_genpds(struct simplefb_par *par,
}
#endif
+#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
+/*
+ * Generic interconnect path handling code.
+ */
+static void simplefb_detach_icc(void *res)
+{
+ struct simplefb_par *par = res;
+ int i;
+
+ for (i = par->icc_count - 1; i >= 0; i--) {
+ if (!IS_ERR_OR_NULL(par->icc_paths[i]))
+ icc_put(par->icc_paths[i]);
+ }
+}
+
+static int simplefb_attach_icc(struct simplefb_par *par,
+ struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ int ret, count, i;
+
+ count = of_count_phandle_with_args(dev->of_node, "interconnects",
+ "#interconnect-cells");
+ if (count < 0)
+ return 0;
+
+ /* An interconnect path consists of two elements */
+ if (count % 2) {
+ dev_err(dev, "invalid interconnects value\n");
+ return -EINVAL;
+ }
+ par->icc_count = count / 2;
+
+ par->icc_paths = devm_kcalloc(dev, par->icc_count,
+ sizeof(*par->icc_paths),
+ GFP_KERNEL);
+ if (!par->icc_paths)
+ return -ENOMEM;
+
+ for (i = 0; i < par->icc_count; i++) {
+ par->icc_paths[i] = of_icc_get_by_index(dev, i);
+ if (IS_ERR_OR_NULL(par->icc_paths[i])) {
+ ret = PTR_ERR(par->icc_paths[i]);
+ if (ret == -EPROBE_DEFER)
+ goto err;
+ dev_err(dev, "failed to get interconnect path %u: %d\n", i, ret);
+ continue;
+ }
+
+ ret = icc_set_bw(par->icc_paths[i], 0, UINT_MAX);
+ if (ret) {
+ dev_err(dev, "failed to set interconnect bandwidth %u: %d\n", i, ret);
+ continue;
+ }
+ }
+
+ return devm_add_action_or_reset(dev, simplefb_detach_icc, par);
+
+err:
+ while (i) {
+ --i;
+ if (!IS_ERR_OR_NULL(par->icc_paths[i]))
+ icc_put(par->icc_paths[i]);
+ }
+ return ret;
+}
+#else
+static int simplefb_attach_icc(struct simplefb_par *par,
+ struct platform_device *pdev)
+{
+ return 0;
+}
+#endif
+
static int simplefb_probe(struct platform_device *pdev)
{
int ret;
@@ -615,6 +694,10 @@ static int simplefb_probe(struct platform_device *pdev)
if (ret < 0)
goto error_regulators;
+ ret = simplefb_attach_icc(par, pdev);
+ if (ret < 0)
+ goto error_regulators;
+
simplefb_clocks_enable(par, pdev);
simplefb_regulators_enable(par, pdev);
--
2.50.0
^ permalink raw reply related
* [PATCH 2/3] drm/sysfb: simpledrm: Add support for interconnect paths
From: Luca Weiss @ 2025-06-20 10:31 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250620-simple-drm-fb-icc-v1-0-d92142e8f74f@fairphone.com>
Some devices might require keeping an interconnect path alive so that
the framebuffer continues working. Add support for that by setting the
bandwidth requirements appropriately for all provided interconnect
paths.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/gpu/drm/sysfb/simpledrm.c | 83 +++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c
index a1c3119330deffc9e122b83941f3697e5b87f277..9643f7c1734ab558d52779d7c45465dbe1d85762 100644
--- a/drivers/gpu/drm/sysfb/simpledrm.c
+++ b/drivers/gpu/drm/sysfb/simpledrm.c
@@ -9,6 +9,7 @@
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
+#include <linux/interconnect.h>
#include <drm/clients/drm_client_setup.h>
#include <drm/drm_atomic.h>
@@ -225,6 +226,10 @@ struct simpledrm_device {
struct device **pwr_dom_devs;
struct device_link **pwr_dom_links;
#endif
+#if defined CONFIG_OF && defined CONFIG_INTERCONNECT
+ unsigned int icc_count;
+ struct icc_path **icc_paths;
+#endif
/* modesetting */
u32 formats[DRM_SYSFB_PLANE_NFORMATS(1)];
@@ -547,6 +552,81 @@ static int simpledrm_device_attach_genpd(struct simpledrm_device *sdev)
}
#endif
+#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
+/*
+ * Generic interconnect path handling code.
+ */
+static void simpledrm_device_detach_icc(void *res)
+{
+ struct simpledrm_device *sdev = res;
+ int i;
+
+ for (i = sdev->icc_count - 1; i >= 0; i--) {
+ if (!IS_ERR_OR_NULL(sdev->icc_paths[i]))
+ icc_put(sdev->icc_paths[i]);
+ }
+}
+
+static int simpledrm_device_attach_icc(struct simpledrm_device *sdev)
+{
+ struct device *dev = sdev->sysfb.dev.dev;
+ int ret, count, i;
+
+ count = of_count_phandle_with_args(dev->of_node, "interconnects",
+ "#interconnect-cells");
+ if (count < 0)
+ return 0;
+
+ /* An interconnect path consists of two elements */
+ if (count % 2) {
+ drm_err(&sdev->sysfb.dev,
+ "invalid interconnects value\n");
+ return -EINVAL;
+ }
+ sdev->icc_count = count / 2;
+
+ sdev->icc_paths = devm_kcalloc(dev, sdev->icc_count,
+ sizeof(*sdev->icc_paths),
+ GFP_KERNEL);
+ if (!sdev->icc_paths)
+ return -ENOMEM;
+
+ for (i = 0; i < sdev->icc_count; i++) {
+ sdev->icc_paths[i] = of_icc_get_by_index(dev, i);
+ if (IS_ERR_OR_NULL(sdev->icc_paths[i])) {
+ ret = PTR_ERR(sdev->icc_paths[i]);
+ if (ret == -EPROBE_DEFER)
+ goto err;
+ drm_err(&sdev->sysfb.dev, "failed to get interconnect path %u: %d\n",
+ i, ret);
+ continue;
+ }
+
+ ret = icc_set_bw(sdev->icc_paths[i], 0, UINT_MAX);
+ if (ret) {
+ drm_err(&sdev->sysfb.dev, "failed to set interconnect bandwidth %u: %d\n",
+ i, ret);
+ continue;
+ }
+ }
+
+ return devm_add_action_or_reset(dev, simpledrm_device_detach_icc, sdev);
+
+err:
+ while (i) {
+ --i;
+ if (!IS_ERR_OR_NULL(sdev->icc_paths[i]))
+ icc_put(sdev->icc_paths[i]);
+ }
+ return ret;
+}
+#else
+static int simpledrm_device_attach_icc(struct simpledrm_device *sdev)
+{
+ return 0;
+}
+#endif
+
/*
* Modesetting
*/
@@ -633,6 +713,9 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
if (ret)
return ERR_PTR(ret);
ret = simpledrm_device_attach_genpd(sdev);
+ if (ret)
+ return ERR_PTR(ret);
+ ret = simpledrm_device_attach_icc(sdev);
if (ret)
return ERR_PTR(ret);
--
2.50.0
^ permalink raw reply related
* [PATCH 1/3] dt-bindings: display: simple-framebuffer: Add interconnects property
From: Luca Weiss @ 2025-06-20 10:31 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
In-Reply-To: <20250620-simple-drm-fb-icc-v1-0-d92142e8f74f@fairphone.com>
Document the interconnects property which is a list of interconnect
paths that is used by the framebuffer and therefore needs to be kept
alive when the framebuffer is being used.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/display/simple-framebuffer.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
index 296500f9da05e296dbbeec50ba5186b6b30aaffc..f0fa0ef23d91043dfb2b220c654b80e2e80850cd 100644
--- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
@@ -79,6 +79,9 @@ properties:
power-domains:
description: List of power domains used by the framebuffer.
+ interconnects:
+ description: List of interconnect paths used by the framebuffer.
+
width:
$ref: /schemas/types.yaml#/definitions/uint32
description: Width of the framebuffer in pixels
--
2.50.0
^ permalink raw reply related
* [PATCH 0/3] Add interconnent support for simpledrm/simplefb
From: Luca Weiss @ 2025-06-20 10:31 UTC (permalink / raw)
To: Hans de Goede, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Javier Martinez Canillas,
Helge Deller
Cc: linux-fbdev, dri-devel, devicetree, linux-kernel, Luca Weiss
Some devices might require keeping an interconnect path alive so that
the framebuffer continues working. Add support for that by setting the
bandwidth requirements appropriately for all provided interconnect
paths.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (3):
dt-bindings: display: simple-framebuffer: Add interconnects property
drm/sysfb: simpledrm: Add support for interconnect paths
fbdev/simplefb: Add support for interconnect paths
.../bindings/display/simple-framebuffer.yaml | 3 +
drivers/gpu/drm/sysfb/simpledrm.c | 83 ++++++++++++++++++++++
drivers/video/fbdev/simplefb.c | 83 ++++++++++++++++++++++
3 files changed, 169 insertions(+)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250617-simple-drm-fb-icc-89461c559913
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply
* Re: [PATCH 1/1] staging: sm750fb: convert CamelCase function names to snake_case
From: Greg KH @ 2025-06-19 15:32 UTC (permalink / raw)
To: khalid.datamax
Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
linux-kernel
In-Reply-To: <20250531211319.55682-3-khalid.datamax@gmail.com>
On Sun, Jun 01, 2025 at 02:41:03AM +0530, khalid.datamax@gmail.com wrote:
> From: Khalid Faisal <khalid.datamax@gmail.com>
>
> This patch converts function names in the sm750fb driver from CamelCase to
> snake_case to comply with Linux kernel coding style.
>
> No functional changes.
>
> Signed-off-by: Khalid Faisal <khalid.datamax@gmail.com>
> ---
> drivers/staging/sm750fb/ddk750_dvi.c | 16 +++++------
> drivers/staging/sm750fb/ddk750_sii164.c | 38 ++++++++++++-------------
> drivers/staging/sm750fb/ddk750_sii164.h | 16 +++++------
> 3 files changed, 35 insertions(+), 35 deletions(-)
Are you sure this file is still in the tree? I don't see it anymore :(
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox