From: Andres Rodriguez <andresx7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx mailing list
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] amdgpu: implement context priority for amdgpu_cs_ctx_create2 v2
Date: Wed, 4 Jan 2017 14:24:24 -0500 [thread overview]
Message-ID: <2e2b9151-265e-07c8-6fb4-e5dc0eb6efe3@gmail.com> (raw)
In-Reply-To: <CACvgo53X0TOGEYwO0vKx1m97+DH9P-mUCsEsPw+5t9o6Xqs+5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Thanks for the feedback Emil, it is very welcome :)
On 1/4/2017 8:47 AM, Emil Velikov wrote:
> Hi Andres,
>
> Pardon for jumping in uninvited, there's a few comments below that you
> might find useful.
>
> On 4 January 2017 at 01:56, Andres Rodriguez <andresx7@gmail.com> wrote:
>
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -20,7 +20,7 @@
>>
>> AC_PREREQ([2.63])
>> AC_INIT([libdrm],
>> - [2.4.74],
>> + [2.4.75],
> This part should be separate and done only as one rolls a release.
> Currently we have more than a dozen of people who can do that, with 3+
> from the AMD team.
I'll take this out of the patch.
>
>> [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
>> [libdrm])
>>
>> diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
>> index d8f2497..01cf3c9 100644
>> --- a/include/drm/amdgpu_drm.h
>> +++ b/include/drm/amdgpu_drm.h
> Please sync this file as described in the README, in the same directory.
Thanks for pointing that out, I totally missed the README
>
>> +/* Context priority level */
>> +#define AMDGPU_CTX_PRIORITY_HIGH 0
>> +#define AMDGPU_CTX_PRIORITY_NORMAL 1
> You really want NORMAL to be 0 here, to preserve the behaviour. In
> other words, [sane] old userspace with new kernel will set HIGH prio,
> where NORMAL is used with older kernels.
Will fix.
>
>> +
>> struct drm_amdgpu_ctx_in {
>> /** AMDGPU_CTX_OP_* */
>> uint32_t op;
>> /** For future use, no flags defined so far */
>> uint32_t flags;
>> uint32_t ctx_id;
>> - uint32_t _pad;
>> + uint32_t priority;
> This part is a bit of meh:
>
> Namely things can go crazy in either one of these scenarios:
> - old kernel [validates _pad to be zero/other], new userspace feeds
> "invalid" value.
> - new kernel. old [nasty] userspace which leaves the value uninitialised.
>
> Re-using _pad is ok, just make sure things don't explode all over the place.
>
> Regards,
> Emil
Regards,
Andres
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2017-01-04 19:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 1:56 [PATCH v2] amdgpu: implement context priority for amdgpu_cs_ctx_create2 Andres Rodriguez
[not found] ` <20170104015628.6472-1-andresx7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-04 1:56 ` [PATCH] amdgpu: implement context priority for amdgpu_cs_ctx_create2 v2 Andres Rodriguez
[not found] ` <20170104015628.6472-2-andresx7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-04 13:47 ` Emil Velikov
[not found] ` <CACvgo53X0TOGEYwO0vKx1m97+DH9P-mUCsEsPw+5t9o6Xqs+5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-04 19:24 ` Andres Rodriguez [this message]
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=2e2b9151-265e-07c8-6fb4-e5dc0eb6efe3@gmail.com \
--to=andresx7-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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