[PATCH] drm/amdgpu: align ip discovery naming with legacy ASICs

Huang, Ray Ray.Huang at amd.com
Tue Mar 8 09:56:10 UTC 2022


[AMD Official Use Only]

Acked-by: Huang Rui <ray.huang at amd.com>

-----Original Message-----
From: Zhang, Yifan <Yifan1.Zhang at amd.com> 
Sent: Tuesday, March 8, 2022 2:21 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Huang, Ray <Ray.Huang at amd.com>; Zhang, Yifan <Yifan1.Zhang at amd.com>
Subject: [PATCH] drm/amdgpu: align ip discovery naming with legacy ASICs

There some code assuming ASIC names are non-space character.
e.g.

runKfdTest() {
    if [ "$RUN_IN_DOCKER" == "true" ]; then

    for hsaNode in $hsaNodes; do
        nodeName=$(getNodeName $hsaNode)
        if [ "$PLATFORM" != "" ] && [ "$PLATFORM" != "$nodeName" ]; then
            echo "WARNING: Actual ASIC $nodeName treated as $PLATFORM"
            nodeName="$PLATFORM"
        fi

        getFilter $nodeName
}

 getFilter() {
    local platform=$1;
}

if launch run_kfdtest.sh on a ip discovery ASIC, platform in getFilter will be "ip"
instead of "ip discovery"

$ ./run_kfdtest.sh
Unsupported platform ip. Exiting

Replace whitespace with underscore to align the naming.

Signed-off-by: Yifan Zhang <yifan1.zhang at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7abdf5e3dc05..0a66f724a4eb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -123,7 +123,7 @@ const char *amdgpu_asic_name[] = {
 	"DIMGREY_CAVEFISH",
 	"BEIGE_GOBY",
 	"YELLOW_CARP",
-	"IP DISCOVERY",
+	"IP_DISCOVERY",
 	"LAST",
 };
 
-- 
2.25.1


More information about the amd-gfx mailing list