[PATCH] drm: amdgpu: Fix logic error

Alex Deucher alexdeucher at gmail.com
Tue Nov 29 15:27:55 UTC 2022


Applied.  Thanks!

Alex

On Tue, Nov 29, 2022 at 2:49 AM Konstantin Meskhidze
<konstantin.meskhidze at huawei.com> wrote:
>
> This commit fixes logic error in function 'amdgpu_hw_ip_info':
>        - value 'uvd' might be 'vcn'.
>
> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze at huawei.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index fe23e09eec98..28752a6a92c4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -424,7 +424,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
>         case AMDGPU_HW_IP_VCN_DEC:
>                 type = AMD_IP_BLOCK_TYPE_VCN;
>                 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
> -                       if (adev->uvd.harvest_config & (1 << i))
> +                       if (adev->vcn.harvest_config & (1 << i))
>                                 continue;
>
>                         if (adev->vcn.inst[i].ring_dec.sched.ready)
> @@ -436,7 +436,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
>         case AMDGPU_HW_IP_VCN_ENC:
>                 type = AMD_IP_BLOCK_TYPE_VCN;
>                 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
> -                       if (adev->uvd.harvest_config & (1 << i))
> +                       if (adev->vcn.harvest_config & (1 << i))
>                                 continue;
>
>                         for (j = 0; j < adev->vcn.num_enc_rings; j++)
> --
> 2.25.1
>


More information about the dri-devel mailing list