.. | .. |
---|
26 | 26 | */ |
---|
27 | 27 | |
---|
28 | 28 | #include <linux/firmware.h> |
---|
29 | | -#include <drm/drmP.h> |
---|
| 29 | + |
---|
30 | 30 | #include "amdgpu.h" |
---|
31 | 31 | #include "amdgpu_vce.h" |
---|
32 | 32 | #include "cikd.h" |
---|
.. | .. |
---|
283 | 283 | } |
---|
284 | 284 | |
---|
285 | 285 | if (vce_v2_0_wait_for_idle(adev)) { |
---|
286 | | - DRM_INFO("VCE is busy, Can't set clock gateing"); |
---|
| 286 | + DRM_INFO("VCE is busy, Can't set clock gating"); |
---|
287 | 287 | return 0; |
---|
288 | 288 | } |
---|
289 | 289 | |
---|
.. | .. |
---|
417 | 417 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
---|
418 | 418 | |
---|
419 | 419 | /* VCE */ |
---|
420 | | - r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_LEGACY, 167, &adev->vce.irq); |
---|
| 420 | + r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 167, &adev->vce.irq); |
---|
421 | 421 | if (r) |
---|
422 | 422 | return r; |
---|
423 | 423 | |
---|
.. | .. |
---|
434 | 434 | ring = &adev->vce.ring[i]; |
---|
435 | 435 | sprintf(ring->name, "vce%d", i); |
---|
436 | 436 | r = amdgpu_ring_init(adev, ring, 512, |
---|
437 | | - &adev->vce.irq, 0); |
---|
| 437 | + &adev->vce.irq, 0, |
---|
| 438 | + AMDGPU_RING_PRIO_DEFAULT); |
---|
438 | 439 | if (r) |
---|
439 | 440 | return r; |
---|
440 | 441 | } |
---|
.. | .. |
---|
463 | 464 | |
---|
464 | 465 | amdgpu_asic_set_vce_clocks(adev, 10000, 10000); |
---|
465 | 466 | vce_v2_0_enable_mgcg(adev, true, false); |
---|
466 | | - for (i = 0; i < adev->vce.num_rings; i++) |
---|
467 | | - adev->vce.ring[i].ready = false; |
---|
468 | 467 | |
---|
469 | 468 | for (i = 0; i < adev->vce.num_rings; i++) { |
---|
470 | | - r = amdgpu_ring_test_ring(&adev->vce.ring[i]); |
---|
| 469 | + r = amdgpu_ring_test_helper(&adev->vce.ring[i]); |
---|
471 | 470 | if (r) |
---|
472 | 471 | return r; |
---|
473 | | - else |
---|
474 | | - adev->vce.ring[i].ready = true; |
---|
475 | 472 | } |
---|
476 | 473 | |
---|
477 | 474 | DRM_INFO("VCE initialized successfully.\n"); |
---|
.. | .. |
---|
609 | 606 | .align_mask = 0xf, |
---|
610 | 607 | .nop = VCE_CMD_NO_OP, |
---|
611 | 608 | .support_64bit_ptrs = false, |
---|
| 609 | + .no_user_fence = true, |
---|
612 | 610 | .get_rptr = vce_v2_0_ring_get_rptr, |
---|
613 | 611 | .get_wptr = vce_v2_0_ring_get_wptr, |
---|
614 | 612 | .set_wptr = vce_v2_0_ring_set_wptr, |
---|