[PATCH 1/2] drm/amdgpu: Unset context priority is now invalid

Alex Deucher alexdeucher at gmail.com
Tue Oct 17 13:22:05 UTC 2023


On Tue, Oct 17, 2023 at 12:52 AM Luben Tuikov <luben.tuikov at amd.com> wrote:
>
> A context priority value of AMD_CTX_PRIORITY_UNSET is now invalid--instead of
> carrying it around and passing it to the Direct Rendering Manager--and it
> becomes AMD_CTX_PRIORITY_NORMAL in amdgpu_ctx_ioctl(), the gateway to context
> creation.
>
> Cc: Alex Deucher <Alexander.Deucher at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Signed-off-by: Luben Tuikov <luben.tuikov at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index 0dc9c655c4fbdb..092962b93064fc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -47,7 +47,6 @@ const unsigned int amdgpu_ctx_num_entities[AMDGPU_HW_IP_NUM] = {
>  bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
>  {
>         switch (ctx_prio) {
> -       case AMDGPU_CTX_PRIORITY_UNSET:
>         case AMDGPU_CTX_PRIORITY_VERY_LOW:
>         case AMDGPU_CTX_PRIORITY_LOW:
>         case AMDGPU_CTX_PRIORITY_NORMAL:
> @@ -55,6 +54,7 @@ bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
>         case AMDGPU_CTX_PRIORITY_VERY_HIGH:
>                 return true;
>         default:
> +       case AMDGPU_CTX_PRIORITY_UNSET:
>                 return false;

I  don't recall if any userspace uses this, but this would break
userspace if it does.

Alex

>         }
>  }
>
> base-commit: dc9b2e683bcba017588b9aaad80f442ad004a48f
> --
> 2.42.0
>


More information about the amd-gfx mailing list