From: Ramalingam C <ramalingam.c@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Improve error reporting for igt_mock_max_segment
Date: Mon, 7 Dec 2020 19:28:40 +0530 [thread overview]
Message-ID: <20201207135840.GC26545@intel.com> (raw)
In-Reply-To: <20201207130346.11849-1-chris@chris-wilson.co.uk>
On 2020-12-07 at 13:03:46 +0000, Chris Wilson wrote:
> When we fail to find a single block large enough to require splitting,
> report the largest block we did find.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> ---
> .../gpu/drm/i915/selftests/intel_memory_region.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/intel_memory_region.c b/drivers/gpu/drm/i915/selftests/intel_memory_region.c
> index a0b518c255de..a55079a061dd 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_memory_region.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_memory_region.c
> @@ -384,16 +384,15 @@ static int igt_mock_max_segment(void *arg)
> goto out_put;
> }
>
> - err = -EINVAL;
> + size = 0;
> list_for_each_entry(block, &obj->mm.blocks, link) {
> - if (i915_buddy_block_size(&mem->mm, block) > max_segment) {
> - err = 0;
> - break;
> - }
> + if (i915_buddy_block_size(&mem->mm, block) > size)
> + size = i915_buddy_block_size(&mem->mm, block);
> }
> - if (err) {
> - pr_err("%s: Failed to create a huge contiguous block\n",
> - __func__);
> + if (size < max_segment) {
> + pr_err("%s: Failed to create a huge contiguous block [> %u], largest block %lld\n",
> + __func__, max_segment, size);
> + err = -EINVAL;
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> goto out_close;
> }
>
> --
> 2.20.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-12-07 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 13:02 [Intel-gfx] [PATCH] drm/i915/selftests: Improve error reporting for igt_mock_max_segment Chris Wilson
2020-12-07 13:03 ` Chris Wilson
2020-12-07 13:58 ` Ramalingam C [this message]
2020-12-07 15:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Improve error reporting for igt_mock_max_segment (rev2) Patchwork
2020-12-07 17:21 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=20201207135840.GC26545@intel.com \
--to=ramalingam.c@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@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;
as well as URLs for NNTP newsgroup(s).