Re: [RFC PATCH 12/40] drm/amd/display: add plane HDR multiplier driver-private property

2023-05-09 Thread Harry Wentland
On 5/9/23 16:35, Joshua Ashton wrote: > FWIW, we technically do use it right now, but it is always set to 1 in > S.31.32. > > Before we used shaper + 3D LUT we did use it for scaling SDR content, > but given we always have a shaper + 3D LUT it made sense for us to > roll that into there. > A

[PATCH 4/6] drm/amdkfd: Move pgmap to amdgpu_kfd_dev structure

2023-05-09 Thread Alex Deucher
From: Philip Yang VRAM pgmap resource is allocated every time when switching compute partitions because kfd_dev is re-initialized by post_partition_switch, As a result, it causes memory region resource leaking and system memory usage accounting unbalanced. pgmap resource should be allocated and

[PATCH 3/6] drm/amdgpu: Skip halting RLC on GFX v9.4.3

2023-05-09 Thread Alex Deucher
From: Lijo Lazar RLC-PMFW handshake happens periodically when GFXCLK DPM is enabled and halting RLC may cause unexpected results. Avoid halting RLC from driver side. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 23

[PATCH 6/6] drm/amdgpu: For GFX 9.4.3 APU fix vram_usage value

2023-05-09 Thread Alex Deucher
From: Harish Kasiviswanathan For GFX 9.4.3 APP APU VRAM is allocated in GTT domain. While freeing memory check for GTT domain instead of VRAM if it is APP APU Signed-off-by: Harish Kasiviswanathan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_a

[PATCH 5/6] drm/amdgpu: Enable NPS4 CPX mode

2023-05-09 Thread Alex Deucher
From: Philip Yang CPX compute mode is valid mode for NPS4 memory partition mode. Signed-off-by: Philip Yang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH 2/6] drm/amdgpu: Fix register accesses in GFX v9.4.3

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Access registers with the right xcc id. Also, remove the unused logic as PG is not used in GFX v9.4.3 Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 16 +++- 1 file changed, 3 inserti

[PATCH 1/6] drm/amdkfd: Increase queue number per process to 255 on GFX9.4.3

2023-05-09 Thread Alex Deucher
From: Mukul Joshi Increase the maximum number of queues that can be created per process to 255 on GFX 9.4.3. There is no HWS limitation restricting the number queues that can be created. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- drivers/gpu/drm/am

[PATCH 6/9] drm/amdgpu: Add query_ras_error_count for jpeg v4_0_3

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Add query_ras_error_count callback for jpeg v4_0_3. It will be used to query and log jpeg error count. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 64 1 file changed

[PATCH 8/9] drm/amdgpu: Initialize jpeg v4_0_3 ras function

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Initialize jpeg v4_0_3 ras function. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 26 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v

[PATCH 9/9] drm/amdgpu: Adjust the sequence to query ras error info

2023-05-09 Thread Alex Deucher
From: Hawking Zhang It turns out STATUS_VALID_FLAG needs to be checked ahead of any other fields. ADDRESS_VALID_FLAG and ERR_INFO_VALID_FLAG only manages ADDRESS and ERR_INFO field respectively. driver should continue poll ERR CNT field even ERR_INFO_VALD_FLAG is not set. Signed-off-by: Hawking

[PATCH 5/9] drm/amdgpu: Re-enable VCN RAS if DPG is enabled

2023-05-09 Thread Alex Deucher
From: Hawking Zhang VCN RAS enablement sequence needs to be added in DPG HW init sequence. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 27 - 1 file changed, 26 insertions(+), 1 deletion(-

[PATCH 7/9] drm/amdgpu: Add reset_ras_error_count for jpeg v4_0_3

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Add reset_ras_error_count callback for jpeg v4_0_3. It will be used to reset jpeg ras error count. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 22 ++ 1 file changed, 22 i

[PATCH 1/9] drm/amdgpu: Add vcn/jpeg ras err status registers

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Add new ras error status registers introduced in vcn v4_0_3 to log vcn and jpeg ras error. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- .../include/asic_reg/vcn/vcn_4_0_3_offset.h | 78 +++ .../include/asic_reg/vcn/vcn_4_0_3_sh_mas

[PATCH 3/9] drm/amdgpu: Add reset_ras_error_count for vcn v4_0_3

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Add reset_ras_error_count callback for vcn v4_0_3. It will be used to reset vcn ras error count. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 22 ++ 1 file changed, 22 inse

[PATCH 2/9] drm/amdgpu: Add query_ras_error_count for vcn v4_0_3

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Add query_ras_error_count callback for vcn v4_0_3. It will be used to query and log vcn error count. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 36 + 1 file changed,

[PATCH 4/9] drm/amdgpu: Initialize vcn v4_0_3 ras function

2023-05-09 Thread Alex Deucher
From: Hawking Zhang Initialize vcn v4_0_3 ras function Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 26 + 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0

[PATCH 3/4] drm/amdgpu: Set memory partitions to 1 for SRIOV.

2023-05-09 Thread Alex Deucher
From: Gavin Wan For SRIOV, the memory partitions are set on host drover. Each VF only has one memory partition. We need set the memory partitions to 1 on guest driver for SRIOV. V2: sqaush in fix ("drm/amdgpu: Fix memory range info of GC 9.4.3 VFs") Signed-off-by: Gavin Wan Acked-by: Zhigang L

[PATCH 4/4] drm/amdgpu: Checked if the pointer NULL before use it.

2023-05-09 Thread Alex Deucher
From: Gavin Wan For SRIOV on some parts, the host driver does not post VBIOS. So the guest cannot get bios information. Therefore, adev->virt.fw_reserve.p_pf2vf and adev->mode_info.atom_context are NULL. Signed-off-by: Gavin Wan Reviewed-by: Zhigang Luo Acked-by: Felix Kuehling Signed-off-by:

[PATCH 1/4] drm/amdgpu: Add PSP supporting PSP 13.0.6 SRIOV ucode init.

2023-05-09 Thread Alex Deucher
From: Gavin Wan Add PSP supporting PSP 13.0.6 SRIOV ucode init. Signed-off-by: Gavin Wan Reviewed-by: Yang Wang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gp

[PATCH 2/4] drm/amdgpu: Skip using MC FB Offset when APU flag is set for SRIOV.

2023-05-09 Thread Alex Deucher
From: Gavin Wan The MC_VM_FB_OFFSET is PF only register. It cannot be read on VF. So, the driver should not use MC_VM_FB_OFFSET address to set the address of dev->gmc.aper_base. Signed-off-by: Gavin Wan Reviewed-by: Zhigang Luo Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v

[PATCH 2/3] drm/amdgpu: Return error on invalid compute mode

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Return error if an invalid compute partition mode is requested. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 +- 2 fi

[PATCH 3/3] drm/amdgpu: Add PSP spatial parition interface

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Add PSP ring command interface for spatial partitioning. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 21 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++ drivers/gpu/drm/

[PATCH 1/3] drm/amdgpu: Add compute mode descriptor function

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Keep a helper function to get description of compute partition mode. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 24 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 21 +

[PATCH] drm/amdkfd: Remove skiping userptr buffer mapping when mmu notifier marks it as invalid

2023-05-09 Thread Alex Deucher
From: Xiaogang Chen mmu notifier does not always hold mm->sem during call back. That causes a race condition between kfd userprt buffer mapping and mmu notifier which leds to gpu shadder or SDMA access userptr buffer before it has been mapped to gpu VM. Always map userptr buffer to avoid that tho

[PATCH] drm/amdgpu: Fix unmapping of aperture

2023-05-09 Thread Alex Deucher
From: Lijo Lazar When aperture size is zero, there is no mapping done. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH] drm/amdgpu: Fix xGMI access P2P mapping failure on GFXIP 9.4.3

2023-05-09 Thread Alex Deucher
From: Rajneesh Bhardwaj On GFXIP 9.4.3, we dont need to rely on xGMI hive info to determine P2P access. Reviewed-by: Felix Kuehling Acked-and-tested-by: Mukul Joshi Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 f

