mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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: 573f8fd0ab ("drm/bridge: panel: Name an associated backlight device")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
265188c01f
commit
fe55c4300b
@@ -17,6 +17,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;
|
||||
@@ -85,6 +86,11 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
|
||||
drm_connector_attach_encoder(&panel_bridge->connector,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user