RE: [PATCH] drm/admdgpu: Add get_gfx_off_status interface

2022-07-21 Thread Liang, Prike
[Public] It looks like the amdgpu_device pointer declaration is useless, please clean it up. Meanwhile need correct the patch subject prefix to drm/amd/pm: instead of drm/admdgpu. With the above fixed the patch is Reviewed-by: Prike Liang > -Original Message- > From: Guo, Shikai > Se

[PATCH] drm/amd: Fix typo 'the the' in comment

2022-07-21 Thread Slark Xiao
Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- drivers/gpu/drm/amd/include/atombios.h| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu

[PATCH] drm/amd/pm: Add get_gfx_off_status interface

2022-07-21 Thread shikai.guo
From: Shikai Guo add get_gfx_off_status interface to yellow_carp_ppt_funcs structure. Signed-off-by: Shikai Guo --- .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 30 +++ 1 file changed, 30 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/dri

[PATCH 1/6] drm/amdgpu: add CHIP_IP_DISCOVERY support for virtualization

2022-07-21 Thread Horace Chen
For further chips we will use CHIP_IP_DISCOVERY, so add this support for virtualization Signed-off-by: Horace Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt

[PATCH 2/6] drm/amdgpu: add sriov nbio callback structure

2022-07-21 Thread Horace Chen
[Why] under SR-IOV, the nbio doorbell range will be defined by PF. So VF nbio doorbell range registers will be blocked. It will cause violation if VF access those registers directly. [How] create an nbio_v4_3_sriov_funcs for sriov nbio_v4_3 initialization to skip the setting for the doorbell range

[PATCH 3/6] drm/amdgpu: add a compute pipe reset for SR-IOV

2022-07-21 Thread Horace Chen
[Why] Under SR-IOV, we are not sure whether pipe status is good or not when doing initialization. The compute engine maybe fail to bringup if pipe status is bad. [How] For SR-IOV, disable the compute engine to do a pipe reset before we do initialization. Signed-off-by: Horace Chen --- drivers/g

[PATCH 4/6] drm/amdgpu: enable WPTR_POLL_ENABLE for sriov on sdma_v6_0

2022-07-21 Thread Horace Chen
[Why] Under SR-IOV, if VF is switched out then its doorbell will be disabled, SDMA rely on WPTR_POLL to get doorbells which was sent during VF switched-out time. [How] For SR-IOV, set SDMA WPTR_POLL_ENABLE to 1. Signed-off-by: Horace Chen --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 5 - 1

[PATCH 5/6] drm/amdgpu: refine virtualization psp fw skip check

2022-07-21 Thread Horace Chen
SR-IOV may need to load different firmwares for different ASIC inside VF. So create a new function in amdgpu_virt to check whether FW load needs to be skipped. Signed-off-by: Horace Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c |

[PATCH 6/6] drm/amdgpu: sriov remove vcn_4_0 and jpeg_4_0

2022-07-21 Thread Horace Chen
SRIOV needs to initialize mmsch instead of multimedia engines directly. So currently remove them for SR-IOV until the code and firmwares are ready. Signed-off-by: Horace Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] drm/amd/pm: Add get_gfx_off_status interface

2022-07-21 Thread Lazar, Lijo
On 7/21/2022 2:27 PM, shikai@amd.com wrote: From: Shikai Guo add get_gfx_off_status interface to yellow_carp_ppt_funcs structure. Signed-off-by: Shikai Guo --- .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 30 +++ 1 file changed, 30 insertions(+) diff --git a/driv

Re: [PATCH] drm/amd/pm: Add get_gfx_off_status interface

2022-07-21 Thread André Almeida
Hi Shikai, Could you change the commit message to drm/amd/pm: Add get_gfx_off_status interface for yellow carp Otherwise, we are going to have duplicated commit messages for each new architecture supporting get_gfx_off_status. Also, giving that this is the second version of your patch, the sub

Re: [PATCH 1/4] drm/amd/display: Drop dm_sw_gfx7_2d_thin_l_vp and dm_sw_gfx7_2d_thin_gl

2022-07-21 Thread André Almeida
Às 15:22 de 20/07/22, Maíra Canal escreveu: > As the enum dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not > used on the codebase, this commit drops those entries from enum > dm_swizzle_mode. > dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not enums, but rather enum items or enum

Re: [PATCH 2/4] drm/amd/display: Remove duplicated CalculateWriteBackDISPCLK

