All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm: add per-connector hotplug events
@ 2021-06-09 10:39 ` Simon Ser
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Ser @ 2021-06-09 10:39 UTC (permalink / raw)
  To: dri-devel, amd-gfx; +Cc: pekka.paalanen, michel, alexander.deucher

When a uevent only updates a single connector, add a CONNECTOR property
to the uevent. This allows user-space to ignore other connectors when
handling the uevent. This is purely an optimization, drivers can still
send a uevent without the CONNECTOR property.

The CONNECTOR property is already set when sending HDCP property update
uevents, see drm_sysfs_connector_status_event.

This has been tested with a wlroots patch [1].

amdgpu has been updated to use these new fine-grained uevents.

[1]: https://github.com/swaywm/wlroots/pull/2959

Simon Ser (4):
  drm/sysfs: introduce drm_sysfs_connector_hotplug_event
  drm/probe-helper: add drm_kms_helper_connector_hotplug_event
  drm/connector: use drm_sysfs_connector_hotplug_event
  amdgpu: use drm_kms_helper_connector_hotplug_event

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 +++---
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c |  4 +--
 drivers/gpu/drm/drm_connector.c               |  2 +-
 drivers/gpu/drm/drm_probe_helper.c            | 20 +++++++++++++++
 drivers/gpu/drm/drm_sysfs.c                   | 25 +++++++++++++++++++
 include/drm/drm_probe_helper.h                |  1 +
 include/drm/drm_sysfs.h                       |  1 +
 7 files changed, 54 insertions(+), 7 deletions(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 0/4] drm: add per-connector hotplug events
@ 2021-06-09 10:39 ` Simon Ser
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Ser @ 2021-06-09 10:39 UTC (permalink / raw)
  To: dri-devel, amd-gfx
  Cc: pekka.paalanen, michel, daniel, daniel, alexander.deucher,
	harry.wentland

When a uevent only updates a single connector, add a CONNECTOR property
to the uevent. This allows user-space to ignore other connectors when
handling the uevent. This is purely an optimization, drivers can still
send a uevent without the CONNECTOR property.

The CONNECTOR property is already set when sending HDCP property update
uevents, see drm_sysfs_connector_status_event.

This has been tested with a wlroots patch [1].

amdgpu has been updated to use these new fine-grained uevents.

[1]: https://github.com/swaywm/wlroots/pull/2959

Simon Ser (4):
  drm/sysfs: introduce drm_sysfs_connector_hotplug_event
  drm/probe-helper: add drm_kms_helper_connector_hotplug_event
  drm/connector: use drm_sysfs_connector_hotplug_event
  amdgpu: use drm_kms_helper_connector_hotplug_event

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 +++---
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c |  4 +--
 drivers/gpu/drm/drm_connector.c               |  2 +-
 drivers/gpu/drm/drm_probe_helper.c            | 20 +++++++++++++++
 drivers/gpu/drm/drm_sysfs.c                   | 25 +++++++++++++++++++
 include/drm/drm_probe_helper.h                |  1 +
 include/drm/drm_sysfs.h                       |  1 +
 7 files changed, 54 insertions(+), 7 deletions(-)

-- 
2.31.1


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] drm: add per-connector hotplug events
  2021-06-09 10:39 ` Simon Ser
@ 2021-06-09 15:03   ` Daniel Vetter
  -1 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2021-06-09 15:03 UTC (permalink / raw)
  To: Simon Ser; +Cc: pekka.paalanen, michel, amd-gfx, dri-devel, alexander.deucher

On Wed, Jun 09, 2021 at 10:39:03AM +0000, Simon Ser wrote:
> When a uevent only updates a single connector, add a CONNECTOR property
> to the uevent. This allows user-space to ignore other connectors when
> handling the uevent. This is purely an optimization, drivers can still
> send a uevent without the CONNECTOR property.
> 
> The CONNECTOR property is already set when sending HDCP property update
> uevents, see drm_sysfs_connector_status_event.
> 
> This has been tested with a wlroots patch [1].
> 
> amdgpu has been updated to use these new fine-grained uevents.

That's a bit thin for motivating roll-out ... Also my idea was that with
the per-connector epoch counter we could make this happen for anyone using
the probe helpers.

I also thought that the dp hotplug code was a bit more unified by now to
not need the duplication across all drivers. But there's only three for
that.

Ofc drivers that hand-roll their hpd code need to be adjusted, but I've
hoped that with the epoch counter we could just make the current hotplug
event code dtrt thing here automatically maybe?

Consistent kms interface across drivers is good, and I think we should
aim for that.
-Daniel

> 
> [1]: https://github.com/swaywm/wlroots/pull/2959
> 
> Simon Ser (4):
>   drm/sysfs: introduce drm_sysfs_connector_hotplug_event
>   drm/probe-helper: add drm_kms_helper_connector_hotplug_event
>   drm/connector: use drm_sysfs_connector_hotplug_event
>   amdgpu: use drm_kms_helper_connector_hotplug_event
> 
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 +++---
>  .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c |  4 +--
>  drivers/gpu/drm/drm_connector.c               |  2 +-
>  drivers/gpu/drm/drm_probe_helper.c            | 20 +++++++++++++++
>  drivers/gpu/drm/drm_sysfs.c                   | 25 +++++++++++++++++++
>  include/drm/drm_probe_helper.h                |  1 +
>  include/drm/drm_sysfs.h                       |  1 +
>  7 files changed, 54 insertions(+), 7 deletions(-)
> 
> -- 
> 2.31.1
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] drm: add per-connector hotplug events
@ 2021-06-09 15:03   ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2021-06-09 15:03 UTC (permalink / raw)
  To: Simon Ser
  Cc: pekka.paalanen, michel, amd-gfx, dri-devel, daniel,
	alexander.deucher, daniel, harry.wentland

On Wed, Jun 09, 2021 at 10:39:03AM +0000, Simon Ser wrote:
> When a uevent only updates a single connector, add a CONNECTOR property
> to the uevent. This allows user-space to ignore other connectors when
> handling the uevent. This is purely an optimization, drivers can still
> send a uevent without the CONNECTOR property.
> 
> The CONNECTOR property is already set when sending HDCP property update
> uevents, see drm_sysfs_connector_status_event.
> 
> This has been tested with a wlroots patch [1].
> 
> amdgpu has been updated to use these new fine-grained uevents.

That's a bit thin for motivating roll-out ... Also my idea was that with
the per-connector epoch counter we could make this happen for anyone using
the probe helpers.

I also thought that the dp hotplug code was a bit more unified by now to
not need the duplication across all drivers. But there's only three for
that.

Ofc drivers that hand-roll their hpd code need to be adjusted, but I've
hoped that with the epoch counter we could just make the current hotplug
event code dtrt thing here automatically maybe?

Consistent kms interface across drivers is good, and I think we should
aim for that.
-Daniel

> 
> [1]: https://github.com/swaywm/wlroots/pull/2959
> 
> Simon Ser (4):
>   drm/sysfs: introduce drm_sysfs_connector_hotplug_event
>   drm/probe-helper: add drm_kms_helper_connector_hotplug_event
>   drm/connector: use drm_sysfs_connector_hotplug_event
>   amdgpu: use drm_kms_helper_connector_hotplug_event
> 
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  8 +++---
>  .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c |  4 +--
>  drivers/gpu/drm/drm_connector.c               |  2 +-
>  drivers/gpu/drm/drm_probe_helper.c            | 20 +++++++++++++++
>  drivers/gpu/drm/drm_sysfs.c                   | 25 +++++++++++++++++++
>  include/drm/drm_probe_helper.h                |  1 +
>  include/drm/drm_sysfs.h                       |  1 +
>  7 files changed, 54 insertions(+), 7 deletions(-)
> 
> -- 
> 2.31.1
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] drm: add per-connector hotplug events
  2021-06-09 15:03   ` Daniel Vetter
@ 2021-06-09 15:10     ` Simon Ser
  -1 siblings, 0 replies; 6+ messages in thread
From: Simon Ser @ 2021-06-09 15:10 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: pekka.paalanen, michel, amd-gfx, dri-devel, alexander.deucher

On Wednesday, June 9th, 2021 at 17:03, Daniel Vetter <daniel@ffwll.ch> wrote:

> On Wed, Jun 09, 2021 at 10:39:03AM +0000, Simon Ser wrote:
> > When a uevent only updates a single connector, add a CONNECTOR property
> > to the uevent. This allows user-space to ignore other connectors when
> > handling the uevent. This is purely an optimization, drivers can still
> > send a uevent without the CONNECTOR property.
> >
> > The CONNECTOR property is already set when sending HDCP property update
> > uevents, see drm_sysfs_connector_status_event.
> >
> > This has been tested with a wlroots patch [1].
> >
> > amdgpu has been updated to use these new fine-grained uevents.
>
> That's a bit thin for motivating roll-out ...

My intention was to add a few other drivers as well if the idea is good.
amdgpu just happens to be a codebase I know and can work with hardware I
own.

> Also my idea was that with the per-connector epoch counter we could make
> this happen for anyone using the probe helpers.

Yeah, I remember something about this, but then nothing materialized.

> I also thought that the dp hotplug code was a bit more unified by now to
> not need the duplication across all drivers. But there's only three for
> that.
>
> Ofc drivers that hand-roll their hpd code need to be adjusted, but I've
> hoped that with the epoch counter we could just make the current hotplug
> event code dtrt thing here automatically maybe?

Sorry, not signing up for that. It looked easy enough to adjust existing
calls, but anything more complicated and I'm out of time.

If anything, this patch is mostly a signal that user-space would like to
receive CONNECTOR properties. User-space is typed up and ready if any
kernel dev wants to implement this. I'm completely fine with abandonning
this patch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] drm: add per-connector hotplug events
@ 2021-06-09 15:10     ` Simon Ser
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Ser @ 2021-06-09 15:10 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: pekka.paalanen, michel, amd-gfx, dri-devel, alexander.deucher,
	daniel, harry.wentland

On Wednesday, June 9th, 2021 at 17:03, Daniel Vetter <daniel@ffwll.ch> wrote:

> On Wed, Jun 09, 2021 at 10:39:03AM +0000, Simon Ser wrote:
> > When a uevent only updates a single connector, add a CONNECTOR property
> > to the uevent. This allows user-space to ignore other connectors when
> > handling the uevent. This is purely an optimization, drivers can still
> > send a uevent without the CONNECTOR property.
> >
> > The CONNECTOR property is already set when sending HDCP property update
> > uevents, see drm_sysfs_connector_status_event.
> >
> > This has been tested with a wlroots patch [1].
> >
> > amdgpu has been updated to use these new fine-grained uevents.
>
> That's a bit thin for motivating roll-out ...

My intention was to add a few other drivers as well if the idea is good.
amdgpu just happens to be a codebase I know and can work with hardware I
own.

> Also my idea was that with the per-connector epoch counter we could make
> this happen for anyone using the probe helpers.

Yeah, I remember something about this, but then nothing materialized.

> I also thought that the dp hotplug code was a bit more unified by now to
> not need the duplication across all drivers. But there's only three for
> that.
>
> Ofc drivers that hand-roll their hpd code need to be adjusted, but I've
> hoped that with the epoch counter we could just make the current hotplug
> event code dtrt thing here automatically maybe?

Sorry, not signing up for that. It looked easy enough to adjust existing
calls, but anything more complicated and I'm out of time.

If anything, this patch is mostly a signal that user-space would like to
receive CONNECTOR properties. User-space is typed up and ready if any
kernel dev wants to implement this. I'm completely fine with abandonning
this patch.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-09 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 10:39 [PATCH 0/4] drm: add per-connector hotplug events Simon Ser
2021-06-09 10:39 ` Simon Ser
2021-06-09 15:03 ` Daniel Vetter
2021-06-09 15:03   ` Daniel Vetter
2021-06-09 15:10   ` Simon Ser
2021-06-09 15:10     ` Simon Ser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.