From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org, Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/api_intel_bb: Use alignment only when kernel support it
Date: Tue, 23 Nov 2021 23:04:08 -0800 [thread overview]
Message-ID: <87k0gyrq53.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20211123091203.6076-1-zbigniew.kempczynski@intel.com>
On Tue, 23 Nov 2021 01:12:03 -0800, Zbigniew Kempczyński wrote:
>
> Test uses intel-bb api so we're responsible to pass valid alignment
> or 0 when it is not supported by the kernel. Add appropriate check
> to avoid failing on such kernels.
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
> tests/i915/api_intel_bb.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
> index 82943a341..5c996f644 100644
> --- a/tests/i915/api_intel_bb.c
> +++ b/tests/i915/api_intel_bb.c
> @@ -469,6 +469,7 @@ static void object_reloc(struct buf_ops *bops, enum obj_cache_ops cache_op)
> uint64_t flags = 0;
> uint64_t shift = cache_op == PURGE_CACHE ? 0x2000 : 0x0;
> bool purge_cache = cache_op == PURGE_CACHE ? true : false;
> + uint64_t alignment = gem_allows_obj_alignment(i915) ? 0x2000 : 0x0;
>
> ibb = intel_bb_create_with_relocs(i915, PAGE_SIZE);
> if (debug_bb)
> @@ -490,7 +491,7 @@ static void object_reloc(struct buf_ops *bops, enum obj_cache_ops cache_op)
> igt_assert(poff_h2 == INTEL_BUF_INVALID_ADDRESS);
>
> intel_bb_add_object(ibb, h1, PAGE_SIZE, poff_h1, 0, true);
> - intel_bb_add_object(ibb, h2, PAGE_SIZE, poff_h2, 0x2000, true);
> + intel_bb_add_object(ibb, h2, PAGE_SIZE, poff_h2, alignment, true);
>
> /*
> * Objects were added to bb, we expect initial addresses are zeroed
> @@ -516,7 +517,7 @@ static void object_reloc(struct buf_ops *bops, enum obj_cache_ops cache_op)
>
> if (purge_cache) {
> intel_bb_add_object(ibb, h1, PAGE_SIZE, poff2_h1, 0, true);
> - intel_bb_add_object(ibb, h2, PAGE_SIZE, poff2_h2 + shift, 0x2000, true);
> + intel_bb_add_object(ibb, h2, PAGE_SIZE, poff2_h2 + shift, alignment, true);
> }
>
> poff_bb = intel_bb_get_object_offset(ibb, ibb->handle);
> --
> 2.26.0
>
prev parent reply other threads:[~2021-11-24 7:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 9:12 [igt-dev] [PATCH i-g-t] tests/api_intel_bb: Use alignment only when kernel support it Zbigniew Kempczyński
2021-11-23 10:08 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-23 11:16 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-23 11:56 ` Zbigniew Kempczyński
2021-11-23 17:26 ` Vudum, Lakshminarayana
2021-11-23 17:14 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2021-11-24 7:04 ` Dixit, Ashutosh [this message]
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=87k0gyrq53.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
--cc=zbigniew.kempczynski@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.