VPE v3.0 Support
Subsystems (2)
Alex Deucher
maintainercover VPE v3.0 Support
Add VPE v3.0 support. First patch adds new register headers. Skipping to avoid spamming the list.
Caden Chien (2):
drm/amdgpu/vpe: add vpe v3.0.0 support
drm/amdgpu/vpe: add vpe v3.0.1 support
Hawking Zhang (1):
drm/amdgpu: Add vpe v3_0_0 ip headers v4
Lin Cao (2):
drm/amdgpu: Allocate VPE cmdbuf from VRAM drm/amdgpu: skip vpe dpm enable if dpm_enabled flag is false
drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 32 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h | 1 + drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c | 351 +++ drivers/gpu/drm/amd/amdgpu/vpe_v3_0.h | 29 + .../include/asic_reg/vpe/vpe_3_0_0_offset.h | 877 ++++++ .../include/asic_reg/vpe/vpe_3_0_0_sh_mask.h | 2661 +++++++++++++++++ 8 files changed, 3955 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/vpe_v3_0.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/vpe/vpe_3_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/vpe/vpe_3_0_0_sh_mask.h
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 2/5 drm/amdgpu/vpe: add vpe v3.0.0 support
From: Caden Chien <[email protected]>
This patch adds support for vpe v3.0.0 with new structs and ip functions
--- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 25 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h | 1 + drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c | 350 ++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vpe_v3_0.h | 29 ++ 6 files changed, 410 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/vpe_v3_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
@@ -239,7 +239,8 @@ amdgpu-y += \ amdgpu-y += \ amdgpu_vpe.o \ vpe_v6_1.o \ - vpe_v2_0.o + vpe_v2_0.o \ + vpe_v3_0.o # add UMSCH block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
@@ -3347,6 +3347,9 @@ static int amdgpu_discovery_set_vpe_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (2 ,2 ,0 ):amdgpu_device_ip_block_add (adev, &vpe_v2_0_ip_block);break ; +case IP_VERSION (3 ,0 ,0 ): +amdgpu_device_ip_block_add (adev, &vpe_v3_0_ip_block); +break ;default :break ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +25 -0
@@ -30,6 +30,7 @@#include "soc15_common.h" #include "vpe_v6_1.h" #include "vpe_v2_0.h" +#include "vpe_v3_0.h" #define AMDGPU_CSA_VPE_SIZE 64/* VPE CSA resides in the 4th page of CSA */
@@ -315,6 +316,9 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)case IP_VERSION (2 ,2 ,0 ):vpe_v2_0_set_funcs (vpe);break ; +case IP_VERSION (3 ,0 ,0 ): +vpe_v3_0_set_funcs (vpe); +break ;default :return -EINVAL ; }
@@ -1038,6 +1042,19 @@ const struct amd_ip_funcs vpe2_ip_funcs = { .set_powergating_state = vpe_set_powergating_state, }; +const struct amd_ip_funcs vpe3_ip_funcs = { + .name ="vpe_v3_0" , + .early_init = vpe_early_init, + .sw_init = vpe_sw_init, + .sw_fini = vpe_sw_fini, + .hw_init = vpe_hw_init, + .hw_fini = vpe_hw_fini, + .suspend = vpe_suspend, + .resume = vpe_resume, + .set_clockgating_state = vpe_set_clockgating_state, + .set_powergating_state = vpe_set_powergating_state, +}; +const struct amdgpu_ip_block_version vpe_v6_1_ip_block = { .type =AMD_IP_BLOCK_TYPE_VPE , .major =6 ,
@@ -1053,3 +1070,11 @@ const struct amdgpu_ip_block_version vpe_v2_0_ip_block = { .rev = 0, .funcs = &vpe2_ip_funcs, }; + +const struct amdgpu_ip_block_version vpe_v3_0_ip_block = { + .type =AMD_IP_BLOCK_TYPE_VPE , + .major =3 , + .minor =0 , + .rev =0 , + .funcs = &vpe3_ip_funcs, +};
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h +1 -0
@@ -108,5 +108,6 @@ int amdgpu_vpe_sysfs_reset_mask_init(struct amdgpu_device *adev);extern const struct amdgpu_ip_block_version vpe_v6_1_ip_block;extern const struct amdgpu_ip_block_version vpe_v2_0_ip_block; +extern const struct amdgpu_ip_block_version vpe_v3_0_ip_block;#endif
drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c new file +350 -0
350 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/vpe_v3_0.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright 2026 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ +#ifndef __VPE_V3_0_H__ +#define __VPE_V3_0_H__ + +#include "amdgpu_vpe.h" + +void vpe_v3_0_set_funcs (struct amdgpu_vpe *vpe); + +#endif
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 3/5 drm/amdgpu/vpe: add vpe v3.0.1 support
In reply to Alex DeucherFrom: Caden Chien <[email protected]>
This initializes VPE IP version 3.0.1
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 1 + drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -3348,6 +3348,7 @@ static int amdgpu_discovery_set_vpe_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vpe_v2_0_ip_block);break ;case IP_VERSION (3 ,0 ,0 ): +case IP_VERSION (3 ,0 ,1 ):amdgpu_device_ip_block_add (adev, &vpe_v3_0_ip_block);break ;default :
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -0
@@ -317,6 +317,7 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)vpe_v2_0_set_funcs (vpe);break ;case IP_VERSION (3 ,0 ,0 ): +case IP_VERSION (3 ,0 ,1 ):vpe_v3_0_set_funcs (vpe);break ;default :
drivers/gpu/drm/amd/amdgpu/vpe_v3_0.c +1 -0
@@ -31,6 +31,7 @@#include "vpe/vpe_3_0_0_sh_mask.h" MODULE_FIRMWARE ("amdgpu/vpe_3_0_0.bin" ); +MODULE_FIRMWARE ("amdgpu/vpe_3_0_1.bin" );#define VPE_THREAD1_UCODE_OFFSET 0x8000
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 4/5 drm/amdgpu: Allocate VPE cmdbuf from VRAM
In reply to Alex DeucherFrom: Lin Cao <[email protected]>
PSP should not accept a GART VA directly from VF Add logical to allocate VPE cmdbuf from VRAM
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -1
@@ -378,7 +378,7 @@ static int vpe_common_init(struct amdgpu_vpe *vpe)int r; r =amdgpu_bo_create_kernel (adev,PAGE_SIZE ,PAGE_SIZE , -AMDGPU_GEM_DOMAIN_GTT , +AMDGPU_GEM_DOMAIN_VRAM |AMDGPU_GEM_DOMAIN_GTT , &adev->vpe.cmdbuf_obj, &adev->vpe.cmdbuf_gpu_addr, (void **)&adev->vpe.cmdbuf_cpu_addr);
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 5/5 drm/amdgpu: skip vpe dpm enable if dpm_enabled flag is false
In reply to Alex DeucherFrom: Lin Cao <[email protected]>
amdgpu_dpm_enable_vpe() should be skipped if dpm_enabled is false
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +3 -1
@@ -699,8 +699,10 @@ static int vpe_set_powergating_state(struct amdgpu_ip_block *ip_block,struct amdgpu_device *adev = ip_block->adev;struct amdgpu_vpe *vpe = &adev->vpe; -if (!adev->pm.dpm_enabled) +if (!adev->pm.dpm_enabled) {dev_err (adev->dev,"Without PM, cannot support powergating\n" ); +return 0 ; + }dev_dbg (adev->dev,"%s: %s!\n" , __func__, (state ==AMD_PG_STATE_GATE ) ?"GATE" :"UNGATE" );
Signature · 1 line
2.55.0