Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panfrost: Handle inexistent GPU during probe

Just in case we're dealing with a yet not recognised device.

Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/r/20251019145225.3621989-3-adrian.larumbe@collabora.com
Signed-off-by: Steven Price <steven.price@arm.com>

authored by

Adrián Larumbe and committed by
Steven Price
16dd7e03 5c0c825a

+13 -2
+13 -2
drivers/gpu/drm/panfrost/panfrost_gpu.c
··· 240 240 /* MediaTek MT8188 Mali-G57 MC3 */ 241 241 GPU_MODEL(g57, 0x9093, 242 242 GPU_REV(g57, 0, 0)), 243 + {0}, 243 244 }; 244 245 245 - static void panfrost_gpu_init_features(struct panfrost_device *pfdev) 246 + static int panfrost_gpu_init_features(struct panfrost_device *pfdev) 246 247 { 247 248 u32 gpu_id, num_js, major, minor, status, rev; 248 249 const char *name = "unknown"; ··· 328 327 break; 329 328 } 330 329 330 + if (!model->name) { 331 + dev_err(pfdev->base.dev, "GPU model not found: mali-%s id rev %#x %#x\n", 332 + name, gpu_id, rev); 333 + return -ENODEV; 334 + } 335 + 331 336 bitmap_from_u64(pfdev->features.hw_features, hw_feat); 332 337 bitmap_from_u64(pfdev->features.hw_issues, hw_issues); 333 338 ··· 354 347 355 348 dev_info(pfdev->base.dev, "shader_present=0x%0llx l2_present=0x%0llx", 356 349 pfdev->features.shader_present, pfdev->features.l2_present); 350 + 351 + return 0; 357 352 } 358 353 359 354 void panfrost_cycle_counter_get(struct panfrost_device *pfdev) ··· 498 489 if (err) 499 490 return err; 500 491 501 - panfrost_gpu_init_features(pfdev); 492 + err = panfrost_gpu_init_features(pfdev); 493 + if (err) 494 + return err; 502 495 503 496 err = dma_set_mask_and_coherent(pfdev->base.dev, 504 497 DMA_BIT_MASK(FIELD_GET(0xff00,