* Exposing GPU information for userspace processes
@ 2013-07-09 21:45 Rhyland Klein
[not found] ` <51DC8493.9090405-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Rhyland Klein @ 2013-07-09 21:45 UTC (permalink / raw)
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thierry Reding
Cc: Stephen Warren
We are currently looking into exporting some information from the linux
kernel to userspace about the GPU. This information is specific per
board as the data can vary depending on the fuses burnt on the board.
Right now we are leaning towards adding sysfs properties to our existing
nodes to share this information.
Before we write up the patches and update our userspace apps to check
the new locations, we wanted to make sure there wasn't a more
accepted/proper way to export information already.
Right now for instance we want to export a property to say how many
pixel pipes there are. This could then be exported in something like:
/sys/bus/platform/drivers/gr3d/54180000.gr3d/num_pixel_pipes
Is this the best approach to take right now or is there another way we
should export this and similar HW specific information?
Thanks,
Rhyland
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Exposing GPU information for userspace processes
[not found] ` <51DC8493.9090405-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-07-10 6:01 ` Dave Airlie
[not found] ` <CAPM=9tyCTF_+Z0S0+TKxio94LCRpJeWJ6U2EcozUj8tjmMESNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2013-07-10 6:01 UTC (permalink / raw)
To: Rhyland Klein
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thierry Reding, Stephen Warren
On Wed, Jul 10, 2013 at 7:45 AM, Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> We are currently looking into exporting some information from the linux
> kernel to userspace about the GPU. This information is specific per
> board as the data can vary depending on the fuses burnt on the board.
>
> Right now we are leaning towards adding sysfs properties to our existing
> nodes to share this information.
>
> Before we write up the patches and update our userspace apps to check
> the new locations, we wanted to make sure there wasn't a more
> accepted/proper way to export information already.
>
> Right now for instance we want to export a property to say how many
> pixel pipes there are. This could then be exported in something like:
>
> /sys/bus/platform/drivers/gr3d/54180000.gr3d/num_pixel_pipes
>
> Is this the best approach to take right now or is there another way we
> should export this and similar HW specific information?
All the x86 GPU drivers use gpu specific get param ioctls for this so far.
e.g. drivers/gpu/drm/radeon/radeon_kms.c:radeon_info_ioctl
Dave.
Dave.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Exposing GPU information for userspace processes
[not found] ` <CAPM=9tyCTF_+Z0S0+TKxio94LCRpJeWJ6U2EcozUj8tjmMESNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-07-10 6:09 ` Daniel Vetter
[not found] ` <20130710060949.GG18285-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2013-07-17 5:40 ` Thierry Reding
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2013-07-10 6:09 UTC (permalink / raw)
To: Dave Airlie
Cc: Rhyland Klein,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Stephen Warren
On Wed, Jul 10, 2013 at 04:01:49PM +1000, Dave Airlie wrote:
> On Wed, Jul 10, 2013 at 7:45 AM, Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> > We are currently looking into exporting some information from the linux
> > kernel to userspace about the GPU. This information is specific per
> > board as the data can vary depending on the fuses burnt on the board.
> >
> > Right now we are leaning towards adding sysfs properties to our existing
> > nodes to share this information.
> >
> > Before we write up the patches and update our userspace apps to check
> > the new locations, we wanted to make sure there wasn't a more
> > accepted/proper way to export information already.
> >
> > Right now for instance we want to export a property to say how many
> > pixel pipes there are. This could then be exported in something like:
> >
> > /sys/bus/platform/drivers/gr3d/54180000.gr3d/num_pixel_pipes
> >
> > Is this the best approach to take right now or is there another way we
> > should export this and similar HW specific information?
>
> All the x86 GPU drivers use gpu specific get param ioctls for this so far.
>
> e.g. drivers/gpu/drm/radeon/radeon_kms.c:radeon_info_ioctl
In drm/i915 we also expose a bunch of thing to sysfs, but everything that
the userspace drivers need for operation is exposed through the getparam
ioctl. We add sysfs interfaces on top if there's a legit reason for the
user to script changes (e.g. gpu error state collection or tuning the
frequency scaling and related read-only statistics).
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Exposing GPU information for userspace processes
[not found] ` <20130710060949.GG18285-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
@ 2013-07-10 16:11 ` Rhyland Klein
0 siblings, 0 replies; 5+ messages in thread
From: Rhyland Klein @ 2013-07-10 16:11 UTC (permalink / raw)
To: Daniel Vetter
Cc: Dave Airlie, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Stephen Warren
On 7/10/2013 2:09 AM, Daniel Vetter wrote:
> On Wed, Jul 10, 2013 at 04:01:49PM +1000, Dave Airlie wrote:
>> On Wed, Jul 10, 2013 at 7:45 AM, Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>> We are currently looking into exporting some information from the linux
>>> kernel to userspace about the GPU. This information is specific per
>>> board as the data can vary depending on the fuses burnt on the board.
>>>
>>> Right now we are leaning towards adding sysfs properties to our existing
>>> nodes to share this information.
>>>
>>> Before we write up the patches and update our userspace apps to check
>>> the new locations, we wanted to make sure there wasn't a more
>>> accepted/proper way to export information already.
>>>
>>> Right now for instance we want to export a property to say how many
>>> pixel pipes there are. This could then be exported in something like:
>>>
>>> /sys/bus/platform/drivers/gr3d/54180000.gr3d/num_pixel_pipes
>>>
>>> Is this the best approach to take right now or is there another way we
>>> should export this and similar HW specific information?
>>
>> All the x86 GPU drivers use gpu specific get param ioctls for this so far.
>>
>> e.g. drivers/gpu/drm/radeon/radeon_kms.c:radeon_info_ioctl
>
> In drm/i915 we also expose a bunch of thing to sysfs, but everything that
> the userspace drivers need for operation is exposed through the getparam
> ioctl. We add sysfs interfaces on top if there's a legit reason for the
> user to script changes (e.g. gpu error state collection or tuning the
> frequency scaling and related read-only statistics).
> -Daniel
>
Thank you both for your helpful responses. I was considering an ioctl as
another option, and it seems that is likely the best approach to take
for this type of information.
Thanks,
-rhyland
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Exposing GPU information for userspace processes
[not found] ` <CAPM=9tyCTF_+Z0S0+TKxio94LCRpJeWJ6U2EcozUj8tjmMESNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-10 6:09 ` Daniel Vetter
@ 2013-07-17 5:40 ` Thierry Reding
1 sibling, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2013-07-17 5:40 UTC (permalink / raw)
To: Dave Airlie
Cc: Rhyland Klein, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Stephen Warren
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
On Wed, Jul 10, 2013 at 04:01:49PM +1000, Dave Airlie wrote:
> On Wed, Jul 10, 2013 at 7:45 AM, Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> > We are currently looking into exporting some information from the linux
> > kernel to userspace about the GPU. This information is specific per
> > board as the data can vary depending on the fuses burnt on the board.
> >
> > Right now we are leaning towards adding sysfs properties to our existing
> > nodes to share this information.
> >
> > Before we write up the patches and update our userspace apps to check
> > the new locations, we wanted to make sure there wasn't a more
> > accepted/proper way to export information already.
> >
> > Right now for instance we want to export a property to say how many
> > pixel pipes there are. This could then be exported in something like:
> >
> > /sys/bus/platform/drivers/gr3d/54180000.gr3d/num_pixel_pipes
> >
> > Is this the best approach to take right now or is there another way we
> > should export this and similar HW specific information?
>
> All the x86 GPU drivers use gpu specific get param ioctls for this so far.
>
> e.g. drivers/gpu/drm/radeon/radeon_kms.c:radeon_info_ioctl
If we want to add an IOCTL for it then we should take some care to craft
it properly so we don't have to keep adding new ones because we forgot
to provide half the information. Something like what radeon does looks
like it's extensible enough for us not to have to worry too much.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-17 5:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09 21:45 Exposing GPU information for userspace processes Rhyland Klein
[not found] ` <51DC8493.9090405-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-07-10 6:01 ` Dave Airlie
[not found] ` <CAPM=9tyCTF_+Z0S0+TKxio94LCRpJeWJ6U2EcozUj8tjmMESNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-10 6:09 ` Daniel Vetter
[not found] ` <20130710060949.GG18285-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2013-07-10 16:11 ` Rhyland Klein
2013-07-17 5:40 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).