drm/xe: Don't raise error on fused-off media
authorMatt Roper <matthew.d.roper@intel.com>
Wed, 14 Jun 2023 20:52:00 +0000 (13:52 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:35:06 +0000 (11:35 -0500)
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 <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20230614205202.3376752-3-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_pci.c

index 5c0c2e9b901eb97e751ab0d8334b7fe8ce8a2181..749826548b4a9bdb76d8668a64db343ad382df72 100644 (file)
@@ -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;