[PATCH 2/3] drm/amdgpu: Set TTM pools for memory partitions

2023-05-09 Thread Alex Deucher
From: Philip Yang For native mode only, create TTM pool for each memory partition to store the NUMA node id, then the TTM pool will be selected using memory partition id to allocate memory from the correct partition. Acked-by: Christian König (rajneesh: changed need_swiotlb and need_dma32 to fa

[PATCH 3/3] drm/amdkfd: Native mode memory partition support

2023-05-09 Thread Alex Deucher
From: Rajneesh Bhardwaj For native mode, after amdgpu_bo is created on CPU domain, then call amdgpu_ttm_tt_set_mem_pool to select the TTM pool using bo->mem_id. ttm_bo_validate will allocate the memory to the correct memory partition before mapping to GPUs. Reviewed-by: Felix Kuehling Acked-and

[PATCH 1/3] drm/ttm: export ttm_pool_fini for cleanup

2023-05-09 Thread Alex Deucher
From: Rajneesh Bhardwaj ttm_pool_init is exported and used outside of ttm subsystem with amdgpu_ttm interface, similarly export ttm_pool_fini for proper cleanup. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_pool.c | 1 +

[PATCH 05/14] drm/amdgpu: Add API to get numa information of XCC

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Add interface to get numa information of ACPI XCC object. The interface uses logical id to identify an XCC. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 14 +++ drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 10/14] drm/amdgpu: Move initialization of xcp before kfd

2023-05-09 Thread Alex Deucher
From: Lijo Lazar After partition switch, fill all relevant xcp information before kfd starts initialization. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 16 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH 12/14] drm/amdkfd: Use xcc mask for identifying xcc

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Instead of start xcc id and number of xcc per node, use the xcc mask which is the mask of logical ids of xccs belonging to a parition. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 9 +- .../drm/

[PATCH 13/14] drm/amdgpu: Check memory ranges for valid xcp mode

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Check the memory ranges available to the device also for deciding a valid partition mode. Only select combinations are valid for a particular mode. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Philip Yang Signed-off-by: Alex Deucher --- .../drm/amd/amdgpu/aqua_

[PATCH 09/14] drm/amdgpu: Fill xcp mem node in aquavanjaram

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Implement callbacks to fill memory node information in aquavanjaram. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- .../drm/amd/amdgpu/aqua_vanjaram_reg_init.c | 61 ++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --g

[PATCH 14/14] drm/amdgpu: Add auto mode for compute partition

2023-05-09 Thread Alex Deucher
From: Lijo Lazar When auto mode is specified, driver will choose the right compute partition mode. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Philip Yang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_d

[PATCH 07/14] drm/amdgpu: Initialize memory ranges for GC 9.4.3

2023-05-09 Thread Alex Deucher
From: Lijo Lazar GC 9.4.3 ASICS may have memory split into multiple partitions.Initialize the memory partition information for each range. The information may be in the form of a numa node id or a range of pages. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- dr

[PATCH 11/14] drm/amdkfd: Add xcp reference to kfd node

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Fetch xcp information from xcp_mgr and also add xcc_mask to kfd node. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 19 +-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 +++ 2 files chan

[PATCH 08/14] drm/amdgpu: Add callback to fill xcp memory id

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Add callback in xcp interface to fill xcp memory id information. Memory id is used to identify the range/partition of an XCP from the available memory partitions in device. Also, fill the id information. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher

[PATCH 01/14] drm/amdgpu: Add utility functions for xcp

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Add utility functions to get details of xcp and iterate through available xcps. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 12 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h | 31

[PATCH 06/14] drm/amdgpu: Add memory partitions to gmc

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Some ASICs have the device memory divided into multiple partitions. The parititions could be denoted by a numa node or by a range of pages. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 17 +

[PATCH 04/14] drm/amdgpu: Store additional numa node information

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Use a struct to store additional numa node information including size and base address. Add numa_info pointer to xcc object to point to the relevant structure based on its proximity domain. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/

[PATCH 02/14] drm/amdgpu: Move memory partition query to gmc

