accel/ivpu: Add information about context on failure
authorStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Fri, 1 Sep 2023 09:49:50 +0000 (11:49 +0200)
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Mon, 4 Sep 2023 09:01:26 +0000 (11:01 +0200)
Identify the mmu context that failed to initialize in the error messages.
This allows the error to be correlated with a specific user during debug.

Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901094957.168898-5-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_mmu_context.c

index 8914e34fb54f79da15291fa9ecc5842961fbcef7..5b48983c7cf823b214091dc3f7386b21540cd013 100644 (file)
@@ -490,13 +490,13 @@ int ivpu_mmu_user_context_init(struct ivpu_device *vdev, struct ivpu_mmu_context
 
        ret = ivpu_mmu_context_init(vdev, ctx, ctx_id);
        if (ret) {
-               ivpu_err(vdev, "Failed to initialize context: %d\n", ret);
+               ivpu_err(vdev, "Failed to initialize context %u: %d\n", ctx_id, ret);
                return ret;
        }
 
        ret = ivpu_mmu_set_pgtable(vdev, ctx_id, &ctx->pgtable);
        if (ret) {
-               ivpu_err(vdev, "Failed to set page table: %d\n", ret);
+               ivpu_err(vdev, "Failed to set page table for context %u: %d\n", ctx_id, ret);
                goto err_context_fini;
        }