* [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
@ 2020-04-06 15:52 Kent Russell
2020-04-07 12:22 ` Russell, Kent
2020-04-07 13:21 ` Deucher, Alexander
0 siblings, 2 replies; 6+ messages in thread
From: Kent Russell @ 2020-04-06 15:52 UTC (permalink / raw)
To: amd-gfx; +Cc: Kent Russell
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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
2020-04-06 15:52 [PATCH] drm/amdgpu: Re-enable FRU check for most models v4 Kent Russell
@ 2020-04-07 12:22 ` Russell, Kent
2020-04-07 13:21 ` Deucher, Alexander
1 sibling, 0 replies; 6+ messages in thread
From: Russell, Kent @ 2020-04-07 12:22 UTC (permalink / raw)
To: amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Sorry for the double-send, this was the right one to send out.
Kent
> -----Original Message-----
> From: Russell, Kent <Kent.Russell@amd.com>
> Sent: Monday, April 6, 2020 11:53 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Russell, Kent <Kent.Russell@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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
2020-04-06 15:52 [PATCH] drm/amdgpu: Re-enable FRU check for most models v4 Kent Russell
2020-04-07 12:22 ` Russell, Kent
@ 2020-04-07 13:21 ` Deucher, Alexander
2020-04-07 14:52 ` Rodrigo Siqueira
1 sibling, 1 reply; 6+ messages in thread
From: Deucher, Alexander @ 2020-04-07 13:21 UTC (permalink / raw)
To: Russell, Kent, amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2692 bytes --]
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Kent Russell <kent.russell@amd.com>
Sent: Monday, April 6, 2020 11:52 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Russell, Kent <Kent.Russell@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@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@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7Cb16b12f4b49f4daadbf108d7da4296b5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637217851859649973&sdata=RRTElSye1BxML4zCiSA1u%2Be6z4NvcgZrI8hPvVXhJTk%3D&reserved=0
[-- Attachment #1.2: Type: text/html, Size: 4911 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
2020-04-07 13:21 ` Deucher, Alexander
@ 2020-04-07 14:52 ` Rodrigo Siqueira
0 siblings, 0 replies; 6+ messages in thread
From: Rodrigo Siqueira @ 2020-04-07 14:52 UTC (permalink / raw)
To: Deucher, Alexander; +Cc: Russell, Kent, amd-gfx
[-- Attachment #1.1: Type: text/plain, Size: 4266 bytes --]
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@amd.com>
> ________________________________
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Kent Russell <kent.russell@amd.com>
> Sent: Monday, April 6, 2020 11:52 AM
> To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
> Cc: Russell, Kent <Kent.Russell@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@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@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@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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
2020-04-06 15:51 Kent Russell
@ 2020-04-06 15:53 ` Russell, Kent
0 siblings, 0 replies; 6+ messages in thread
From: Russell, Kent @ 2020-04-06 15:53 UTC (permalink / raw)
To: amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Ignore this one, needed to update the commit
Kent
> -----Original Message-----
> From: Russell, Kent <Kent.Russell@amd.com>
> Sent: Monday, April 6, 2020 11:51 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Russell, Kent <Kent.Russell@amd.com>
> Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
>
> There is 1 VG20 DID that does not have the FRU on there, and trying to read
> that will cause a hang. For now, check for the gaming DID until a proper fix can
> be implemented. 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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
@ 2020-04-06 15:51 Kent Russell
2020-04-06 15:53 ` Russell, Kent
0 siblings, 1 reply; 6+ messages in thread
From: Kent Russell @ 2020-04-06 15:51 UTC (permalink / raw)
To: amd-gfx; +Cc: Kent Russell
There is 1 VG20 DID that does not have the FRU on there, and trying to read
that will cause a hang. For now, check for the gaming DID until a proper
fix can be implemented. 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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-07 14:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 15:52 [PATCH] drm/amdgpu: Re-enable FRU check for most models v4 Kent Russell
2020-04-07 12:22 ` Russell, Kent
2020-04-07 13:21 ` Deucher, Alexander
2020-04-07 14:52 ` Rodrigo Siqueira
-- strict thread matches above, loose matches on Subject: below --
2020-04-06 15:51 Kent Russell
2020-04-06 15:53 ` Russell, Kent
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.