[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-23 Thread Daniel Vetter
On Thu, Jun 23, 2016 at 10:43 AM, Thierry Reding wrote: > On Thu, Jun 23, 2016 at 10:24:46AM +0200, Tomeu Vizoso wrote: >> On 23 June 2016 at 10:21, Jani Nikula wrote: >> > On Wed, 22 Jun 2016, Daniel Vetter wrote: >> >> On Wed, Jun 22, 2016 at 4:31 PM, Thierry Reding >> >> wrote: >> >>> Perhap

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-23 Thread Jani Nikula
On Wed, 22 Jun 2016, Daniel Vetter wrote: > On Wed, Jun 22, 2016 at 4:31 PM, Thierry Reding > wrote: >> Perhaps another way to avoid that would be to put the two files into a >> separate directory, as in: >> >> /sys/kernel/debug/dri//crtc-/crc/ >> +-- control >> +-- data >

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-23 Thread Thierry Reding
On Thu, Jun 23, 2016 at 10:24:46AM +0200, Tomeu Vizoso wrote: > On 23 June 2016 at 10:21, Jani Nikula wrote: > > On Wed, 22 Jun 2016, Daniel Vetter wrote: > >> On Wed, Jun 22, 2016 at 4:31 PM, Thierry Reding > >> wrote: > >>> Perhaps another way to avoid that would be to put the two files into a

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-23 Thread Tomeu Vizoso
On 23 June 2016 at 10:21, Jani Nikula wrote: > On Wed, 22 Jun 2016, Daniel Vetter wrote: >> On Wed, Jun 22, 2016 at 4:31 PM, Thierry Reding >> wrote: >>> Perhaps another way to avoid that would be to put the two files into a >>> separate directory, as in: >>> >>> /sys/kernel/debug/dri//c

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Daniel Vetter
On Wed, Jun 22, 2016 at 4:31 PM, Thierry Reding wrote: > On Wed, Jun 22, 2016 at 04:08:52PM +0200, Daniel Vetter wrote: >> On Wed, Jun 22, 2016 at 3:32 PM, Thierry Reding >> wrote: >> >> >> + * wsp: (#0x20 | #0x9 | #0xA)+ >> >> >> + * >> >> >> + * eg.: >> >> >> + * "crtc 0 plane1" -> Start C

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Thierry Reding
On Wed, Jun 22, 2016 at 04:08:52PM +0200, Daniel Vetter wrote: > On Wed, Jun 22, 2016 at 3:32 PM, Thierry Reding > wrote: > >> >> + * wsp: (#0x20 | #0x9 | #0xA)+ > >> >> + * > >> >> + * eg.: > >> >> + * "crtc 0 plane1" -> Start CRC computations on plane1 of first CRTC > >> >> + * "crtc 0 non

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Daniel Vetter
On Tue, Jun 21, 2016 at 01:06:41PM +0200, Tomeu Vizoso wrote: > Adds a per-device debugfile "drm_crc_control" that allows selecting a > source for frame checksums in each CRTC that supports them. > > The checksums for each subsequent frame can be read from the per-CRTC > file "drm_crtc_N_crc". >

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Daniel Vetter
On Wed, Jun 22, 2016 at 3:32 PM, Thierry Reding wrote: >> >> +const struct file_operations drm_crtc_crc_fops = { >> >> + .owner = THIS_MODULE, >> >> + .open = crtc_crc_open, >> >> + .read = crtc_crc_read, >> >> + .release = crtc_crc_release, >> >> +}; >> > >> > Do we want to suppor

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Daniel Vetter
On Wed, Jun 22, 2016 at 3:32 PM, Thierry Reding wrote: >> >> + * wsp: (#0x20 | #0x9 | #0xA)+ >> >> + * >> >> + * eg.: >> >> + * "crtc 0 plane1" -> Start CRC computations on plane1 of first CRTC >> >> + * "crtc 0 none"-> Stop CRC >> > >> > I've said this above, but again, it seems odd to

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Thierry Reding
On Wed, Jun 22, 2016 at 10:26:36AM +0200, Tomeu Vizoso wrote: > On 21 June 2016 at 17:07, Thierry Reding wrote: > > On Tue, Jun 21, 2016 at 01:06:41PM +0200, Tomeu Vizoso wrote: > > [...] > >> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > > [...] > > > >> + > >> +static in

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-22 Thread Tomeu Vizoso
On 21 June 2016 at 17:07, Thierry Reding wrote: > On Tue, Jun 21, 2016 at 01:06:41PM +0200, Tomeu Vizoso wrote: > [...] >> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > [...] > >> + >> +static int crc_control_show(struct seq_file *m, void *data) >> +{ >> + struct drm_d

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-21 Thread Thierry Reding
On Tue, Jun 21, 2016 at 01:06:41PM +0200, Tomeu Vizoso wrote: [...] > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c [...] > +static int > +drm_add_fake_info_node(struct drm_minor *minor, > +struct dentry *ent, > +const void *key) Nit:

[PATCH v1 2/3] drm: Add API for capturing frame CRCs

2016-06-21 Thread Tomeu Vizoso
Adds a per-device debugfile "drm_crc_control" that allows selecting a source for frame checksums in each CRTC that supports them. The checksums for each subsequent frame can be read from the per-CRTC file "drm_crtc_N_crc". The code is taken from the i915 driver and other drivers can now provide f