[PATCH 05/13] drm/xe/sa: Improve error message on init failure
Matthew Brost
matthew.brost at intel.com
Thu Dec 12 03:10:42 UTC 2024
On Thu, Dec 12, 2024 at 02:01:33AM +0100, Michal Wajdeczko wrote:
> Instead of raw errno value we can print friendly error code and
> also print size of the buffer object that we fail to prepare.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
> ---
> drivers/gpu/drm/xe/xe_sa.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sa.c b/drivers/gpu/drm/xe/xe_sa.c
> index b990bd8a49fd..94d22371af84 100644
> --- a/drivers/gpu/drm/xe/xe_sa.c
> +++ b/drivers/gpu/drm/xe/xe_sa.c
> @@ -50,8 +50,8 @@ struct xe_sa_manager *xe_sa_bo_manager_init(struct xe_tile *tile, u32 size, u32
> XE_BO_FLAG_GGTT |
> XE_BO_FLAG_GGTT_INVALIDATE);
> if (IS_ERR(bo)) {
> - drm_err(&xe->drm, "failed to allocate bo for sa manager: %ld\n",
> - PTR_ERR(bo));
> + drm_err(&xe->drm, "Failed to prepare %uKiB BO for SA manager (%pe)\n",
> + size / SZ_1K, bo);
> return ERR_CAST(bo);
> }
> sa_manager->bo = bo;
> --
> 2.47.1
>
More information about the Intel-xe
mailing list