[QUESTION] gfvhub_v2_1 updates CNTL regs before initialize related page table address

2023-05-19 Thread Zibin Liu
Hi, I'm looking at the initialization sequences in gfxhub_v2_1.c. I'm confused on whether the GCVM_CONTEXT1_CNTL CNTL reg can be written before the corresponding GCVM_CONTEXT1_PAGE_TABLE_START_ADDR and GCVM_CONTEXT1_PAGE_TABLE_END_ADDR reg is written. Here is the background: *

Re: [PATCH v4 07/10] drm/amdgpu: map usermode queue into MES

2023-05-19 Thread Alex Deucher
On Mon, Apr 24, 2023 at 1:39 PM Shashank Sharma wrote: > > This patch adds new functions to map/unmap a usermode queue into > the FW, using the MES ring. As soon as this mapping is done, the > queue would be considered ready to accept the workload. > > V1: Addressed review comments from Alex on

Re: [PATCH v4 06/10] drm/amdgpu: set FW parameters in v11_struct

2023-05-19 Thread Alex Deucher
On Mon, Apr 24, 2023 at 1:39 PM Shashank Sharma wrote: > > From: Arvind Yadav > > This patch sets new parameters defined in v11_struct for > usermode queue with the respective allocated gpu context > space addresses. > > V4: Split the patch into two parts, keep only the set parameter > part

Re: [PATCH v4 05/10] drm/amdgpu: create context space for usermode queue

2023-05-19 Thread Alex Deucher
On Mon, Apr 24, 2023 at 1:39 PM Shashank Sharma wrote: > > The FW expects us to allocate at least one page as context > space to process gang, process, GDS and FW related work. > This patch creates a joint object for the same, and calculates > GPU space offsets for each of these spaces. > > V1:

Re: [PATCH v4 04/10] drm/amdgpu: create GFX-gen11 MQD for userqueue

2023-05-19 Thread Alex Deucher
On Mon, Apr 24, 2023 at 1:39 PM Shashank Sharma wrote: > > A Memory queue descriptor (MQD) of a userqueue defines it in > the hw's context. As MQD format can vary between different > graphics IPs, we need gfx GEN specific handlers to create MQDs. > > This patch: > - Introduces MQD handler

Re: [PATCH v4 01/10] drm/amdgpu: UAPI for user queue management

2023-05-19 Thread Alex Deucher
On Mon, Apr 24, 2023 at 1:39 PM Shashank Sharma wrote: > > From: Alex Deucher > > This patch intorduces new UAPI/IOCTL for usermode graphics > queue. The userspace app will fill this structure and request > the graphics driver to add a graphics work queue for it. The > output of this UAPI is a

Re: [PATCH v2] drm/amdgpu: Fix the EPERM error when get user pages

2023-05-19 Thread Felix Kuehling
On 2023-05-19 08:02, Ma Jun wrote: Check and pass the readonly flags when set amdgpu_ttm_tt flags for readonly ptr pages. Otherwise, there is EPERM error returned during the KFDExceptionTest.PermissionFaultUserPointer test on ploaris10. I remember you asked me about this maybe 2 weeks

Re: [PATCH] drm/amdkfd: Align partition memory size to page size

2023-05-19 Thread Felix Kuehling
On 2023-05-19 10:19, Philip Yang wrote: The compute partition memory size calculated from KFD_XCP_MEMORY_SIZE may not align to page size if xcp_mgr->num_xcp_per_mem_partition is 6. Change the KFD_XCP_MEMORY_SIZE macro to return page align size, so KFD node memory size reported in sysfs is page

Re: [PATCH] drm/amd/pm: Fix output of pp_od_clk_voltage

2023-05-19 Thread Alex Deucher
On Mon, Nov 14, 2022 at 8:57 PM Jonatas Esteves wrote: > > Printing the other clock types should not be conditioned on being able > to print OD_SCLK. Some GPUs currently have limited capability of only > printing a subset of these. > > Since this condition was introduced in v5.18-rc1, reading

Re: [PATCH v4] drm/amd: Flush any delayed gfxoff on suspend entry

2023-05-19 Thread Deucher, Alexander
[AMD Official Use Only - General] GFX PG is a pre-requisite for gfxoff IIRC. We shouldn't disable it on s2idle I think. Alex From: amd-gfx on behalf of Mario Limonciello Sent: Friday, May 19, 2023 12:24 AM To: Quan, Evan ; amd-gfx@lists.freedesktop.org

Re: [PATCH] drm/radeon: fix possible division-by-zero errors

2023-05-19 Thread Alex Deucher
In practice this should never happen. Applied with some minor coding style fixes. Alex On Fri, May 19, 2023 at 11:33 AM Nikita Zhandarovich wrote: > > Function rv740_get_decoded_reference_divider() may return 0 due to > unpredictable reference divider value calculated in >

Re: [PATCH] drm/radeon: stop including swiotlb.h

2023-05-19 Thread Alex Deucher
Applied. Thanks! On Thu, May 18, 2023 at 9:52 AM Christoph Hellwig wrote: > > radeon does not need swiotlb.h, so stop including it. > > Signed-off-by: Christoph Hellwig > --- > drivers/gpu/drm/radeon/radeon_ttm.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] drm/amdgpu: stop including swiotlb.h

2023-05-19 Thread Alex Deucher
Applied. Thanks! On Thu, May 18, 2023 at 9:52 AM Christoph Hellwig wrote: > > amdgpu does not need swiotlb.h, so stop including it. > > Signed-off-by: Christoph Hellwig > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] drm/amdgpu: Fix uninitalized variable in kgd2kfd_device_init

2023-05-19 Thread Alex Deucher
Reviewed-by: Alex Deucher On Fri, May 19, 2023 at 1:17 AM Srinivasan Shanmugam wrote: > > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:613:4: error: variable > 'num_xcd' is uninitialized when used here [-Werror,-Wuninitialized] > num_xcd,

Re: [PATCH] drm/amdgpu: Fix uninitalized variable in jpeg_v4_0_3_is_idle & jpeg_v4_0_3_wait_for_idle

2023-05-19 Thread Alex Deucher
On Fri, May 19, 2023 at 1:06 AM Srinivasan Shanmugam wrote: > > drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c:752:4: error: variable 'ret' is > uninitialized when used here [-Werror,-Wuninitialized] > ret &= ((RREG32_SOC15_OFFSET( > ^~~ >

Re: [PATCH] drm/amd/amdgpu: Fix errors & warnings in mmhub_v1_8.c

2023-05-19 Thread Alex Deucher
On Fri, May 19, 2023 at 6:59 AM Srinivasan Shanmugam wrote: > > Fix below errors & warnings reported by checkpatch: > > ERROR: code indent should use tabs where possible > WARNING: please, no space before tabs > WARNING: please, no spaces at the start of a line > WARNING: Prefer 'unsigned int' to

[PATCH] drm/radeon: fix possible division-by-zero errors

2023-05-19 Thread Nikita Zhandarovich
Function rv740_get_decoded_reference_divider() may return 0 due to unpredictable reference divider value calculated in radeon_atom_get_clock_dividers(). This will lead to division-by-zero error once that value is used as a divider in calculating 'clk_s'. While unlikely, this issue should

[linux-next:master] BUILD SUCCESS WITH WARNING dbd91ef4e91c1ce3a24429f5fb3876b7a0306733

2023-05-19 Thread kernel test robot
tree/branch: INFO setup_repo_specs: /db/releases/20230519164737/lkp-src/repo/*/linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: dbd91ef4e91c1ce3a24429f5fb3876b7a0306733 Add linux-next specific files for 20230519 Warning reports: https

[PATCH] drm/amdkfd: Align partition memory size to page size

2023-05-19 Thread Philip Yang
The compute partition memory size calculated from KFD_XCP_MEMORY_SIZE may not align to page size if xcp_mgr->num_xcp_per_mem_partition is 6. Change the KFD_XCP_MEMORY_SIZE macro to return page align size, so KFD node memory size reported in sysfs is page align size, to avoid application VRAM

Re: [PATCH 2/2] drm/amdgpu: Disable interrupt tracker on NBIOv7.9

2023-05-19 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Fri, May 19, 2023 at 12:42 AM Shiwu Zhang wrote: > > From: Lijo Lazar > > Enabling nBIF interrupt history tracker prevents LCLK deep sleep, > hence disable it > > Signed-off-by: Lijo Lazar > Reviewed-by: Hawking Zhang > --- >

Re: [PATCH 06/29] drm/amdgpu: keep amdgpu_ctx_mgr in ctx structure

2023-05-19 Thread Alex Deucher
On Fri, May 19, 2023 at 8:16 AM Mike Lothian wrote: > > On Wed, 10 May 2023 at 22:24, Alex Deucher wrote: > > > > From: James Zhu > > > > Keep amdgpu_ctx_mgr in ctx structure to track fpriv. > > > > Signed-off-by: James Zhu > > Acked-by: Lijo Lazar > > Signed-off-by: Alex Deucher > > --- > >

RE: [PATCH v2] drm/amdgpu: Fix unused amdgpu_acpi_get_numa_info function in amdgpu_acpi_get_node_id()

2023-05-19 Thread Lazar, Lijo
[AMD Official Use Only - General] Reviewed-by: Lijo Lazar Thanks, Lijo -Original Message- From: SHANMUGAM, SRINIVASAN Sent: Friday, May 19, 2023 6:53 PM To: Koenig, Christian ; Deucher, Alexander ; Tuikov, Luben ; Lazar, Lijo Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN

[PATCH v2] drm/amdgpu: Fix unused amdgpu_acpi_get_numa_info function in amdgpu_acpi_get_node_id()

2023-05-19 Thread Srinivasan Shanmugam
Fix the below compiler complaining error: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: unused function 'amdgpu_acpi_get_numa_info' [-Werror,-Wunused-function] static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm) ^ 1 error generated.

RE: [PATCH] drm/amdgpu: Fix unused amdgpu_acpi_get_numa_info function in amdgpu_acpi_get_node_id()

2023-05-19 Thread Lazar, Lijo
[AMD Official Use Only - General] Thanks for the fix. Please use move the +#ifdef CONFIG_ACPI_NUMA up a bit to cover amdgpu_acpi_get_numa_size as well. Thanks, Lijo -Original Message- From: SHANMUGAM, SRINIVASAN Sent: Friday, May 19, 2023 5:51 PM To: Koenig, Christian ; Deucher,

[PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused

2023-05-19 Thread Srinivasan Shanmugam
Silencing the compiler from below compilation error: drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c:704:23: error: variable 'mmhub_v1_8_mmea_err_status_reg' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = {

[PATCH] drm/amdgpu: Fix unused amdgpu_acpi_get_numa_info function in amdgpu_acpi_get_node_id()

2023-05-19 Thread Srinivasan Shanmugam
Fix the below compiler complaining error: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:860:33: error: unused function 'amdgpu_acpi_get_numa_info' [-Werror,-Wunused-function] static struct amdgpu_numa_info *amdgpu_acpi_get_numa_info(uint32_t pxm) ^ 1 error generated.

Re: [PATCH 06/29] drm/amdgpu: keep amdgpu_ctx_mgr in ctx structure

2023-05-19 Thread Mike Lothian
On Wed, 10 May 2023 at 22:24, Alex Deucher wrote: > > From: James Zhu > > Keep amdgpu_ctx_mgr in ctx structure to track fpriv. > > Signed-off-by: James Zhu > Acked-by: Lijo Lazar > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 + >

RE: [PATCH] drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7

2023-05-19 Thread Chen, Guchun
[Public] Looks it's better to add a Fixes tag like Fixes: 4dd9b5392c57 ("drm/amd/pm: fix possible power mode mismatch between driver and PMFW"), if I understand it correctly. Regards, Guchun > -Original Message- > From: amd-gfx On Behalf Of Evan > Quan > Sent: Friday, May 19, 2023

[PATCH v2] drm/amdgpu: Fix the EPERM error when get user pages

2023-05-19 Thread Ma Jun
Check and pass the readonly flags when set amdgpu_ttm_tt flags for readonly ptr pages. Otherwise, there is EPERM error returned during the KFDExceptionTest.PermissionFaultUserPointer test on ploaris10. Signed-off-by: Ma Jun --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 -

RE: [PATCH 2/2] drm/amdgpu: retire set_vga_state for some ASIC

2023-05-19 Thread Zhang, Hawking
[AMD Official Use Only - General] Series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Gao, Likun Sent: Friday, May 19, 2023 19:17 To: amd-gfx list Cc: Zhang, Hawking Subject: [PATCH 2/2] drm/amdgpu: retire set_vga_state for some ASIC [AMD Official Use

[PATCH 2/2] drm/amdgpu: retire set_vga_state for some ASIC

2023-05-19 Thread Gao, Likun
[AMD Official Use Only - General] From: Likun Gao set_vga_state operation only allowed on SI generation ASIC, retire the realted function on those ASIC which did not do anything. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/nv.c| 6 -- drivers/gpu/drm/amd/amdgpu/soc15.c |

FW: [PATCH 1/2] drm/amdgpu: fix vga_set_state NULL pointer issue

2023-05-19 Thread Gao, Likun
[AMD Official Use Only - General] From: Likun Gao Fix NULL pointer issue for vga_set_state function as not all the ASIC need this operation. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/amd/amdgpu: Fix errors & warnings in mmhub_v1_8.c

2023-05-19 Thread Srinivasan Shanmugam
Fix below errors & warnings reported by checkpatch: ERROR: code indent should use tabs where possible WARNING: please, no space before tabs WARNING: please, no spaces at the start of a line WARNING: Prefer 'unsigned int' to bare use of 'unsigned' ERROR: space prohibited before that '++' (ctx:WxB)

RE: [PATCH] drm/amdgpu: Fix uninitialized variable in gfxhub_v1_2_xcp_resume

2023-05-19 Thread Lazar, Lijo
[AMD Official Use Only - General] Reviewed-by: Lijo Lazar Thanks, Lijo -Original Message- From: SHANMUGAM, SRINIVASAN Sent: Friday, May 19, 2023 10:28 AM To: Koenig, Christian ; Deucher, Alexander ; Tuikov, Luben ; Lazar, Lijo ; Zhang, Hawking Cc: amd-gfx@lists.freedesktop.org;

[PATCH] drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7

2023-05-19 Thread Evan Quan
Otherwise, the power source switching will fail due to message unavailable. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

[bug report] drm/amd/display: Add connector HPD trigger debugfs entry

2023-05-19 Thread Dan Carpenter
Hello Eryk Brol, This is a semi-automatic email about new static checker warnings. The patch 6f77b2ac6280: "drm/amd/display: Add connector HPD trigger debugfs entry" from Aug 10, 2020, leads to the following Smatch complaint:

RE: [PATCH v2] drm/amdgpu: Fix uninitialized variable in gfx_v9_4_3_cp_resume

2023-05-19 Thread Lazar, Lijo
[AMD Official Use Only - General] Reviewed-by: Lijo Lazar Thanks, Lijo -Original Message- From: SHANMUGAM, SRINIVASAN Sent: Friday, May 19, 2023 11:50 AM To: Koenig, Christian ; Deucher, Alexander ; Tuikov, Luben ; Lazar, Lijo Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM,

RE: [PATCH] drm/amdgpu: remove unused definition

2023-05-19 Thread SHANMUGAM, SRINIVASAN
[AMD Official Use Only - General] Acked-by: Srinivasan Shanmugam -Original Message- From: Zhou1, Tao Sent: Friday, May 19, 2023 11:24 AM To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Cc: SHANMUGAM, SRINIVASAN ; Zhou1, Tao ; kernel test robot Subject: [PATCH] drm/amdgpu: remove

[PATCH v2] drm/amdgpu: Fix uninitialized variable in gfx_v9_4_3_cp_resume

2023-05-19 Thread Srinivasan Shanmugam
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:1925:6: error: variable 'r' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (amdgpu_xcp_query_partition_mode(adev->xcp_mgr, ^~