From: "Christian König" <deathsimple@vodafone.de>
To: "Ernst Sjöstrand" <ernstp@gmail.com>,
"Alex Deucher" <alexdeucher@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] amdgpu: fix overflow for timeout calculation
Date: Sat, 21 Nov 2015 12:07:22 +0100 [thread overview]
Message-ID: <5650506A.1050401@vodafone.de> (raw)
In-Reply-To: <CAD=4a=VmWcuyY=O6oCJ5tp2d=kSx=euRTwCrAZ4cozAe5ugp9w@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2317 bytes --]
On 21.11.2015 11:48, Ernst Sjöstrand wrote:
> I guess the patches should be for
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c instead?
No, why do you think so? This is a libdrm patch, not a kernel patch.
Regards,
Christian.
>
> Regards
> //Ernst
>
> 2015-11-21 1:24 GMT+01:00 Alex Deucher <alexdeucher@gmail.com
> <mailto:alexdeucher@gmail.com>>:
>
> From: Jammy Zhou <Jammy.Zhou@amd.com <mailto:Jammy.Zhou@amd.com>>
>
> Set the timeout to AMDGPU_TIMEOUT_INFINITE when overflow happens
>
> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com
> <mailto:Jammy.Zhou@amd.com>>
> Reviewed-by: Christian König <christian.koenig@amd.com
> <mailto:christian.koenig@amd.com>>
> ---
> amdgpu/amdgpu_cs.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
> index 4da9821..aa594c4 100644
> --- a/amdgpu/amdgpu_cs.c
> +++ b/amdgpu/amdgpu_cs.c
> @@ -289,12 +289,16 @@ drm_private uint64_t
> amdgpu_cs_calculate_timeout(uint64_t timeout)
>
> if (timeout != AMDGPU_TIMEOUT_INFINITE) {
> struct timespec current;
> + uint64_t current_ns;
> r = clock_gettime(CLOCK_MONOTONIC, ¤t);
> if (r)
> return r;
>
> - timeout += ((uint64_t)current.tv_sec) * 1000000000ull;
> - timeout += current.tv_nsec;
> + current_ns = ((uint64_t)current.tv_sec) *
> 1000000000ull;
> + current_ns += current.tv_nsec;
> + timeout += current_ns;
> + if (timeout < current_ns)
> + timeout = AMDGPU_TIMEOUT_INFINITE;
> }
> return timeout;
> }
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> <mailto:dri-devel@lists.freedesktop.org>
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
[-- Attachment #1.2: Type: text/html, Size: 4768 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-11-21 11:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-21 0:24 [PATCH 1/2] amdgpu: fix overflow for timeout calculation Alex Deucher
2015-11-21 0:24 ` [PATCH 2/2] amdgpu: Make amdgpu_cs_calculate_timeout() return something sensible on error Alex Deucher
2015-11-21 10:48 ` [PATCH 1/2] amdgpu: fix overflow for timeout calculation Ernst Sjöstrand
2015-11-21 11:07 ` Christian König [this message]
2015-11-21 11:25 ` Ernst Sjöstrand
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=5650506A.1050401@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ernstp@gmail.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