amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/10] drm/amdgpu: add gfx shadow callback
Date: Mon, 20 Mar 2023 16:57:53 +0100	[thread overview]
Message-ID: <fd529eb8-2070-320f-27bf-371ac294c574@gmail.com> (raw)
In-Reply-To: <20230317171748.682691-8-alexander.deucher@amd.com>

Am 17.03.23 um 18:17 schrieb Alex Deucher:
> To provide IP specific shadow sizes.  UMDs will use
> this to query the kernel driver for the size of the
> shadow buffers.
>
> v2: make callback return an int (Alex)
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> index 4ad9e225d6e6..8826f1efc75f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
> @@ -219,6 +219,15 @@ struct amdgpu_gfx_ras {
>   						struct amdgpu_iv_entry *entry);
>   };
>   
> +struct amdgpu_gfx_shadow_info {
> +	u32 shadow_size;
> +	u32 shadow_alignment;
> +	u32 csa_size;
> +	u32 csa_alignment;
> +	u32 gds_size;
> +	u32 gds_alignment;

I don't think we need an alignment for those. Otherwise we would run 
into problems with the VA mappings as well.

Regards,
Christian.

> +};
> +
>   struct amdgpu_gfx_funcs {
>   	/* get the gpu clock counter */
>   	uint64_t (*get_gpu_clock_counter)(struct amdgpu_device *adev);
> @@ -236,6 +245,8 @@ struct amdgpu_gfx_funcs {
>   				 u32 queue, u32 vmid);
>   	void (*init_spm_golden)(struct amdgpu_device *adev);
>   	void (*update_perfmon_mgcg)(struct amdgpu_device *adev, bool enable);
> +	int (*get_gfx_shadow_info)(struct amdgpu_device *adev,
> +				   struct amdgpu_gfx_shadow_info *shadow_info);
>   };
>   
>   struct sq_work {
> @@ -372,6 +383,7 @@ struct amdgpu_gfx {
>   #define amdgpu_gfx_select_se_sh(adev, se, sh, instance) (adev)->gfx.funcs->select_se_sh((adev), (se), (sh), (instance))
>   #define amdgpu_gfx_select_me_pipe_q(adev, me, pipe, q, vmid) (adev)->gfx.funcs->select_me_pipe_q((adev), (me), (pipe), (q), (vmid))
>   #define amdgpu_gfx_init_spm_golden(adev) (adev)->gfx.funcs->init_spm_golden((adev))
> +#define amdgpu_gfx_get_gfx_shadow_info(adev, si) (adev)->gfx.funcs->get_gfx_shadow_info((adev), (si))
>   
>   /**
>    * amdgpu_gfx_create_bitmask - create a bitmask


  reply	other threads:[~2023-03-20 15:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 17:17 [PATCH 00/10] Enable FW assisted shadowing for GFX11 Alex Deucher
2023-03-17 17:17 ` [PATCH 01/10] drm/amdgpu: add UAPI to query GFX shadow sizes Alex Deucher
2023-03-17 17:17 ` [PATCH 02/10] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers Alex Deucher
2023-03-17 17:17 ` [PATCH 03/10] drm/amdgpu: add gfx shadow CS IOCTL support Alex Deucher
2023-03-20 15:46   ` Christian König
2023-03-20 15:49     ` Alex Deucher
2023-03-20 15:55       ` Christian König
2023-03-20 16:01         ` Alex Deucher
2023-03-20 16:04           ` Christian König
2023-03-20 15:52     ` Alex Deucher
2023-03-17 17:17 ` [PATCH 04/10] drm/amdgpu: add gfx11 emit shadow callback Alex Deucher
2023-03-20 15:49   ` Christian König
2023-03-20 16:08     ` Alex Deucher
2023-03-17 17:17 ` [PATCH 05/10] drm/amdgpu/gfx11: make job optional in emit_gfx_shadow Alex Deucher
2023-03-17 17:17 ` [PATCH 06/10] drm/amdgpu: don't require a job for cond_exec and shadow Alex Deucher
2023-03-20 15:50   ` Christian König
2023-03-17 17:17 ` [PATCH 07/10] drm/amdgpu: add gfx shadow callback Alex Deucher
2023-03-20 15:57   ` Christian König [this message]
2023-03-20 16:03     ` Alex Deucher
2023-03-17 17:17 ` [PATCH 08/10] drm/amdgpu: add get_gfx_shadow_info callback for gfx11 Alex Deucher
2023-03-17 17:17 ` [PATCH 09/10] drm/amdgpu: add support for new GFX shadow size query Alex Deucher
2023-03-17 17:17 ` [PATCH 10/10] drm/amdgpu: bump driver version number for CP GFX shadow Alex Deucher

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=fd529eb8-2070-320f-27bf-371ac294c574@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).