[PATCH 1/3] drm/amdgpu: Add USBC PD FW load interface to PSP.

Alex Deucher alexdeucher at gmail.com
Mon Mar 2 21:21:47 UTC 2020


On Mon, Mar 2, 2020 at 2:24 PM Andrey Grodzovsky
<andrey.grodzovsky at amd.com> wrote:
>
> Used to load PD FW to PSP.

Might want to define PD = Power Delivery.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> index 37fa184..297435c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> @@ -114,6 +114,8 @@ struct psp_funcs
>         int (*mem_training)(struct psp_context *psp, uint32_t ops);
>         uint32_t (*ring_get_wptr)(struct psp_context *psp);
>         void (*ring_set_wptr)(struct psp_context *psp, uint32_t value);
> +       int (*load_usbc_pd_fw)(struct psp_context *psp, dma_addr_t dma_addr);
> +       int (*read_usbc_pd_fw)(struct psp_context *psp, uint32_t *fw_ver);
>  };
>
>  #define AMDGPU_XGMI_MAX_CONNECTED_NODES                64
> @@ -351,6 +353,14 @@ struct amdgpu_psp_funcs {
>  #define psp_ring_get_wptr(psp) (psp)->funcs->ring_get_wptr((psp))
>  #define psp_ring_set_wptr(psp, value) (psp)->funcs->ring_set_wptr((psp), (value))
>
> +#define psp_load_usbc_pd_fw(psp, dma_addr) \
> +       ((psp)->funcs->load_usbc_pd_fw ? \
> +       (psp)->funcs->load_usbc_pd_fw((psp), (dma_addr)) : -EINVAL)
> +
> +#define psp_read_usbc_pd_fw(psp, fw_ver) \
> +       ((psp)->funcs->read_usbc_pd_fw ? \
> +       (psp)->funcs->read_usbc_pd_fw((psp), fw_ver) : -EINVAL)
> +
>  extern const struct amd_ip_funcs psp_ip_funcs;
>
>  extern const struct amdgpu_ip_block_version psp_v3_1_ip_block;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list