drm/amd: Add interrupt source definitions for VI v3.
Subsystems (2)
PATCH 1/4 drm/amd: Add interrupt source definitions for VI v3.
Stop using 'magic numbers' when registering interrupt sources.
v2:
Clean redundant comments.
Switch to kernel style comments.
v3:
Add CP_ECC_ERROR define
--- .../drm/amd/include/ivsrcid/ivsrcid_vislands30.h | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+)
drivers/gpu/drm/amd/include/ivsrcid/ivsrcid_vislands30.h +98 -0
@@ -198,4 +198,102 @@#define VISLANDS30_IV_SRCID_HPD_RX_F 42 // 0x2a#define VISLANDS30_IV_EXTID_HPD_RX_F 11 +#define VISLANDS30_IV_SRCID_GPIO_19 0x00000053/* 83 */ + +#define VISLANDS30_IV_SRCID_SRBM_READ_TIMEOUT_ERR 0x00000060/* 96 */ +#define VISLANDS30_IV_SRCID_SRBM_CTX_SWITCH 0x00000061/* 97 */ + +#define VISLANDS30_IV_SRBM_REG_ACCESS_ERROR 0x00000062/* 98 */ + + +#define VISLANDS30_IV_SRCID_UVD_ENC_GEN_PURP 0x00000077/* 119 */ +#define VISLANDS30_IV_SRCID_UVD_SYSTEM_MESSAGE 0x0000007c/* 124 */ + +#define VISLANDS30_IV_SRCID_BIF_PF_VF_MSGBUF_VALID 0x00000087/* 135 */ + +#define VISLANDS30_IV_SRCID_BIF_VF_PF_MSGBUF_ACK 0x0000008a/* 138 */ + +#define VISLANDS30_IV_SRCID_SYS_PAGE_INV_FAULT 0x0000008c/* 140 */ +#define VISLANDS30_IV_SRCID_SYS_MEM_PROT_FAULT 0x0000008d/* 141 */ + +#define VISLANDS30_IV_SRCID_SEM_PAGE_INV_FAULT 0x00000090/* 144 */ +#define VISLANDS30_IV_SRCID_SEM_MEM_PROT_FAULT 0x00000091/* 145 */ + +#define VISLANDS30_IV_SRCID_GFX_PAGE_INV_FAULT 0x00000092/* 146 */ +#define VISLANDS30_IV_SRCID_GFX_MEM_PROT_FAULT 0x00000093/* 147 */ + +#define VISLANDS30_IV_SRCID_ACP 0x000000a2/* 162 */ + +#define VISLANDS30_IV_SRCID_VCE_TRAP 0x000000a7/* 167 */ +#define VISLANDS30_IV_EXTID_VCE_TRAP_GENERAL_PURPOSE 0 +#define VISLANDS30_IV_EXTID_VCE_TRAP_LOW_LATENCY 1 +#define VISLANDS30_IV_EXTID_VCE_TRAP_REAL_TIME 2 + +#define VISLANDS30_IV_SRCID_CP_INT_RB 0x000000b0/* 176 */ +#define VISLANDS30_IV_SRCID_CP_INT_IB1 0x000000b1/* 177 */ +#define VISLANDS30_IV_SRCID_CP_INT_IB2 0x000000b2/* 178 */ +#define VISLANDS30_IV_SRCID_CP_PM4_RES_BITS_ERR 0x000000b4/* 180 */ +#define VISLANDS30_IV_SRCID_CP_END_OF_PIPE 0x000000b5/* 181 */ +#define VISLANDS30_IV_SRCID_CP_BAD_OPCODE 0x000000b7/* 183 */ +#define VISLANDS30_IV_SRCID_CP_PRIV_REG_FAULT 0x000000b8/* 184 */ +#define VISLANDS30_IV_SRCID_CP_PRIV_INSTR_FAULT 0x000000b9/* 185 */ +#define VISLANDS30_IV_SRCID_CP_WAIT_MEM_SEM_FAULT 0x000000ba/* 186 */ +#define VISLANDS30_IV_SRCID_CP_GUI_IDLE 0x000000bb/* 187 */ +#define VISLANDS30_IV_SRCID_CP_GUI_BUSY 0x000000bc/* 188 */ + +#define VISLANDS30_IV_SRCID_CP_COMPUTE_QUERY_STATUS 0x000000bf/* 191 */ +#define VISLANDS30_IV_SRCID_CP_ECC_ERROR 0x000000c5/* 197 */ + +#define CARRIZO_IV_SRCID_CP_COMPUTE_QUERY_STATUS 0x000000c7/* 199 */ + +#define VISLANDS30_IV_SRCID_CP_WAIT_REG_MEM_POLL_TIMEOUT 0x000000c0/* 192 */ +#define VISLANDS30_IV_SRCID_CP_SEM_SIG_INCOMPL 0x000000c1/* 193 */ +#define VISLANDS30_IV_SRCID_CP_PREEMPT_ACK 0x000000c2/* 194 */ +#define VISLANDS30_IV_SRCID_CP_GENERAL_PROT_FAULT 0x000000c3/* 195 */ +#define VISLANDS30_IV_SRCID_CP_GDS_ALLOC_ERROR 0x000000c4/* 196 */ +#define VISLANDS30_IV_SRCID_CP_ECC_ERROR 0x000000c5/* 197 */ + +#define VISLANDS30_IV_SRCID_RLC_STRM_PERF_MONITOR 0x000000ca/* 202 */ + +#define VISLANDS30_IV_SDMA_ATOMIC_SRC_ID 0x000000da/* 218 */ + +#define VISLANDS30_IV_SRCID_SDMA_ECC_ERROR 0x000000dc/* 220 */ + +#define VISLANDS30_IV_SRCID_SDMA_TRAP 0x000000e0/* 224 */ +#define VISLANDS30_IV_SRCID_SDMA_SEM_INCOMPLETE 0x000000e1/* 225 */ +#define VISLANDS30_IV_SRCID_SDMA_SEM_WAIT 0x000000e2/* 226 */ + + +#define VISLANDS30_IV_SRCID_SMU_DISP_TIMER2_TRIGGER 0x000000e5/* 229 */ + +#define VISLANDS30_IV_SRCID_CG_TSS_THERMAL_LOW_TO_HIGH 0x000000e6/* 230 */ +#define VISLANDS30_IV_SRCID_CG_TSS_THERMAL_HIGH_TO_LOW 0x000000e7/* 231 */ + +#define VISLANDS30_IV_SRCID_GRBM_READ_TIMEOUT_ERR 0x000000e8/* 232 */ +#define VISLANDS30_IV_SRCID_GRBM_REG_GUI_IDLE 0x000000e9/* 233 */ + +#define VISLANDS30_IV_SRCID_SQ_INTERRUPT_MSG 0x000000ef/* 239 */ + +#define VISLANDS30_IV_SRCID_SDMA_PREEMPT 0x000000f0/* 240 */ +#define VISLANDS30_IV_SRCID_SDMA_VM_HOLE 0x000000f2/* 242 */ +#define VISLANDS30_IV_SRCID_SDMA_CTXEMPTY 0x000000f3/* 243 */ +#define VISLANDS30_IV_SRCID_SDMA_DOORBELL_INVALID 0x000000f4/* 244 */ +#define VISLANDS30_IV_SRCID_SDMA_FROZEN 0x000000f5/* 245 */ +#define VISLANDS30_IV_SRCID_SDMA_POLL_TIMEOUT 0x000000f6/* 246 */ +#define VISLANDS30_IV_SRCID_SDMA_SRBM_WRITE 0x000000f7/* 247 */ + +#define VISLANDS30_IV_SRCID_CG_THERMAL_TRIG 0x000000f8/* 248 */ + +#define VISLANDS30_IV_SRCID_SMU_DISP_TIMER_TRIGGER 0x000000fd/* 253 */ + +/* These are not "real" source ids defined by HW */ +#define VISLANDS30_IV_SRCID_VM_CONTEXT_ALL 0x00000100/* 256 */ +#define VISLANDS30_IV_EXTID_VM_CONTEXT0_ALL 0 +#define VISLANDS30_IV_EXTID_VM_CONTEXT1_ALL 1 + + +/* IV Extended IDs */ +#define VISLANDS30_IV_EXTID_NONE 0x00000000 +#define VISLANDS30_IV_EXTID_INVALID 0xffffffff +#endif // _IVSRCID_VISLANDS30_H_
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1531346035-28172-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
PATCH 2/4 drm/amd: Use newly added interrupt source defs for VI v3.
v2: Rebase
v3: Use defines for CP_SQ and CP_ECC_ERROR interrupts.
--- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 14 ++++++++------ drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 8 +++++--- 12 files changed, 46 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +4 -2
@@ -41,6 +41,8 @@#include "gmc/gmc_8_1_d.h" #include "gmc/gmc_8_1_sh_mask.h" +#include "ivsrcid/ivsrcid_vislands30.h" +static void dce_v10_0_set_display_funcs (struct amdgpu_device *adev);static void dce_v10_0_set_irq_funcs (struct amdgpu_device *adev);
@@ -2737,14 +2739,14 @@ static int dce_v10_0_sw_init(void *handle)return r; } -for (i =8 ; i <20 ; i +=2 ) { +for (i =VISLANDS30_IV_SRCID_D1_GRPH_PFLIP ; i <20 ; i +=2 ) { r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY , i, &adev->pageflip_irq);if (r)return r; }/* HPD hotplug */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,42 , &adev->hpd_irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_HOTPLUG_DETECT_A , &adev->hpd_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +4 -2
@@ -41,6 +41,8 @@#include "gmc/gmc_8_1_d.h" #include "gmc/gmc_8_1_sh_mask.h" +#include "ivsrcid/ivsrcid_vislands30.h" +static void dce_v11_0_set_display_funcs (struct amdgpu_device *adev);static void dce_v11_0_set_irq_funcs (struct amdgpu_device *adev);
@@ -2858,14 +2860,14 @@ static int dce_v11_0_sw_init(void *handle)return r; } -for (i =8 ; i <20 ; i +=2 ) { +for (i =VISLANDS30_IV_SRCID_D1_GRPH_PFLIP ; i <20 ; i +=2 ) { r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY , i, &adev->pageflip_irq);if (r)return r; }/* HPD hotplug */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,42 , &adev->hpd_irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_HOTPLUG_DETECT_A , &adev->hpd_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2 -1
@@ -36,6 +36,7 @@#include "dce_v10_0.h" #include "dce_v11_0.h" #include "dce_virtual.h" +#include "ivsrcid/ivsrcid_vislands30.h" #define DCE_VIRTUAL_VBLANK_PERIOD 16666666
@@ -378,7 +379,7 @@ static int dce_virtual_sw_init(void *handle)int r, i;struct amdgpu_device *adev = (struct amdgpu_device *)handle; - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,229 , &adev->crtc_irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_SMU_DISP_TIMER2_TRIGGER , &adev->crtc_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +8 -6
@@ -51,6 +51,8 @@#include "smu/smu_7_1_3_d.h" +#include "ivsrcid/ivsrcid_vislands30.h" +#define GFX8_NUM_GFX_RINGS 1#define GFX8_MEC_HPD_SIZE 2048
@@ -2047,35 +2049,35 @@ static int gfx_v8_0_sw_init(void *handle) adev->gfx.mec.num_queue_per_pipe =8 ;/* KIQ event */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,178 , &adev->gfx.kiq.irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_CP_INT_IB2 , &adev->gfx.kiq.irq);if (r)return r;/* EOP Event */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,181 , &adev->gfx.eop_irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_CP_END_OF_PIPE , &adev->gfx.eop_irq);if (r)return r;/* Privileged reg */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,184 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_CP_PRIV_REG_FAULT , &adev->gfx.priv_reg_irq);if (r)return r;/* Privileged inst */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,185 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_CP_PRIV_INSTR_FAULT , &adev->gfx.priv_inst_irq);if (r)return r;/* Add CP EDC/ECC irq */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,197 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_CP_ECC_ERROR , &adev->gfx.cp_ecc_error_irq);if (r)return r;/* SQ interrupts. */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,239 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_SQ_INTERRUPT_MSG , &adev->gfx.sq_irq);if (r) {DRM_ERROR ("amdgpu_irq_add() for SQ failed: %d\n" , r);
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +4 -2
@@ -43,6 +43,8 @@#include "amdgpu_atombios.h" +#include "ivsrcid/ivsrcid_vislands30.h" +static void gmc_v7_0_set_gmc_funcs (struct amdgpu_device *adev);static void gmc_v7_0_set_irq_funcs (struct amdgpu_device *adev);static int gmc_v7_0_wait_for_idle (void *handle);
@@ -999,11 +1001,11 @@ static int gmc_v7_0_sw_init(void *handle) adev->gmc.vram_type =gmc_v7_0_convert_vram_type (tmp); } - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,146 , &adev->gmc.vm_fault); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_GFX_PAGE_INV_FAULT , &adev->gmc.vm_fault);if (r)return r; - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,147 , &adev->gmc.vm_fault); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_GFX_MEM_PROT_FAULT , &adev->gmc.vm_fault);if (r)return r;
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +4 -2
@@ -44,6 +44,8 @@#include "amdgpu_atombios.h" +#include "ivsrcid/ivsrcid_vislands30.h" +static void gmc_v8_0_set_gmc_funcs (struct amdgpu_device *adev);static void gmc_v8_0_set_irq_funcs (struct amdgpu_device *adev);static int gmc_v8_0_wait_for_idle (void *handle);
@@ -1100,11 +1102,11 @@ static int gmc_v8_0_sw_init(void *handle) adev->gmc.vram_type =gmc_v8_0_convert_vram_type (tmp); } - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,146 , &adev->gmc.vm_fault); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_GFX_PAGE_INV_FAULT , &adev->gmc.vm_fault);if (r)return r; - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,147 , &adev->gmc.vm_fault); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_GFX_MEM_PROT_FAULT , &adev->gmc.vm_fault);if (r)return r;
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +4 -2
@@ -44,6 +44,8 @@#include "iceland_sdma_pkt_open.h" +#include "ivsrcid/ivsrcid_vislands30.h" +static void sdma_v2_4_set_ring_funcs (struct amdgpu_device *adev);static void sdma_v2_4_set_buffer_funcs (struct amdgpu_device *adev);static void sdma_v2_4_set_vm_pte_funcs (struct amdgpu_device *adev);
@@ -896,7 +898,7 @@ static int sdma_v2_4_sw_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* SDMA trap event */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,224 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_SDMA_TRAP , &adev->sdma.trap_irq);if (r)return r;
@@ -908,7 +910,7 @@ static int sdma_v2_4_sw_init(void *handle)return r;/* SDMA Privileged inst */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,247 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_SDMA_SRBM_WRITE , &adev->sdma.illegal_inst_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +4 -2
@@ -44,6 +44,8 @@#include "tonga_sdma_pkt_open.h" +#include "ivsrcid/ivsrcid_vislands30.h" +static void sdma_v3_0_set_ring_funcs (struct amdgpu_device *adev);static void sdma_v3_0_set_buffer_funcs (struct amdgpu_device *adev);static void sdma_v3_0_set_vm_pte_funcs (struct amdgpu_device *adev);
@@ -1175,7 +1177,7 @@ static int sdma_v3_0_sw_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* SDMA trap event */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,224 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_SDMA_TRAP , &adev->sdma.trap_irq);if (r)return r;
@@ -1187,7 +1189,7 @@ static int sdma_v3_0_sw_init(void *handle)return r;/* SDMA Privileged inst */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,247 , + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_SDMA_SRBM_WRITE , &adev->sdma.illegal_inst_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +2 -1
@@ -35,6 +35,7 @@#include "vi.h" #include "smu/smu_7_1_2_d.h" #include "smu/smu_7_1_2_sh_mask.h" +#include "ivsrcid/ivsrcid_vislands30.h" static void uvd_v5_0_set_ring_funcs (struct amdgpu_device *adev);static void uvd_v5_0_set_irq_funcs (struct amdgpu_device *adev);
@@ -104,7 +105,7 @@ static int uvd_v5_0_sw_init(void *handle)int r;/* UVD TRAP */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,124 , &adev->uvd.inst->irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_UVD_SYSTEM_MESSAGE , &adev->uvd.inst->irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +3 -2
@@ -36,6 +36,7 @@#include "bif/bif_5_1_d.h" #include "gmc/gmc_8_1_d.h" #include "vi.h" +#include "ivsrcid/ivsrcid_vislands30.h" /* Polaris10/11/12 firmware version */ #define FW_1_130_16 ((1 << 24) | (130 << 16) | (16 << 8))
@@ -400,14 +401,14 @@ static int uvd_v6_0_sw_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* UVD TRAP */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,124 , &adev->uvd.inst->irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_UVD_SYSTEM_MESSAGE , &adev->uvd.inst->irq);if (r)return r;/* UVD ENC TRAP */ if (uvd_v6_0_enc_support (adev)) {for (i =0 ; i < adev->uvd.num_enc_rings; ++i) { - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY , i +119 , &adev->uvd.inst->irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY , i +VISLANDS30_IV_SRCID_UVD_ENC_GEN_PURP , &adev->uvd.inst->irq);if (r)return r; }
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +2 -1
@@ -39,6 +39,7 @@#include "smu/smu_7_1_2_sh_mask.h" #include "gca/gfx_8_0_d.h" #include "gca/gfx_8_0_sh_mask.h" +#include "ivsrcid/ivsrcid_vislands30.h" #define GRBM_GFX_INDEX__VCE_INSTANCE__SHIFT 0x04
@@ -422,7 +423,7 @@ static int vce_v3_0_sw_init(void *handle)int r, i;/* VCE */ - r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,167 , &adev->vce.irq); + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,VISLANDS30_IV_SRCID_VCE_TRAP , &adev->vce.irq);if (r)return r;
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +5 -3
@@ -48,6 +48,8 @@#include "processpptables.h" #include "pp_thermal.h" +#include "ivsrcid/ivsrcid_vislands30.h" +#define MC_CG_ARB_FREQ_F0 0x0a#define MC_CG_ARB_FREQ_F1 0x0b#define MC_CG_ARB_FREQ_F2 0x0c
@@ -4105,17 +4107,17 @@ static int smu7_register_irq_handlers(struct pp_hwmgr *hwmgr)amdgpu_irq_add_id ((struct amdgpu_device *)(hwmgr->adev),AMDGPU_IH_CLIENTID_LEGACY , -230 , +VISLANDS30_IV_SRCID_CG_TSS_THERMAL_LOW_TO_HIGH , source);amdgpu_irq_add_id ((struct amdgpu_device *)(hwmgr->adev),AMDGPU_IH_CLIENTID_LEGACY , -231 , +VISLANDS30_IV_SRCID_CG_TSS_THERMAL_HIGH_TO_LOW , source);/* Register CTF(GPIO_19) interrupt */ amdgpu_irq_add_id ((struct amdgpu_device *)(hwmgr->adev),AMDGPU_IH_CLIENTID_LEGACY , -83 , +VISLANDS30_IV_SRCID_GPIO_19 , source);return 0 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amd: Add interrupt source definitions for SOC15 v3.
In reply to a message not in the archiveStop using 'magic numbers' when registering interrupt sources.
v2: Switch to kernel style comments.
v3:
Rebase.
--- .../drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_9_0.h | 55 ++++++++++++++++++++++ .../amd/include/ivsrcid/sdma0/irqsrcs_sdma0_4_0.h | 50 ++++++++++++++++++++ .../amd/include/ivsrcid/sdma1/irqsrcs_sdma1_4_0.h | 50 ++++++++++++++++++++ .../amd/include/ivsrcid/smuio/irqsrcs_smuio_9_0.h | 32 +++++++++++++ .../drm/amd/include/ivsrcid/thm/irqsrcs_thm_9_0.h | 33 +++++++++++++ .../drm/amd/include/ivsrcid/uvd/irqsrcs_uvd_7_0.h | 34 +++++++++++++ .../drm/amd/include/ivsrcid/vce/irqsrcs_vce_4_0.h | 34 +++++++++++++ .../drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_1_0.h | 34 +++++++++++++ .../drm/amd/include/ivsrcid/vmc/irqsrcs_vmc_1_0.h | 37 +++++++++++++++ 9 files changed, 359 insertions(+) create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_9_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/sdma0/irqsrcs_sdma0_4_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/sdma1/irqsrcs_sdma1_4_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/smuio/irqsrcs_smuio_9_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/thm/irqsrcs_thm_9_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/uvd/irqsrcs_uvd_7_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/vce/irqsrcs_vce_4_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_1_0.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/vmc/irqsrcs_vmc_1_0.h
drivers/gpu/drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_9_0.h new file +55 -0
@@ -0,0 +1,55 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_GFX_9_0_H__ +#define __IRQSRCS_GFX_9_0_H__ + + +#define GFX_9_0__SRCID__CP_RB_INTERRUPT_PKT 176/* B0 CP_INTERRUPT pkt in RB */ +#define GFX_9_0__SRCID__CP_IB1_INTERRUPT_PKT 177/* B1 CP_INTERRUPT pkt in IB1 */ +#define GFX_9_0__SRCID__CP_IB2_INTERRUPT_PKT 178/* B2 CP_INTERRUPT pkt in IB2 */ +#define GFX_9_0__SRCID__CP_PM4_PKT_RSVD_BIT_ERROR 180/* B4 PM4 Pkt Rsvd Bits Error */ +#define GFX_9_0__SRCID__CP_EOP_INTERRUPT 181/* B5 End-of-Pipe Interrupt */ +#define GFX_9_0__SRCID__CP_BAD_OPCODE_ERROR 183/* B7 Bad Opcode Error */ +#define GFX_9_0__SRCID__CP_PRIV_REG_FAULT 184/* B8 Privileged Register Fault */ +#define GFX_9_0__SRCID__CP_PRIV_INSTR_FAULT 185/* B9 Privileged Instr Fault */ +#define GFX_9_0__SRCID__CP_WAIT_MEM_SEM_FAULT 186/* BA Wait Memory Semaphore Fault (Synchronization Object Fault) */ +#define GFX_9_0__SRCID__CP_CTX_EMPTY_INTERRUPT 187/* BB Context Empty Interrupt */ +#define GFX_9_0__SRCID__CP_CTX_BUSY_INTERRUPT 188/* BC Context Busy Interrupt */ +#define GFX_9_0__SRCID__CP_ME_WAIT_REG_MEM_POLL_TIMEOUT 192/* C0 CP.ME Wait_Reg_Mem Poll Timeout */ +#define GFX_9_0__SRCID__CP_SIG_INCOMPLETE 193/* C1 "Surface Probe Fault Signal Incomplete" */ +#define GFX_9_0__SRCID__CP_PREEMPT_ACK 194/* C2 Preemption Ack-wledge */ +#define GFX_9_0__SRCID__CP_GPF 195/* C3 General Protection Fault (GPF) */ +#define GFX_9_0__SRCID__CP_GDS_ALLOC_ERROR 196/* C4 GDS Alloc Error */ +#define GFX_9_0__SRCID__CP_ECC_ERROR 197/* C5 ECC Error */ +#define GFX_9_0__SRCID__CP_COMPUTE_QUERY_STATUS 199/* C7 Compute query status */ +#define GFX_9_0__SRCID__CP_VM_DOORBELL 200/* C8 Unattached VM Doorbell Received */ +#define GFX_9_0__SRCID__CP_FUE_ERROR 201/* C9 ECC FUE Error */ +#define GFX_9_0__SRCID__RLC_STRM_PERF_MONITOR_INTERRUPT 202/* CA Streaming Perf Monitor Interrupt */ +#define GFX_9_0__SRCID__GRBM_RD_TIMEOUT_ERROR 232/* E8 CRead timeout error */ +#define GFX_9_0__SRCID__GRBM_REG_GUI_IDLE 233/* E9 Register GUI Idle */ +#define GFX_9_0__SRCID__SQ_INTERRUPT_ID 239/* EF SQ Interrupt (ttrace wrap, errors) */ + +#endif /* __IRQSRCS_GFX_9_0_H__ */
drivers/gpu/drm/amd/include/ivsrcid/sdma0/irqsrcs_sdma0_4_0.h new file +50 -0
50 lines not on this page · raw message
drivers/gpu/drm/amd/include/ivsrcid/sdma1/irqsrcs_sdma1_4_0.h new file +50 -0
50 lines not on this page · raw message
drivers/gpu/drm/amd/include/ivsrcid/smuio/irqsrcs_smuio_9_0.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_SMUIO_9_0_H__ +#define __IRQSRCS_SMUIO_9_0_H__ + +#define SMUIO_9_0__SRCID__SMUIO_GPIO19 83/* GPIO19 interrupt */ + +#endif /* __IRQSRCS_SMUIO_9_0_H__ */ +
drivers/gpu/drm/amd/include/ivsrcid/thm/irqsrcs_thm_9_0.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_THM_9_0_H__ +#define __IRQSRCS_THM_9_0_H__ + +#define THM_9_0__SRCID__THM_DIG_THERM_L2H 0/* ASIC_TEMP > CG_THERMAL_INT.DIG_THERM_INTH */ +#define THM_9_0__SRCID__THM_DIG_THERM_H2L 1/* ASIC_TEMP < CG_THERMAL_INT.DIG_THERM_INTL */ + +#endif /* __IRQSRCS_THM_9_0_H__ */ +
drivers/gpu/drm/amd/include/ivsrcid/uvd/irqsrcs_uvd_7_0.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_UVD_7_0_H__ +#define __IRQSRCS_UVD_7_0_H__ + +#define UVD_7_0__SRCID__UVD_ENC_GEN_PURP 119 +#define UVD_7_0__SRCID__UVD_ENC_LOW_LATENCY 120 +#define UVD_7_0__SRCID__UVD_SYSTEM_MESSAGE_INTERRUPT 124/* UVD system message interrupt */ + +#endif /* __IRQSRCS_UVD_7_0_H__ */ +
drivers/gpu/drm/amd/include/ivsrcid/vce/irqsrcs_vce_4_0.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_VCE_4_0_H__ +#define __IRQSRCS_VCE_4_0_H__ + +#define VCE_4_0__CTXID__VCE_TRAP_GENERAL_PURPOSE 0 +#define VCE_4_0__CTXID__VCE_TRAP_LOW_LATENCY 1 +#define VCE_4_0__CTXID__VCE_TRAP_REAL_TIME 2 + +#endif /* __IRQSRCS_VCE_4_0_H__ */ +
drivers/gpu/drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_1_0.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_VCN_1_0_H__ +#define __IRQSRCS_VCN_1_0_H__ + +#define VCN_1_0__SRCID__UVD_ENC_GENERAL_PURPOSE 119/* 0x77 Encoder General Purpose */ +#define VCN_1_0__SRCID__UVD_ENC_LOW_LATENCY 120/* 0x78 Encoder Low Latency */ +#define VCN_1_0__SRCID__UVD_SYSTEM_MESSAGE_INTERRUPT 124/* 0x7c UVD system message interrupt */ + +#endif /* __IRQSRCS_VCN_1_0_H__ */ +
drivers/gpu/drm/amd/include/ivsrcid/vmc/irqsrcs_vmc_1_0.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __IRQSRCS_VMC_1_0_H__ +#define __IRQSRCS_VMC_1_0_H__ + + +#define VMC_1_0__SRCID__VM_FAULT 0 +#define VMC_1_0__SRCID__VM_CONTEXT0_ALL 256 +#define VMC_1_0__SRCID__VM_CONTEXT1_ALL 257 + +#define UTCL2_1_0__SRCID__FAULT 0/* UTC L2 has encountered a fault or retry scenario */ + + +#endif /* __IRQSRCS_VMC_1_0_H__ */
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amd: Use newly added interrupt source defs for SOC15.
In reply to a message not in the archive--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++---- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 6 ++++-- drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 8 +++++--- 7 files changed, 29 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +6 -4
@@ -38,6 +38,8 @@#include "clearstate_gfx9.h" #include "v9_structs.h" +#include "ivsrcid/gfx/irqsrcs_gfx_9_0.h" +#define GFX9_NUM_GFX_RINGS 1#define GFX9_MEC_HPD_SIZE 2048#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L
@@ -1451,23 +1453,23 @@ static int gfx_v9_0_sw_init(void *handle) adev->gfx.mec.num_queue_per_pipe =8 ;/* KIQ event */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,178 , &adev->gfx.kiq.irq); + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,GFX_9_0__SRCID__CP_IB2_INTERRUPT_PKT , &adev->gfx.kiq.irq);if (r)return r;/* EOP Event */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,181 , &adev->gfx.eop_irq); + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,GFX_9_0__SRCID__CP_EOP_INTERRUPT , &adev->gfx.eop_irq);if (r)return r;/* Privileged reg */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,184 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,GFX_9_0__SRCID__CP_PRIV_REG_FAULT , &adev->gfx.priv_reg_irq);if (r)return r;/* Privileged inst */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,185 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_GRBM_CP ,GFX_9_0__SRCID__CP_PRIV_INSTR_FAULT , &adev->gfx.priv_inst_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +4 -2
@@ -43,6 +43,8 @@#include "gfxhub_v1_0.h" #include "mmhub_v1_0.h" +#include "ivsrcid/vmc/irqsrcs_vmc_1_0.h" +/* add these here since we already include dce12 headers and these are for DCN */ #define mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION 0x055d#define mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION_BASE_IDX 2
@@ -877,9 +879,9 @@ static int gmc_v9_0_sw_init(void *handle) }/* This interrupt is VMC page fault.*/ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_VMC ,0 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_VMC ,VMC_1_0__SRCID__VM_FAULT , &adev->gmc.vm_fault); - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_UTCL2 ,0 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_UTCL2 ,UTCL2_1_0__SRCID__FAULT , &adev->gmc.vm_fault);if (r)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +5 -2
@@ -38,6 +38,9 @@#include "soc15.h" #include "vega10_sdma_pkt_open.h" +#include "ivsrcid/sdma0/irqsrcs_sdma0_4_0.h" +#include "ivsrcid/sdma1/irqsrcs_sdma1_4_0.h" +MODULE_FIRMWARE ("amdgpu/vega10_sdma.bin" );MODULE_FIRMWARE ("amdgpu/vega10_sdma1.bin" );MODULE_FIRMWARE ("amdgpu/vega12_sdma.bin" );
@@ -1225,13 +1228,13 @@ static int sdma_v4_0_sw_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* SDMA trap event */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_SDMA0 ,224 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_SDMA0 ,SDMA0_4_0__SRCID__SDMA_TRAP , &adev->sdma.trap_irq);if (r)return r;/* SDMA trap event */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_SDMA1 ,224 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_SDMA1 ,SDMA1_4_0__SRCID__SDMA_TRAP , &adev->sdma.trap_irq);if (r)return r;
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +3 -2
@@ -39,6 +39,7 @@#include "hdp/hdp_4_0_offset.h" #include "mmhub/mmhub_1_0_offset.h" #include "mmhub/mmhub_1_0_sh_mask.h" +#include "ivsrcid/uvd/irqsrcs_uvd_7_0.h" #define UVD7_MAX_HW_INSTANCES_VEGA20 2
@@ -402,13 +403,13 @@ static int uvd_v7_0_sw_init(void *handle)for (j =0 ; j < adev->uvd.num_uvd_inst; j++) {/* UVD TRAP */ - r =amdgpu_irq_add_id (adev, amdgpu_ih_clientid_uvds[j],124 , &adev->uvd.inst[j].irq); + r =amdgpu_irq_add_id (adev, amdgpu_ih_clientid_uvds[j],UVD_7_0__SRCID__UVD_SYSTEM_MESSAGE_INTERRUPT , &adev->uvd.inst[j].irq);if (r)return r;/* UVD ENC TRAP */ for (i =0 ; i < adev->uvd.num_enc_rings; ++i) { - r =amdgpu_irq_add_id (adev, amdgpu_ih_clientid_uvds[j], i +119 , &adev->uvd.inst[j].irq); + r =amdgpu_irq_add_id (adev, amdgpu_ih_clientid_uvds[j], i +UVD_7_0__SRCID__UVD_ENC_GEN_PURP , &adev->uvd.inst[j].irq);if (r)return r; }
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c +2 -0
@@ -39,6 +39,8 @@#include "mmhub/mmhub_1_0_offset.h" #include "mmhub/mmhub_1_0_sh_mask.h" +#include "ivsrcid/vce/irqsrcs_vce_4_0.h" +#define VCE_STATUS_VCPU_REPORT_FW_LOADED_MASK 0x02#define VCE_V4_0_FW_SIZE (384 * 1024)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +4 -2
@@ -35,6 +35,8 @@#include "mmhub/mmhub_9_1_offset.h" #include "mmhub/mmhub_9_1_sh_mask.h" +#include "ivsrcid/vcn/irqsrcs_vcn_1_0.h" +static int vcn_v1_0_stop (struct amdgpu_device *adev);static void vcn_v1_0_set_dec_ring_funcs (struct amdgpu_device *adev);static void vcn_v1_0_set_enc_ring_funcs (struct amdgpu_device *adev);
@@ -77,13 +79,13 @@ static int vcn_v1_0_sw_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* VCN DEC TRAP */ - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_VCN ,124 , &adev->vcn.irq); + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_VCN ,VCN_1_0__SRCID__UVD_SYSTEM_MESSAGE_INTERRUPT , &adev->vcn.irq);if (r)return r;/* VCN ENC TRAP */ for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { - r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_VCN , i +119 , + r =amdgpu_irq_add_id (adev,SOC15_IH_CLIENTID_VCN , i +VCN_1_0__SRCID__UVD_ENC_GENERAL_PURPOSE , &adev->vcn.irq);if (r)return r;
drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c +5 -3
@@ -25,6 +25,8 @@#include "ppatomctrl.h" #include "ppsmc.h" #include "atom.h" +#include "ivsrcid/thm/irqsrcs_thm_9_0.h" +#include "ivsrcid/smuio/irqsrcs_smuio_9_0.h" uint8_t convert_to_vid (uint16_t vddc) {
@@ -594,17 +596,17 @@ int smu9_register_irq_handlers(struct pp_hwmgr *hwmgr)amdgpu_irq_add_id ((struct amdgpu_device *)(hwmgr->adev),SOC15_IH_CLIENTID_THM , -0 , +THM_9_0__SRCID__THM_DIG_THERM_L2H , source);amdgpu_irq_add_id ((struct amdgpu_device *)(hwmgr->adev),SOC15_IH_CLIENTID_THM , -1 , +THM_9_0__SRCID__THM_DIG_THERM_H2L , source);/* Register CTF(GPIO_19) interrupt */ amdgpu_irq_add_id ((struct amdgpu_device *)(hwmgr->adev),SOC15_IH_CLIENTID_ROM_SMUIO , -83 , +SMUIO_9_0__SRCID__SMUIO_GPIO19 , source);return 0 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byQuoted 6 lines · Andrey Grodzovsky
Stop using 'magic numbers' when registering interrupt sources.
v2:
Clean redundant comments.
Switch to kernel style comments.
Quoted 7 lines
v3:
AddCP_ECC_ERRORdefineSigned-off-by Andrey Grodzovsky <[email protected]>Acked-by Christian König <[email protected]>Signed-off-by Andrey Grodzovsky <[email protected]>
You added your s-o-b twice. Other than that, the series is:
Quoted 114 lines
--- .../drm/amd/include/ivsrcid/ivsrcid_vislands30.h | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+)drivers/gpu/drm/amd/include/ivsrcid/ivsrcid_vislands30.h +98
-1@@ -198,4 +198,102 @@#define VISLANDS30_IV_SRCID_HPD_RX_F 42 // 0x2a#define VISLANDS30_IV_EXTID_HPD_RX_F 11 +#define VISLANDS30_IV_SRCID_GPIO_19 0x00000053/* 83 */ + +#define VISLANDS30_IV_SRCID_SRBM_READ_TIMEOUT_ERR 0x00000060/* 96 */ +#define VISLANDS30_IV_SRCID_SRBM_CTX_SWITCH 0x00000061/* 97 */ + +#define VISLANDS30_IV_SRBM_REG_ACCESS_ERROR 0x00000062/* 98 */ + + +#define VISLANDS30_IV_SRCID_UVD_ENC_GEN_PURP 0x00000077/* 119 */ +#define VISLANDS30_IV_SRCID_UVD_SYSTEM_MESSAGE 0x0000007c/* 124 */ + +#define VISLANDS30_IV_SRCID_BIF_PF_VF_MSGBUF_VALID 0x00000087/* 135 */ + +#define VISLANDS30_IV_SRCID_BIF_VF_PF_MSGBUF_ACK 0x0000008a/* 138 */ + +#define VISLANDS30_IV_SRCID_SYS_PAGE_INV_FAULT 0x0000008c/* 140 */ +#define VISLANDS30_IV_SRCID_SYS_MEM_PROT_FAULT 0x0000008d/* 141 */ + +#define VISLANDS30_IV_SRCID_SEM_PAGE_INV_FAULT 0x00000090/* 144 */ +#define VISLANDS30_IV_SRCID_SEM_MEM_PROT_FAULT 0x00000091/* 145 */ + +#define VISLANDS30_IV_SRCID_GFX_PAGE_INV_FAULT 0x00000092/* 146 */ +#define VISLANDS30_IV_SRCID_GFX_MEM_PROT_FAULT 0x00000093/* 147 */ + +#define VISLANDS30_IV_SRCID_ACP 0x000000a2/* 162 */ + +#define VISLANDS30_IV_SRCID_VCE_TRAP 0x000000a7/* 167 */ +#define VISLANDS30_IV_EXTID_VCE_TRAP_GENERAL_PURPOSE 0 +#define VISLANDS30_IV_EXTID_VCE_TRAP_LOW_LATENCY 1 +#define VISLANDS30_IV_EXTID_VCE_TRAP_REAL_TIME 2 + +#define VISLANDS30_IV_SRCID_CP_INT_RB 0x000000b0/* 176 */ +#define VISLANDS30_IV_SRCID_CP_INT_IB1 0x000000b1/* 177 */ +#define VISLANDS30_IV_SRCID_CP_INT_IB2 0x000000b2/* 178 */ +#define VISLANDS30_IV_SRCID_CP_PM4_RES_BITS_ERR 0x000000b4/* 180 */ +#define VISLANDS30_IV_SRCID_CP_END_OF_PIPE 0x000000b5/* 181 */ +#define VISLANDS30_IV_SRCID_CP_BAD_OPCODE 0x000000b7/* 183 */ +#define VISLANDS30_IV_SRCID_CP_PRIV_REG_FAULT 0x000000b8/* 184 */ +#define VISLANDS30_IV_SRCID_CP_PRIV_INSTR_FAULT 0x000000b9/* 185 */ +#define VISLANDS30_IV_SRCID_CP_WAIT_MEM_SEM_FAULT 0x000000ba/* 186 */ +#define VISLANDS30_IV_SRCID_CP_GUI_IDLE 0x000000bb/* 187 */ +#define VISLANDS30_IV_SRCID_CP_GUI_BUSY 0x000000bc/* 188 */ + +#define VISLANDS30_IV_SRCID_CP_COMPUTE_QUERY_STATUS 0x000000bf/* 191 */ +#define VISLANDS30_IV_SRCID_CP_ECC_ERROR 0x000000c5/* 197 */ + +#define CARRIZO_IV_SRCID_CP_COMPUTE_QUERY_STATUS 0x000000c7/* 199 */ + +#define VISLANDS30_IV_SRCID_CP_WAIT_REG_MEM_POLL_TIMEOUT 0x000000c0/* 192 */ +#define VISLANDS30_IV_SRCID_CP_SEM_SIG_INCOMPL 0x000000c1/* 193 */ +#define VISLANDS30_IV_SRCID_CP_PREEMPT_ACK 0x000000c2/* 194 */ +#define VISLANDS30_IV_SRCID_CP_GENERAL_PROT_FAULT 0x000000c3/* 195 */ +#define VISLANDS30_IV_SRCID_CP_GDS_ALLOC_ERROR 0x000000c4/* 196 */ +#define VISLANDS30_IV_SRCID_CP_ECC_ERROR 0x000000c5/* 197 */ + +#define VISLANDS30_IV_SRCID_RLC_STRM_PERF_MONITOR 0x000000ca/* 202 */ + +#define VISLANDS30_IV_SDMA_ATOMIC_SRC_ID 0x000000da/* 218 */ + +#define VISLANDS30_IV_SRCID_SDMA_ECC_ERROR 0x000000dc/* 220 */ + +#define VISLANDS30_IV_SRCID_SDMA_TRAP 0x000000e0/* 224 */ +#define VISLANDS30_IV_SRCID_SDMA_SEM_INCOMPLETE 0x000000e1/* 225 */ +#define VISLANDS30_IV_SRCID_SDMA_SEM_WAIT 0x000000e2/* 226 */ + + +#define VISLANDS30_IV_SRCID_SMU_DISP_TIMER2_TRIGGER 0x000000e5/* 229 */ + +#define VISLANDS30_IV_SRCID_CG_TSS_THERMAL_LOW_TO_HIGH 0x000000e6/* 230 */ +#define VISLANDS30_IV_SRCID_CG_TSS_THERMAL_HIGH_TO_LOW 0x000000e7/* 231 */ + +#define VISLANDS30_IV_SRCID_GRBM_READ_TIMEOUT_ERR 0x000000e8/* 232 */ +#define VISLANDS30_IV_SRCID_GRBM_REG_GUI_IDLE 0x000000e9/* 233 */ + +#define VISLANDS30_IV_SRCID_SQ_INTERRUPT_MSG 0x000000ef/* 239 */ + +#define VISLANDS30_IV_SRCID_SDMA_PREEMPT 0x000000f0/* 240 */ +#define VISLANDS30_IV_SRCID_SDMA_VM_HOLE 0x000000f2/* 242 */ +#define VISLANDS30_IV_SRCID_SDMA_CTXEMPTY 0x000000f3/* 243 */ +#define VISLANDS30_IV_SRCID_SDMA_DOORBELL_INVALID 0x000000f4/* 244 */ +#define VISLANDS30_IV_SRCID_SDMA_FROZEN 0x000000f5/* 245 */ +#define VISLANDS30_IV_SRCID_SDMA_POLL_TIMEOUT 0x000000f6/* 246 */ +#define VISLANDS30_IV_SRCID_SDMA_SRBM_WRITE 0x000000f7/* 247 */ + +#define VISLANDS30_IV_SRCID_CG_THERMAL_TRIG 0x000000f8/* 248 */ + +#define VISLANDS30_IV_SRCID_SMU_DISP_TIMER_TRIGGER 0x000000fd/* 253 */ + +/* These are not "real" source ids defined by HW */ +#define VISLANDS30_IV_SRCID_VM_CONTEXT_ALL 0x00000100/* 256 */ +#define VISLANDS30_IV_EXTID_VM_CONTEXT0_ALL 0 +#define VISLANDS30_IV_EXTID_VM_CONTEXT1_ALL 1 + + +/* IV Extended IDs */ +#define VISLANDS30_IV_EXTID_NONE 0x00000000 +#define VISLANDS30_IV_EXTID_INVALID 0xffffffff +#endif // _IVSRCID_VISLANDS30_H_ --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx