答复: [PATCH] drm/amdgpu: fix the wrong value of UVD bo size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christian:

Yes, I have misunderstand the AMDGPU_UVD_FIRMWARE_OFFSET in amdgpu_uvd_mc_resume().

I will update the patch.

Thanks
JimQu

________________________________________
å??件人: Christian König <deathsimple at vodafone.de>
å??é??æ?¶é?´: 2016å¹´8æ??23æ?¥ 16:02:11
�件人: Qu, Jim; amd-gfx at lists.freedesktop.org
主�: Re: [PATCH] drm/amdgpu: fix the wrong value of UVD bo size

Am 23.08.2016 um 08:20 schrieb jimqu:
> Driver allocate bo for restore UVD fw ,cache, stack , etc.
> the firmware size is not only ucode size but the ucode and header.

Nope that isn't correct. Only the firmware is copied to the BO, not the
header. See amdgpu_uvd_resume().

Saying this we should probably use the length from the header instead of
calculating it manually again in amdgpu_uvd_resume().

Christian.

>
> Change-Id: I886c099fa123c4814de9b7db3559c30e7b41fd1b
> Signed-off-by: JimQu <Jim.Qu at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 533d702..13ad44e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -198,7 +198,7 @@ int amdgpu_uvd_sw_init(struct amdgpu_device *adev)
>               DRM_ERROR("POLARIS10/11 UVD firmware version %hu.%hu is too old.\n",
>                         version_major, version_minor);
>
> -     bo_size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes) + 8)
> +     bo_size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(adev->uvd.fw->size) + 8)
>                 +  AMDGPU_UVD_STACK_SIZE + AMDGPU_UVD_HEAP_SIZE
>                 +  AMDGPU_UVD_SESSION_SIZE * adev->uvd.max_handles;
>       r = amdgpu_bo_create_kernel(adev, bo_size, PAGE_SIZE,




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux