From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: Vanshidhar Konda <vanshidhar.r.konda@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 2/4] lib/i915/intel_memory_region: Add lib to manage memory regions
Date: Wed, 20 Nov 2019 08:20:15 +0100 [thread overview]
Message-ID: <20191120072015.GA15831@zkempczy-desk.igk.intel.com> (raw)
In-Reply-To: <20191119180329.vuimtbx433dzdhap@vrkonda-desk.ra.intel.com>
On Tue, Nov 19, 2019 at 10:03:29AM -0800, Vanshidhar Konda wrote:
<cut>
> > + * gem_query_has_memory_region:
> > + * @query_info: query result of memory regions
> > + * @region: region existance to check inside @query_info regions
> > + *
> > + * This function check existence of region in @query_info
> > + *
> > + * Returns: true if memory region was found. Otherwise false.
> > + */
> > +bool gem_query_has_memory_region(struct local_i915_query_memory_region_info *query_info,
> > + uint32_t region)
> > +{
> > + for (int i = 0; i < query_info->num_regions; i++)
> > + if (query_info->regions[i].id == region)
> > + return true;
> > +
> > + return false;
> > +}
> > +
> > +/**
> > + * gem_query_require_region:
> > + * @query_info: query result of memory regions
> > + * @region: region to check inside query
> > + *
> > + * Function lead to skipping test if @region doesn't exists in @query_info.
> > + */
> > +void gem_query_require_region(struct local_i915_query_memory_region_info *query_info,
> > + uint32_t region)
>
> Fix formatting for second line
Ok, be in v3 in an hour.
> > +/* gem_create_in_memory_region_list:
> > + * @fd: opened i915 drm file descriptor
> > + * @size: requested size of the buffer
> > + * @mem_regions: memory regions array (priority list)
> > + * @num_regions: @mem_regions length
> > + */
> > +uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
> > + uint32_t *mem_regions,
> > + int num_regions)
> > +{
> > + uint32_t handle = gem_create(fd, size);
> > +
> > + if (gem_has_lmem(fd)) {
>
> Why have a check for LMEM only? Is it not possible to have multiple
> SMEM regions? Or that the object is always created in SMEM?
>
> Other than these two comments, looks good to me.
Good point. Until now I thought we will have single SMEM region,
but who knows :)
>
> Acked-by: Vanshidhar Konda <vanshidhar.r.konda@intel.com>
Thanks for comments and A-B.
Zbigniew
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-11-20 7:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 16:02 [igt-dev] [PATCH i-g-t v2 0/4] Basic LMEM support in IGT Zbigniew Kempczyński
2019-11-19 16:02 ` [igt-dev] [PATCH i-g-t v2 1/4] lib/i915/gem_mman: add mmap_offset support Zbigniew Kempczyński
2019-11-19 16:23 ` Summers, Stuart
2019-11-19 17:19 ` Zbigniew Kempczyński
2019-11-19 16:02 ` [igt-dev] [PATCH i-g-t v2 2/4] lib/i915/intel_memory_region: Add lib to manage memory regions Zbigniew Kempczyński
2019-11-19 18:03 ` Vanshidhar Konda
2019-11-20 7:20 ` Zbigniew Kempczyński [this message]
2019-11-20 9:34 ` Petri Latvala
2019-11-20 16:27 ` Zbigniew Kempczyński
2019-11-19 16:02 ` [igt-dev] [PATCH i-g-t v2 3/4] tests/i915/gem_mmap_offset: Add new API test for gem_mmap_offset Zbigniew Kempczyński
2019-11-19 18:13 ` Vanshidhar Konda
2019-11-20 10:50 ` Zbigniew Kempczyński
2019-11-19 16:02 ` [igt-dev] [PATCH i-g-t v2 4/4] tests/i915/gem_exec_basic: Iterate over all memory regions Zbigniew Kempczyński
2019-11-19 18:15 ` Vanshidhar Konda
2019-11-19 16:53 ` [igt-dev] ✗ GitLab.Pipeline: warning for Basic LMEM support in IGT (rev2) Patchwork
2019-11-19 17:00 ` [igt-dev] ✗ Fi.CI.BAT: failure " 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=20191120072015.GA15831@zkempczy-desk.igk.intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=vanshidhar.r.konda@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox