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_request_latency()
Date: Mon, 16 Nov 2020 16:37:34 +0200 [thread overview]
Message-ID: <87y2j1mkpd.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20201116143540.3648870-1-zhangxiaoxu5@huawei.com>
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> writes:
> If intel context create failed, the perf_request_latency() will return 0
> rather than error, because we doesn't initialize the return value.
>
> Fixes: 25c26f18ea79 ("drm/i915/selftests: Measure dispatch latency")
> 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 64bbb8288249..6b512fc13ca7 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -2293,8 +2293,10 @@ static int perf_request_latency(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_request_latency()
Date: Mon, 16 Nov 2020 16:37:34 +0200 [thread overview]
Message-ID: <87y2j1mkpd.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20201116143540.3648870-1-zhangxiaoxu5@huawei.com>
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> writes:
> If intel context create failed, the perf_request_latency() will return 0
> rather than error, because we doesn't initialize the return value.
>
> Fixes: 25c26f18ea79 ("drm/i915/selftests: Measure dispatch latency")
> 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 64bbb8288249..6b512fc13ca7 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> @@ -2293,8 +2293,10 @@ static int perf_request_latency(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:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 14:35 [Intel-gfx] [PATCH] drm/i915/selftests: Fix wrong return value of perf_request_latency() Zhang Xiaoxu
2020-11-16 14:35 ` Zhang Xiaoxu
2020-11-16 14:37 ` Mika Kuoppala [this message]
2020-11-16 14:37 ` Mika Kuoppala
2020-11-16 16:29 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-11-16 22:09 ` [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=87y2j1mkpd.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.