[Intel-gfx] [PATCH v2] drm/i915: Add debugfs to read any DPCD register
Daniel Vetter
daniel at ffwll.ch
Mon Apr 20 08:44:58 PDT 2015
On Fri, Apr 17, 2015 at 01:00:28PM +0300, Ville Syrjälä wrote:
> On Fri, Apr 17, 2015 at 06:33:57AM +0000, R, Durgadoss wrote:
> > >-----Original Message-----
> > >From: Ville Syrjälä [mailto:ville.syrjala at linux.intel.com]
> > >Sent: Thursday, April 16, 2015 8:03 PM
> > >To: Jani Nikula
> > >Cc: R, Durgadoss; intel-gfx at lists.freedesktop.org; Syrjala, Ville; Zanoni, Paulo R
> > >Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: Add debugfs to read any DPCD register
> > >
> > >On Thu, Apr 16, 2015 at 05:07:00PM +0300, Jani Nikula wrote:
> > >> On Wed, 08 Apr 2015, Durgadoss R <durgadoss.r at intel.com> wrote:
> > >> > This patch creates a connector specific debugfs
> > >> > interface to read any particular DPCD register.
> > >> > The DPCD register address (hex format) is written
> > >> > to 'i915_dpcd_addr' interface and the corresponding
> > >> > value can be read from 'i915_dpcd_val' interface.
> > >> >
> > >> > Example usage:
> > >> > echo 0x70 > i915_dpcd_addr
> > >> > cat i915_dpcd_val
> > >> > 0x1
> > >> >
> > >> > v2: Address Jani's comments.
> > >>
> > >> So, code-wise this looks good to me.
> > >>
> > >> But like I said in my review of v1, I am undecided on whether we want to
> > >> have this interface or not. I could really be persuaded either way.
> > >>
> > >> Perhaps Ville or Paulo have an opinion?
> > >
> > >I think having the ability to read (and also write actually) DPCD would
> > >be nice.
> > >
> > >So I like the idea, but it does seem a bit limited since it doesn't
> > >allow writes. So perhaps we should just expose the entire DPCD as a
> > >binary file and include a tool in i-g-t to read/write individual
> > >pieces?
> > >
> > >We could also have a tool to parse the entire thing like we have
> > >for the vbt stuff.
> >
> > Yes, This seems to be a good idea. I will start working on this.
> > Although I am not sure on the 'write' part.. I guess we can discuss
> > as we go along..
> >
> > But I still think, a pointed read/write would also be useful
> > at times for debug. So, If you agree, I can extend this interface
> > to take values for write as well and submit a v3.
>
> For me at least i-g-t is always around so if a small tool is needed
> to make the read/write a single register case easy, I'm fine with
> that. We anyway need tools to read/write everything else, so I don't
> see a big difference here. But if other people would prefer something
> that doesn't need a specific tool I won't object to it either.
Imo adding a /dev node or debugfs files with ioctl to do generic dp aux
transactions and then add userspace tooling on top (similar to i2c) would
be the right approach. Adding all the possible dp aux registers
(especially once we look at mst) seems to be an unending task.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list