2023-05-09 Thread Alex Deucher
From: Lijo Lazar GMC block handles memory related information, it makes more sense to keep memory partition functions in gmc block. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 30 + drivers/gpu/drm/amd

[PATCH 03/14] drm/amdgpu: Get supported memory partition modes

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Expand the interface to get supported memory partition modes also along with the current memory partition mode. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0

[PATCH] drm/amdgpu: Use apt name for FW reserved region

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Use the generic term fw_reserved_memory for FW reserve region. This region may also hold discovery TMR in addition to other reserve regions. This region size could be larger than discovery tmr size, hence don't change the discovery tmr size based on this. Signed-off-by: Lijo Laz

[PATCH] drm/amdgpu: Use GPU VA space for IH v4.4.2 in APU

2023-05-09 Thread Alex Deucher
From: Lijo Lazar For IH ring buffer and read/write pointers, use GPU VA space rather than Guest PA on APU configs. Access through Guest PA doesn't work when IOMMU is enabled. It is also beneficial in NUMA configs as it allocates from the closest numa pool in a numa enabled system. Signed-off-by:

[PATCH] drm/amdgpu: Simplify aquavanjram instance mapping

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Simplify so as to use the same sequence to assign logical to physical ids for all IPs. Signed-off-by: Lijo Lazar Acked-by: Leo Liu Tested-by: James Zhu Signed-off-by: Alex Deucher --- .../drm/amd/amdgpu/aqua_vanjaram_reg_init.c | 33 +-- 1 file changed, 8

[PATCH 12/12] drm/amdgpu/vcn: Use buffer object's deletion logic

2023-05-09 Thread Alex Deucher
From: Lijo Lazar VCN DPG buffer object is intialized to NULL. If allotted, buffer object deletion logic will take care of NULL check and delete accordingly. This is useful for cases where indirect sram flag could be manipulated later after buffer allocation. Signed-off-by: Lijo Lazar Reviewed-b

[PATCH 10/12] drm/amdgpu: Add a read after write DB_CTRL for vcn_v4_0_3

2023-05-09 Thread Alex Deucher
From: Sonny Jiang To make sure VCN DB_CTRL is delivered before doorbell write. Signed-off-by: Sonny Jiang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4

[PATCH 07/12] drm/amdgpu: use physical AID index for ring name

2023-05-09 Thread Alex Deucher
From: James Zhu Use physical AID index for VCN/JPEG ring name instead of logical AID index. Signed-off-by: James Zhu Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 2 files changed, 2 i

[PATCH 08/12] drm/amdgpu: A workaround for JPEG_v4_0_3 ring test fail

2023-05-09 Thread Alex Deucher
From: Sonny Jiang The jpeg_v4_0_3 jpeg_pitch register uses UVD_JRBC_SCRATCH0. It needs to move WREG() to after jpeg_start. Switch to a posted register write when doing the ring test to make sure the register write lands before we test the result. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu

[PATCH 11/12] drm/amdgpu: Use a different value than 0xDEADBEEF for jpeg ring test

2023-05-09 Thread Alex Deucher
From: Sonny Jiang The 0xDEADBEEF standard anti-hang value. Use it may cause fake pass. Signed-off-by: Sonny Jiang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/g

[PATCH 05/12] drm/amdgpu: Fix harvest reporting of VCN

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Use VCN instance mask to check if an instance is harvested or not. Signed-off-by: Lijo Lazar Reviewed-by: James Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH 09/12] drm/amdgpu: fixes a JPEG get write/read pointer bug

2023-05-09 Thread Alex Deucher
From: Sonny Jiang Need parentheses for the micro parameters. Signed-off-by: Sonny Jiang Reviewed-by: David (Ming Qiang) Wu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgp

[PATCH 06/12] drm/amdgpu/vcn: use dummy register selects AID for VCN_RAM ucode

2023-05-09 Thread Alex Deucher
From: James Zhu Use dummy register 0xDEADBEEF selects AID for PSP VCN_RAM ucode. Signed-off-by: James Zhu Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/dr

