* [PATCH] [v2] drm/i915: Expand error state's address width to 64b
2014-04-29 1:11 ` [PATCH] drm/i915: Expand error state's address width to 64b Ben Widawsky
@ 2014-04-29 1:43 ` Ben Widawsky
2014-04-29 1:45 ` [PATCH] intel_error_decode: use 64b gtt_offset Ben Widawsky
2014-05-01 8:06 ` [PATCH] [v2] drm/i915: Expand error state's address width to 64b Chris Wilson
2014-04-29 2:21 ` [PATCH] [v3] " Ben Widawsky
2014-04-29 2:29 ` [PATCH] drm/i915: Support 64b execbuf Ben Widawsky
2 siblings, 2 replies; 17+ messages in thread
From: Ben Widawsky @ 2014-04-29 1:43 UTC (permalink / raw)
To: Intel GFX
v2: 0 pad the new 8B fields or else intel_error_decode has a hard time.
Note, regardless we need an igt update.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_drv.h | 4 ++--
drivers/gpu/drm/i915/i915_gpu_error.c | 16 +++++++++-------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 539f16db..cdde849 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -366,7 +366,7 @@ struct drm_i915_error_state {
struct drm_i915_error_object {
int page_count;
- u32 gtt_offset;
+ u64 gtt_offset;
u32 *pages[0];
} *ringbuffer, *batchbuffer, *wa_batchbuffer, *ctx, *hws_page;
@@ -391,7 +391,7 @@ struct drm_i915_error_state {
u32 size;
u32 name;
u32 rseqno, wseqno;
- u32 gtt_offset;
+ u64 gtt_offset;
u32 read_domains;
u32 write_domain;
s32 fence_reg:I915_MAX_NUM_FENCE_BITS;
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 481a7d1..881ad8f 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -194,7 +194,7 @@ static void print_error_buffers(struct drm_i915_error_state_buf *m,
err_printf(m, "%s [%d]:\n", name, count);
while (count--) {
- err_printf(m, " %08x %8u %02x %02x %x %x",
+ err_printf(m, " %016llx %8u %02x %02x %x %x",
err->gtt_offset,
err->size,
err->read_domains,
@@ -401,7 +401,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
err_printf(m, " (submitted by %s [%d])",
error->ring[i].comm,
error->ring[i].pid);
- err_printf(m, " --- gtt_offset = 0x%08x\n",
+ err_printf(m, " --- gtt_offset = 0x%016llx\n",
obj->gtt_offset);
print_error_obj(m, obj);
}
@@ -409,7 +409,8 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
obj = error->ring[i].wa_batchbuffer;
if (obj) {
err_printf(m, "%s (w/a) --- gtt_offset = 0x%08x\n",
- dev_priv->ring[i].name, obj->gtt_offset);
+ dev_priv->ring[i].name,
+ lower_32_bits(obj->gtt_offset));
print_error_obj(m, obj);
}
@@ -428,14 +429,14 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
if ((obj = error->ring[i].ringbuffer)) {
err_printf(m, "%s --- ringbuffer = 0x%08x\n",
dev_priv->ring[i].name,
- obj->gtt_offset);
+ lower_32_bits(obj->gtt_offset));
print_error_obj(m, obj);
}
if ((obj = error->ring[i].hws_page)) {
err_printf(m, "%s --- HW Status = 0x%08x\n",
dev_priv->ring[i].name,
- obj->gtt_offset);
+ lower_32_bits(obj->gtt_offset));
offset = 0;
for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
err_printf(m, "[%04x] %08x %08x %08x %08x\n",
@@ -451,14 +452,15 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
if ((obj = error->ring[i].ctx)) {
err_printf(m, "%s --- HW Context = 0x%08x\n",
dev_priv->ring[i].name,
- obj->gtt_offset);
+ lower_32_bits(obj->gtt_offset));
print_error_obj(m, obj);
}
}
obj = error->semaphore_obj;
if (obj) {
- err_printf(m, "Semaphore page = 0x%08x\n", obj->gtt_offset);
+ err_printf(m, "Semaphore page = 0x%08x\n",
+ lower_32_bits(obj->gtt_offset));
for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
err_printf(m, "[%04x] %08x %08x %08x %08x\n",
elt * 4,
--
1.9.2
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH] intel_error_decode: use 64b gtt_offset
2014-04-29 1:43 ` [PATCH] [v2] " Ben Widawsky
@ 2014-04-29 1:45 ` Ben Widawsky
2014-04-29 8:52 ` Daniel Vetter
2014-05-01 8:06 ` [PATCH] [v2] drm/i915: Expand error state's address width to 64b Chris Wilson
1 sibling, 1 reply; 17+ messages in thread
From: Ben Widawsky @ 2014-04-29 1:45 UTC (permalink / raw)
To: Intel GFX
See the relevant kernel patch for the details. I guess this breaks
support for older error state, I am not actually sure. Without
versioning our error state though, I cannot think of a better way.
Suggestions are welcome.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
tools/intel_error_decode.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
index 1eeff07..d0028a1 100644
--- a/tools/intel_error_decode.c
+++ b/tools/intel_error_decode.c
@@ -311,17 +311,17 @@ print_fence(unsigned int devid, uint64_t fence)
uint32_t head[MAX_RINGS];
int head_ndx = 0;
int num_rings = 0;
-static void print_batch(int is_batch, const char *ring_name, uint32_t gtt_offset)
+static void print_batch(int is_batch, const char *ring_name, uint64_t gtt_offset)
{
const char *buffer_type[2] = { "ringbuffer", "batchbuffer" };
if (is_batch || !num_rings)
- printf("%s (%s) at 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset);
+ printf("%s (%s) at 0x%016lx\n", buffer_type[is_batch], ring_name, gtt_offset);
else
- printf("%s (%s) at 0x%08x; HEAD points to: 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset);
+ printf("%s (%s) at 0x%016lx; HEAD points to: 0x%016lx\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset);
}
static void decode(struct drm_intel_decode *ctx, bool is_batch,
- const char *ring_name, uint32_t gtt_offset, uint32_t *data,
+ const char *ring_name, uint64_t gtt_offset, uint32_t *data,
int *count)
{
if (!*count)
@@ -344,7 +344,7 @@ read_data_file(FILE *file)
char *line = NULL;
size_t line_size;
uint32_t offset, value, ring_length = 0;
- uint32_t gtt_offset = 0, new_gtt_offset;
+ uint64_t gtt_offset = 0, new_gtt_offset;
char *ring_name = NULL;
int is_batch = 1;
@@ -361,7 +361,7 @@ read_data_file(FILE *file)
if (num_rings == -1)
num_rings = head_ndx;
- matched = sscanf(dashes, "--- gtt_offset = 0x%08x\n",
+ matched = sscanf(dashes, "--- gtt_offset = 0x%016lx\n",
&new_gtt_offset);
if (matched == 1) {
decode(decode_ctx, is_batch, ring_name,
@@ -373,7 +373,7 @@ read_data_file(FILE *file)
continue;
}
- matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n",
+ matched = sscanf(dashes, "--- ringbuffer = 0x%08lx\n",
&new_gtt_offset);
if (matched == 1) {
decode(decode_ctx, is_batch, ring_name,
--
1.9.2
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH] intel_error_decode: use 64b gtt_offset
2014-04-29 1:45 ` [PATCH] intel_error_decode: use 64b gtt_offset Ben Widawsky
@ 2014-04-29 8:52 ` Daniel Vetter
2014-04-29 9:01 ` Daniel Vetter
0 siblings, 1 reply; 17+ messages in thread
From: Daniel Vetter @ 2014-04-29 8:52 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Intel GFX
On Mon, Apr 28, 2014 at 06:45:50PM -0700, Ben Widawsky wrote:
> See the relevant kernel patch for the details. I guess this breaks
> support for older error state, I am not actually sure. Without
> versioning our error state though, I cannot think of a better way.
> Suggestions are welcome.
Just drop the length qualifier and let scanf it the full number?
-Daniel
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> tools/intel_error_decode.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
> index 1eeff07..d0028a1 100644
> --- a/tools/intel_error_decode.c
> +++ b/tools/intel_error_decode.c
> @@ -311,17 +311,17 @@ print_fence(unsigned int devid, uint64_t fence)
> uint32_t head[MAX_RINGS];
> int head_ndx = 0;
> int num_rings = 0;
> -static void print_batch(int is_batch, const char *ring_name, uint32_t gtt_offset)
> +static void print_batch(int is_batch, const char *ring_name, uint64_t gtt_offset)
> {
> const char *buffer_type[2] = { "ringbuffer", "batchbuffer" };
> if (is_batch || !num_rings)
> - printf("%s (%s) at 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset);
> + printf("%s (%s) at 0x%016lx\n", buffer_type[is_batch], ring_name, gtt_offset);
> else
> - printf("%s (%s) at 0x%08x; HEAD points to: 0x%08x\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset);
> + printf("%s (%s) at 0x%016lx; HEAD points to: 0x%016lx\n", buffer_type[is_batch], ring_name, gtt_offset, head[head_ndx++ % num_rings] + gtt_offset);
> }
>
> static void decode(struct drm_intel_decode *ctx, bool is_batch,
> - const char *ring_name, uint32_t gtt_offset, uint32_t *data,
> + const char *ring_name, uint64_t gtt_offset, uint32_t *data,
> int *count)
> {
> if (!*count)
> @@ -344,7 +344,7 @@ read_data_file(FILE *file)
> char *line = NULL;
> size_t line_size;
> uint32_t offset, value, ring_length = 0;
> - uint32_t gtt_offset = 0, new_gtt_offset;
> + uint64_t gtt_offset = 0, new_gtt_offset;
> char *ring_name = NULL;
> int is_batch = 1;
>
> @@ -361,7 +361,7 @@ read_data_file(FILE *file)
> if (num_rings == -1)
> num_rings = head_ndx;
>
> - matched = sscanf(dashes, "--- gtt_offset = 0x%08x\n",
> + matched = sscanf(dashes, "--- gtt_offset = 0x%016lx\n",
> &new_gtt_offset);
> if (matched == 1) {
> decode(decode_ctx, is_batch, ring_name,
> @@ -373,7 +373,7 @@ read_data_file(FILE *file)
> continue;
> }
>
> - matched = sscanf(dashes, "--- ringbuffer = 0x%08x\n",
> + matched = sscanf(dashes, "--- ringbuffer = 0x%08lx\n",
> &new_gtt_offset);
> if (matched == 1) {
> decode(decode_ctx, is_batch, ring_name,
> --
> 1.9.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH] intel_error_decode: use 64b gtt_offset
2014-04-29 8:52 ` Daniel Vetter
@ 2014-04-29 9:01 ` Daniel Vetter
2014-04-29 10:48 ` Chris Wilson
2014-04-30 0:54 ` Ben Widawsky
0 siblings, 2 replies; 17+ messages in thread
From: Daniel Vetter @ 2014-04-29 9:01 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Intel GFX
On Tue, Apr 29, 2014 at 10:52:44AM +0200, Daniel Vetter wrote:
> On Mon, Apr 28, 2014 at 06:45:50PM -0700, Ben Widawsky wrote:
> > See the relevant kernel patch for the details. I guess this breaks
> > support for older error state, I am not actually sure. Without
> > versioning our error state though, I cannot think of a better way.
> > Suggestions are welcome.
>
> Just drop the length qualifier and let scanf it the full number?
Also, you know the drill: Testcase, please. A copy of drv_hangman to also
feed the captured error state into intel_error_decode and check that it
doesn't fall overr (exitcode != 0 and nothing on stderr). Maybe call it
drv_error_decode or something like that.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] intel_error_decode: use 64b gtt_offset
2014-04-29 9:01 ` Daniel Vetter
@ 2014-04-29 10:48 ` Chris Wilson
2014-04-29 11:05 ` Daniel Vetter
2014-04-30 0:54 ` Ben Widawsky
1 sibling, 1 reply; 17+ messages in thread
From: Chris Wilson @ 2014-04-29 10:48 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel GFX, Ben Widawsky
On Tue, Apr 29, 2014 at 11:01:10AM +0200, Daniel Vetter wrote:
> On Tue, Apr 29, 2014 at 10:52:44AM +0200, Daniel Vetter wrote:
> > On Mon, Apr 28, 2014 at 06:45:50PM -0700, Ben Widawsky wrote:
> > > See the relevant kernel patch for the details. I guess this breaks
> > > support for older error state, I am not actually sure. Without
> > > versioning our error state though, I cannot think of a better way.
> > > Suggestions are welcome.
> >
> > Just drop the length qualifier and let scanf it the full number?
>
> Also, you know the drill: Testcase, please. A copy of drv_hangman to also
> feed the captured error state into intel_error_decode and check that it
> doesn't fall overr (exitcode != 0 and nothing on stderr). Maybe call it
> drv_error_decode or something like that.
Actually, I would have hoped you asked for uniformity in presenting and
parsing 64bit values :)
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] intel_error_decode: use 64b gtt_offset
2014-04-29 10:48 ` Chris Wilson
@ 2014-04-29 11:05 ` Daniel Vetter
0 siblings, 0 replies; 17+ messages in thread
From: Daniel Vetter @ 2014-04-29 11:05 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, Ben Widawsky, Intel GFX
On Tue, Apr 29, 2014 at 12:48 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Tue, Apr 29, 2014 at 11:01:10AM +0200, Daniel Vetter wrote:
>> On Tue, Apr 29, 2014 at 10:52:44AM +0200, Daniel Vetter wrote:
>> > On Mon, Apr 28, 2014 at 06:45:50PM -0700, Ben Widawsky wrote:
>> > > See the relevant kernel patch for the details. I guess this breaks
>> > > support for older error state, I am not actually sure. Without
>> > > versioning our error state though, I cannot think of a better way.
>> > > Suggestions are welcome.
>> >
>> > Just drop the length qualifier and let scanf it the full number?
>>
>> Also, you know the drill: Testcase, please. A copy of drv_hangman to also
>> feed the captured error state into intel_error_decode and check that it
>> doesn't fall overr (exitcode != 0 and nothing on stderr). Maybe call it
>> drv_error_decode or something like that.
>
> Actually, I would have hoped you asked for uniformity in presenting and
> parsing 64bit values :)
That approaches a turing test, so a bit out of scope for igt ;-)
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] intel_error_decode: use 64b gtt_offset
2014-04-29 9:01 ` Daniel Vetter
2014-04-29 10:48 ` Chris Wilson
@ 2014-04-30 0:54 ` Ben Widawsky
1 sibling, 0 replies; 17+ messages in thread
From: Ben Widawsky @ 2014-04-30 0:54 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel GFX, Ben Widawsky
On Tue, Apr 29, 2014 at 11:01:10AM +0200, Daniel Vetter wrote:
> On Tue, Apr 29, 2014 at 10:52:44AM +0200, Daniel Vetter wrote:
> > On Mon, Apr 28, 2014 at 06:45:50PM -0700, Ben Widawsky wrote:
> > > See the relevant kernel patch for the details. I guess this breaks
> > > support for older error state, I am not actually sure. Without
> > > versioning our error state though, I cannot think of a better way.
> > > Suggestions are welcome.
> >
> > Just drop the length qualifier and let scanf it the full number?
>
> Also, you know the drill: Testcase, please. A copy of drv_hangman to also
> feed the captured error state into intel_error_decode and check that it
> doesn't fall overr (exitcode != 0 and nothing on stderr). Maybe call it
> drv_error_decode or something like that.
> -Daniel
You're not going to get it from me. If you don't take the patch, that's
fine by me.
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] [v2] drm/i915: Expand error state's address width to 64b
2014-04-29 1:43 ` [PATCH] [v2] " Ben Widawsky
2014-04-29 1:45 ` [PATCH] intel_error_decode: use 64b gtt_offset Ben Widawsky
@ 2014-05-01 8:06 ` Chris Wilson
1 sibling, 0 replies; 17+ messages in thread
From: Chris Wilson @ 2014-05-01 8:06 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Intel GFX
On Mon, Apr 28, 2014 at 06:43:04PM -0700, Ben Widawsky wrote:
> v2: 0 pad the new 8B fields or else intel_error_decode has a hard time.
> Note, regardless we need an igt update.
We should decide whether to use 0000000100000000 or 00000001 00000000
and be consistent.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] [v3] drm/i915: Expand error state's address width to 64b
2014-04-29 1:11 ` [PATCH] drm/i915: Expand error state's address width to 64b Ben Widawsky
2014-04-29 1:43 ` [PATCH] [v2] " Ben Widawsky
@ 2014-04-29 2:21 ` Ben Widawsky
2014-04-29 2:29 ` [PATCH] drm/i915: Support 64b execbuf Ben Widawsky
2 siblings, 0 replies; 17+ messages in thread
From: Ben Widawsky @ 2014-04-29 2:21 UTC (permalink / raw)
To: Intel GFX
v2: 0 pad the new 8B fields or else intel_error_decode has a hard time.
Note, regardless we need an igt update.
v3: Make reloc_offset 64b also.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_drv.h | 4 ++--
drivers/gpu/drm/i915/i915_gpu_error.c | 18 ++++++++++--------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 539f16db..cdde849 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -366,7 +366,7 @@ struct drm_i915_error_state {
struct drm_i915_error_object {
int page_count;
- u32 gtt_offset;
+ u64 gtt_offset;
u32 *pages[0];
} *ringbuffer, *batchbuffer, *wa_batchbuffer, *ctx, *hws_page;
@@ -391,7 +391,7 @@ struct drm_i915_error_state {
u32 size;
u32 name;
u32 rseqno, wseqno;
- u32 gtt_offset;
+ u64 gtt_offset;
u32 read_domains;
u32 write_domain;
s32 fence_reg:I915_MAX_NUM_FENCE_BITS;
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 481a7d1..1e6ac12 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -194,7 +194,7 @@ static void print_error_buffers(struct drm_i915_error_state_buf *m,
err_printf(m, "%s [%d]:\n", name, count);
while (count--) {
- err_printf(m, " %08x %8u %02x %02x %x %x",
+ err_printf(m, " %016llx %8u %02x %02x %x %x",
err->gtt_offset,
err->size,
err->read_domains,
@@ -401,7 +401,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
err_printf(m, " (submitted by %s [%d])",
error->ring[i].comm,
error->ring[i].pid);
- err_printf(m, " --- gtt_offset = 0x%08x\n",
+ err_printf(m, " --- gtt_offset = 0x%016llx\n",
obj->gtt_offset);
print_error_obj(m, obj);
}
@@ -409,7 +409,8 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
obj = error->ring[i].wa_batchbuffer;
if (obj) {
err_printf(m, "%s (w/a) --- gtt_offset = 0x%08x\n",
- dev_priv->ring[i].name, obj->gtt_offset);
+ dev_priv->ring[i].name,
+ lower_32_bits(obj->gtt_offset));
print_error_obj(m, obj);
}
@@ -428,14 +429,14 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
if ((obj = error->ring[i].ringbuffer)) {
err_printf(m, "%s --- ringbuffer = 0x%08x\n",
dev_priv->ring[i].name,
- obj->gtt_offset);
+ lower_32_bits(obj->gtt_offset));
print_error_obj(m, obj);
}
if ((obj = error->ring[i].hws_page)) {
err_printf(m, "%s --- HW Status = 0x%08x\n",
dev_priv->ring[i].name,
- obj->gtt_offset);
+ lower_32_bits(obj->gtt_offset));
offset = 0;
for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
err_printf(m, "[%04x] %08x %08x %08x %08x\n",
@@ -451,14 +452,15 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
if ((obj = error->ring[i].ctx)) {
err_printf(m, "%s --- HW Context = 0x%08x\n",
dev_priv->ring[i].name,
- obj->gtt_offset);
+ lower_32_bits(obj->gtt_offset));
print_error_obj(m, obj);
}
}
obj = error->semaphore_obj;
if (obj) {
- err_printf(m, "Semaphore page = 0x%08x\n", obj->gtt_offset);
+ err_printf(m, "Semaphore page = 0x%08x\n",
+ lower_32_bits(obj->gtt_offset));
for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
err_printf(m, "[%04x] %08x %08x %08x %08x\n",
elt * 4,
@@ -554,7 +556,7 @@ i915_error_object_create_sized(struct drm_i915_private *dev_priv,
{
struct drm_i915_error_object *dst;
int i;
- u32 reloc_offset;
+ u64 reloc_offset;
if (src == NULL || src->pages == NULL)
return NULL;
--
1.9.2
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH] drm/i915: Support 64b execbuf
2014-04-29 1:11 ` [PATCH] drm/i915: Expand error state's address width to 64b Ben Widawsky
2014-04-29 1:43 ` [PATCH] [v2] " Ben Widawsky
2014-04-29 2:21 ` [PATCH] [v3] " Ben Widawsky
@ 2014-04-29 2:29 ` Ben Widawsky
2014-05-01 8:12 ` Chris Wilson
2 siblings, 1 reply; 17+ messages in thread
From: Ben Widawsky @ 2014-04-29 2:29 UTC (permalink / raw)
To: Intel GFX
Previously, our code only had a 32b offset value for where the
batchbuffer starts. With full PPGTT, and 64b canonical GPU address
space, that is an insufficient value. The code to expand is pretty
straight forward, and only one platform needs to do anything with the
extra bits.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++--------
drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 6ffecd2..f5f0b92 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1017,7 +1017,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
struct i915_hw_context *ctx;
struct i915_address_space *vm;
const u32 ctx_id = i915_execbuffer2_get_context_id(*args);
- u32 exec_start = args->batch_start_offset, exec_len;
+ u64 exec_start = args->batch_start_offset, exec_len;
u32 mask, flags;
int ret, mode, i;
bool need_relocs;
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index a42942f..bbe989f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1324,7 +1324,7 @@ gen8_ring_put_irq(struct intel_ring_buffer *ring)
static int
i965_dispatch_execbuffer(struct intel_ring_buffer *ring,
- u32 offset, u32 length,
+ u64 offset, u32 length,
unsigned flags)
{
int ret;
@@ -1347,7 +1347,7 @@ i965_dispatch_execbuffer(struct intel_ring_buffer *ring,
#define I830_BATCH_LIMIT (256*1024)
static int
i830_dispatch_execbuffer(struct intel_ring_buffer *ring,
- u32 offset, u32 len,
+ u64 offset, u32 len,
unsigned flags)
{
int ret;
@@ -1398,7 +1398,7 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring,
static int
i915_dispatch_execbuffer(struct intel_ring_buffer *ring,
- u32 offset, u32 len,
+ u64 offset, u32 len,
unsigned flags)
{
int ret;
@@ -1943,7 +1943,7 @@ static int gen6_bsd_ring_flush(struct intel_ring_buffer *ring,
static int
gen8_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
- u32 offset, u32 len,
+ u64 offset, u32 len,
unsigned flags)
{
struct drm_i915_private *dev_priv = ring->dev->dev_private;
@@ -1957,8 +1957,8 @@ gen8_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
/* FIXME(BDW): Address space and security selectors. */
intel_ring_emit(ring, MI_BATCH_BUFFER_START_GEN8 | (ppgtt<<8));
- intel_ring_emit(ring, offset);
- intel_ring_emit(ring, 0);
+ intel_ring_emit(ring, lower_32_bits(offset));
+ intel_ring_emit(ring, upper_32_bits(offset));
intel_ring_emit(ring, MI_NOOP);
intel_ring_advance(ring);
@@ -1967,7 +1967,7 @@ gen8_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
static int
hsw_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
- u32 offset, u32 len,
+ u64 offset, u32 len,
unsigned flags)
{
int ret;
@@ -1988,7 +1988,7 @@ hsw_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
static int
gen6_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
- u32 offset, u32 len,
+ u64 offset, u32 len,
unsigned flags)
{
int ret;
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index dbdce5f..cb55cff 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -135,7 +135,7 @@ struct intel_ring_buffer {
void (*set_seqno)(struct intel_ring_buffer *ring,
u32 seqno);
int (*dispatch_execbuffer)(struct intel_ring_buffer *ring,
- u32 offset, u32 length,
+ u64 offset, u32 length,
unsigned flags);
#define I915_DISPATCH_SECURE 0x1
#define I915_DISPATCH_PINNED 0x2
--
1.9.2
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH] drm/i915: Support 64b execbuf
2014-04-29 2:29 ` [PATCH] drm/i915: Support 64b execbuf Ben Widawsky
@ 2014-05-01 8:12 ` Chris Wilson
2014-05-01 10:18 ` Barbalho, Rafael
0 siblings, 1 reply; 17+ messages in thread
From: Chris Wilson @ 2014-05-01 8:12 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Intel GFX
On Mon, Apr 28, 2014 at 07:29:25PM -0700, Ben Widawsky wrote:
> Previously, our code only had a 32b offset value for where the
> batchbuffer starts. With full PPGTT, and 64b canonical GPU address
> space, that is an insufficient value. The code to expand is pretty
> straight forward, and only one platform needs to do anything with the
> extra bits.
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] drm/i915: Support 64b execbuf
2014-05-01 8:12 ` Chris Wilson
@ 2014-05-01 10:18 ` Barbalho, Rafael
2014-05-05 14:02 ` Daniel Vetter
0 siblings, 1 reply; 17+ messages in thread
From: Barbalho, Rafael @ 2014-05-01 10:18 UTC (permalink / raw)
To: Chris Wilson, Widawsky, Benjamin; +Cc: Intel GFX
> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Chris Wilson
> Sent: Thursday, May 01, 2014 9:13 AM
> To: Widawsky, Benjamin
> Cc: Intel GFX
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: Support 64b execbuf
>
> On Mon, Apr 28, 2014 at 07:29:25PM -0700, Ben Widawsky wrote:
> > Previously, our code only had a 32b offset value for where the
> > batchbuffer starts. With full PPGTT, and 64b canonical GPU address
> > space, that is an insufficient value. The code to expand is pretty
> > straight forward, and only one platform needs to do anything with the
> > extra bits.
> >
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Thanks,
Rafael
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] drm/i915: Support 64b execbuf
2014-05-01 10:18 ` Barbalho, Rafael
@ 2014-05-05 14:02 ` Daniel Vetter
0 siblings, 0 replies; 17+ messages in thread
From: Daniel Vetter @ 2014-05-05 14:02 UTC (permalink / raw)
To: Barbalho, Rafael; +Cc: Intel GFX, Widawsky, Benjamin
On Thu, May 01, 2014 at 10:18:52AM +0000, Barbalho, Rafael wrote:
> > -----Original Message-----
> > From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
> > Of Chris Wilson
> > Sent: Thursday, May 01, 2014 9:13 AM
> > To: Widawsky, Benjamin
> > Cc: Intel GFX
> > Subject: Re: [Intel-gfx] [PATCH] drm/i915: Support 64b execbuf
> >
> > On Mon, Apr 28, 2014 at 07:29:25PM -0700, Ben Widawsky wrote:
> > > Previously, our code only had a 32b offset value for where the
> > > batchbuffer starts. With full PPGTT, and 64b canonical GPU address
> > > space, that is an insufficient value. The code to expand is pretty
> > > straight forward, and only one platform needs to do anything with the
> > > extra bits.
> > >
> > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
> Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 17+ messages in thread