From: Matt Roper Date: Wed, 14 Jun 2023 20:52:00 +0000 (-0700) Subject: drm/xe: Don't raise error on fused-off media X-Git-Tag: v6.8-rc1~21^2~13^2~573 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=54c5b74a06939bec61aa59421aa1073c0b666c2c;p=linux-block.git drm/xe: Don't raise error on fused-off media It's legitimate for the media GMD_ID register to read back as 0x0 if media functionality is fused off or otherwise not present on the platform. Avoid printing an "unknown media version" error message for this case. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230614205202.3376752-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 5c0c2e9b901e..749826548b4a 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -447,6 +447,10 @@ static void handle_gmdid(struct xe_device *xe, peek_gmdid(xe, GMD_ID.addr + 0x380000, &ver, media_revid); + /* Media may legitimately be fused off / not present */ + if (ver == 0) + return; + for (int i = 0; i < ARRAY_SIZE(media_ip_map); i++) { if (ver == media_ip_map[i].ver) { xe->info.media_verx100 = ver;