[PATCH 04/12] drm/amdgpu: Use logical ids for VCN/JPEG v4.0.3

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Address VCN/JPEG instances using logical ids. Whenever register access is required, get the physical instance using GET_INST. Signed-off-by: Lijo Lazar Acked-by: Leo Liu Tested-by: James Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 29

[PATCH 02/12] drm/amdgpu: Add instance mask for VCN and JPEG

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Keep an instance mask formed by physical instance numbers for VCN and JPEG IPs. Populate the mask from discovery table information. Signed-off-by: Lijo Lazar Acked-by: Leo Liu Tested-by: James Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

[PATCH 03/12] drm/amdgpu: Add VCN logical to physical id mapping

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Add mappings for logical to physical id for VCN/JPEG 4.0.3 v2: make local function static (Alex) Signed-off-by: Lijo Lazar Acked-by: Leo Liu Tested-by: James Zhu Signed-off-by: Alex Deucher --- .../drm/amd/amdgpu/aqua_vanjaram_reg_init.c| 18 ++ 1 file

[PATCH 01/12] drm/amdgpu: Load vcn_v4_0_3 ucode during early_init

2023-05-09 Thread Alex Deucher
From: Sonny Jiang VCN loading ucode is moved to early_init with using 'amdgpu_ucode_*' helpers. Reviewed-by: Leo Liu Signed-off-by: Sonny Jiang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

[PATCH 6/7] drm/amdgpu: Fix discovery sys node harvest info

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Initalize syfs nodes after harvest information is fetched and fetch the correct harvest info based on each IP instance. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 41 +-- 1 file

[PATCH 1/7] drm/amdgpu: Add parsing of acpi xcc objects

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Add parsing of ACPI xcc objects and fill in relevant info from them by invoking the DSM methods. Signed-off-by: Lijo Lazar Reviewed-and-tested-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 + drivers/gpu/drm/amd/amdgpu/a

[PATCH 7/7] drm/amdgpu: preserve the num_links in case of reflection

2023-05-09 Thread Alex Deucher
From: Shiwu Zhang For topology reflection, each socket to every other socket has the exactly same topology info as the other way around. So it is safe to keep the reflected num_links value otherwise it will be overriden by the link info output of GET_PEER_LINKS command. Signed-off-by: Shiwu Zhan

[PATCH 5/7] drm/amdkfd: Flush TLB after unmapping for GFX v9.4.3

2023-05-09 Thread Alex Deucher
From: Philip Yang kfd_flush_tlb_after_unmap should return true for GFX v9.4.3, to do TLB heavyweight flush after unmapping from GPU to guarantee that the GPU will not access pages after they have been unmapped. This also helps improve the mapping to GPU performance. Without this, KFD accidently

[PATCH 4/7] drm/amdgpu: Add fallback path for discovery info

2023-05-09 Thread Alex Deucher
From: Lijo Lazar If SOC doesn't expose dedicated vram, discovery region may be available through system memory. Rename the existing interface to generic read_binary_from_mem and add a fallback path to read from system memory. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by:

[PATCH 3/7] drm/amdgpu: Read discovery info from system memory

2023-05-09 Thread Alex Deucher
From: Lijo Lazar On certain ASICs, discovery info is available at reserved region in system memory. The location is available through ACPI interface. Add API to read discovery info from there. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/dr

[PATCH 2/7] drm/amdgpu: Add API to get tmr info from acpi

2023-05-09 Thread Alex Deucher
From: Lijo Lazar In certain configs, TMR information is available from ACPI. Add API to fetch the information. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

[PATCH 01/12] drm/amd/pm: Update pmfw header files for SMU v13.0.6

2023-05-09 Thread Alex Deucher
From: Asad kamal Update driver metrics table for SMU v13.0.6 to be compatible with PMFW v85.47 version Signed-off-by: Asad kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- .../drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_6.h | 4 ++-- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw

[PATCH 4/4] drm/amdkfd: Enable SVM on Native mode

2023-05-09 Thread Alex Deucher
From: Mukul Joshi This patch enables SVM capability on GFX9.4.3 when run in Native mode. It also sets best_prefetch and best_restore locations to CPU as there is no VRAM. Signed-off-by: Mukul Joshi Acked-by: Rajneesh Bhardwaj Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- drive

[PATCH 3/4] drm/amdgpu: Add FGCG for GFX v9.4.3

2023-05-09 Thread Alex Deucher
From: Lijo Lazar It's not fine grain, behaves similar to MGCG. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/driver

[PATCH 2/4] drm/amdgpu: Use transient mode during xcp switch

2023-05-09 Thread Alex Deucher
From: Lijo Lazar During partition switch, keep the state as transient mode. Fetch the latest state if switch fails. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 18 +++--- drivers/gpu/drm/amd/amdgpu

[PATCH 1/4] drm/amdgpu: Add flags for partition mode query

2023-05-09 Thread Alex Deucher
From: Lijo Lazar It's not required to take lock on all cases while querying partition mode. Querying partition mode during KFD init process doesn't need to take a lock. Init process after a switch will already be happening under lock. Control the behaviour by adding flags to xcp_query_partition_m

[PATCH 12/12] drm/amd/pm: fix wrong smu socclk value

2023-05-09 Thread Alex Deucher
From: Yang Wang fix typo about smu socclk value. Signed-off-by: Yang Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v1

[PATCH 11/12] drm/amdgpu: Add mode-2 reset in SMU v13.0.6

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Modifications to mode-2 reset flow for SMU v13.0.6 ASICs. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 9 + .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c |

[PATCH 07/12] drm/amd/pm: Update hw mon attributes for GC version 9.4.3

2023-05-09 Thread Alex Deucher
From: Asad Kamal Update hw mon attributes for GC Version 9.4.3 to valid ones on APU and Non APU systems v2: Group checks along existing one Added power limit & mclock for gc version 9.4.3 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/p

[PATCH 10/12] drm/amd/pm: Notify PMFW about driver unload cases

2023-05-09 Thread Alex Deucher
From: Lijo Lazar On SMU v13.0.6 APUs, FW will need to take some actions if driver is going to halt RLC. Notify PMFW that driver is not going to manage device so that FW takes care of the required actions. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Asad Kamal Signed-off-by: Alex

[PATCH 09/12] drm/amd/pm: Update PMFW headers for version 85.54

2023-05-09 Thread Alex Deucher
From: Lijo Lazar It adds message support for FW notification on driver unload. Signed-off-by: Lijo Lazar Reviewed-by: Le Ma Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher --- .../inc/pmfw_if/smu13_driver_if_v13_0_6.h | 18 -- .../pm/swsmu/inc/pmfw_if/smu_v13_0_6_pp

[PATCH 05/12] drm/amd/pm: Keep interface version in PMFW header

2023-05-09 Thread Alex Deucher
From: Lijo Lazar Use the interface version directly from PMFW interface header file rather than keeping another definition in common smu13 file. Signed-off-by: Lijo Lazar Reviewed-by: Asad kamal Signed-off-by: Alex Deucher --- .../inc/pmfw_if/smu13_driver_if_aldebaran.h | 2 + .../inc/pmf

[PATCH 08/12] drm/amd/pm: Expose mem temperature for GC version 9.4.3

2023-05-09 Thread Alex Deucher
From: Asad Kamal Add mem temperature as part of hw mon attributes for GC version 9.4.3 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/g

[PATCH 03/12] drm/amd/pm: Update pmfw header files for SMU v13.0.6

2023-05-09 Thread Alex Deucher
From: Asad kamal Update driver interface for SMU v13.0.6 to be compatible with PMFW v85.48 version Signed-off-by: Asad kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_6.h | 12 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_

[PATCH 06/12] drm/amd/pm: Initialize power limit for SMU v13.0.6

2023-05-09 Thread Alex Deucher
From: Lijo Lazar PMFW will initialize the power limit values even if PPT throttler feature is disabled. Fetch the limit value from FW. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 15 --- 1 f

[PATCH 02/12] drm/amd/pm: Update gfx clock frequency for SMU v13.0.6

