[PATCH] drm/amdgpu: updated UMC error address record with correct channel index

Zhou1, Tao Tao.Zhou1 at amd.com
Tue Jan 7 09:08:46 UTC 2020


uint32_t channel_index = adev->umc.channel_idx_tbl[umc_inst * adev->umc.channel_inst_num + ch_inst];

The code is too long, it can be separated into two lines.

With that fixed, the patch is:

Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Clements, John <John.Clements at amd.com>
Sent: Tuesday, January 7, 2020 4:31 PM
To: Chen, Guchun <Guchun.Chen at amd.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Subject: RE: [PATCH] drm/amdgpu: updated UMC error address record with correct channel index


[AMD Public Use]



Hello GuChun/Tao,



Thank you for your feedback, I have implemented both of your changes.



Thank you,

John Clements



From: Chen, Guchun <Guchun.Chen at amd.com>
Sent: Tuesday, January 7, 2020 4:10 PM
To: Clements, John <John.Clements at amd.com>; amd-gfx at lists.freedesktop.org
Subject: RE: [PATCH] drm/amdgpu: updated UMC error address record with correct channel index



[AMD Public Use]



If we have to improve the macro definition for repetitive loops, I assume we can merge the two defines into one, like:



#define LOOP_UMC_CH_INST(umc_inst) for ((umc_inst) = 0; (umc_inst) < adev->umc.umc_inst##_num; (umc_inst)++)



Then when we call the double loop, it can be done like:

LOOP_UMC_CH_INST(umc_inst)

              LOOP_UMC_CH_INST(channel_inst) {…



Next we should name the macro more friendly.



Regards,

Guchun



From: Clements, John <John.Clements at amd.com<mailto:John.Clements at amd.com>>
Sent: Tuesday, January 7, 2020 3:28 PM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>; dl.srdc_lnx_ras <dl.srdc_lnx_ras at amd.com<mailto:dl.srdc_lnx_ras at amd.com>>
Subject: [PATCH] drm/amdgpu: updated UMC error address record with correct channel index



[AMD Official Use Only - Internal Distribution Only]



Resolved issue with inputting an incorrect UMC channel index into the UMC error address record.



Defined macros for repetitive for loops



Thank you,

John Clements
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200107/28080845/attachment.htm>


More information about the amd-gfx mailing list