Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_psr2_su: Print debugfs when skipping test

Mun, Gwan-gyeong
2020-06-02T16:56:23Z

As Jose explained, i915_edp_psr_status() function writes
"i915_edp_psr_status" file.
[drivers/gpu/drm/i915/display/intel_display_debugfs.c]

And when the i915_edp_psr_status() writes psr information, it puts new
line.

It will be helpful for tracking of skipping PSR issue.

Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>

On Mon, 2020-06-01 at 16:46 +0000, Souza, Jose wrote:
> On Mon, 2020-06-01 at 11:18 +0300, Petri Latvala wrote:
> > On Fri, May 29, 2020 at 06:16:13PM -0700, José Roberto de Souza
> > wrote:
> > > This tests is being sporadically skipped in CI as it is not due
> > > "PSR sink not reliable: yes" lets print the i915_edp_psr_status
> > > to
> > > find out the reason.
> > > This can be reverted afterwards.
> > >
> > > Reference: https://gitlab.freedesktop.org/drm/intel/-/issues/1911
> > > Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > ---
> > > lib/igt_psr.c | 13 +++++++++++++
> > > lib/igt_psr.h | 1 +
> > > tests/kms_psr2_su.c | 2 ++
> > > 3 files changed, 16 insertions(+)
> > >
> > > diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> > > index 956f6219c..8c2f4ce6c 100644
> > > --- a/lib/igt_psr.c
> > > +++ b/lib/igt_psr.c
> > > @@ -229,3 +229,16 @@ bool psr2_wait_su(int debugfs_fd, uint16_t
> > > *num_su_blocks)
> > > {
> > > return igt_wait(psr2_read_last_num_su_blocks_val(debugfs_fd,
> > > num_su_blocks), 40, 1);
> > > }
> > > +
> > > +void psr_print_debugfs(int debugfs_fd)
> > > +{
> > > + char buf[PSR_STATUS_MAX_LEN];
> > > + int ret;
> > > +
> > > + ret = igt_debugfs_simple_read(debugfs_fd,
> > > "i915_edp_psr_status", buf,
> > > + sizeof(buf));
> > > + if (ret < 0)
> > > + return;
> > > +
> > > + igt_debug("%s", buf);
> >
> > Does the buf always have a newline here? Even when the file has
> > exactly PSR_STATUS_MAX_LEN bytes?
>
> i915_edp_psr_status is always smaller than PSR_STATUS_MAX_LEN
> otherwise it would break tests and it ends with "\n" but I can add it
> too.
>
> >
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev