From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 4/6] Add i915/gem_ctx_persistence
Date: Tue, 3 Sep 2019 20:50:34 +0300 [thread overview]
Message-ID: <20190903175003.GC22095@intel.intel> (raw)
In-Reply-To: <20190902041548.14919-4-chris@chris-wilson.co.uk>
Hi Chris,
just a few quick question from a first look,
> +/**
> + * __gem_context_set_persistence:
> + * @i915: open i915 drm file descriptor
> + * @ctx: i915 context id
> + * @state: desired persistence
> + *
> + * Like __gem_context_set_persistence(), except we assert on failure.
> + */
> +void gem_context_set_persistence(int i915, uint32_t ctx, bool state)
> +{
> + igt_assert_eq(__gem_context_set_persistence(i915, ctx, state), 0);
> +}
Is this really required? We know what comes out of this, it's the
same as calling igt_assert_eq(1, 2); right?
> @@ -58,6 +63,10 @@ int __gem_context_get_param(int fd, struct drm_i915_gem_context_param *p);
> int __gem_context_set_priority(int fd, uint32_t ctx, int prio);
> void gem_context_set_priority(int fd, uint32_t ctx, int prio);
>
> +#define I915_CONTEXT_PARAM_PERSISTENCE 0xb
what if we want to add more parameters in the driver? We would
need to remember to update this as well.
> + gem_context_get_param(i915, &p);
> + expected = !!p.value;
> +
> + expected = !expected;
"expected = !p.value" ?
> + p.value = expected;
> + gem_context_set_param(i915, &p);
> + gem_context_get_param(i915, &p);
> + igt_assert_eq(p.value, expected);
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-09-03 17:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 4:15 [PATCH i-g-t 1/6] lib: Fix gem_measure_ring_inflight Chris Wilson
2019-09-02 4:15 ` [PATCH i-g-t 2/6] i915/gem_ctx_shared: Prebind both context images Chris Wilson
2019-09-03 13:59 ` [PATCH i-g-t] " Chris Wilson
2019-09-03 15:25 ` [igt-dev] [PATCH i-g-t 2/6] " Andi Shyti
2019-09-02 4:15 ` [PATCH i-g-t 3/6] i915/gem_tiled_swapped: Tweak mlocked size Chris Wilson
2019-09-03 15:32 ` [igt-dev] " Andi Shyti
2019-09-03 19:31 ` [PATCH i-g-t] i915/gem_tiled_swapping: " Chris Wilson
2019-09-04 6:47 ` Andi Shyti
2019-09-02 4:15 ` [PATCH i-g-t 4/6] Add i915/gem_ctx_persistence Chris Wilson
2019-09-03 17:50 ` Andi Shyti [this message]
2019-09-02 4:15 ` [PATCH i-g-t 5/6] i915/gem_mocs_settings: Fudge gen11:vcs2 mocs register base Chris Wilson
2019-09-02 4:15 ` [PATCH i-g-t 6/6] i915/gem_exec_balancer: Beware the migratory fence Chris Wilson
2019-09-03 12:53 ` [PATCH i-g-t 1/6] lib: Fix gem_measure_ring_inflight Andi Shyti
2019-09-03 14:40 ` ✓ Fi.CI.BAT: success for i915/gem_ctx_shared: Prebind both context images Patchwork
2019-09-03 18:29 ` ✓ Fi.CI.IGT: " Patchwork
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=20190903175003.GC22095@intel.intel \
--to=andi.shyti@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@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;
as well as URLs for NNTP newsgroup(s).