From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [igt-dev] [PATCH i-g-t v2 1/4] lib/intel_bufops: add fields for keeping offset and context
Date: Thu, 4 Jun 2020 12:03:50 +0200 [thread overview]
Message-ID: <20200604100353.24552-2-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20200604100353.24552-1-zbigniew.kempczynski@intel.com>
To avoid relocations when intel_buf is used we need to keep previous
offset and context. Add addr structure with offset and ctx fields.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
lib/gpu_cmds.c | 6 +++---
lib/intel_bufops.h | 4 ++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/gpu_cmds.c b/lib/gpu_cmds.c
index 8c284eb1..417253a7 100644
--- a/lib/gpu_cmds.c
+++ b/lib/gpu_cmds.c
@@ -109,7 +109,7 @@ gen7_fill_surface_state(struct intel_bb *ibb,
address = intel_bb_offset_reloc(ibb, buf->handle,
read_domain, write_domain,
- offset + 4, 0x0);
+ offset + 4, buf->addr.offset);
igt_assert(address >> 32 == 0);
ss->ss1.base_addr = address;
@@ -161,7 +161,7 @@ gen8_fill_surface_state(struct intel_bb *ibb,
address = intel_bb_offset_reloc(ibb, buf->handle,
read_domain, write_domain,
- offset + 4 * 8, 0x0);
+ offset + 4 * 8, buf->addr.offset);
ss->ss8.base_addr = (uint32_t) address;
ss->ss9.base_addr_hi = address >> 32;
@@ -218,7 +218,7 @@ gen11_fill_surface_state(struct intel_bb *ibb,
address = intel_bb_offset_reloc(ibb, buf->handle,
read_domain, write_domain,
- offset + 4 * 8, 0x0);
+ offset + 4 * 8, buf->addr.offset);
ss->ss8.base_addr = (uint32_t) address;
ss->ss9.base_addr_hi = address >> 32;
diff --git a/lib/intel_bufops.h b/lib/intel_bufops.h
index 3a4fae4e..95217cfe 100644
--- a/lib/intel_bufops.h
+++ b/lib/intel_bufops.h
@@ -18,6 +18,10 @@ struct intel_buf {
uint32_t offset;
uint32_t stride;
} aux;
+ struct {
+ uint64_t offset;
+ uint32_t ctx;
+ } addr;
};
static inline unsigned int intel_buf_width(const struct intel_buf *buf)
--
2.26.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-06-04 10:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 10:03 [igt-dev] [PATCH i-g-t v2 0/4] Remove libdrm from media_spin Zbigniew Kempczyński
2020-06-04 10:03 ` Zbigniew Kempczyński [this message]
2020-06-04 10:03 ` [igt-dev] [PATCH i-g-t v2 2/4] lib/intel_batchbuffer: add bb reset Zbigniew Kempczyński
2020-06-04 15:07 ` Chris Wilson
2020-06-05 5:40 ` Zbigniew Kempczyński
2020-06-05 14:17 ` Chris Wilson
2020-06-04 10:10 ` [igt-dev] [PATCH i-g-t v2 3/4] tests/i915_pm_sseu: remove libdrm dependency Zbigniew Kempczyński
2020-06-04 10:10 ` [igt-dev] [PATCH i-g-t v2 4/4] HAX: run gpgpu|media_fill and i915_pm_sseu in BAT only Zbigniew Kempczyński
2020-06-04 11:04 ` [igt-dev] ✓ Fi.CI.BAT: success for Remove libdrm from media_spin Patchwork
2020-06-04 14:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-06-04 18:17 ` [igt-dev] ✓ Fi.CI.BAT: success for Remove libdrm from media_spin (rev2) Patchwork
2020-06-04 21:32 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2020-06-04 9:16 [igt-dev] [PATCH i-g-t v2 0/4] Remove libdrm from media_spin Zbigniew Kempczyński
2020-06-04 9:16 ` [igt-dev] [PATCH i-g-t v2 1/4] lib/intel_bufops: add fields for keeping offset and context Zbigniew Kempczyński
2020-06-04 9:13 [igt-dev] [PATCH i-g-t v2 0/4] Remove libdrm from media_spin Zbigniew Kempczyński
2020-06-04 9:13 ` [igt-dev] [PATCH i-g-t v2 1/4] lib/intel_bufops: add fields for keeping offset and context Zbigniew Kempczyński
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=20200604100353.24552-2-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@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