From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Subject: [PATCH i-g-t 1/7] lib/intel_bufops: Store devid on buffer ops creation
Date: Thu, 25 Apr 2024 12:47:15 +0200 [thread overview]
Message-ID: <20240425104721.52376-2-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20240425104721.52376-1-zbigniew.kempczynski@intel.com>
As I need devid to diverge intel-buf init code lets store it in
bufops structure. I decided to use it in tiling probe function
in same patch to avoid two-lines patch noise.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
lib/intel_bufops.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 51fdf50adb..007ccdb953 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -114,6 +114,7 @@ struct buf_ops {
int gen_start;
int gen_end;
unsigned int intel_gen;
+ uint32_t devid;
uint32_t supported_tiles;
uint32_t supported_hw_tiles;
uint32_t swizzle_x;
@@ -1499,12 +1500,11 @@ static bool probe_hw_tiling(struct buf_ops *bops, uint32_t tiling,
{
uint64_t size = 256 * 256;
uint32_t handle, buf_tiling, buf_swizzle, phys_swizzle;
- uint32_t devid, stride;
+ uint32_t stride;
int ret;
bool is_set = false;
- devid = intel_get_drm_devid(bops->fd);
- stride = get_stride(devid, tiling);
+ stride = get_stride(bops->devid, tiling);
handle = gem_create(bops->fd, size);
/* Single shot, if no fences are available we fail immediately */
@@ -1616,6 +1616,7 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
bops->fd = fd;
bops->intel_gen = generation;
+ bops->devid = devid;
bops->driver = is_i915_device(fd) ? INTEL_DRIVER_I915 :
is_xe_device(fd) ? INTEL_DRIVER_XE : 0;
igt_assert(bops->driver);
--
2.34.1
next prev parent reply other threads:[~2024-04-25 10:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 10:47 [PATCH i-g-t 0/7] Add render-copy compression on Xe+ Zbigniew Kempczyński
2024-04-25 10:47 ` Zbigniew Kempczyński [this message]
2024-04-25 10:47 ` [PATCH i-g-t 2/7] lib/intel_blt: Rename confusing fb tile to i915 tile Zbigniew Kempczyński
2024-04-25 10:47 ` [PATCH i-g-t 3/7] lib/intel_blt: Add i915 -> blt tile helper converter Zbigniew Kempczyński
2024-04-25 10:47 ` [PATCH i-g-t 4/7] lib/intel_bufops: Drop tilings restrictions Zbigniew Kempczyński
2024-04-25 13:08 ` Juha-Pekka Heikkila
2024-04-25 15:52 ` Zbigniew Kempczyński
2024-04-26 10:14 ` Juha-Pekka Heikkila
2024-04-26 11:22 ` Zbigniew Kempczyński
2024-04-25 10:47 ` [PATCH i-g-t 5/7] lib/intel_bufops: Start supporting compression on Xe2+ Zbigniew Kempczyński
2024-04-25 10:47 ` [PATCH i-g-t 6/7] lib/rendercopy_gen9: Allow to use all tilings on flatccs platforms Zbigniew Kempczyński
2024-04-25 12:26 ` Juha-Pekka Heikkila
2024-04-25 15:53 ` Zbigniew Kempczyński
2024-04-26 8:21 ` Zbigniew Kempczyński
2024-04-25 10:47 ` [PATCH i-g-t 7/7] tests/xe_render_copy: Add subtest which exercises compression Zbigniew Kempczyński
2024-04-25 11:43 ` ✓ CI.xeBAT: success for Add render-copy compression on Xe+ Patchwork
2024-04-25 11:49 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-26 3:59 ` Zbigniew Kempczyński
2024-04-26 7:59 ` Illipilli, TejasreeX
2024-04-25 23:59 ` ✗ CI.xeFULL: " Patchwork
2024-04-26 7:56 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-26 10:06 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-05-06 7:27 ` 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=20240425104721.52376-2-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--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