[PATCH v2 2/2] drm/amd/include/vg20: hack VCE_BASE

Deucher, Alexander Alexander.Deucher at amd.com
Tue Apr 17 20:37:02 UTC 2018


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of James Zhu
> Sent: Tuesday, April 17, 2018 4:33 PM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH v2 2/2] drm/amd/include/vg20: hack VCE_BASE
> 
> Vega20 uses vce_4_1 engine. By hacking vega20 VCE_BASE,
> vce_4_1 can reuse vce_4.0 header file.

Maybe instead of saying hack, say something like:
Adjust VCE_BASE so that we can re-use the VCE 4.0 register headers on 4.1 hardware.  All the registers have the same absolute offset.

With that changed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> 
> Signed-off-by: James Zhu <James.Zhu at amd.com>
> ---
>  drivers/gpu/drm/amd/include/vega20_ip_offset.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/include/vega20_ip_offset.h
> b/drivers/gpu/drm/amd/include/vega20_ip_offset.h
> index 2da2d97..f345e0d 100644
> --- a/drivers/gpu/drm/amd/include/vega20_ip_offset.h
> +++ b/drivers/gpu/drm/amd/include/vega20_ip_offset.h
> @@ -144,7 +144,8 @@ static const struct IP_BASE UVD_BASE            ={ { { {
> 0x00007800, 0x00007E00,
>                                          { { 0, 0, 0, 0, 0, 0 } },
>                                          { { 0, 0, 0, 0, 0, 0 } },
>                                          { { 0, 0, 0, 0, 0, 0 } } } };
> -static const struct IP_BASE VCE_BASE            ={ { { { 0x00008800, 0, 0, 0, 0, 0 } },
> +/* Hack VCE_BASE to make vce_4_1 use vce_4_0 offset header files*/
> +static const struct IP_BASE VCE_BASE            ={ { { { 0x00007E00/* 0x00008800
> */, 0, 0, 0, 0, 0 } },
>                                          { { 0, 0, 0, 0, 0, 0 } },
>                                          { { 0, 0, 0, 0, 0, 0 } },
>                                          { { 0, 0, 0, 0, 0, 0 } },
> --
> 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