2023-05-09 Thread Alex Deucher
From: Asad kamal Update gfx clock frequency from metric table for SMU v13.0.6 Signed-off-by: Asad kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a

[PATCH 04/12] drm/amd/pm: Add ih for SMU v13.0.6 thermal throttling

2023-05-09 Thread Alex Deucher
From: Asad kamal Add interrupt handler for thermal throttler events from PMFW on SMUv13.0.6 Signed-off-by: Asad kamal Acked-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 107 +- 1 file changed, 104 inser

[PATCH] drm/amdgpu: remove irq_get return value check in gfx_ras_late_init

2023-05-09 Thread Alex Deucher
From: Tao Zhou Not all ASICs support GFX CP ECC irq. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

[PATCH] drm/amdgpu: change the print level to warn for ip block disabled

2023-05-09 Thread Alex Deucher
From: Le Ma Avoid to mislead users as it's not a real error. Signed-off-by: Le Ma Reviewed-by: Asad Kamal Reviewed-by: Amber Lin Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: fix sdma instance

2023-05-09 Thread Alex Deucher
From: "Stanley.Yang" It should change logical instance to device instance to query ras info Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 7 +-- 1 file changed, 5 insertions(+), 2 d

[PATCH] drm/amdgpu: increase AMDGPU_MAX_RINGS

2023-05-09 Thread Alex Deucher
From: Le Ma On newer GPUs, the number of kernel rings are increased. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amdgpu: Increase Max GPU instance to 64

2023-05-09 Thread Alex Deucher
From: Mukul Joshi Increase Max GPU instances to 64 to handle multi-socket system with GFX 9.4.3 asic. Signed-off-by: Mukul Joshi Acked-by: Felix Kuehling Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH 2/3] drm/amdgpu: Implement new dummy vram manager

2023-05-09 Thread Alex Deucher
From: Rajneesh Bhardwaj This adds dummy vram manager to support ASICs that do not have a dedicated or carvedout vram domain. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 67 ++-- 1

[PATCH 1/3] drm/amdgpu: Handle VRAM dependencies on GFXIP9.4.3

2023-05-09 Thread Alex Deucher
From: Rajneesh Bhardwaj [For 1P NPS1 mode driver bringup] Changes required to initialize the amdgpu driver with frontdoor firmware loading and discovery=2 with the native mode SBIOS that enables CPU GPU unified interleaved memory. sudo modprobe amdgpu discovery=2 Once PSP TMR region is reporte

[PATCH 3/3] drm/amdgpu: Create VRAM BOs on GTT for GFXIP9.4.3

2023-05-09 Thread Alex Deucher
From: Rajneesh Bhardwaj On GFXIP9.4.3 APP APU where there is no dedicated VRAM domain handle VRAM BO allocation requests on CPU domain and validate them on GTT. Support for handling multi-socket and multi-numa partitions within a socket will be added by future patches, this enables 1P NPS1 asic

Re: [PATCH] drm/sched: Check scheduler work queue before calling timeout handling

2023-05-09 Thread Alex Deucher
+ dri-devel On Tue, May 9, 2023 at 5:43 PM wrote: > > From: Vitaly Prosyak > > During an IGT GPU reset test we see again oops despite of > commit 0c8c901aaaebc9bf8bf189ffc116e678f7a2dc16 > drm/sched: Check scheduler ready before calling timeout handling. > > It uses ready condition whether to ca

[PATCH] drm/sched: Check scheduler work queue before calling timeout handling

2023-05-09 Thread vitaly.prosyak
From: Vitaly Prosyak During an IGT GPU reset test we see again oops despite of commit 0c8c901aaaebc9bf8bf189ffc116e678f7a2dc16 drm/sched: Check scheduler ready before calling timeout handling. It uses ready condition whether to call drm_sched_fault which unwind the TDR leads to GPU reset. Howeve

Re: [RFC PATCH 12/40] drm/amd/display: add plane HDR multiplier driver-private property

2023-05-09 Thread Joshua Ashton
FWIW, we technically do use it right now, but it is always set to 1 in S.31.32. Before we used shaper + 3D LUT we did use it for scaling SDR content, but given we always have a shaper + 3D LUT it made sense for us to roll that into there. On Tue, 9 May 2023 at 20:00, Harry Wentland wrote: > > On

Re: [RFC PATCH 12/40] drm/amd/display: add plane HDR multiplier driver-private property

2023-05-09 Thread Harry Wentland
On 5/9/23 12:54, Joshua Ashton wrote: > We currently do not have a use for this as we settled on per-plane 3D > LUT + Shaper, but we might end up wanting to use in our scRGB stack > someday so I would like to keep it. > uAPI should always have a userspace that uses it. But if we go and put it beh

[PATCH 2/2] amdgpu: validate drm_amdgpu_gem_va against overflows

2023-05-09 Thread Chia-I Wu
The existing validations are incorrect and insufficient. This is motivated by OOB access in amdgpu_vm_update_range when offset_in_bo+map_size overflows. Fixes: 9f7eb5367d00 ("drm/amdgpu: actually use the VM map parameters") --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +-- drivers/gpu/drm

[PATCH 1/2] amdgpu: validate drm_amdgpu_gem_va addrs for all ops

2023-05-09 Thread Chia-I Wu
Extend the address and size validations to AMDGPU_VA_OP_UNMAP and AMDGPU_VA_OP_CLEAR by moving the validations to amdgpu_gem_va_ioctl. Internal users of amdgpu_vm_bo_map are no longer validated but they should be fine. Userspace (radeonsi and radv) seems fine as well. --- drivers/gpu/drm/amd/amd

Re: [RFC PATCH 00/40] drm/amd/display: add AMD driver-specific properties for color mgmt

2023-05-09 Thread Harry Wentland
On 5/9/23 12:52, Melissa Wen wrote: > On 05/08, Harry Wentland wrote: >> >> >> On 4/23/23 10:10, Melissa Wen wrote: >>> Hi all, >>> >>> Joshua Ashton and I (with the great collaboration of Harry Wentland - >>> thanks) have been working on KMS color pipeline enhancement for Steam >>> Deck/SteamOS

Re: [RFC PATCH 03/40] drm/amd/display: introduce Steam Deck color features to AMD display driver

2023-05-09 Thread Harry Wentland
On 5/9/23 12:23, Melissa Wen wrote: > On 05/08, Harry Wentland wrote: >> On 4/23/23 10:10, Melissa Wen wrote: >>> We are enabling a large set of color calibration features to enhance KMS >>> color mgmt but these properties are specific of AMD display HW, and >>> cannot be provided by other vendo

Re: [RFC PATCH 03/40] drm/amd/display: introduce Steam Deck color features to AMD display driver

2023-05-09 Thread Harry Wentland
On 5/9/23 12:52, Joshua Ashton wrote: > I think the idea is that we wouldn't have a config option so it > doesn't inherently become linux kernel uAPI? > > Then we can just build our SteamOS kernels with that definiton set. > That's the idea. Would that work for you? Harry > On Tue, 9 May 20

Re: [PATCH 2/2] drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well

2023-05-09 Thread Guilherme G. Piccoli
On 09/05/2023 13:49, Bas Nieuwenhuizen wrote: > From: "Guilherme G. Piccoli" > > (Bas: speculative change to mirror gfx10/gfx9) > > Signed-off-by: Guilherme G. Piccoli > Cc: Alex Deucher > --- Thanks a lot for both patches Bas! This second one, despite I've attached it on gitlab, you should a

Re: [RFC PATCH 07/40] drm/amd/display: add CRTC gamma TF to driver-private props

2023-05-09 Thread Joshua Ashton
I am okay with us dropping the shaper + 3D LUT from crtc. It has problems anyway wrt. atomicity. On Tue, 9 May 2023 at 16:34, Melissa Wen wrote: > > On 05/08, Harry Wentland wrote: > > > > > > On 4/23/23 10:10, Melissa Wen wrote: > > > From: Joshua Ashton > > > > > > Add predefined transfer func

  1   2   >