Exposing GPU information for userspace processes

Thierry Reding thierry.reding at gmail.com
Tue Jul 16 22:40:26 PDT 2013


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 at nvidia.com> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130717/b3ec8d39/attachment.pgp>


More information about the dri-devel mailing list