From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Thierry Reding <thierry.reding@gmail.com>,
dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
Boris Brezillon <boris.brezillon@bootlin.com>
Subject: [RFC PATCH 2/3] drm/bridge: panel: Make use of the panel detection infrastructure
Date: Mon, 30 Apr 2018 16:43:22 +0200 [thread overview]
Message-ID: <20180430144323.9233-3-boris.brezillon@bootlin.com> (raw)
In-Reply-To: <20180430144323.9233-1-boris.brezillon@bootlin.com>
The DRM panel framework now exposes a way to know whether a panel is
connected or disconnected.
Use this panel detection logic to implement the connector->detect_ctx()
method and allow one to report when a panel is connected or disconnected
which is particularly useful to support panels connected through
extension boards.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
drivers/gpu/drm/bridge/panel.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index 6d99d4a3beb3..195deb651243 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -44,9 +44,21 @@ static int panel_bridge_connector_get_modes(struct drm_connector *connector)
return drm_panel_get_modes(panel_bridge->panel);
}
+static int
+panel_bridge_connector_detect_ctx(struct drm_connector *connector,
+ struct drm_modeset_acquire_ctx *ctx,
+ bool force)
+{
+ struct panel_bridge *panel_bridge =
+ drm_connector_to_panel_bridge(connector);
+
+ return drm_panel_detect(panel_bridge->panel);
+}
+
static const struct drm_connector_helper_funcs
panel_bridge_connector_helper_funcs = {
.get_modes = panel_bridge_connector_get_modes,
+ .detect_ctx = panel_bridge_connector_detect_ctx,
};
static const struct drm_connector_funcs panel_bridge_connector_funcs = {
@@ -68,6 +80,7 @@ static int panel_bridge_attach(struct drm_bridge *bridge)
return -ENODEV;
}
+ connector->polled = panel_bridge->panel->polled;
drm_connector_helper_add(connector,
&panel_bridge_connector_helper_funcs);
--
2.14.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-04-30 14:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 14:43 [RFC PATCH 0/3] drm/panel: Support panel detection Boris Brezillon
2018-04-30 14:43 ` [RFC PATCH 1/3] " Boris Brezillon
2018-04-30 16:08 ` Daniel Vetter
2018-04-30 16:34 ` Boris Brezillon
2018-04-30 14:43 ` Boris Brezillon [this message]
2018-04-30 14:43 ` [RFC PATCH 3/3] drm/panel: rpi-touchscreen: Implement ->detect() Boris Brezillon
2018-04-30 17:22 ` [RFC PATCH 0/3] drm/panel: Support panel detection Eric Anholt
2018-04-30 17:43 ` Boris Brezillon
2018-04-30 19:48 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180430144323.9233-3-boris.brezillon@bootlin.com \
--to=boris.brezillon@bootlin.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox