Skip to content

Commit

Permalink
drm/bridge: panel: Name an associated backlight device
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
6by9 committed May 17, 2024
1 parent 7a8a376 commit 97d00cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/bridge/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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;
Expand Down Expand Up @@ -86,6 +87,9 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
drm_connector_attach_encoder(&panel_bridge->connector,
bridge->encoder);

backlight_set_display_name(panel_bridge->panel->backlight,
panel_bridge->connector.name);

if (bridge->dev->registered) {
if (connector->funcs->reset)
connector->funcs->reset(connector);
Expand Down

0 comments on commit 97d00cb

Please sign in to comment.