Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: add vcn irq functions

Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Leo Liu and committed by
Alex Deucher
a319f444 cca69fe8

+32
+32
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
··· 38 38 static int vcn_v1_0_start(struct amdgpu_device *adev); 39 39 static int vcn_v1_0_stop(struct amdgpu_device *adev); 40 40 static void vcn_v1_0_set_dec_ring_funcs(struct amdgpu_device *adev); 41 + static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev); 41 42 42 43 /** 43 44 * vcn_v1_0_early_init - set function pointers ··· 52 51 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 53 52 54 53 vcn_v1_0_set_dec_ring_funcs(adev); 54 + vcn_v1_0_set_irq_funcs(adev); 55 55 56 56 return 0; 57 57 } ··· 676 674 vcn_v1_0_dec_vm_reg_wait(ring, data0, data1, mask); 677 675 } 678 676 677 + static int vcn_v1_0_set_interrupt_state(struct amdgpu_device *adev, 678 + struct amdgpu_irq_src *source, 679 + unsigned type, 680 + enum amdgpu_interrupt_state state) 681 + { 682 + return 0; 683 + } 684 + 685 + static int vcn_v1_0_process_interrupt(struct amdgpu_device *adev, 686 + struct amdgpu_irq_src *source, 687 + struct amdgpu_iv_entry *entry) 688 + { 689 + DRM_DEBUG("IH: VCN TRAP\n"); 690 + 691 + amdgpu_fence_process(&adev->vcn.ring_dec); 692 + 693 + return 0; 694 + } 695 + 679 696 static const struct amd_ip_funcs vcn_v1_0_ip_funcs = { 680 697 .name = "vcn_v1_0", 681 698 .early_init = vcn_v1_0_early_init, ··· 744 723 { 745 724 adev->vcn.ring_dec.funcs = &vcn_v1_0_dec_ring_vm_funcs; 746 725 DRM_INFO("VCN decode is enabled in VM mode\n"); 726 + } 727 + 728 + static const struct amdgpu_irq_src_funcs vcn_v1_0_irq_funcs = { 729 + .set = vcn_v1_0_set_interrupt_state, 730 + .process = vcn_v1_0_process_interrupt, 731 + }; 732 + 733 + static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev) 734 + { 735 + adev->vcn.irq.num_types = 1; 736 + adev->vcn.irq.funcs = &vcn_v1_0_irq_funcs; 747 737 }