difos/target/linux/bcm27xx/patches-6.12/950-0461-drm-bridge-panel-Name-an-associated-backlight-device.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

48 lines
1.6 KiB
Diff

From a9a23d5c64f1042efd8e1c5ee99dcd466bd64c7d Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Fri, 17 May 2024 17:37:33 +0100
Subject: [PATCH] drm/bridge: panel: Name an associated backlight device
Pass the DRM connector name to any configured backlight
device so that userspace can associate the two items.
Ideally this should be in drm_panel, but it is bridge/panel
that creates the drm_connector and therefore knows the name.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drm/bridge: panel: Ensure backlight is reachable
Ensure that the various options of modules vs builtin results
in being able to call into the backlight code.
https://github.com/raspberrypi/linux/issues/6198
Fixes: 573f8fd0abf1 ("drm/bridge: panel: Name an associated backlight device")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/gpu/drm/bridge/panel.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -16,6 +16,7 @@
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
+#include <linux/backlight.h>
struct panel_bridge {
struct drm_bridge bridge;
@@ -83,6 +84,11 @@ static int panel_bridge_attach(struct dr
drm_connector_attach_encoder(&panel_bridge->connector,
bridge->encoder);
+#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
+ backlight_set_display_name(panel_bridge->panel->backlight,
+ panel_bridge->connector.name);
+#endif
+
if (bridge->dev->registered) {
if (connector->funcs->reset)
connector->funcs->reset(connector);