AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: new ids flag for tmz (v2)
Date: Thu, 30 Jul 2020 16:46:39 +0200	[thread overview]
Message-ID: <93bcdc83-24b6-5a66-2e73-adea528c2edb@gmail.com> (raw)
In-Reply-To: <20200730135457.38848-1-pierre-eric.pelloux-prayer@amd.com>

Am 30.07.20 um 15:54 schrieb Pierre-Eric Pelloux-Prayer:
> Allows UMD to know if TMZ is supported and enabled.
>
> This commit also bumps KMS_DRIVER_MINOR because if we don't
> UMD can't tell if "ids_flags & AMDGPU_IDS_FLAGS_TMZ == 0" means
> "tmz is not enabled" or "tmz may be enabled but the kernel doesn't
> report it".
>
> v2: use amdgpu_is_tmz() and reworded commit message.

Your signed-off-by line is missing, but apart from that the patch is 
Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
> Patch for using it in Mesa is at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049
> (ac/gpu_info: add detection of TMZ support).
> I've kept the AMDGPU_IDS_FLAGS_TMZ name to match the existing
> AMDGPU_IDS_FLAGS_PREEMPTION flag.
>
> Pierre-Eric
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++
>   include/uapi/drm/amdgpu_drm.h           | 1 +
>   3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 6291f5f0d223..6dcab25914cf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -88,9 +88,10 @@
>    * - 3.37.0 - L2 is invalidated before SDMA IBs, needed for correctness
>    * - 3.38.0 - Add AMDGPU_IB_FLAG_EMIT_MEM_SYNC
>    * - 3.39.0 - DMABUF implicit sync does a full pipeline sync
> + * - 3.40.0 - Add AMDGPU_IDS_FLAGS_TMZ
>    */
>   #define KMS_DRIVER_MAJOR	3
> -#define KMS_DRIVER_MINOR	39
> +#define KMS_DRIVER_MINOR	40
>   #define KMS_DRIVER_PATCHLEVEL	0
>   
>   int amdgpu_vram_limit = 0;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index eebbe2103e32..d353ded353bb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -736,6 +736,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>   			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
>   		if (amdgpu_mcbp || amdgpu_sriov_vf(adev))
>   			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_PREEMPTION;
> +		if (amdgpu_is_tmz(adev))
> +			dev_info.ids_flags |= AMDGPU_IDS_FLAGS_TMZ;
>   
>   		vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
>   		vm_size -= AMDGPU_VA_RESERVED_SIZE;
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index 765a94ec4420..b826f2d6efe1 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -676,6 +676,7 @@ struct drm_amdgpu_cs_chunk_data {
>    */
>   #define AMDGPU_IDS_FLAGS_FUSION         0x1
>   #define AMDGPU_IDS_FLAGS_PREEMPTION     0x2
> +#define AMDGPU_IDS_FLAGS_TMZ            0x4
>   
>   /* indicate if acceleration can be working */
>   #define AMDGPU_INFO_ACCEL_WORKING		0x00

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-07-30 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 13:54 [PATCH] drm/amdgpu: new ids flag for tmz (v2) Pierre-Eric Pelloux-Prayer
2020-07-30 14:46 ` Christian König [this message]
2020-08-05  8:23   ` Pierre-Eric Pelloux-Prayer

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=93bcdc83-24b6-5a66-2e73-adea528c2edb@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=pierre-eric.pelloux-prayer@amd.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