accel/ivpu: Print information about used workarounds
authorStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Fri, 1 Sep 2023 09:49:51 +0000 (11:49 +0200)
committerStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Mon, 4 Sep 2023 14:21:03 +0000 (16:21 +0200)
Use ivpu_dbg(MISC) to print information about workarounds.

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-6-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_drv.h
drivers/accel/ivpu/ivpu_hw_37xx.c
drivers/accel/ivpu/ivpu_hw_40xx.c

index 57381dacd21c417c5351c97856a6b44883477d66..12a63f8a73e8ab598ca3f3030fae1e0db5d59b54 100644 (file)
 
 #define IVPU_WA(wa_name) (vdev->wa.wa_name)
 
+#define IVPU_PRINT_WA(wa_name) do {                                    \
+       if (IVPU_WA(wa_name))                                           \
+               ivpu_dbg(vdev, MISC, "Using WA: " #wa_name "\n");       \
+} while (0)
+
 struct ivpu_wa_table {
        bool punit_disabled;
        bool clear_runtime_mem;
index 712e2f76219228b51f94cfd4cd53a12478318aee..edd4d860f135e7a6b958ba5a5180214f698d1b11 100644 (file)
@@ -104,6 +104,11 @@ static void ivpu_hw_wa_init(struct ivpu_device *vdev)
 
        if (ivpu_device_id(vdev) == PCI_DEVICE_ID_MTL && ivpu_revision(vdev) < 4)
                vdev->wa.interrupt_clear_with_0 = true;
+
+       IVPU_PRINT_WA(punit_disabled);
+       IVPU_PRINT_WA(clear_runtime_mem);
+       IVPU_PRINT_WA(d3hot_after_power_off);
+       IVPU_PRINT_WA(interrupt_clear_with_0);
 }
 
 static void ivpu_hw_timeouts_init(struct ivpu_device *vdev)
index 09ba07443396c45db970a8d07884cc9b31e4ec9d..1c25285496358ed33d0371ab46364aab6c980500 100644 (file)
@@ -126,6 +126,10 @@ static void ivpu_hw_wa_init(struct ivpu_device *vdev)
 
        if (ivpu_hw_gen(vdev) == IVPU_HW_40XX)
                vdev->wa.disable_clock_relinquish = true;
+
+       IVPU_PRINT_WA(punit_disabled);
+       IVPU_PRINT_WA(clear_runtime_mem);
+       IVPU_PRINT_WA(disable_clock_relinquish);
 }
 
 static void ivpu_hw_timeouts_init(struct ivpu_device *vdev)