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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: add 64bit doorbell assignments

Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ken Wang and committed by
Alex Deucher
39807b93 d0e95758

+68
+68
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 618 618 u32 num_doorbells; /* Number of doorbells actually reserved for amdgpu. */ 619 619 }; 620 620 621 + /* 622 + * 64bit doorbell, offset are in QWORD, occupy 2KB doorbell space 623 + */ 624 + typedef enum _AMDGPU_DOORBELL64_ASSIGNMENT 625 + { 626 + /* 627 + * All compute related doorbells: kiq, hiq, diq, traditional compute queue, user queue, should locate in 628 + * a continues range so that programming CP_MEC_DOORBELL_RANGE_LOWER/UPPER can cover this range. 629 + * Compute related doorbells are allocated from 0x00 to 0x8a 630 + */ 631 + 632 + 633 + /* kernel scheduling */ 634 + AMDGPU_DOORBELL64_KIQ = 0x00, 635 + 636 + /* HSA interface queue and debug queue */ 637 + AMDGPU_DOORBELL64_HIQ = 0x01, 638 + AMDGPU_DOORBELL64_DIQ = 0x02, 639 + 640 + /* Compute engines */ 641 + AMDGPU_DOORBELL64_MEC_RING0 = 0x03, 642 + AMDGPU_DOORBELL64_MEC_RING1 = 0x04, 643 + AMDGPU_DOORBELL64_MEC_RING2 = 0x05, 644 + AMDGPU_DOORBELL64_MEC_RING3 = 0x06, 645 + AMDGPU_DOORBELL64_MEC_RING4 = 0x07, 646 + AMDGPU_DOORBELL64_MEC_RING5 = 0x08, 647 + AMDGPU_DOORBELL64_MEC_RING6 = 0x09, 648 + AMDGPU_DOORBELL64_MEC_RING7 = 0x0a, 649 + 650 + /* User queue doorbell range (128 doorbells) */ 651 + AMDGPU_DOORBELL64_USERQUEUE_START = 0x0b, 652 + AMDGPU_DOORBELL64_USERQUEUE_END = 0x8a, 653 + 654 + /* Graphics engine */ 655 + AMDGPU_DOORBELL64_GFX_RING0 = 0x8b, 656 + 657 + /* 658 + * Other graphics doorbells can be allocated here: from 0x8c to 0xef 659 + * Graphics voltage island aperture 1 660 + * default non-graphics QWORD index is 0xF0 - 0xFF inclusive 661 + */ 662 + 663 + /* sDMA engines */ 664 + AMDGPU_DOORBELL64_sDMA_ENGINE0 = 0xF0, 665 + AMDGPU_DOORBELL64_sDMA_HI_PRI_ENGINE0 = 0xF1, 666 + AMDGPU_DOORBELL64_sDMA_ENGINE1 = 0xF2, 667 + AMDGPU_DOORBELL64_sDMA_HI_PRI_ENGINE1 = 0xF3, 668 + 669 + /* Interrupt handler */ 670 + AMDGPU_DOORBELL64_IH = 0xF4, /* For legacy interrupt ring buffer */ 671 + AMDGPU_DOORBELL64_IH_RING1 = 0xF5, /* For page migration request log */ 672 + AMDGPU_DOORBELL64_IH_RING2 = 0xF6, /* For page migration translation/invalidation log */ 673 + 674 + /* VCN engine */ 675 + AMDGPU_DOORBELL64_VCN0 = 0xF8, 676 + AMDGPU_DOORBELL64_VCN1 = 0xF9, 677 + AMDGPU_DOORBELL64_VCN2 = 0xFA, 678 + AMDGPU_DOORBELL64_VCN3 = 0xFB, 679 + AMDGPU_DOORBELL64_VCN4 = 0xFC, 680 + AMDGPU_DOORBELL64_VCN5 = 0xFD, 681 + AMDGPU_DOORBELL64_VCN6 = 0xFE, 682 + AMDGPU_DOORBELL64_VCN7 = 0xFF, 683 + 684 + AMDGPU_DOORBELL64_MAX_ASSIGNMENT = 0xFF, 685 + AMDGPU_DOORBELL64_INVALID = 0xFFFF 686 + } AMDGPU_DOORBELL64_ASSIGNMENT; 687 + 688 + 621 689 void amdgpu_doorbell_get_kfd_info(struct amdgpu_device *adev, 622 690 phys_addr_t *aperture_base, 623 691 size_t *aperture_size,