2022-07-21 Thread André Almeida
Às 15:22 de 20/07/22, Maíra Canal escreveu: > The functions dml30_CalculateWriteBackDISPCLK and > dml31_CalculateWriteBackDISPCLK are identical. Therefor, to avoid > code duplication, dml31_CalculateWriteBackDISPCLK is removed and > replaced by dml30_CalculateWriteBackDISPCLK. > The message shoul

Re: [PATCH] mm/gup.c: Fix formating in check_and_migrate_movable_page()

2022-07-21 Thread David Hildenbrand
On 21.07.22 04:05, Alistair Popple wrote: > Commit b05a79d4377f ("mm/gup: migrate device coherent pages when pinning > instead of failing") added a badly formatted if statement. Fix it. > > Signed-off-by: Alistair Popple > Reported-by: David Hildenbrand > --- > > Apologies Andrew for missing th

[PATCH 1/1] drm/amdkfd: Correct mmu_notifier_get failure handling

2022-07-21 Thread Philip Yang
If process has signal pending, mmu_notifier_get_locked fails and calls ops->free_notifier, kfd_process_free_notifier will schedule kfd_process_wq_release as process refcount is 1, but process structure is already freed. This use after free bug causes system crash with different backtrace. The fix

Re: [PATCH 1/6] drm/amdgpu: add CHIP_IP_DISCOVERY support for virtualization

2022-07-21 Thread Alex Deucher
On Thu, Jul 21, 2022 at 5:52 AM Horace Chen wrote: > > For further chips we will use CHIP_IP_DISCOVERY, so add this > support for virtualization All current and future chips will use CHIP_IP_DISCOVERY. If we plan to keep the register the same for all new aics, this should be fine. If we might ne

Re: [PATCH 1/1] drm/amdkfd: Correct mmu_notifier_get failure handling

2022-07-21 Thread Felix Kuehling
Am 2022-07-21 um 09:44 schrieb Philip Yang: If process has signal pending, mmu_notifier_get_locked fails and calls ops->free_notifier, kfd_process_free_notifier will schedule kfd_process_wq_release as process refcount is 1, but process structure is already freed. This use after free bug causes sy

Re: [PATCH 5/5] drm/amd/display: move FPU code from dcn301 clk mgr to DML folder

2022-07-21 Thread Maíra Canal
Hi Melissa, On 7/20/22 16:32, Melissa Wen wrote: > The -mno-gnu-attribute option in dcn301 clk mgr makefile hides a soft vs > hard fp error for powerpc. After removing this flag, we can see some FPU > code remains there: > > gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: > drivers/gpu/

[PATCH 2/5] drm/amdgpu: add VCN function in NBIO v7.7

2022-07-21 Thread Sonny Jiang
Add function to support VCN_4_0_2 doorbell Signed-off-by: Sonny Jiang Reviewed-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c ind

[PATCH 3/5] drm/amdgpu: add VCN_4_0_2 firmware support i

2022-07-21 Thread Sonny Jiang
Add VCN_4_0_2 firmware support Signed-off-by: Sonny Jiang Reviewed-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 1bfdfb9207ac..f36e4f0

[PATCH 4/5] drm/amdgpu: vcn_4_0_2 video codec query

2022-07-21 Thread Sonny Jiang
Enable support for vcn_4_0_2 video codec Signed-off-by: Sonny Jiang Reviewed-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 00e9b7089feb..68e78983f956 100644

[PATCH 1/5] drm/amdgpu: fix a vcn4 boot poll bug in emulation mode

2022-07-21 Thread Sonny Jiang
The return value should be set in vcn4 boot poll. Signed-off-by: Sonny Jiang Reviewed-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c index a91ffbf902d4..3a

[PATCH 5/5] drm/amdgpu: enable VCN cg and JPEG cg/pg i

2022-07-21 Thread Sonny Jiang
Not enable VCN pg because encode issue Signed-off-by: Sonny Jiang Reviewed-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/soc21.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 68e78983f956.

Re: [drm] 39dec70a06: leaking-addresses.proc._dyndbg_classes.

2022-07-21 Thread jim . cromie
On Wed, Jul 20, 2022 at 7:05 PM kernel test robot wrote: > > > Greeting, > > FYI, we noticed the following commit (built with gcc-11): > > commit: 39dec70a061e581e60adb416031948ecd2dcd5d0 ("drm: POC drm on dyndbg > - use in core, 2 helpers, 3 drivers.") > https://github.com/jimc/linux.git dyn-drm

