From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>,
zhangxiaoxu5@huawei.com, chris@chris-wilson.co.uk,
jani.nikula@linux.intel.com, rodrigo.vivi@intel.com,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix wrong return value of perf_series_engines()
Date: Mon, 16 Nov 2020 16:51:19 +0200 [thread overview]
Message-ID: <87v9e5mk2g.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20201116144112.3673011-1-zhangxiaoxu5@huawei.com>
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> writes:
> If intel context create failed, the perf_series_engines() will return 0
> rather than error, because we doesn't initialize the return value.
>
> Fixes: cbfd3a0c5a55 ("drm/i915/selftests: Add request throughput measurement to perf")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/selftests/i915_request.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> index 6b512fc13ca7..e424a6d1a68c 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -2469,8 +2469,10 @@ static int perf_series_engines(void *arg)
> struct intel_context *ce;
>
> ce = intel_context_create(engine);
> - if (IS_ERR(ce))
> + if (IS_ERR(ce)) {
> + err = PTR_ERR(ce);
> goto out;
> + }
>
> err = intel_context_pin(ce);
> if (err) {
> --
> 2.25.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>,
zhangxiaoxu5@huawei.com, chris@chris-wilson.co.uk,
jani.nikula@linux.intel.com, rodrigo.vivi@intel.com,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/selftests: Fix wrong return value of perf_series_engines()
Date: Mon, 16 Nov 2020 16:51:19 +0200 [thread overview]
Message-ID: <87v9e5mk2g.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20201116144112.3673011-1-zhangxiaoxu5@huawei.com>
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> writes:
> If intel context create failed, the perf_series_engines() will return 0
> rather than error, because we doesn't initialize the return value.
>
> Fixes: cbfd3a0c5a55 ("drm/i915/selftests: Add request throughput measurement to perf")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/selftests/i915_request.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> index 6b512fc13ca7..e424a6d1a68c 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -2469,8 +2469,10 @@ static int perf_series_engines(void *arg)
> struct intel_context *ce;
>
> ce = intel_context_create(engine);
> - if (IS_ERR(ce))
> + if (IS_ERR(ce)) {
> + err = PTR_ERR(ce);
> goto out;
> + }
>
> err = intel_context_pin(ce);
> if (err) {
> --
> 2.25.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-11-16 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 14:41 [Intel-gfx] [PATCH] drm/i915/selftests: Fix wrong return value of perf_series_engines() Zhang Xiaoxu
2020-11-16 14:41 ` Zhang Xiaoxu
2020-11-16 14:51 ` Mika Kuoppala [this message]
2020-11-16 14:51 ` Mika Kuoppala
2020-11-16 15:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-11-16 21:26 ` [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=87v9e5mk2g.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=zhangxiaoxu5@huawei.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.