All of lore.kernel.org
 help / color / mirror / Atom feed
* DP Aux interfaces inquiry
@ 2017-01-24 19:51 Mario.Limonciello
  2017-01-25 15:56 ` Ville Syrjälä
  0 siblings, 1 reply; 7+ messages in thread
From: Mario.Limonciello @ 2017-01-24 19:51 UTC (permalink / raw)
  To: intel-gfx

Hi,

Recently Synaptics collaborated with Dell on a plugin [1] for fwupd that allows flashing Synaptics MST hubs using the DP aux interface to manipulate the DPCD [2].
Currently the plugin hardcodes the max number of DP aux devices to look for to 3 (as that's what we've seen so far on HW), but we were wondering:

	1) If there is a way to query the number of devices that the kernel is going to be creating?
	2) Are there any instances of more than 3 devices in the wild today that anyone is aware of?

[1] https://github.com/hughsie/fwupd/tree/master/plugins/synapticsmst
[2] https://github.com/torvalds/linux/commit/e94cb37b34eb8a88fe847438dba55c3f18bf024a

Thanks,


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

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

* Re: DP Aux interfaces inquiry
  2017-01-24 19:51 DP Aux interfaces inquiry Mario.Limonciello
@ 2017-01-25 15:56 ` Ville Syrjälä
  2017-01-25 16:43   ` Mario.Limonciello
  0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2017-01-25 15:56 UTC (permalink / raw)
  To: Mario.Limonciello; +Cc: intel-gfx

On Tue, Jan 24, 2017 at 07:51:28PM +0000, Mario.Limonciello@dell.com wrote:
> Hi,
> 
> Recently Synaptics collaborated with Dell on a plugin [1] for fwupd that allows flashing Synaptics MST hubs using the DP aux interface to manipulate the DPCD [2].
> Currently the plugin hardcodes the max number of DP aux devices to look for to 3 (as that's what we've seen so far on HW), but we were wondering:
> 
> 	1) If there is a way to query the number of devices that the kernel is going to be creating?
> 	2) Are there any instances of more than 3 devices in the wild today that anyone is aware of?

These depend on the board you're dealing with, and on the number of
gpus you have in the system (and whether they actually have drivers
loaded for them).

We should also perhaps expose the aux device node for MST devices. At
which point the number of aux nodes could change dynamically when you
plug MST devices in/out.

So I don't think you should be making any assumptions on the
number/order of these device nodes.

> 
> [1] https://github.com/hughsie/fwupd/tree/master/plugins/synapticsmst
> [2] https://github.com/torvalds/linux/commit/e94cb37b34eb8a88fe847438dba55c3f18bf024a
> 
> Thanks,
> 
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: DP Aux interfaces inquiry
  2017-01-25 15:56 ` Ville Syrjälä
@ 2017-01-25 16:43   ` Mario.Limonciello
  2017-01-25 17:13     ` Rafael Antognolli
  2017-01-25 18:40     ` Ville Syrjälä
  0 siblings, 2 replies; 7+ messages in thread
From: Mario.Limonciello @ 2017-01-25 16:43 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

Thanks for your comments.  Some nested below.

> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> Sent: Wednesday, January 25, 2017 9:57 AM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] DP Aux interfaces inquiry
> 
> On Tue, Jan 24, 2017 at 07:51:28PM +0000, Mario.Limonciello@dell.com
> wrote:
> > Hi,
> >
> > Recently Synaptics collaborated with Dell on a plugin [1] for fwupd that
> allows flashing Synaptics MST hubs using the DP aux interface to manipulate
> the DPCD [2].
> > Currently the plugin hardcodes the max number of DP aux devices to look for
> to 3 (as that's what we've seen so far on HW), but we were wondering:
> >
> > 	1) If there is a way to query the number of devices that the kernel is
> going to be creating?
> > 	2) Are there any instances of more than 3 devices in the wild today that
> anyone is aware of?
> 
> These depend on the board you're dealing with, and on the number of gpus you
> have in the system (and whether they actually have drivers loaded for them).

OK, that's what I was suspecting.

> 
> We should also perhaps expose the aux device node for MST devices. At which
> point the number of aux nodes could change dynamically when you plug MST
> devices in/out.
> 

Hmm, for the devices themselves?  The way Synaptics handles cascaded MST devices
today is a remote control mechanism.  They're able to turn on remote control
for one MST hub, and it will forward control commands (and payloads) to the next
cascaded hub.

If/when you do this can you send a uevent up to userspace?  It would be good
for fwupd to be able to listen to it and refresh devices based upon what happened
from nodes coming and going.

> So I don't think you should be making any assumptions on the number/order of
> these device nodes.
> 

From userspace would it be better to just scan /dev for /dev/drm_dp_aux# nodes?
No assumptions about the order of them, just look for all the ones with that prefix?

If not, do you have a better recommendation on how to do this?

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

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

* Re: DP Aux interfaces inquiry
  2017-01-25 16:43   ` Mario.Limonciello
@ 2017-01-25 17:13     ` Rafael Antognolli
  2017-01-25 17:31       ` Ville Syrjälä
  2017-01-25 18:40     ` Ville Syrjälä
  1 sibling, 1 reply; 7+ messages in thread
From: Rafael Antognolli @ 2017-01-25 17:13 UTC (permalink / raw)
  To: Mario.Limonciello; +Cc: intel-gfx

Hi Mario, please see below...

On Wed, Jan 25, 2017 at 04:43:58PM +0000, Mario.Limonciello@dell.com wrote:
> Thanks for your comments.  Some nested below.
> 
> > -----Original Message-----
> > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> > Sent: Wednesday, January 25, 2017 9:57 AM
> > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] DP Aux interfaces inquiry
> > 
> > On Tue, Jan 24, 2017 at 07:51:28PM +0000, Mario.Limonciello@dell.com
> > wrote:
> > > Hi,
> > >
> > > Recently Synaptics collaborated with Dell on a plugin [1] for fwupd that
> > allows flashing Synaptics MST hubs using the DP aux interface to manipulate
> > the DPCD [2].
> > > Currently the plugin hardcodes the max number of DP aux devices to look for
> > to 3 (as that's what we've seen so far on HW), but we were wondering:
> > >
> > > 	1) If there is a way to query the number of devices that the kernel is
> > going to be creating?
> > > 	2) Are there any instances of more than 3 devices in the wild today that
> > anyone is aware of?
> > 
> > These depend on the board you're dealing with, and on the number of gpus you
> > have in the system (and whether they actually have drivers loaded for them).
> 
> OK, that's what I was suspecting.
> 
> > 
> > We should also perhaps expose the aux device node for MST devices. At which
> > point the number of aux nodes could change dynamically when you plug MST
> > devices in/out.
> > 
> 
> Hmm, for the devices themselves?  The way Synaptics handles cascaded MST devices
> today is a remote control mechanism.  They're able to turn on remote control
> for one MST hub, and it will forward control commands (and payloads) to the next
> cascaded hub.
> 
> If/when you do this can you send a uevent up to userspace?  It would be good
> for fwupd to be able to listen to it and refresh devices based upon what happened
> from nodes coming and going.
> 
> > So I don't think you should be making any assumptions on the number/order of
> > these device nodes.
> > 
> 
> From userspace would it be better to just scan /dev for /dev/drm_dp_aux# nodes?
> No assumptions about the order of them, just look for all the ones with that prefix?
> 
> If not, do you have a better recommendation on how to do this?

Alternatively, you can also scan /sys/class/drm_dp_aux_dev/. The number
of the files that you have there should match what you have inside /dev.
It's not necessarily better though.

Regards,
Rafael
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: DP Aux interfaces inquiry
  2017-01-25 17:13     ` Rafael Antognolli
@ 2017-01-25 17:31       ` Ville Syrjälä
  0 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2017-01-25 17:31 UTC (permalink / raw)
  To: Rafael Antognolli; +Cc: intel-gfx, Mario.Limonciello

On Wed, Jan 25, 2017 at 09:13:44AM -0800, Rafael Antognolli wrote:
> Hi Mario, please see below...
> 
> On Wed, Jan 25, 2017 at 04:43:58PM +0000, Mario.Limonciello@dell.com wrote:
> > Thanks for your comments.  Some nested below.
> > 
> > > -----Original Message-----
> > > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> > > Sent: Wednesday, January 25, 2017 9:57 AM
> > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > Cc: intel-gfx@lists.freedesktop.org
> > > Subject: Re: [Intel-gfx] DP Aux interfaces inquiry
> > > 
> > > On Tue, Jan 24, 2017 at 07:51:28PM +0000, Mario.Limonciello@dell.com
> > > wrote:
> > > > Hi,
> > > >
> > > > Recently Synaptics collaborated with Dell on a plugin [1] for fwupd that
> > > allows flashing Synaptics MST hubs using the DP aux interface to manipulate
> > > the DPCD [2].
> > > > Currently the plugin hardcodes the max number of DP aux devices to look for
> > > to 3 (as that's what we've seen so far on HW), but we were wondering:
> > > >
> > > > 	1) If there is a way to query the number of devices that the kernel is
> > > going to be creating?
> > > > 	2) Are there any instances of more than 3 devices in the wild today that
> > > anyone is aware of?
> > > 
> > > These depend on the board you're dealing with, and on the number of gpus you
> > > have in the system (and whether they actually have drivers loaded for them).
> > 
> > OK, that's what I was suspecting.
> > 
> > > 
> > > We should also perhaps expose the aux device node for MST devices. At which
> > > point the number of aux nodes could change dynamically when you plug MST
> > > devices in/out.
> > > 
> > 
> > Hmm, for the devices themselves?  The way Synaptics handles cascaded MST devices
> > today is a remote control mechanism.  They're able to turn on remote control
> > for one MST hub, and it will forward control commands (and payloads) to the next
> > cascaded hub.
> > 
> > If/when you do this can you send a uevent up to userspace?  It would be good
> > for fwupd to be able to listen to it and refresh devices based upon what happened
> > from nodes coming and going.
> > 
> > > So I don't think you should be making any assumptions on the number/order of
> > > these device nodes.
> > > 
> > 
> > From userspace would it be better to just scan /dev for /dev/drm_dp_aux# nodes?
> > No assumptions about the order of them, just look for all the ones with that prefix?
> > 
> > If not, do you have a better recommendation on how to do this?
> 
> Alternatively, you can also scan /sys/class/drm_dp_aux_dev/. The number
> of the files that you have there should match what you have inside /dev.
> It's not necessarily better though.

Or if you already know the connector that you want to use, then you can
find the sysfs stuff for the correct aux device directly under the
connector somewhere in /sys/class/drm/

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: DP Aux interfaces inquiry
  2017-01-25 16:43   ` Mario.Limonciello
  2017-01-25 17:13     ` Rafael Antognolli
@ 2017-01-25 18:40     ` Ville Syrjälä
  2017-01-27 19:42       ` Mario.Limonciello
  1 sibling, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2017-01-25 18:40 UTC (permalink / raw)
  To: Mario.Limonciello; +Cc: intel-gfx

On Wed, Jan 25, 2017 at 04:43:58PM +0000, Mario.Limonciello@dell.com wrote:
> Thanks for your comments.  Some nested below.
> 
> > -----Original Message-----
> > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> > Sent: Wednesday, January 25, 2017 9:57 AM
> > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] DP Aux interfaces inquiry
> > 
> > On Tue, Jan 24, 2017 at 07:51:28PM +0000, Mario.Limonciello@dell.com
> > wrote:
> > > Hi,
> > >
> > > Recently Synaptics collaborated with Dell on a plugin [1] for fwupd that
> > allows flashing Synaptics MST hubs using the DP aux interface to manipulate
> > the DPCD [2].
> > > Currently the plugin hardcodes the max number of DP aux devices to look for
> > to 3 (as that's what we've seen so far on HW), but we were wondering:
> > >
> > > 	1) If there is a way to query the number of devices that the kernel is
> > going to be creating?
> > > 	2) Are there any instances of more than 3 devices in the wild today that
> > anyone is aware of?
> > 
> > These depend on the board you're dealing with, and on the number of gpus you
> > have in the system (and whether they actually have drivers loaded for them).
> 
> OK, that's what I was suspecting.
> 
> > 
> > We should also perhaps expose the aux device node for MST devices. At which
> > point the number of aux nodes could change dynamically when you plug MST
> > devices in/out.
> > 
> 
> Hmm, for the devices themselves?  The way Synaptics handles cascaded MST devices
> today is a remote control mechanism.  They're able to turn on remote control
> for one MST hub, and it will forward control commands (and payloads) to the next
> cascaded hub.

I'm not really any kind of MST expert, so I don't really know what
people get up to with these things. But there are definitely remote DPCD
read/write messages in the spec, so I think we should be able to expose
the DPCD of any downstream device via a device node.

I took a quick stab at it:
git://github.com/vsyrjala/linux.git dp_mst_port_aux_dev

Doesn't quite seem to work though, so I probably made a mistake somewhere.

> 
> If/when you do this can you send a uevent up to userspace?  It would be good
> for fwupd to be able to listen to it and refresh devices based upon what happened
> from nodes coming and going.

Hotplug uevents should be fired off whenever a new display
appears/disappears.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: DP Aux interfaces inquiry
  2017-01-25 18:40     ` Ville Syrjälä
