* [PATCH] tests/drv_hangman: Adjust to 64bit bb offsets
@ 2015-08-18 14:56 Mika Kuoppala
2015-08-18 15:16 ` Michel Thierry
0 siblings, 1 reply; 2+ messages in thread
From: Mika Kuoppala @ 2015-08-18 14:56 UTC (permalink / raw)
To: intel-gfx; +Cc: Akash Goel
commit e1f123257a1f7d3af36a31a0fb2d4c6f40039fed
Author: Michel Thierry <michel.thierry@intel.com>
Date: Wed Jul 29 17:23:56 2015 +0100
drm/i915: Expand error state's address width to 64b
changed the batch buffer address to be 64b. Fix the parsing
of gtt offset accordingly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91638
Cc: Akash Goel <akash.goel@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
tests/drv_hangman.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index d93bef3..070c7cf 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -252,7 +252,8 @@ static void check_error_state(const int gen,
while (getline(&line, &line_size, file) > 0) {
char *dashes = NULL;
int bb_matched = 0;
- uint32_t gtt_offset;
+ uint32_t gtt_offset_upper, gtt_offset_lower;
+ uint64_t gtt_offset;
int req_matched = 0;
int requests;
uint32_t tail;
@@ -267,9 +268,11 @@ static void check_error_state(const int gen,
strncpy(ring_name, line, dashes - line);
ring_name[dashes - line - 1] = '\0';
- bb_matched = sscanf(dashes, "--- gtt_offset = 0x%08x\n",
- >t_offset);
- if (bb_matched == 1) {
+ bb_matched = sscanf(dashes, "--- gtt_offset = 0x%08x %08x\n",
+ >t_offset_upper, >t_offset_lower);
+ gtt_offset = ((uint64_t)gtt_offset_upper << 32) | gtt_offset_lower;
+
+ if (bb_matched == 2) {
char expected_line[32];
igt_assert(strstr(ring_name, expected_ring_name));
@@ -305,7 +308,7 @@ static void check_error_state(const int gen,
}
ringbuf_matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n",
- >t_offset);
+ >t_offset_lower);
if (ringbuf_matched == 1) {
unsigned int offset, command, expected_addr = 0;
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tests/drv_hangman: Adjust to 64bit bb offsets
2015-08-18 14:56 [PATCH] tests/drv_hangman: Adjust to 64bit bb offsets Mika Kuoppala
@ 2015-08-18 15:16 ` Michel Thierry
0 siblings, 0 replies; 2+ messages in thread
From: Michel Thierry @ 2015-08-18 15:16 UTC (permalink / raw)
To: Mika Kuoppala, intel-gfx; +Cc: Akash Goel
On 8/18/2015 10:56 PM, Mika Kuoppala wrote:
> commit e1f123257a1f7d3af36a31a0fb2d4c6f40039fed
> Author: Michel Thierry <michel.thierry@intel.com>
> Date: Wed Jul 29 17:23:56 2015 +0100
>
> drm/i915: Expand error state's address width to 64b
>
> changed the batch buffer address to be 64b. Fix the parsing
> of gtt offset accordingly.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91638
> Cc: Akash Goel <akash.goel@intel.com>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> tests/drv_hangman.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
> index d93bef3..070c7cf 100644
> --- a/tests/drv_hangman.c
> +++ b/tests/drv_hangman.c
> @@ -252,7 +252,8 @@ static void check_error_state(const int gen,
> while (getline(&line, &line_size, file) > 0) {
> char *dashes = NULL;
> int bb_matched = 0;
> - uint32_t gtt_offset;
> + uint32_t gtt_offset_upper, gtt_offset_lower;
> + uint64_t gtt_offset;
> int req_matched = 0;
> int requests;
> uint32_t tail;
> @@ -267,9 +268,11 @@ static void check_error_state(const int gen,
> strncpy(ring_name, line, dashes - line);
> ring_name[dashes - line - 1] = '\0';
>
> - bb_matched = sscanf(dashes, "--- gtt_offset = 0x%08x\n",
> - >t_offset);
> - if (bb_matched == 1) {
> + bb_matched = sscanf(dashes, "--- gtt_offset = 0x%08x %08x\n",
> + >t_offset_upper, >t_offset_lower);
> + gtt_offset = ((uint64_t)gtt_offset_upper << 32) | gtt_offset_lower;
> +
> + if (bb_matched == 2) {
> char expected_line[32];
>
> igt_assert(strstr(ring_name, expected_ring_name));
> @@ -305,7 +308,7 @@ static void check_error_state(const int gen,
> }
>
> ringbuf_matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n",
> - >t_offset);
> + >t_offset_lower);
> if (ringbuf_matched == 1) {
> unsigned int offset, command, expected_addr = 0;
>
>
Right, the error state now looks like:
--- gtt_offset = 0x00000000 00000000
And
--- ringbuffer = 0x00000000
will have the lower 32-bits.
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-18 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18 14:56 [PATCH] tests/drv_hangman: Adjust to 64bit bb offsets Mika Kuoppala
2015-08-18 15:16 ` Michel Thierry
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).