intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Morton, Derek J" <derek.j.morton@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 5/7] lib/debugfs: Read the crc frame counter as hex
Date: Tue, 15 Dec 2015 14:46:02 +0200	[thread overview]
Message-ID: <20151215124602.GE4437@intel.com> (raw)
In-Reply-To: <2D016F5BA44C744783BA96B1D3EBC5BD13ED7AC8@IRSMSX102.ger.corp.intel.com>

On Tue, Dec 15, 2015 at 12:03:11PM +0000, Morton, Derek J wrote:
> >
> >
> >-----Original Message-----
> >From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of ville.syrjala@linux.intel.com
> >Sent: Monday, December 14, 2015 8:16 PM
> >To: intel-gfx@lists.freedesktop.org
> >Subject: [Intel-gfx] [PATCH i-g-t 5/7] lib/debugfs: Read the crc frame counter as hex
> >
> >From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >With the kernel fixed to dump out the crc frame counts in hex, we must follow suit.
> >
> >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >---
> > lib/igt_debugfs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 2c3b1cfe2370..5e71f50d7326 100644
> >--- a/lib/igt_debugfs.c
> >+++ b/lib/igt_debugfs.c
> >@@ -484,7 +484,7 @@ static bool pipe_crc_init_from_string(igt_crc_t *crc, const char *line)
> > 	int n;
> > 
> > 	crc->n_words = 5;
> >-	n = sscanf(line, "%8u %8x %8x %8x %8x %8x", &crc->frame, &crc->crc[0],
> >+	n = sscanf(line, "%8x %8x %8x %8x %8x %8x", &crc->frame, &crc->crc[0],
> 
> What will happen for kernels that have not been 'fixed'? Android is always behind drm_nightly. Is there any way of knowing whether this value is in hex or decimal and read it accordingly? What tests will be affected if this is wrong?

You might know if it's hex if the number happes to have a-f in it.
Othwerwise you can't tell since we don't use a 0x prefix.

Another option is to fix the size assumptions about the string on
both kernel and igt side.

And a third option would be to have the kernel return 'count & 0xffffff'
which would fit in the 8 characters allotted. igt wouldn't need to be
changed in this case. That might actually make some sense since on
gen3/4 the hw frame counter is only 24 bits. If userspace would have
to deal with wraparound it could just assume that it occurs at 2^24.
Actually now that I think about the current tests are probably broken
if the counter wraps sooner than 2^32. But since the interface can't
even carry such large frame counter numbers the test will simply fail
in other ways until the kernel gets fixed.

> 
> //Derek 
> 
> > 		   &crc->crc[1], &crc->crc[2], &crc->crc[3], &crc->crc[4]);
> > 	return n == 6;
> > }
> >--
> >2.4.10
> >
> >_______________________________________________
> >Intel-gfx mailing list
> >Intel-gfx@lists.freedesktop.org
> >http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-12-15 12:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 20:15 [PATCH i-g-t 1/7] Fix a bunch of printf types ville.syrjala
2015-12-14 20:15 ` [PATCH i-g-t 2/7] tests/gem_mmap_gtt: Deal with tile sizes on gen2/3 ville.syrjala
2015-12-14 21:52   ` Chris Wilson
2015-12-15 20:37     ` Ville Syrjälä
2015-12-15 20:51   ` Paulo Zanoni
2015-12-15 21:08     ` Ville Syrjälä
2015-12-15 21:19       ` Paulo Zanoni
2015-12-15 21:30         ` Ville Syrjälä
2015-12-14 20:15 ` [PATCH i-g-t 3/7] tests/gem_mmap_gtt: Add progress indicators ville.syrjala
2015-12-14 20:15 ` [PATCH i-g-t 4/7] tests/gem_mmap_gtt: Make the small-bo tiling tests work on old platforms ville.syrjala
2015-12-14 20:49   ` Chris Wilson
2015-12-14 20:54     ` Chris Wilson
2015-12-15  9:41       ` Ville Syrjälä
2015-12-15  9:57         ` Chris Wilson
2015-12-15 10:57           ` Ville Syrjälä
2015-12-15 11:16             ` Chris Wilson
2015-12-15 11:29               ` Ville Syrjälä
2015-12-15 12:01                 ` Ville Syrjälä
2015-12-15 12:30                   ` Chris Wilson
2015-12-16 10:46                     ` Daniel Vetter
2015-12-16 11:11                       ` Chris Wilson
2015-12-14 20:15 ` [PATCH i-g-t 5/7] lib/debugfs: Read the crc frame counter as hex ville.syrjala
2015-12-15 12:03   ` Morton, Derek J
2015-12-15 12:46     ` Ville Syrjälä [this message]
2015-12-14 20:15 ` [PATCH i-g-t 6/7] tests/kms_flip: Increase TEST_TS_CONT max seq difference to 150 ville.syrjala
2015-12-16 10:49   ` Daniel Vetter
2015-12-14 20:15 ` [PATCH i-g-t 7/7] tests/kms_pipe_crc_basic: Use igt_assert_eq() to see the failing frame counts ville.syrjala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151215124602.GE4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=derek.j.morton@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).