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 1/2] lib/i915/intel_memory_region: Provide system memory region stub
Date: Mon, 13 Dec 2021 08:55:15 -0800 [thread overview]
Message-ID: <875yrsa1ho.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20211209200453.15885-2-zbigniew.kempczynski@intel.com>
On Thu, 09 Dec 2021 12:04:52 -0800, Zbigniew Kempczyński wrote:
>
> diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c
> index 058b273dc..fd29eec90 100644
> --- a/lib/i915/intel_memory_region.c
> +++ b/lib/i915/intel_memory_region.c
> @@ -123,9 +123,17 @@ struct drm_i915_query_memory_regions *gem_get_query_memory_regions(int fd)
> * Any DRM_I915_QUERY_MEMORY_REGIONS specific errors are encoded in the
> * item.length, even though the ioctl might still return success.
> */
> +
> if (item.length < 0) {
> - igt_critical("DRM_I915_QUERY_MEMORY_REGIONS failed with %d\n",
> - item.length);
> + /*
> + * If kernel supports query but not memory regions query
> + * just return predefined system memory region only.
> + */
> + size_t sys_qi_size = offsetof(typeof(*query_info), regions[1]);
> +
> + query_info = calloc(1, sys_qi_size);
> + query_info->num_regions = 1;
> + query_info->regions[0].region.memory_class = I915_MEMORY_CLASS_SYSTEM;
Should there be another check here that DRM_I915_QUERY_MEMORY_REGIONS query
was not recognized? Otherwise the query could have failed for some other
reason?
next prev parent reply other threads:[~2021-12-13 16:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 20:04 [igt-dev] [PATCH i-g-t 0/2] Stop failing on system region on stable kernels Zbigniew Kempczyński
2021-12-09 20:04 ` [igt-dev] [PATCH i-g-t 1/2] lib/i915/intel_memory_region: Provide system memory region stub Zbigniew Kempczyński
2021-12-13 16:55 ` Dixit, Ashutosh [this message]
2021-12-13 17:26 ` Zbigniew Kempczyński
2021-12-09 20:04 ` [igt-dev] [PATCH i-g-t 2/2] lib/i915/intel_memory_region: Add fallback for creating gem bo Zbigniew Kempczyński
2021-12-13 16:45 ` Dixit, Ashutosh
2021-12-13 17:38 ` Zbigniew Kempczyński
2021-12-14 4:58 ` Dixit, Ashutosh
2021-12-09 23:19 ` [igt-dev] ✓ Fi.CI.BAT: success for Stop failing on system region on stable kernels Patchwork
2021-12-10 8:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-10 9:10 ` Zbigniew Kempczyński
2021-12-10 18:06 ` Vudum, Lakshminarayana
2021-12-10 17:09 ` Patchwork
2021-12-10 18:06 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2021-12-08 17:24 [igt-dev] [PATCH i-g-t 0/2] Stop complaining regioning " Zbigniew Kempczyński
2021-12-08 17:24 ` [igt-dev] [PATCH i-g-t 1/2] lib/i915/intel_memory_region: Provide system memory region stub Zbigniew Kempczyński
2021-12-09 11:19 ` Petri Latvala
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=875yrsa1ho.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox