[PATCH] drm/amd/display: Load TA firmware for navi10/12/14

Harry Wentland hwentlan at amd.com
Thu Nov 28 20:23:12 UTC 2019



On 2019-11-28 3:20 p.m., Bhawanpreet Lakha wrote:
> Hey Harry can you please take a look thanks
> 
> On 2019-11-08 5:01 p.m., Deucher, Alexander wrote:
>> Acked-by: Alex Deucher <alexander.deucher at amd.com>
>> ------------------------------------------------------------------------
>> *From:* amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of
>> Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
>> *Sent:* Friday, November 8, 2019 4:57 PM
>> *To:* amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
>> *Cc:* Lakha, Bhawanpreet <Bhawanpreet.Lakha at amd.com>
>> *Subject:* [PATCH] drm/amd/display: Load TA firmware for navi10/12/14
>>  
>> load the ta firmware for navi10/12/14.
>> This is already being done for raven/picasso and
>> is needed for supporting hdcp on navi
>>
>> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>

Reviewed-by: Harry Wentland <harry.wentland at amd.com>

Harry

>> ---
>>  drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 25 +++++++++++++++++++++++++
>>  1 file changed, 25 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> index ffeaa2f5588d..daf11be5416f 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> @@ -186,6 +186,31 @@ static int psp_v11_0_init_microcode(struct
>> psp_context *psp)
>>          case CHIP_NAVI10:
>>          case CHIP_NAVI14:
>>          case CHIP_NAVI12:
>> +               snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin",
>> chip_name);
>> +               err = request_firmware(&adev->psp.ta_fw, fw_name,
>> adev->dev);
>> +               if (err) {
>> +                       release_firmware(adev->psp.ta_fw);
>> +                       adev->psp.ta_fw = NULL;
>> +                       dev_info(adev->dev,
>> +                                "psp v11.0: Failed to load firmware
>> \"%s\"\n", fw_name);
>> +               } else {
>> +                       err = amdgpu_ucode_validate(adev->psp.ta_fw);
>> +                       if (err)
>> +                               goto out2;
>> +
>> +                       ta_hdr = (const struct ta_firmware_header_v1_0
>> *)adev->psp.ta_fw->data;
>> +                       adev->psp.ta_hdcp_ucode_version =
>> le32_to_cpu(ta_hdr->ta_hdcp_ucode_version);
>> +                       adev->psp.ta_hdcp_ucode_size =
>> le32_to_cpu(ta_hdr->ta_hdcp_size_bytes);
>> +                       adev->psp.ta_hdcp_start_addr = (uint8_t *)ta_hdr +
>> +                              
>> le32_to_cpu(ta_hdr->header.ucode_array_offset_bytes);
>> +
>> +                       adev->psp.ta_fw_version =
>> le32_to_cpu(ta_hdr->header.ucode_version);
>> +
>> +                       adev->psp.ta_dtm_ucode_version =
>> le32_to_cpu(ta_hdr->ta_dtm_ucode_version);
>> +                       adev->psp.ta_dtm_ucode_size =
>> le32_to_cpu(ta_hdr->ta_dtm_size_bytes);
>> +                       adev->psp.ta_dtm_start_addr = (uint8_t
>> *)adev->psp.ta_hdcp_start_addr +
>> +                               le32_to_cpu(ta_hdr->ta_dtm_offset_bytes);
>> +               }
>>                  break;
>>          default:
>>                  BUG();
>> -- 
>> 2.17.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