Re: [PATCH 1/4] drm/amd/display: Drop dm_sw_gfx7_2d_thin_l_vp and dm_sw_gfx7_2d_thin_gl

2022-07-21 Thread Maíra Canal
On 7/21/22 10:31, André Almeida wrote: > Às 15:22 de 20/07/22, Maíra Canal escreveu: >> As the enum dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not >> used on the codebase, this commit drops those entries from enum >> dm_swizzle_mode. >> > > dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thi

[PATCH v2 1/4] drm/amd/display: Drop dm_sw_gfx7_2d_thin_l_vp and dm_sw_gfx7_2d_thin_gl

2022-07-21 Thread Maíra Canal
As the enum entries dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not used on the codebase, drop those entries from enum dm_swizzle_mode. Signed-off-by: Maíra Canal --- v1 -> v2: - Replace "enum" to "enum entries" (André Almeida). - Describe changes in imperative mood (André Almeida). ---

[PATCH v2 2/4] drm/amd/display: Remove duplicated CalculateWriteBackDISPCLK

2022-07-21 Thread Maíra Canal
The functions dml30_CalculateWriteBackDISPCLK and dml31_CalculateWriteBackDISPCLK are identical. Therefor, to avoid code duplication, replace dml31_CalculateWriteBackDISPCLK by dml30_CalculateWriteBackDISPCLK Signed-off-by: Maíra Canal --- v1 -> v2: - Describe changes in imperative mood (André Al

[PATCH v2 3/4] drm/amd/display: Remove parameters from rq_dlg_get_dlg_reg

2022-07-21 Thread Maíra Canal
Across all DCN's (except DCN32, that has a separate rq_dlg_get_dlg_reg), the parameters const bool vm_en, const bool ignore_viewport_pos, and const bool immediate_flip_support are not used on the function. Therefore, change the rq_dlg_get_dlg_reg signature by deleting those parameters. Signed-off-

[PATCH v2 4/4] drm/amd/display: Rewrite CalculateWriteBackDISPCLK function

2022-07-21 Thread Maíra Canal
Based on the dml30_CalculateWriteBackDISPCLK, it separates the DISPCLK calculations on three variables, making no functional changes, in order to make it more readable and better express that three values are being compared on dml_max. Signed-off-by: Maíra Canal Reviewed-by: André Almeida --- .

Re: [PATCH 1/5] drm/amd/display: fix soft-fp vs hard-fp on DCN 3.1 family for powerpc

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-20 15:32, Melissa Wen wrote: Move remaining FPU code to DML folder that caused compilation error for powerpc. This patch depends on [1] to prevent the error below: /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_

Re: [PATCH 2/5] drm/amd/display: remove useless FPU protection wrapper from dcn31_resource file

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-20 15:32, Melissa Wen wrote: Many lines of code in dcn31_resource_construct are wrapped by DC_FP macro to protect FPU operations; however, there is no FPU in this region. Therefore, just remove the wrapper for clarity. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/d

Re: [PATCH 3/5] drm/amd/display: move FPU code on dcn21 clk_mgr

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-20 15:32, Melissa Wen wrote: The -mno-gnu-attribute option in dcn21 clk mgr makefile hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: /gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/..

Re: [PATCH 4/5] drm/amd/display: move FPU code from dcn30 clk mgr to DML folder

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-20 15:32, Melissa Wen wrote: The -mno-gnu-attribute option in clk mgr makefile for dcn30 hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu

Re: [PATCH 5/5] drm/amd/display: move FPU code from dcn301 clk mgr to DML folder

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-20 15:32, Melissa Wen wrote: The -mno-gnu-attribute option in dcn301 clk mgr makefile hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: gcc-11.3.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld: drivers/gpu/drm/amd/amdgpu/..

Re: [PATCH v2 1/4] drm/amd/display: Drop dm_sw_gfx7_2d_thin_l_vp and dm_sw_gfx7_2d_thin_gl

2022-07-21 Thread André Almeida
Thank you for the quick revision! Series is Reviewed-by: André Almeida Às 15:36 de 21/07/22, Maíra Canal escreveu: > As the enum entries dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp > are not used on the codebase, drop those entries from enum > dm_swizzle_mode. > > Signed-off-by: Maíra Can

Re: [PATCH 0/5] drm/amd/display: FPU cleanup in clk_mgr files for powerpc

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-20 15:32, Melissa Wen wrote: An initial report from Guenter[1] shows some soft-fp vs hard-fp error from DCN31 clk mgr for powerpc. I was not able to reproduce it cross-compiling with gcc-powerpc-linux-gnu and gcc-11.3, but thanks to Maíra tips, I can reproduce the issue using make.c

Re: [PATCH 5/5] drm/amd/display: move FPU code from dcn301 clk mgr to DML folder

2022-07-21 Thread Rodrigo Siqueira Jordao
On 2022-07-21 13:26, Maíra Canal wrote: Hi Melissa, On 7/20/22 16:32, Melissa Wen wrote: The -mno-gnu-attribute option in dcn301 clk mgr makefile hides a soft vs hard fp error for powerpc. After removing this flag, we can see some FPU code remains there: gcc-11.3.0-nolibc/powerpc64-linux/bi

[PATCH 1/2] drm/amd/display: Fix dc_version detect for dcn314

2022-07-21 Thread Roman.Li
From: Roman Li [Why] While parsing dc_version redundant check leads to invalid dc_version for dcn314. [How] Remove redundant check Fixes: 923989c9cc31b ("drm/amd/display: Enable DCN314 in DC") Signed-off-by: Roman Li --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file chan

[PATCH 2/2] drm/amd/display: Specify supported modifiers for dcn314

2022-07-21 Thread Roman.Li
From: Roman Li Use same modifiers as for AMDGPU_FAMILY_GC_11_0_0 Signed-off-by: Roman Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu

Re: [PATCH 2/2] drm/amd/display: Specify supported modifiers for dcn314

2022-07-21 Thread Alex Deucher
Series is: Reviewed-by: Alex Deucher On Thu, Jul 21, 2022 at 6:04 PM wrote: > From: Roman Li > > Use same modifiers as for AMDGPU_FAMILY_GC_11_0_0 > > Signed-off-by: Roman Li > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 1 + > 1 file changed, 1 insertion(+) > > diff --gi

Re: [PATCH v2 01/29] ACPI: video: Add acpi_video_backlight_use_native() helper

2022-07-21 Thread Daniel Dadap
On 7/12/22 14:38, Hans de Goede wrote: ATM on x86 laptops where we want userspace to use the acpi_video backlight device we often register both the GPU's native backlight device and acpi_video's firmware acpi_video# backlight device. This relies on userspace preferring firmware type backlight d

Re: [PATCH v2 01/29] ACPI: video: Add acpi_video_backlight_use_native() helper

2022-07-21 Thread Daniel Dadap
On 7/21/22 16:24, Daniel Dadap wrote: On 7/12/22 14:38, Hans de Goede wrote: ATM on x86 laptops where we want userspace to use the acpi_video backlight device we often register both the GPU's native backlight device and acpi_video's firmware acpi_video# backlight device. This relies on users

RE: [PATCH] drm/amd/pm: Add get_gfx_off_status interface

2022-07-21 Thread Liu, Aaron
[AMD Official Use Only - General] Shikai, Yellow carp's SMUIO is 13_0_1. #define regSMUIO_GFX_MISC_CNTL 0x00c5 This register in your patch is from smuio_13_0_2_offset.h and this register's value is different to 13_0_1. #

[PATCH] drm/amdgpu: enable swiotlb for gmc 10.0

2022-07-21 Thread Aaron Liu
Enable swiotlb for gmc 10.0. Signed-off-by: Aaron Liu --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index 6470290aaf7d..a1a98c7fe8e1 100644 --- a/drivers/gpu/drm/am

RE: [PATCH 1/6] drm/amdgpu: add CHIP_IP_DISCOVERY support for virtualization

2022-07-21 Thread Chen, Horace
[AMD Official Use Only - General] Hi Alex, By current design, we will keep this register same for all new asics. Also, the amdgpu_detect_virtualization will be called before we read the IP discovery table (virtualization needs to send a message to host machine to request for the IP discovery ta

[PATCH] drm/amdgpu: Fix the incomplete product number

2022-07-21 Thread Roy Sun
The comments say that the product number is a 16-digit HEX string so the buffer needs to be at least 17 characters to hold the NUL terminator. Expand the buffer size to 20 to avoid the alignment issues. The comment:Product number should only be 16 characters. Any more,and something could be wrong.