[PATCH 5/5] drm/amdgpu: Remove the direct fw loading support for sdma2.4

Alex Deucher alexdeucher at gmail.com
Tue Oct 9 19:28:23 UTC 2018


On Tue, Oct 9, 2018 at 8:45 AM Rex Zhu <Rex.Zhu at amd.com> wrote:
>
> sdma2.4 is only for iceland. For Vi, we don't maintain the
> direct fw loading.
>
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 42 ----------------------------------
>  1 file changed, 42 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> index cd781ab..2d4770e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
> @@ -504,41 +504,6 @@ static int sdma_v2_4_rlc_resume(struct amdgpu_device *adev)
>         return 0;
>  }
>
> -/**
> - * sdma_v2_4_load_microcode - load the sDMA ME ucode
> - *
> - * @adev: amdgpu_device pointer
> - *
> - * Loads the sDMA0/1 ucode.
> - * Returns 0 for success, -EINVAL if the ucode is not available.
> - */
> -static int sdma_v2_4_load_microcode(struct amdgpu_device *adev)
> -{
> -       const struct sdma_firmware_header_v1_0 *hdr;
> -       const __le32 *fw_data;
> -       u32 fw_size;
> -       int i, j;
> -
> -       /* halt the MEs */
> -       sdma_v2_4_enable(adev, false);
> -
> -       for (i = 0; i < adev->sdma.num_instances; i++) {
> -               if (!adev->sdma.instance[i].fw)
> -                       return -EINVAL;
> -               hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data;
> -               amdgpu_ucode_print_sdma_hdr(&hdr->header);
> -               fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
> -               fw_data = (const __le32 *)
> -                       (adev->sdma.instance[i].fw->data +
> -                        le32_to_cpu(hdr->header.ucode_array_offset_bytes));
> -               WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0);
> -               for (j = 0; j < fw_size; j++)
> -                       WREG32(mmSDMA0_UCODE_DATA + sdma_offsets[i], le32_to_cpup(fw_data++));
> -               WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], adev->sdma.instance[i].fw_version);
> -       }
> -
> -       return 0;
> -}
>
>  /**
>   * sdma_v2_4_start - setup and start the async dma engines
> @@ -552,13 +517,6 @@ static int sdma_v2_4_start(struct amdgpu_device *adev)
>  {
>         int r;
>
> -
> -       if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
> -               r = sdma_v2_4_load_microcode(adev);
> -               if (r)
> -                       return r;
> -       }
> -
>         /* halt the engine before programing */
>         sdma_v2_4_enable(adev, false);
>
> --
> 1.9.1
>
> _______________________________________________
> 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