[PATCH v7 2/5] drm/scdc-helper: Add scdc_status debugfs entry
Maxime Ripard
mripard at kernel.org
Tue Jul 21 05:41:42 PDT 2026
On Tue, Jul 21, 2026 at 10:58:58AM +0200, Nicolas Frattaroli wrote:
> SCDC provides status information on the current display link. At the
> very least, it may be useful to expose this info through debugfs.
>
> Add a debugfs entry for it under the connector, which displays a few
> more details parsed out of the SCDC registers. A new
> drm_scdc_debugfs_init function can be called by the connector
> implementation to initialise the debugfs file.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
> ---
> drivers/gpu/drm/display/drm_scdc_helper.c | 184 ++++++++++++++++++++++++++++++
> include/drm/display/drm_scdc_helper.h | 32 ++++++
> 2 files changed, 216 insertions(+)
>
> diff --git a/drivers/gpu/drm/display/drm_scdc_helper.c b/drivers/gpu/drm/display/drm_scdc_helper.c
> +/**
> + * drm_scdc_debugfs_init - Initialize scdc files in connector debugfs
> + * @connector: pointer to &struct drm_connector to operate on
> + * @root: debugfs &struct dentry for the debugfs root of @connector
> + *
> + * Creates SCDC-related debugfs files for @connector. Must be called after
> + * @root is already created.
> + */
> +void drm_scdc_debugfs_init(struct drm_connector *connector, struct dentry *root)
> +{
> + struct scdc_debugfs_priv *priv;
> +
> + if (!root || !connector)
> + return;
> +
> + priv = drmm_kzalloc(connector->dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return;
> +
> + priv->connector = connector;
You need to take a reference to the connector pointer here with
drm_connector_get()
With this fixed,
Reviewed-by: Maxime Ripard <mripard at kernel.org>
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260721/1a486cea/attachment.sig>
More information about the linux-arm-kernel
mailing list