Skip to content

Commit 573f8fd

Browse files
6by9pelwell
authored andcommitted
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 <[email protected]>
1 parent 1e0dc52 commit 573f8fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/bridge/panel.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <drm/drm_panel.h>
1515
#include <drm/drm_print.h>
1616
#include <drm/drm_probe_helper.h>
17+
#include <linux/backlight.h>
1718

1819
struct panel_bridge {
1920
struct drm_bridge bridge;
@@ -86,6 +87,9 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
8687
drm_connector_attach_encoder(&panel_bridge->connector,
8788
bridge->encoder);
8889

90+
backlight_set_display_name(panel_bridge->panel->backlight,
91+
panel_bridge->connector.name);
92+
8993
if (bridge->dev->registered) {
9094
if (connector->funcs->reset)
9195
connector->funcs->reset(connector);

0 commit comments

Comments
 (0)