2 * Copyright 2016 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
25 #include "amdgpu_ih.h"
28 #include "oss/osssys_4_0_offset.h"
29 #include "oss/osssys_4_0_sh_mask.h"
31 #include "soc15_common.h"
32 #include "vega10_ih.h"
36 static void vega10_ih_set_interrupt_funcs(struct amdgpu_device
*adev
);
39 * vega10_ih_enable_interrupts - Enable the interrupt ring buffer
41 * @adev: amdgpu_device pointer
43 * Enable the interrupt ring buffer (VEGA10).
45 static void vega10_ih_enable_interrupts(struct amdgpu_device
*adev
)
47 u32 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL
);
49 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, RB_ENABLE
, 1);
50 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, ENABLE_INTR
, 1);
51 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL
, ih_rb_cntl
);
52 adev
->irq
.ih
.enabled
= true;
54 if (adev
->irq
.ih1
.ring_size
) {
55 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
);
56 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL_RING1
,
58 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
, ih_rb_cntl
);
59 adev
->irq
.ih1
.enabled
= true;
62 if (adev
->irq
.ih2
.ring_size
) {
63 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING2
);
64 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL_RING2
,
66 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING2
, ih_rb_cntl
);
67 adev
->irq
.ih2
.enabled
= true;
72 * vega10_ih_disable_interrupts - Disable the interrupt ring buffer
74 * @adev: amdgpu_device pointer
76 * Disable the interrupt ring buffer (VEGA10).
78 static void vega10_ih_disable_interrupts(struct amdgpu_device
*adev
)
80 u32 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL
);
82 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, RB_ENABLE
, 0);
83 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, ENABLE_INTR
, 0);
84 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL
, ih_rb_cntl
);
85 /* set rptr, wptr to 0 */
86 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR
, 0);
87 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR
, 0);
88 adev
->irq
.ih
.enabled
= false;
89 adev
->irq
.ih
.rptr
= 0;
91 if (adev
->irq
.ih1
.ring_size
) {
92 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
);
93 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL_RING1
,
95 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
, ih_rb_cntl
);
96 /* set rptr, wptr to 0 */
97 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR_RING1
, 0);
98 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR_RING1
, 0);
99 adev
->irq
.ih1
.enabled
= false;
100 adev
->irq
.ih1
.rptr
= 0;
103 if (adev
->irq
.ih2
.ring_size
) {
104 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING2
);
105 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL_RING2
,
107 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING2
, ih_rb_cntl
);
108 /* set rptr, wptr to 0 */
109 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR_RING2
, 0);
110 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR_RING2
, 0);
111 adev
->irq
.ih2
.enabled
= false;
112 adev
->irq
.ih2
.rptr
= 0;
116 static uint32_t vega10_ih_rb_cntl(struct amdgpu_ih_ring
*ih
, uint32_t ih_rb_cntl
)
118 int rb_bufsz
= order_base_2(ih
->ring_size
/ 4);
120 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
,
121 MC_SPACE
, ih
->use_bus_addr
? 1 : 4);
122 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
,
123 WPTR_OVERFLOW_CLEAR
, 1);
124 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
,
125 WPTR_OVERFLOW_ENABLE
, 1);
126 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, RB_SIZE
, rb_bufsz
);
127 /* Ring Buffer write pointer writeback. If enabled, IH_RB_WPTR register
128 * value is written to memory
130 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
,
131 WPTR_WRITEBACK_ENABLE
, 1);
132 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, MC_SNOOP
, 1);
133 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, MC_RO
, 0);
134 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, MC_VMID
, 0);
140 * vega10_ih_irq_init - init and enable the interrupt ring
142 * @adev: amdgpu_device pointer
144 * Allocate a ring buffer for the interrupt controller,
145 * enable the RLC, disable interrupts, enable the IH
146 * ring buffer and enable it (VI).
147 * Called at device load and reume.
148 * Returns 0 for success, errors for failure.
150 static int vega10_ih_irq_init(struct amdgpu_device
*adev
)
152 struct amdgpu_ih_ring
*ih
;
154 u32 ih_rb_cntl
, ih_doorbell_rtpr
;
158 vega10_ih_disable_interrupts(adev
);
160 adev
->nbio_funcs
->ih_control(adev
);
163 /* Ring Buffer base. [39:8] of 40-bit address of the beginning of the ring buffer*/
164 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_BASE
, ih
->gpu_addr
>> 8);
165 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_BASE_HI
, (ih
->gpu_addr
>> 40) & 0xff);
167 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL
);
168 ih_rb_cntl
= vega10_ih_rb_cntl(ih
, ih_rb_cntl
);
169 ih_rb_cntl
= REG_SET_FIELD(ih_rb_cntl
, IH_RB_CNTL
, RPTR_REARM
,
170 !!adev
->irq
.msi_enabled
);
171 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL
, ih_rb_cntl
);
173 /* set the writeback address whether it's enabled or not */
174 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR_ADDR_LO
,
175 lower_32_bits(ih
->wptr_addr
));
176 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR_ADDR_HI
,
177 upper_32_bits(ih
->wptr_addr
) & 0xFFFF);
179 /* set rptr, wptr to 0 */
180 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR
, 0);
181 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR
, 0);
183 ih_doorbell_rtpr
= RREG32_SOC15(OSSSYS
, 0, mmIH_DOORBELL_RPTR
);
184 if (adev
->irq
.ih
.use_doorbell
) {
185 ih_doorbell_rtpr
= REG_SET_FIELD(ih_doorbell_rtpr
,
186 IH_DOORBELL_RPTR
, OFFSET
,
187 adev
->irq
.ih
.doorbell_index
);
188 ih_doorbell_rtpr
= REG_SET_FIELD(ih_doorbell_rtpr
,
192 ih_doorbell_rtpr
= REG_SET_FIELD(ih_doorbell_rtpr
,
196 WREG32_SOC15(OSSSYS
, 0, mmIH_DOORBELL_RPTR
, ih_doorbell_rtpr
);
200 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_BASE_RING1
, ih
->gpu_addr
>> 8);
201 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_BASE_HI_RING1
,
202 (ih
->gpu_addr
>> 40) & 0xff);
204 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
);
205 ih_rb_cntl
= vega10_ih_rb_cntl(ih
, ih_rb_cntl
);
206 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
, ih_rb_cntl
);
208 /* set rptr, wptr to 0 */
209 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR_RING1
, 0);
210 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR_RING1
, 0);
215 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_BASE_RING2
, ih
->gpu_addr
>> 8);
216 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_BASE_HI_RING2
,
217 (ih
->gpu_addr
>> 40) & 0xff);
219 ih_rb_cntl
= RREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING1
);
220 ih_rb_cntl
= vega10_ih_rb_cntl(ih
, ih_rb_cntl
);
221 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_CNTL_RING2
, ih_rb_cntl
);
223 /* set rptr, wptr to 0 */
224 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR_RING2
, 0);
225 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_WPTR_RING2
, 0);
228 tmp
= RREG32_SOC15(OSSSYS
, 0, mmIH_STORM_CLIENT_LIST_CNTL
);
229 tmp
= REG_SET_FIELD(tmp
, IH_STORM_CLIENT_LIST_CNTL
,
230 CLIENT18_IS_STORM_CLIENT
, 1);
231 WREG32_SOC15(OSSSYS
, 0, mmIH_STORM_CLIENT_LIST_CNTL
, tmp
);
233 tmp
= RREG32_SOC15(OSSSYS
, 0, mmIH_INT_FLOOD_CNTL
);
234 tmp
= REG_SET_FIELD(tmp
, IH_INT_FLOOD_CNTL
, FLOOD_CNTL_ENABLE
, 1);
235 WREG32_SOC15(OSSSYS
, 0, mmIH_INT_FLOOD_CNTL
, tmp
);
237 pci_set_master(adev
->pdev
);
239 /* enable interrupts */
240 vega10_ih_enable_interrupts(adev
);
246 * vega10_ih_irq_disable - disable interrupts
248 * @adev: amdgpu_device pointer
250 * Disable interrupts on the hw (VEGA10).
252 static void vega10_ih_irq_disable(struct amdgpu_device
*adev
)
254 vega10_ih_disable_interrupts(adev
);
256 /* Wait and acknowledge irq */
261 * vega10_ih_get_wptr - get the IH ring buffer wptr
263 * @adev: amdgpu_device pointer
265 * Get the IH ring buffer wptr from either the register
266 * or the writeback memory buffer (VEGA10). Also check for
267 * ring buffer overflow and deal with it.
268 * Returns the value of the wptr.
270 static u32
vega10_ih_get_wptr(struct amdgpu_device
*adev
,
271 struct amdgpu_ih_ring
*ih
)
275 wptr
= le32_to_cpu(*ih
->wptr_cpu
);
277 if (!REG_GET_FIELD(wptr
, IH_RB_WPTR
, RB_OVERFLOW
))
280 /* Double check that the overflow wasn't already cleared. */
282 if (ih
== &adev
->irq
.ih
)
283 reg
= SOC15_REG_OFFSET(OSSSYS
, 0, mmIH_RB_WPTR
);
284 else if (ih
== &adev
->irq
.ih1
)
285 reg
= SOC15_REG_OFFSET(OSSSYS
, 0, mmIH_RB_WPTR_RING1
);
286 else if (ih
== &adev
->irq
.ih2
)
287 reg
= SOC15_REG_OFFSET(OSSSYS
, 0, mmIH_RB_WPTR_RING2
);
291 wptr
= RREG32_NO_KIQ(reg
);
292 if (!REG_GET_FIELD(wptr
, IH_RB_WPTR
, RB_OVERFLOW
))
295 wptr
= REG_SET_FIELD(wptr
, IH_RB_WPTR
, RB_OVERFLOW
, 0);
297 /* When a ring buffer overflow happen start parsing interrupt
298 * from the last not overwritten vector (wptr + 32). Hopefully
299 * this should allow us to catchup.
301 tmp
= (wptr
+ 32) & ih
->ptr_mask
;
302 dev_warn(adev
->dev
, "IH ring buffer overflow "
303 "(0x%08X, 0x%08X, 0x%08X)\n",
304 wptr
, ih
->rptr
, tmp
);
307 if (ih
== &adev
->irq
.ih
)
308 reg
= SOC15_REG_OFFSET(OSSSYS
, 0, mmIH_RB_CNTL
);
309 else if (ih
== &adev
->irq
.ih1
)
310 reg
= SOC15_REG_OFFSET(OSSSYS
, 0, mmIH_RB_CNTL_RING1
);
311 else if (ih
== &adev
->irq
.ih2
)
312 reg
= SOC15_REG_OFFSET(OSSSYS
, 0, mmIH_RB_CNTL_RING2
);
316 tmp
= RREG32_NO_KIQ(reg
);
317 tmp
= REG_SET_FIELD(tmp
, IH_RB_CNTL
, WPTR_OVERFLOW_CLEAR
, 1);
318 WREG32_NO_KIQ(reg
, tmp
);
321 return (wptr
& ih
->ptr_mask
);
325 * vega10_ih_decode_iv - decode an interrupt vector
327 * @adev: amdgpu_device pointer
329 * Decodes the interrupt vector at the current rptr
330 * position and also advance the position.
332 static void vega10_ih_decode_iv(struct amdgpu_device
*adev
,
333 struct amdgpu_ih_ring
*ih
,
334 struct amdgpu_iv_entry
*entry
)
336 /* wptr/rptr are in bytes! */
337 u32 ring_index
= ih
->rptr
>> 2;
340 dw
[0] = le32_to_cpu(ih
->ring
[ring_index
+ 0]);
341 dw
[1] = le32_to_cpu(ih
->ring
[ring_index
+ 1]);
342 dw
[2] = le32_to_cpu(ih
->ring
[ring_index
+ 2]);
343 dw
[3] = le32_to_cpu(ih
->ring
[ring_index
+ 3]);
344 dw
[4] = le32_to_cpu(ih
->ring
[ring_index
+ 4]);
345 dw
[5] = le32_to_cpu(ih
->ring
[ring_index
+ 5]);
346 dw
[6] = le32_to_cpu(ih
->ring
[ring_index
+ 6]);
347 dw
[7] = le32_to_cpu(ih
->ring
[ring_index
+ 7]);
349 entry
->client_id
= dw
[0] & 0xff;
350 entry
->src_id
= (dw
[0] >> 8) & 0xff;
351 entry
->ring_id
= (dw
[0] >> 16) & 0xff;
352 entry
->vmid
= (dw
[0] >> 24) & 0xf;
353 entry
->vmid_src
= (dw
[0] >> 31);
354 entry
->timestamp
= dw
[1] | ((u64
)(dw
[2] & 0xffff) << 32);
355 entry
->timestamp_src
= dw
[2] >> 31;
356 entry
->pasid
= dw
[3] & 0xffff;
357 entry
->pasid_src
= dw
[3] >> 31;
358 entry
->src_data
[0] = dw
[4];
359 entry
->src_data
[1] = dw
[5];
360 entry
->src_data
[2] = dw
[6];
361 entry
->src_data
[3] = dw
[7];
363 /* wptr/rptr are in bytes! */
368 * vega10_ih_set_rptr - set the IH ring buffer rptr
370 * @adev: amdgpu_device pointer
372 * Set the IH ring buffer rptr.
374 static void vega10_ih_set_rptr(struct amdgpu_device
*adev
,
375 struct amdgpu_ih_ring
*ih
)
377 if (ih
->use_doorbell
) {
378 /* XXX check if swapping is necessary on BE */
379 *ih
->rptr_cpu
= ih
->rptr
;
380 WDOORBELL32(ih
->doorbell_index
, ih
->rptr
);
381 } else if (ih
== &adev
->irq
.ih
) {
382 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR
, ih
->rptr
);
383 } else if (ih
== &adev
->irq
.ih1
) {
384 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR_RING1
, ih
->rptr
);
385 } else if (ih
== &adev
->irq
.ih2
) {
386 WREG32_SOC15(OSSSYS
, 0, mmIH_RB_RPTR_RING2
, ih
->rptr
);
391 * vega10_ih_self_irq - dispatch work for ring 1 and 2
393 * @adev: amdgpu_device pointer
394 * @source: irq source
395 * @entry: IV with WPTR update
397 * Update the WPTR from the IV and schedule work to handle the entries.
399 static int vega10_ih_self_irq(struct amdgpu_device
*adev
,
400 struct amdgpu_irq_src
*source
,
401 struct amdgpu_iv_entry
*entry
)
403 uint32_t wptr
= cpu_to_le32(entry
->src_data
[0]);
405 switch (entry
->ring_id
) {
407 *adev
->irq
.ih1
.wptr_cpu
= wptr
;
408 schedule_work(&adev
->irq
.ih1_work
);
411 *adev
->irq
.ih2
.wptr_cpu
= wptr
;
412 schedule_work(&adev
->irq
.ih2_work
);
419 static const struct amdgpu_irq_src_funcs vega10_ih_self_irq_funcs
= {
420 .process
= vega10_ih_self_irq
,
423 static void vega10_ih_set_self_irq_funcs(struct amdgpu_device
*adev
)
425 adev
->irq
.self_irq
.num_types
= 0;
426 adev
->irq
.self_irq
.funcs
= &vega10_ih_self_irq_funcs
;
429 static int vega10_ih_early_init(void *handle
)
431 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
433 vega10_ih_set_interrupt_funcs(adev
);
434 vega10_ih_set_self_irq_funcs(adev
);
438 static int vega10_ih_sw_init(void *handle
)
440 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
443 r
= amdgpu_irq_add_id(adev
, SOC15_IH_CLIENTID_IH
, 0,
444 &adev
->irq
.self_irq
);
448 r
= amdgpu_ih_ring_init(adev
, &adev
->irq
.ih
, 256 * 1024, true);
452 if (adev
->asic_type
== CHIP_VEGA10
) {
453 r
= amdgpu_ih_ring_init(adev
, &adev
->irq
.ih1
, PAGE_SIZE
, true);
457 r
= amdgpu_ih_ring_init(adev
, &adev
->irq
.ih2
, PAGE_SIZE
, true);
462 /* TODO add doorbell for IH1 & IH2 as well */
463 adev
->irq
.ih
.use_doorbell
= true;
464 adev
->irq
.ih
.doorbell_index
= adev
->doorbell_index
.ih
<< 1;
466 r
= amdgpu_irq_init(adev
);
471 static int vega10_ih_sw_fini(void *handle
)
473 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
475 amdgpu_irq_fini(adev
);
476 amdgpu_ih_ring_fini(adev
, &adev
->irq
.ih2
);
477 amdgpu_ih_ring_fini(adev
, &adev
->irq
.ih1
);
478 amdgpu_ih_ring_fini(adev
, &adev
->irq
.ih
);
483 static int vega10_ih_hw_init(void *handle
)
486 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
488 r
= vega10_ih_irq_init(adev
);
495 static int vega10_ih_hw_fini(void *handle
)
497 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
499 vega10_ih_irq_disable(adev
);
504 static int vega10_ih_suspend(void *handle
)
506 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
508 return vega10_ih_hw_fini(adev
);
511 static int vega10_ih_resume(void *handle
)
513 struct amdgpu_device
*adev
= (struct amdgpu_device
*)handle
;
515 return vega10_ih_hw_init(adev
);
518 static bool vega10_ih_is_idle(void *handle
)
524 static int vega10_ih_wait_for_idle(void *handle
)
530 static int vega10_ih_soft_reset(void *handle
)
537 static int vega10_ih_set_clockgating_state(void *handle
,
538 enum amd_clockgating_state state
)
543 static int vega10_ih_set_powergating_state(void *handle
,
544 enum amd_powergating_state state
)
549 const struct amd_ip_funcs vega10_ih_ip_funcs
= {
551 .early_init
= vega10_ih_early_init
,
553 .sw_init
= vega10_ih_sw_init
,
554 .sw_fini
= vega10_ih_sw_fini
,
555 .hw_init
= vega10_ih_hw_init
,
556 .hw_fini
= vega10_ih_hw_fini
,
557 .suspend
= vega10_ih_suspend
,
558 .resume
= vega10_ih_resume
,
559 .is_idle
= vega10_ih_is_idle
,
560 .wait_for_idle
= vega10_ih_wait_for_idle
,
561 .soft_reset
= vega10_ih_soft_reset
,
562 .set_clockgating_state
= vega10_ih_set_clockgating_state
,
563 .set_powergating_state
= vega10_ih_set_powergating_state
,
566 static const struct amdgpu_ih_funcs vega10_ih_funcs
= {
567 .get_wptr
= vega10_ih_get_wptr
,
568 .decode_iv
= vega10_ih_decode_iv
,
569 .set_rptr
= vega10_ih_set_rptr
572 static void vega10_ih_set_interrupt_funcs(struct amdgpu_device
*adev
)
574 adev
->irq
.ih_funcs
= &vega10_ih_funcs
;
577 const struct amdgpu_ip_block_version vega10_ih_ip_block
=
579 .type
= AMD_IP_BLOCK_TYPE_IH
,
583 .funcs
= &vega10_ih_ip_funcs
,