[PATCH] drm/amdgpu: Re-enable FRU check for most models v4
Rodrigo Siqueira
Rodrigo.Siqueira at amd.com
Tue Apr 7 14:52:45 UTC 2020
Hi,
After applying this patch I have seen the following error:
In file included from ./include/linux/uuid.h:12,
from ./include/linux/mod_devicetable.h:13,
from ./include/linux/pci.h:27,
from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23:
In function ‘memcpy’,
inlined from ‘amdgpu_fru_get_product_info’ at drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:137:2:
./include/linux/string.h:376:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter
376 | __read_overflow2();
| ^~~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:266: drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Did I miss something?
P.s: I'm using gcc 9.3.0 (Arch Linux 9.3.0-1)
Best Regards
On 04/07, Deucher, Alexander wrote:
> [AMD Official Use Only - Internal Distribution Only]
>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ________________________________
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Kent Russell <kent.russell at amd.com>
> Sent: Monday, April 6, 2020 11:52 AM
> To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
> Cc: Russell, Kent <Kent.Russell at amd.com>
> Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
>
> There is at least 1 VG20 DID that does not have an FRU, and trying to read
> that will cause a hang. For now, explicitly support reading the FRU for
> Arcturus and for the WKS VG20 DIDs, and skip for everything else.
> This re-enables serial number reporting for server cards
>
> v2: Add ASIC check
> v3: Don't default to true for pre-VG20
> v4: Use DID instead of parsing the VBIOS
>
> Signed-off-by: Kent Russell <kent.russell at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> index bfe4259f9508..9d17761721de 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> @@ -20,6 +20,8 @@
> * OTHER DEALINGS IN THE SOFTWARE.
> *
> */
> +#include <linux/pci.h>
> +
> #include "amdgpu.h"
> #include "amdgpu_i2c.h"
> #include "smu_v11_0_i2c.h"
> @@ -31,8 +33,16 @@
>
> bool is_fru_eeprom_supported(struct amdgpu_device *adev)
> {
> - /* TODO: Resolve supported ASIC type */
> -
> + /* TODO: Gaming SKUs don't have the FRU EEPROM.
> + * Use this hack to address hangs on modprobe on gaming SKUs
> + * until a proper solution can be implemented by only supporting
> + * it on Arcturus, and the explicit chip IDs for VG20 Server cards
> + */
> + if ((adev->asic_type == CHIP_ARCTURUS) ||
> + (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a0) ||
> + (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a1) ||
> + (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a4))
> + return true;
> return false;
> }
>
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C94ab725894bf4069999508d7daf6a1a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637218625208800660&sdata=EMsjck3eT5RA19qGVLjoFVaX25zgPq8axwUxSR4HyOY%3D&reserved=0
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C94ab725894bf4069999508d7daf6a1a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637218625208840485&sdata=9ZL1XLDOi2qBIMV8obDmCIB1G6PKi%2FXegRfFDZtfMfA%3D&reserved=0
--
Rodrigo Siqueira
https://siqueira.tech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200407/a92e83cb/attachment.sig>
More information about the amd-gfx
mailing list