[bug report] drm/xe/display: Implement display support
Dan Carpenter
dan.carpenter at linaro.org
Fri Jan 5 12:21:00 UTC 2024
Hello Maarten Lankhorst,
The patch 44e694958b95: "drm/xe/display: Implement display support"
from Aug 17, 2023 (linux-next), leads to the following Smatch static
checker warning:
drivers/gpu/drm/xe/xe_bo.c:1414 __xe_bo_create_locked()
error: we previously assumed 'tile' could be null (see line 1408)
drivers/gpu/drm/xe/xe_bo.c
1404 xe_vm_get(vm);
1405 bo->vm = vm;
1406
1407 if (bo->flags & XE_BO_CREATE_GGTT_BIT) {
1408 if (!tile && flags & XE_BO_CREATE_STOLEN_BIT)
1409 tile = xe_device_get_root_tile(xe);
Let's assume tile is NULL and XE_BO_CREATE_STOLEN_BIT is not set.
1410
1411 xe_assert(xe, tile);
1412
1413 if (flags & XE_BO_FIXED_PLACEMENT_BIT) {
--> 1414 err = xe_ggtt_insert_bo_at(tile->mem.ggtt, bo,
^^^^^^^^^^^^^^
1415 start + bo->size, U64_MAX);
1416 } else {
1417 err = xe_ggtt_insert_bo(tile->mem.ggtt, bo);
^^^^^^^^^^^^^^
Then we will crash.
1418 }
1419 if (err)
1420 goto err_unlock_put_bo;
1421 }
1422
1423 return bo;
1424
regards,
dan carpenter
More information about the Intel-xe
mailing list