ivpu_hw.c (92815da4576a495cb6362cdfb132152fccc2222d) | ivpu_hw.c (d9dfc4eaa3c6bfbd072980a265edbaffbea4db4a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2020 - 2024 Intel Corporation 4 */ 5 6#include "ivpu_drv.h" 7#include "ivpu_hw.h" 8#include "ivpu_hw_btrs.h" --- 50 unchanged lines hidden (view full) --- 59 vdev->wa.clear_runtime_mem = false; 60 61 if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL) 62 vdev->wa.interrupt_clear_with_0 = ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev); 63 64 if (ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL) 65 vdev->wa.disable_clock_relinquish = true; 66 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2020 - 2024 Intel Corporation 4 */ 5 6#include "ivpu_drv.h" 7#include "ivpu_hw.h" 8#include "ivpu_hw_btrs.h" --- 50 unchanged lines hidden (view full) --- 59 vdev->wa.clear_runtime_mem = false; 60 61 if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL) 62 vdev->wa.interrupt_clear_with_0 = ivpu_hw_btrs_irqs_clear_with_0_mtl(vdev); 63 64 if (ivpu_device_id(vdev) == PCI_DEVICE_ID_LNL) 65 vdev->wa.disable_clock_relinquish = true; 66 |
67 if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) 68 vdev->wa.wp0_during_power_up = true; 69 |
|
67 IVPU_PRINT_WA(punit_disabled); 68 IVPU_PRINT_WA(clear_runtime_mem); 69 IVPU_PRINT_WA(interrupt_clear_with_0); 70 IVPU_PRINT_WA(disable_clock_relinquish); | 70 IVPU_PRINT_WA(punit_disabled); 71 IVPU_PRINT_WA(clear_runtime_mem); 72 IVPU_PRINT_WA(interrupt_clear_with_0); 73 IVPU_PRINT_WA(disable_clock_relinquish); |
74 IVPU_PRINT_WA(wp0_during_power_up); |
|
71} 72 73static void timeouts_init(struct ivpu_device *vdev) 74{ 75 if (ivpu_is_fpga(vdev)) { 76 vdev->timeout.boot = 100000; 77 vdev->timeout.jsm = 50000; 78 vdev->timeout.tdr = 2000000; --- 41 unchanged lines hidden (view full) --- 120{ 121 return ivpu_hw_btrs_wp_drive(vdev, false); 122} 123 124int ivpu_hw_power_up(struct ivpu_device *vdev) 125{ 126 int ret; 127 | 75} 76 77static void timeouts_init(struct ivpu_device *vdev) 78{ 79 if (ivpu_is_fpga(vdev)) { 80 vdev->timeout.boot = 100000; 81 vdev->timeout.jsm = 50000; 82 vdev->timeout.tdr = 2000000; --- 41 unchanged lines hidden (view full) --- 124{ 125 return ivpu_hw_btrs_wp_drive(vdev, false); 126} 127 128int ivpu_hw_power_up(struct ivpu_device *vdev) 129{ 130 int ret; 131 |
132 if (IVPU_WA(wp0_during_power_up)) { 133 /* WP requests may fail when powering down, so issue WP 0 here */ 134 ret = wp_disable(vdev); 135 if (ret) 136 ivpu_warn(vdev, "Failed to disable workpoint: %d\n", ret); 137 } 138 |
|
128 ret = ivpu_hw_btrs_d0i3_disable(vdev); 129 if (ret) 130 ivpu_warn(vdev, "Failed to disable D0I3: %d\n", ret); 131 132 ret = wp_enable(vdev); 133 if (ret) { 134 ivpu_err(vdev, "Failed to enable workpoint: %d\n", ret); 135 return ret; --- 178 unchanged lines hidden --- | 139 ret = ivpu_hw_btrs_d0i3_disable(vdev); 140 if (ret) 141 ivpu_warn(vdev, "Failed to disable D0I3: %d\n", ret); 142 143 ret = wp_enable(vdev); 144 if (ret) { 145 ivpu_err(vdev, "Failed to enable workpoint: %d\n", ret); 146 return ret; --- 178 unchanged lines hidden --- |