@ 2017-01-27 19:42       ` Mario.Limonciello
  0 siblings, 0 replies; 7+ messages in thread
From: Mario.Limonciello @ 2017-01-27 19:42 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx



> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> Sent: Wednesday, January 25, 2017 12:41 PM
> To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] DP Aux interfaces inquiry
> 
> On Wed, Jan 25, 2017 at 04:43:58PM +0000, Mario.Limonciello@dell.com
> wrote:
> > Thanks for your comments.  Some nested below.
> >
> > > -----Original Message-----
> > > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> > > Sent: Wednesday, January 25, 2017 9:57 AM
> > > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > > Cc: intel-gfx@lists.freedesktop.org
> > > Subject: Re: [Intel-gfx] DP Aux interfaces inquiry
> > >
> > > On Tue, Jan 24, 2017 at 07:51:28PM +0000, Mario.Limonciello@dell.com
> > > wrote:
> > > > Hi,
> > > >
> > > > Recently Synaptics collaborated with Dell on a plugin [1] for
> > > > fwupd that
> > > allows flashing Synaptics MST hubs using the DP aux interface to
> > > manipulate the DPCD [2].
> > > > Currently the plugin hardcodes the max number of DP aux devices to
> > > > look for
> > > to 3 (as that's what we've seen so far on HW), but we were wondering:
> > > >
> > > > 	1) If there is a way to query the number of devices that the
> > > > kernel is
> > > going to be creating?
> > > > 	2) Are there any instances of more than 3 devices in the wild
> > > > today that
> > > anyone is aware of?
> > >
> > > These depend on the board you're dealing with, and on the number of
> > > gpus you have in the system (and whether they actually have drivers loaded
> for them).
> >
> > OK, that's what I was suspecting.
> >
> > >
> > > We should also perhaps expose the aux device node for MST devices.
> > > At which point the number of aux nodes could change dynamically when
> > > you plug MST devices in/out.
> > >
> >
> > Hmm, for the devices themselves?  The way Synaptics handles cascaded
> > MST devices today is a remote control mechanism.  They're able to turn
> > on remote control for one MST hub, and it will forward control
> > commands (and payloads) to the next cascaded hub.
> 
> I'm not really any kind of MST expert, so I don't really know what people get up
> to with these things. But there are definitely remote DPCD read/write
> messages in the spec, so I think we should be able to expose the DPCD of any
> downstream device via a device node.
> 
> I took a quick stab at it:
> git://github.com/vsyrjala/linux.git dp_mst_port_aux_dev
> 
> Doesn't quite seem to work though, so I probably made a mistake somewhere.
> 

Nodes for remote devices aren't too important really for this fwupd support
since the plugin knows how to use the remote control messages.  Actually if
extra nodes are added it would probably confuse the existing userspace stuff
now.

> >
> > If/when you do this can you send a uevent up to userspace?  It would
> > be good for fwupd to be able to listen to it and refresh devices based
> > upon what happened from nodes coming and going.
> 
> Hotplug uevents should be fired off whenever a new display
> appears/disappears.
> 

Ah great, I'll add in udev support to the plugin then.

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

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

end of thread, other threads:[~2017-01-27 19:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 19:51 DP Aux interfaces inquiry Mario.Limonciello
2017-01-25 15:56 ` Ville Syrjälä
2017-01-25 16:43   ` Mario.Limonciello
2017-01-25 17:13     ` Rafael Antognolli
2017-01-25 17:31       ` Ville Syrjälä
2017-01-25 18:40     ` Ville Syrjälä
2017-01-27 19:42       ` Mario.Limonciello

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.