From: Ramalingam C <ramalingam.c@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 09/10] drm: uevent for connector status change
Date: Wed, 27 Mar 2019 20:10:01 +0530 [thread overview]
Message-ID: <20190327144001.GB18417@intel.com> (raw)
In-Reply-To: <20190327110137.GG2665@phenom.ffwll.local>
On 2019-03-27 at 12:01:37 +0100, Daniel Vetter wrote:
> On Fri, Mar 22, 2019 at 06:14:47AM +0530, Ramalingam C wrote:
> > DRM API for generating uevent for a status changes of connector's
> > property.
> >
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > ---
> > drivers/gpu/drm/drm_sysfs.c | 28 ++++++++++++++++++++++++++++
> > include/drm/drm_sysfs.h | 5 ++++-
> > 2 files changed, 32 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
> > index ecb7b33002bb..c76c65ca4122 100644
> > --- a/drivers/gpu/drm/drm_sysfs.c
> > +++ b/drivers/gpu/drm/drm_sysfs.c
> > @@ -330,6 +330,34 @@ void drm_sysfs_hotplug_event(struct drm_device *dev)
> > }
> > EXPORT_SYMBOL(drm_sysfs_hotplug_event);
>
> Maybe add a comment to the kerneldoc of drm_sysfs_hotplug_event() that new
> uapi should use drm_sysfs_connector_status_event().
Sure.
-Ram
> -Daniel
>
> >
> > +/**
> > + * drm_sysfs_connector_status_event - generate a DRM uevent for connector
> > + * property status change
> > + * @connector: connector on which property status changed
> > + * @property: connector property whoes status changed.
> > + *
> > + * Send a uevent for the DRM device specified by @dev. Currently we
> > + * set HOTPLUG=1 and connector id along with it property id related to status
> > + * changed.
> > + */
> > +void drm_sysfs_connector_status_event(struct drm_connector *connector,
> > + struct drm_property *property)
> > +{
> > + struct drm_device *dev = connector->dev;
> > + char hotplug_str[] = "HOTPLUG=1", conn_id[30], prop_id[30];
> > + char *envp[4] = { hotplug_str, conn_id, prop_id, NULL };
> > +
> > + snprintf(conn_id, ARRAY_SIZE(conn_id),
> > + "CONNECTOR=%u", connector->base.id);
> > + snprintf(prop_id, ARRAY_SIZE(prop_id),
> > + "PROPERTY=%u", property->base.id);
> > +
> > + DRM_DEBUG("generating connector status event\n");
> > +
> > + kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp);
> > +}
> > +EXPORT_SYMBOL(drm_sysfs_connector_status_event);
> > +
> > static void drm_sysfs_release(struct device *dev)
> > {
> > kfree(dev);
> > diff --git a/include/drm/drm_sysfs.h b/include/drm/drm_sysfs.h
> > index 4f311e836cdc..d454ef617b2c 100644
> > --- a/include/drm/drm_sysfs.h
> > +++ b/include/drm/drm_sysfs.h
> > @@ -4,10 +4,13 @@
> >
> > struct drm_device;
> > struct device;
> > +struct drm_connector;
> > +struct drm_property;
> >
> > int drm_class_device_register(struct device *dev);
> > void drm_class_device_unregister(struct device *dev);
> >
> > void drm_sysfs_hotplug_event(struct drm_device *dev);
> > -
> > +void drm_sysfs_connector_status_event(struct drm_connector *connector,
> > + struct drm_property *property);
> > #endif
> > --
> > 2.19.1
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-27 14:40 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 0:44 [PATCH v3 00/10] HDCP2.2 Phase II Ramalingam C
2019-03-22 0:44 ` [PATCH v3 01/10] drm/i915: debugfs: HDCP2.2 capability read Ramalingam C
2019-03-27 9:51 ` Daniel Vetter
2019-03-22 0:44 ` [PATCH v3 02/10] drm: Add Content protection type property Ramalingam C
2019-03-27 9:56 ` Daniel Vetter
2019-03-27 13:34 ` Ramalingam C
2019-03-22 0:44 ` [PATCH v3 03/10] drm/i915: Attach content " Ramalingam C
2019-03-27 10:00 ` Daniel Vetter
2019-03-27 13:39 ` Ramalingam C
2019-03-22 0:44 ` [PATCH v3 04/10] drm/i915: HDCP SRM parsing and revocation check Ramalingam C
2019-03-27 10:16 ` Daniel Vetter
2019-03-27 13:48 ` Ramalingam C
2019-03-22 0:44 ` [PATCH v3 05/10] drm/i915/sysfs: Node for hdcp srm Ramalingam C
2019-03-22 0:44 ` [PATCH v3 06/10] drm: Add CP downstream_info property Ramalingam C
2019-03-27 10:25 ` Daniel Vetter
2019-03-27 14:00 ` Ramalingam C
2019-03-27 14:22 ` Daniel Vetter
2019-03-22 0:44 ` [PATCH v3 07/10] drm/i915: Populate downstream info for HDCP1.4 Ramalingam C
2019-03-27 10:28 ` Daniel Vetter
2019-03-22 0:44 ` [PATCH v3 08/10] drm/i915: Populate downstream info for HDCP2.2 Ramalingam C
2019-03-27 10:31 ` Daniel Vetter
2019-03-27 14:49 ` Ramalingam C
2019-03-27 17:44 ` Daniel Vetter
2019-03-22 0:44 ` [PATCH v3 09/10] drm: uevent for connector status change Ramalingam C
2019-03-27 11:00 ` Daniel Vetter
2019-03-27 11:01 ` Daniel Vetter
2019-03-27 14:40 ` Ramalingam C [this message]
2019-03-22 0:44 ` [PATCH v3 10/10] drm/i915: uevent for HDCP " Ramalingam C
2019-03-27 11:06 ` Daniel Vetter
2019-03-27 14:37 ` Ramalingam C
2019-03-27 17:47 ` Daniel Vetter
2019-03-22 3:26 ` ✗ Fi.CI.CHECKPATCH: warning for HDCP2.2 Phase II (rev4) Patchwork
2019-03-22 3:33 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-22 3:54 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-22 23:31 ` ✓ Fi.CI.IGT: " Patchwork
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=20190327144001.GB18417@intel.com \
--to=ramalingam.c@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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