Re: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-09 Thread Christian König
Yeah, that's a good point. If build_bug_on() doesn't works for some reason then we at least need to lower this to a WARN_ON. A BUG_ON() is only justified if we prevent strong data corruption with it or note a NULL pointer earlier on or similar. Regards, Christian. Am 10.09.21 um 06:36 schr

Re: [PATCH 4/4] drm/amdgpu: VCN avoid memory allocation during IB test

2021-09-09 Thread Christian König
Am 10.09.21 um 02:38 schrieb xinhui pan: alloc extra msg from direct IB pool. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 99 +++-- 1 file changed, 45 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/dr

Re: [PATCH 3/4] drm/amdgpu: VCE avoid memory allocation during IB test

2021-09-09 Thread Christian König
Am 10.09.21 um 02:38 schrieb xinhui pan: alloc extra msg from direct IB pool. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/d

Re: [PATCH 2/4] drm/amdgpu: UVD avoid memory allocation during IB test

2021-09-09 Thread Christian König
Am 10.09.21 um 02:38 schrieb xinhui pan: move BO allocation in sw_init. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 75 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 8 +-- drivers/gpu/drm/am

Re: [PATCH 1/4] drm/amdgpu: Increase direct IB pool size

2021-09-09 Thread Christian König
Am 10.09.21 um 02:38 schrieb xinhui pan: Direct IB pool is used for vce/vcn IB extra msg too. Increase its size to AMDGPU_IB_POOL_SIZE. Signed-off-by: xinhui pan Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++-- 1 file changed, 2 insertions(+), 6 dele

RE: [PATCH] drm/amd/pm: fix runpm hang when amdgpu loaded prior to sound driver

2021-09-09 Thread Chen, Guchun
[Public] Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Friday, September 10, 2021 11:18 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Lazar, Lijo ; Quan, Evan ; Pelloux-prayer, Pierre-eric Subject: [PATCH] drm/

RE: [PATCH v3 1/1] drm/amdkfd: make needs_pcie_atomics FW-version dependent

2021-09-09 Thread Chen, Guchun
[Public] Move PCIe atomic detection from kgf2kfd_probe into kgf2kfd_device_init because the MEC firmware is not loaded yet at the probe stage A spelling typo, s/kgf2kfd_device_init/ kgd2kfd_device_init With above fixed, the patch is: Reviewed-by: Guchun Chen Regards, Guchun -Original Mes

Re: [PATCH v3 1/1] drm/amdkfd: make needs_pcie_atomics FW-version dependent

2021-09-09 Thread Felix Kuehling
Am 2021-09-08 um 6:48 p.m. schrieb Felix Kuehling: > On some GPUs the PCIe atomic requirement for KFD depends on the MEC > firmware version. Add a firmware version check for this. The minimum > firmware version that works without atomics can be updated in the > device_info structure for each GPU ty

Re: [PATCH] drm/amd/pm: fix runpm hang when amdgpu loaded prior to sound driver

2021-09-09 Thread Lazar, Lijo
On 9/10/2021 8:47 AM, Evan Quan wrote: Current RUNPM mechanism relies on PMFW to master the timing for BACO in/exit. And that needs cooperation from sound driver for dstate change notification for function 1(audio). Otherwise(on sound driver missing), BACO cannot be kicked in correctly and han

Re: [PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-09 Thread Pan, Xinhui
[AMD Official Use Only] looks good to me. But maybe build_bug_on works too and more reasonable to detect such wrong usage. From: Chen, Guchun Sent: Friday, September 10, 2021 12:30:14 PM To: amd-gfx@lists.freedesktop.org ; dri-de...@lists.freedesktop.org ; Koenig

[PATCH] drm/ttm: add a BUG_ON in ttm_set_driver_manager when array bounds

2021-09-09 Thread Guchun Chen
Vendor will define their own memory types on top of TTM_PL_PRIV, but call ttm_set_driver_manager directly without checking mem_type value when setting up memory manager. So add such check to aware the case when array bounds. Signed-off-by: Leslie Shi Signed-off-by: Guchun Chen --- include/drm/t

[PATCH] drm/amdgpu: use generic fb helpers instead of setting up AMD own's.

2021-09-09 Thread Evan Quan
With the shadow buffer support from generic framebuffer emulation, it's possible now to have runpm kicked when no update for console. Change-Id: I285472c9100ee6f649d3f3f3548f402b9cd34eaf Signed-off-by: Evan Quan Acked-by: Christian König -- v1->v2: - rename amdgpu_align_pitch as amdgpu_gem_ali

[PATCH] drm/amd/pm: fix runpm hang when amdgpu loaded prior to sound driver

2021-09-09 Thread Evan Quan
Current RUNPM mechanism relies on PMFW to master the timing for BACO in/exit. And that needs cooperation from sound driver for dstate change notification for function 1(audio). Otherwise(on sound driver missing), BACO cannot be kicked in correctly and hang will be observed on RUNPM exit. By switch

[PATCH 4/4] drm/amdgpu: VCN avoid memory allocation during IB test

2021-09-09 Thread xinhui pan
alloc extra msg from direct IB pool. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 99 +++-- 1 file changed, 45 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 5612

[PATCH 3/4] drm/amdgpu: VCE avoid memory allocation during IB test

2021-09-09 Thread xinhui pan
alloc extra msg from direct IB pool. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c index e9fdf49d69e8

[PATCH 2/4] drm/amdgpu: UVD avoid memory allocation during IB test

2021-09-09 Thread xinhui pan
move BO allocation in sw_init. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 75 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 8 +-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 8 +-- 4 files changed

[PATCH 1/4] drm/amdgpu: Increase direct IB pool size

2021-09-09 Thread xinhui pan
Direct IB pool is used for vce/vcn IB extra msg too. Increase its size to AMDGPU_IB_POOL_SIZE. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/dr

Re: [PATCH 0/4] Fix stack usage of DML

2021-09-09 Thread Nathan Chancellor
On Wed, Sep 08, 2021 at 09:00:19PM -0400, Harry Wentland wrote: > With the '-Werror' enablement patch the amdgpu build was failing > on clang builds because a bunch of functions were blowing past > the 1024 byte stack frame default. Due to this we also noticed > that a lot of functions were passing

Re: [PATCH] drm/amd/display: Add NULL checks for vblank workqueue

2021-09-09 Thread Harry Wentland
On 2021-09-07 9:41 p.m., Mike Lothian wrote: > Hi > > I've just tested this out against Linus's tree and it seems to fix things > Thanks. > Out of interest does Tonga have GPU reset when things go wrong? > Not sure. Alex might know. Harry > Thanks > > Mike > > On Tue, 7 Sept 2021 at 15

Re: [PATCH] drm/amdgpu: Drop inline from amdgpu_ras_eeprom_max_record_count

2021-09-09 Thread Lyude Paul
Reviewed-by: Lyude Paul On Thu, 2021-09-09 at 18:56 +0200, Michel Dänzer wrote: > From: Michel Dänzer > > This was unusual; normally, inline functions are declared static as > well, and defined in a header file if used by multiple compilation > units. The latter would be more involved in this c

Re: [PATCH] drm/amd/display: dc_assert_fp_enabled assert only if FPU is not enabled

2021-09-09 Thread Harry Wentland
On 2021-09-09 12:55 p.m., Anson Jacob wrote: > Assert only when FPU is not enabled. > > Fixes: e549f77c1965 ("drm/amd/display: Add DC_FP helper to check FPU state") > Signed-off-by: Anson Jacob > Cc: Christian König > Cc: Hersen Wu > Cc: Harry Wentland > Cc: Rodrigo Siqueira Reviewed-by: Har

RE: [PATCH] drm/amdgpu: Get atomicOps info from Host for sriov setup

2021-09-09 Thread Liu, Shaoyun
[AMD Official Use Only] Thanks for the review . I accepted your comments and will sent another change list for review once your change is in. Regards Shaoyun.liu -Original Message- From: Kuehling, Felix Sent: Thursday, September 9, 2021 12:18 PM To: Liu, Shaoyun ; amd-gfx@lists.

Re: [PATCH] drm/amdgpu: Drop inline from amdgpu_ras_eeprom_max_record_count

2021-09-09 Thread Michel Dänzer
Apologies, I messed up the recipients in this patch, please follow up to the fixed version I just sent. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer

[PATCH] drm/amdgpu: Drop inline from amdgpu_ras_eeprom_max_record_count

2021-09-09 Thread Michel Dänzer
From: Michel Dänzer This was unusual; normally, inline functions are declared static as well, and defined in a header file if used by multiple compilation units. The latter would be more involved in this case, so just drop the inline declaration for now. Fixes compile failure building for ppc64l

[PATCH] drm/amd/display: dc_assert_fp_enabled assert only if FPU is not enabled

2021-09-09 Thread Anson Jacob
Assert only when FPU is not enabled. Fixes: e549f77c1965 ("drm/amd/display: Add DC_FP helper to check FPU state") Signed-off-by: Anson Jacob Cc: Christian König Cc: Hersen Wu Cc: Harry Wentland Cc: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 2 +- 1 file changed, 1

[PATCH] drm/amdgpu: Drop inline from amdgpu_ras_eeprom_max_record_count

2021-09-09 Thread Michel Dänzer
From: Michel Dänzer This was unusual; normally, inline functions are declared static as well, and defined in a header file if used by multiple compilation units. The latter would be more involved in this case, so just drop the inline declaration for now. Fixes compile failure building for ppc64l

Re: [PATCH 3/3] drm/amdgpu: move iommu_resume before ip init/resume

2021-09-09 Thread James Zhu
On 2021-09-07 6:20 p.m., Felix Kuehling wrote: Am 2021-09-07 um 4:30 p.m. schrieb James Zhu: On 2021-09-07 1:53 p.m., Felix Kuehling wrote: Am 2021-09-07 um 1:51 p.m. schrieb Felix Kuehling: Am 2021-09-07 um 1:22 p.m. schrieb James Zhu: On 2021-09-07 12:48 p.m., Felix Kuehling wrote: Am 2

Re: [PATCH] drm/amdgpu: Get atomicOps info from Host for sriov setup

2021-09-09 Thread Felix Kuehling
Am 2021-09-09 um 11:59 a.m. schrieb shaoyunl: > The AtomicOp Requester Enable bit is reserved in VFs and the PF value applies > to all > associated VFs. so guest driver can not directly enable the atomicOps for VF, > it > depends on PF to enable it. In current design, amdgpu driver will get the

[PATCH] drm/amdgpu: Get atomicOps info from Host for sriov setup

2021-09-09 Thread shaoyunl
The AtomicOp Requester Enable bit is reserved in VFs and the PF value applies to all associated VFs. so guest driver can not directly enable the atomicOps for VF, it depends on PF to enable it. In current design, amdgpu driver will get the enabled atomicOps bits through private pf2vf data Signe

Re: [PATCH] Enable '-Werror' by default for all kernel builds

2021-09-09 Thread Guenter Roeck
On 9/9/21 12:30 AM, Christian König wrote: Am 09.09.21 um 08:07 schrieb Guenter Roeck: On 9/8/21 10:58 PM, Christoph Hellwig wrote: On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote: It'd be good to avoid. It has helped uncover build issues with KASAN in the past. Or at least make it

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-09 Thread Christophe Leroy
On 9/8/21 10:58 PM, Tom Lendacky wrote: Introduce a powerpc version of the cc_platform_has() function. This will be used to replace the powerpc mem_encrypt_active() implementation, so the implementation will initially only support the CC_ATTR_MEM_ENCRYPT attribute. Cc: Michael Ellerman Cc: B

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-09 Thread Christian Borntraeger
On 09.09.21 00:58, Tom Lendacky wrote: This patch series provides a generic helper function, cc_platform_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new confidential computing technologies are added to the kernel

Re: [PATCH v3 8/8] treewide: Replace the use of mem_encrypt_active() with cc_platform_has()

2021-09-09 Thread Christophe Leroy
On 9/8/21 10:58 PM, Tom Lendacky wrote: diff --git a/arch/powerpc/include/asm/mem_encrypt.h b/arch/powerpc/include/asm/mem_encrypt.h index ba9dab07c1be..2f26b8fc8d29 100644 --- a/arch/powerpc/include/asm/mem_encrypt.h +++ b/arch/powerpc/include/asm/mem_encrypt.h @@ -10,11 +10,6 @@ #incl

Re: [PATCH v3 2/8] mm: Introduce a function to check for confidential computing features

2021-09-09 Thread Christophe Leroy
On 9/8/21 10:58 PM, Tom Lendacky wrote: In prep for other confidential computing technologies, introduce a generic helper function, cc_platform_has(), that can be used to check for specific I have little problem with that naming. For me CC has always meant Compiler Collection. active conf

Re: [PATCH v3 8/8] treewide: Replace the use of mem_encrypt_active() with cc_platform_has()

2021-09-09 Thread Tom Lendacky
On 9/9/21 2:25 AM, Christophe Leroy wrote: On 9/8/21 10:58 PM, Tom Lendacky wrote: diff --git a/arch/powerpc/include/asm/mem_encrypt.h b/arch/powerpc/include/asm/mem_encrypt.h index ba9dab07c1be..2f26b8fc8d29 100644 --- a/arch/powerpc/include/asm/mem_encrypt.h +++ b/arch/powerpc/include/asm

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-09 Thread Tom Lendacky
On 9/9/21 2:32 AM, Christian Borntraeger wrote: On 09.09.21 00:58, Tom Lendacky wrote: This patch series provides a generic helper function, cc_platform_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new confidentia

Re: [PATCH] Enable '-Werror' by default for all kernel builds

2021-09-09 Thread Arnd Bergmann
On Thu, Sep 9, 2021 at 1:43 PM Marco Elver wrote: > On Thu, 9 Sept 2021 at 13:00, Arnd Bergmann wrote: > > On Thu, Sep 9, 2021 at 12:54 PM Marco Elver wrote: > > > On Thu, 9 Sept 2021 at 07:59, Christoph Hellwig > > > wrote: > > > > On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote:

[PATCH AUTOSEL 4.4 22/35] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 4.9 32/48] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 4.14 36/59] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

Subject: [PATCH 1/1] drm/amdgpu: Update RAS trigger error block support

2021-09-09 Thread Clements, John
[AMD Official Use Only] Submitting patch to update RAS trigger error to support additional blocks 0002-drm-amdgpu-Update-RAS-trigger-error-block-support.patch Description: 0002-drm-amdgpu-Update-RAS-trigger-error-block-support.patch

[PATCH AUTOSEL 4.19 46/74] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 4.19 16/74] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex

2021-09-09 Thread Sasha Levin
From: Anson Jacob [ Upstream commit 1a394b3c3de2577f200cb623c52a5c2b82805cec ] link_rate is updated via debugfs using hex values, set it to output in hex as well. eg: Resolution: 1920x1080@144Hz cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x14 0 Verified: 4 0x1e 0 Reported

[PATCH AUTOSEL 5.4 099/109] drm/amdkfd: Account for SH/SE count when setting up cu masks.

2021-09-09 Thread Sasha Levin
From: Sean Keely [ Upstream commit 1ec06c2dee679e9f089e78ed20cb74ee90155f61 ] On systems with multiple SH per SE compute_static_thread_mgmt_se# is split into independent masks, one for each SH, in the upper and lower 16 bits. We need to detect this and apply cu masking to each SH. The cu mask

[PATCH AUTOSEL 5.4 063/109] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit 554594567b1fa3da74f88ec7b2dc83d000c58e98 ] The variable dc->clk_mgr is checked in: if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) This indicates dc->clk_mgr can be NULL. However, it is dereferenced in: if (!dc->clk_mgr->funcs->get_clock) To fix this null

[PATCH AUTOSEL 5.4 062/109] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 5.4 025/109] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex

2021-09-09 Thread Sasha Levin
From: Anson Jacob [ Upstream commit 1a394b3c3de2577f200cb623c52a5c2b82805cec ] link_rate is updated via debugfs using hex values, set it to output in hex as well. eg: Resolution: 1920x1080@144Hz cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x14 0 Verified: 4 0x1e 0 Reported

[PATCH AUTOSEL 5.4 023/109] drm/amd/display: Fix timer_per_pixel unit error

2021-09-09 Thread Sasha Levin
From: Oliver Logush [ Upstream commit 23e55639b87fb16a9f0f66032ecb57060df6c46c ] [why] The units of the time_per_pixel variable were incorrect, this had to be changed for the code to properly function. [how] The change was very straightforward, only required one line of code to be changed where

[PATCH AUTOSEL 5.4 001/109] drm/amdgpu: Fix amdgpu_ras_eeprom_init()

2021-09-09 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit dce4400e6516d18313d23de45b5be8a18980b00e ] No need to account for the 2 bytes of EEPROM address--this is now well abstracted away by the fixes the the lower layers. Cc: Andrey Grodzovsky Cc: Alexander Deucher Signed-off-by: Luben Tuikov Acked-by: Alexande

[PATCH AUTOSEL 5.10 158/176] drm/amdkfd: Account for SH/SE count when setting up cu masks.

2021-09-09 Thread Sasha Levin
From: Sean Keely [ Upstream commit 1ec06c2dee679e9f089e78ed20cb74ee90155f61 ] On systems with multiple SH per SE compute_static_thread_mgmt_se# is split into independent masks, one for each SH, in the upper and lower 16 bits. We need to detect this and apply cu masking to each SH. The cu mask

[PATCH AUTOSEL 5.10 106/176] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit 554594567b1fa3da74f88ec7b2dc83d000c58e98 ] The variable dc->clk_mgr is checked in: if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) This indicates dc->clk_mgr can be NULL. However, it is dereferenced in: if (!dc->clk_mgr->funcs->get_clock) To fix this null

[PATCH AUTOSEL 5.10 105/176] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 5.10 098/176] drm/amd/display: fix incorrect CM/TF programming sequence in dwb

2021-09-09 Thread Sasha Levin
From: Roy Chan [ Upstream commit 781e1e23131cce56fb557e6ec2260480a6bd08cc ] [How] the programming sequeune was for old asic. the correct programming sequeunce should be similar to the one used in mpc. the fix is copied from the mpc programming sequeunce. Reviewed-by: Anthony Koo Acked-by: Anso

[PATCH AUTOSEL 5.10 097/176] drm/amd/display: fix missing writeback disablement if plane is removed

2021-09-09 Thread Sasha Levin
From: Roy Chan [ Upstream commit 82367e7f22d085092728f45fd5fbb15e3fb997c0 ] [Why] If the plane has been removed, the writeback disablement logic doesn't run [How] fix the logic order Acked-by: Anson Jacob Signed-off-by: Roy Chan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-

[PATCH AUTOSEL 5.10 041/176] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex

2021-09-09 Thread Sasha Levin
From: Anson Jacob [ Upstream commit 1a394b3c3de2577f200cb623c52a5c2b82805cec ] link_rate is updated via debugfs using hex values, set it to output in hex as well. eg: Resolution: 1920x1080@144Hz cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x14 0 Verified: 4 0x1e 0 Reported

[PATCH AUTOSEL 5.10 040/176] drm/amdgpu: Fix a printing message

2021-09-09 Thread Sasha Levin
From: Oak Zeng [ Upstream commit 95f71f12aa45d65b7f2ccab95569795edffd379a ] The printing message "PSP loading VCN firmware" is mis-leading because people might think driver is loading VCN firmware. Actually when this message is printed, driver is just preparing some VCN ucode, not loading VCN fi

[PATCH AUTOSEL 5.10 032/176] drm/amd/display: Fix timer_per_pixel unit error

2021-09-09 Thread Sasha Levin
From: Oliver Logush [ Upstream commit 23e55639b87fb16a9f0f66032ecb57060df6c46c ] [why] The units of the time_per_pixel variable were incorrect, this had to be changed for the code to properly function. [how] The change was very straightforward, only required one line of code to be changed where

[PATCH AUTOSEL 5.10 002/176] drm/amdgpu: Fix amdgpu_ras_eeprom_init()

2021-09-09 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit dce4400e6516d18313d23de45b5be8a18980b00e ] No need to account for the 2 bytes of EEPROM address--this is now well abstracted away by the fixes the the lower layers. Cc: Andrey Grodzovsky Cc: Alexander Deucher Signed-off-by: Luben Tuikov Acked-by: Alexande

[PATCH AUTOSEL 5.13 198/219] drm/amdkfd: Account for SH/SE count when setting up cu masks.

2021-09-09 Thread Sasha Levin
From: Sean Keely [ Upstream commit 1ec06c2dee679e9f089e78ed20cb74ee90155f61 ] On systems with multiple SH per SE compute_static_thread_mgmt_se# is split into independent masks, one for each SH, in the upper and lower 16 bits. We need to detect this and apply cu masking to each SH. The cu mask

[PATCH AUTOSEL 5.13 130/219] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit 554594567b1fa3da74f88ec7b2dc83d000c58e98 ] The variable dc->clk_mgr is checked in: if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) This indicates dc->clk_mgr can be NULL. However, it is dereferenced in: if (!dc->clk_mgr->funcs->get_clock) To fix this null

[PATCH AUTOSEL 5.13 129/219] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 5.13 119/219] drm/amd/display: fix incorrect CM/TF programming sequence in dwb

2021-09-09 Thread Sasha Levin
From: Roy Chan [ Upstream commit 781e1e23131cce56fb557e6ec2260480a6bd08cc ] [How] the programming sequeune was for old asic. the correct programming sequeunce should be similar to the one used in mpc. the fix is copied from the mpc programming sequeunce. Reviewed-by: Anthony Koo Acked-by: Anso

[PATCH AUTOSEL 5.13 118/219] drm/amd/display: fix missing writeback disablement if plane is removed

2021-09-09 Thread Sasha Levin
From: Roy Chan [ Upstream commit 82367e7f22d085092728f45fd5fbb15e3fb997c0 ] [Why] If the plane has been removed, the writeback disablement logic doesn't run [How] fix the logic order Acked-by: Anson Jacob Signed-off-by: Roy Chan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-

[PATCH AUTOSEL 5.13 054/219] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex

2021-09-09 Thread Sasha Levin
From: Anson Jacob [ Upstream commit 1a394b3c3de2577f200cb623c52a5c2b82805cec ] link_rate is updated via debugfs using hex values, set it to output in hex as well. eg: Resolution: 1920x1080@144Hz cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x14 0 Verified: 4 0x1e 0 Reported

[PATCH AUTOSEL 5.13 053/219] drm/amdgpu: Fix a printing message

2021-09-09 Thread Sasha Levin
From: Oak Zeng [ Upstream commit 95f71f12aa45d65b7f2ccab95569795edffd379a ] The printing message "PSP loading VCN firmware" is mis-leading because people might think driver is loading VCN firmware. Actually when this message is printed, driver is just preparing some VCN ucode, not loading VCN fi

[PATCH AUTOSEL 5.13 044/219] drm/amd/display: Fix timer_per_pixel unit error

2021-09-09 Thread Sasha Levin
From: Oliver Logush [ Upstream commit 23e55639b87fb16a9f0f66032ecb57060df6c46c ] [why] The units of the time_per_pixel variable were incorrect, this had to be changed for the code to properly function. [how] The change was very straightforward, only required one line of code to be changed where

[PATCH AUTOSEL 5.13 005/219] drm/amdgpu: Fix amdgpu_ras_eeprom_init()

2021-09-09 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit dce4400e6516d18313d23de45b5be8a18980b00e ] No need to account for the 2 bytes of EEPROM address--this is now well abstracted away by the fixes the the lower layers. Cc: Andrey Grodzovsky Cc: Alexander Deucher Signed-off-by: Luben Tuikov Acked-by: Alexande

[PATCH AUTOSEL 5.14 225/252] drm/amdkfd: Account for SH/SE count when setting up cu masks.

2021-09-09 Thread Sasha Levin
From: Sean Keely [ Upstream commit 1ec06c2dee679e9f089e78ed20cb74ee90155f61 ] On systems with multiple SH per SE compute_static_thread_mgmt_se# is split into independent masks, one for each SH, in the upper and lower 16 bits. We need to detect this and apply cu masking to each SH. The cu mask

[PATCH AUTOSEL 5.14 148/252] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit 554594567b1fa3da74f88ec7b2dc83d000c58e98 ] The variable dc->clk_mgr is checked in: if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) This indicates dc->clk_mgr can be NULL. However, it is dereferenced in: if (!dc->clk_mgr->funcs->get_clock) To fix this null

[PATCH AUTOSEL 5.14 147/252] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()

2021-09-09 Thread Sasha Levin
From: Tuo Li [ Upstream commit a211260c34cfadc6068fece8c9e99e0fe1e2a2b6 ] The variable val is declared without initialization, and its address is passed to amdgpu_i2c_get_byte(). In this function, the value of val is accessed in: DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n", addr, *val);

[PATCH AUTOSEL 5.14 136/252] drm/amd/display: fix incorrect CM/TF programming sequence in dwb

2021-09-09 Thread Sasha Levin
From: Roy Chan [ Upstream commit 781e1e23131cce56fb557e6ec2260480a6bd08cc ] [How] the programming sequeune was for old asic. the correct programming sequeunce should be similar to the one used in mpc. the fix is copied from the mpc programming sequeunce. Reviewed-by: Anthony Koo Acked-by: Anso

[PATCH AUTOSEL 5.14 135/252] drm/amd/display: fix missing writeback disablement if plane is removed

2021-09-09 Thread Sasha Levin
From: Roy Chan [ Upstream commit 82367e7f22d085092728f45fd5fbb15e3fb997c0 ] [Why] If the plane has been removed, the writeback disablement logic doesn't run [How] fix the logic order Acked-by: Anson Jacob Signed-off-by: Roy Chan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-

[PATCH AUTOSEL 5.14 084/252] drm/amd/display: Fix PSR command version

2021-09-09 Thread Sasha Levin
From: Mikita Lipski [ Upstream commit af1f2b19fd7d404d299355cc95930efee5b3ed8b ] [why] For dual eDP when setting the new settings we need to set command version to DMUB_CMD_PSR_CONTROL_VERSION_1, otherwise DMUB will not read panel_inst parameter. [how] Instead of PSR_VERSION_1 pass DMUB_CMD_PSR_

[PATCH AUTOSEL 5.14 063/252] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex

2021-09-09 Thread Sasha Levin
From: Anson Jacob [ Upstream commit 1a394b3c3de2577f200cb623c52a5c2b82805cec ] link_rate is updated via debugfs using hex values, set it to output in hex as well. eg: Resolution: 1920x1080@144Hz cat /sys/kernel/debug/dri/0/DP-1/link_settings Current: 4 0x14 0 Verified: 4 0x1e 0 Reported

[PATCH AUTOSEL 5.14 062/252] drm/amdgpu: Fix a printing message

2021-09-09 Thread Sasha Levin
From: Oak Zeng [ Upstream commit 95f71f12aa45d65b7f2ccab95569795edffd379a ] The printing message "PSP loading VCN firmware" is mis-leading because people might think driver is loading VCN firmware. Actually when this message is printed, driver is just preparing some VCN ucode, not loading VCN fi

[PATCH AUTOSEL 5.14 061/252] drm/amd/display: Fixed hardware power down bypass during headless boot

2021-09-09 Thread Sasha Levin
From: Jake Wang [ Upstream commit 3addbde269f21ffc735f6d3d0c2237664923824e ] [Why] During headless boot, DIG may be on which causes HW/SW discrepancies. To avoid this we power down hardware on boot if DIG is turned on. With introduction of multiple eDP, hardware power down is being bypassed unde

[PATCH AUTOSEL 5.14 052/252] drm/amd/display: Fix timer_per_pixel unit error

2021-09-09 Thread Sasha Levin
From: Oliver Logush [ Upstream commit 23e55639b87fb16a9f0f66032ecb57060df6c46c ] [why] The units of the time_per_pixel variable were incorrect, this had to be changed for the code to properly function. [how] The change was very straightforward, only required one line of code to be changed where

[PATCH AUTOSEL 5.14 008/252] drm/amdgpu: Fix koops when accessing RAS EEPROM

2021-09-09 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit 1d9d2ca85b32605ac9c74c8fa42d0c1cfbe019d4 ] Debugfs RAS EEPROM files are available when the ASIC supports RAS, and when the debugfs is enabled, an also when "ras_enable" module parameter is set to 0. However in this case, we get a kernel oops when accessing so

[PATCH AUTOSEL 5.14 007/252] drm/amdgpu: Fix amdgpu_ras_eeprom_init()

2021-09-09 Thread Sasha Levin
From: Luben Tuikov [ Upstream commit dce4400e6516d18313d23de45b5be8a18980b00e ] No need to account for the 2 bytes of EEPROM address--this is now well abstracted away by the fixes the the lower layers. Cc: Andrey Grodzovsky Cc: Alexander Deucher Signed-off-by: Luben Tuikov Acked-by: Alexande

Re: [PATCH v2] drm/amdgpu: fix sysfs_emit/sysfs_emit_at warnings(v2)

2021-09-09 Thread Huang Rui
On Thu, Sep 09, 2021 at 04:00:05PM +0800, Yu, Lang wrote: > sysfs_emit and sysfs_emit_at requrie a page boundary > aligned buf address. Make them happy! > > v2: use an inline function > > Warning Log: > [ 492.545174] invalid sysfs_emit_at: buf:f19bdfde at:0 > [ 492.546416] WARNING: CPU:

Re: [PATCH] Enable '-Werror' by default for all kernel builds

2021-09-09 Thread Arnd Bergmann
On Thu, Sep 9, 2021 at 12:54 PM Marco Elver wrote: > On Thu, 9 Sept 2021 at 07:59, Christoph Hellwig wrote: > > On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote: > > > It'd be good to avoid. It has helped uncover build issues with KASAN in > > > the past. Or at least make it dependent

Re: [PATCH] drm/amdgpu: fix sysfs_emit/sysfs_emit_at warnings

2021-09-09 Thread Christian König
Am 09.09.21 um 10:36 schrieb Lazar, Lijo: On 9/9/2021 1:31 PM, Christian König wrote: Am 09.09.21 um 05:28 schrieb Lazar, Lijo: On 9/9/2021 8:13 AM, Yu, Lang wrote: [AMD Official Use Only] So the final decision is rollback to scnprintf(). If we can define our own helper functions like sysfs

Re: [PATCH] drm/amdgpu: fix sysfs_emit/sysfs_emit_at warnings

2021-09-09 Thread Lazar, Lijo
On 9/9/2021 1:31 PM, Christian König wrote: Am 09.09.21 um 05:28 schrieb Lazar, Lijo: On 9/9/2021 8:13 AM, Yu, Lang wrote: [AMD Official Use Only] So the final decision is rollback to scnprintf(). If we can define our own helper functions like sysfs_emit/sysfs_emit_at but without page bou

Re: [PATCH 2/2] drm/amdgpu: alloc IB extra msg from IB pool

2021-09-09 Thread Christian König
Yes, correct but the key point is I want the same handling for old and new UVD blocks to be the same. This makes it more likely that the code keeps working on all hardware generations when we change something. See those old hardware is rare to get these days and I don't want to risk any bug

RE: Subject: [PATCH 1/1] drm/amdgpu: Update RAS trigger error block support

2021-09-09 Thread Zhang, Hawking
[AMD Official Use Only] Reviewed-by: Hawking Zhang Regards, Hawking From: Clements, John Sent: Thursday, September 9, 2021 15:59 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking ; Li, Candice Subject: Subject: [PATCH 1/1] drm/amdgpu: Update RAS trigger error block support [AMD Official Use

Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size

2021-09-09 Thread Christian König
Ok, good to know. That's probably the reason why we didn't push that stuff into the IB in the first place. And yes, using fixed 256kiB sounds like a plan to me then, but please also double check the AMDGPU_IB_POOL_SIZE define. I also won't mind if you just open code the two initialization sin

Re: [PATCH 2/2] drm/amdgpu: alloc IB extra msg from IB pool

2021-09-09 Thread Pan, Xinhui
[AMD Official Use Only] well, If IB test fails because we use gtt domain or the above 256MB vram. Then the failure is expected. Doesn't IB test exist to detect such issue? 发件人: Koenig, Christian 发送时间: 2021年9月9日星期四 15:16 收件人: Pan, Xinhui; amd-gfx@lists.freedesktop

RE: [PATCH] drm/amdgpu: Update RAS status print

2021-09-09 Thread Zhang, Hawking
[AMD Official Use Only] Please change the coding style for the bracket. + if (ras_cmd->ras_status) + { Other than that, the patch is Reviewed-by: Hawking Zhang Regards, Hawking From: Clements, John Sent: Thursday, September 9, 2021 16:00 To: amd-gfx@lists.freedesktop.

Re: [PATCH 0/4] Fix stack usage of DML

2021-09-09 Thread Christian König
It's nice to see at least some of them addressed, feel free to add an Acked-by: Christian König Regards, Christian. Am 09.09.21 um 03:00 schrieb Harry Wentland: With the '-Werror' enablement patch the amdgpu build was failing on clang builds because a bunch of functions were blowing past the

Re: [PATCH] drm/amdgpu: fix sysfs_emit/sysfs_emit_at warnings

2021-09-09 Thread Christian König
Am 09.09.21 um 05:28 schrieb Lazar, Lijo: On 9/9/2021 8:13 AM, Yu, Lang wrote: [AMD Official Use Only] So the final decision is rollback to scnprintf(). If we can define our own helper functions like sysfs_emit/sysfs_emit_at but without page boundary aligned limitation to make life easier?

[PATCH] drm/amdgpu: Update RAS status print

2021-09-09 Thread Clements, John
[AMD Official Use Only] Submitting patch to remove parser for RAS status response codes and just print RAS status value on non-zero value 0001-drm-amdgpu-Update-RAS-status-print.patch Description: 0001-drm-amdgpu-Update-RAS-status-print.patch

[PATCH v2] drm/amdgpu: fix sysfs_emit/sysfs_emit_at warnings(v2)

2021-09-09 Thread Lang Yu
sysfs_emit and sysfs_emit_at requrie a page boundary aligned buf address. Make them happy! v2: use an inline function Warning Log: [ 492.545174] invalid sysfs_emit_at: buf:f19bdfde at:0 [ 492.546416] WARNING: CPU: 7 PID: 1304 at fs/sysfs/file.c:765 sysfs_emit_at+0x4a/0xa0 [ 492.654805

Re: [PATCH 1/2] drm/amdgpu: Increase direct IB pool size

2021-09-09 Thread Pan, Xinhui
[AMD Official Use Only] yep, vcn need 128kb extra memory. I will make the pool size constant as 256kb. From: Koenig, Christian Sent: Thursday, September 9, 2021 3:14:15 PM To: Pan, Xinhui ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: Re: [PAT

RE: [PATCH] drm/amdgpu: refactor function to init no-psp fw

2021-09-09 Thread Zhang, Hawking
[AMD Official Use Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Gao, Likun Sent: Thursday, September 9, 2021 15:15 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Gao, Likun Subject: [PATCH] drm/amdgpu: refactor function to init no-psp fw From: Lik

Re: [PATCH] Enable '-Werror' by default for all kernel builds

2021-09-09 Thread Christian König
Am 09.09.21 um 08:07 schrieb Guenter Roeck: On 9/8/21 10:58 PM, Christoph Hellwig wrote: On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote: It'd be good to avoid. It has helped uncover build issues with KASAN in the past. Or at least make it dependent on the problematic architecture.

Re: [PATCH] Enable '-Werror' by default for all kernel builds

2021-09-09 Thread Christoph Hellwig
On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote: > It'd be good to avoid. It has helped uncover build issues with KASAN in > the past. Or at least make it dependent on the problematic architecture. > For example if arm is a problem, something like this: I'm also seeing quite a few stac

Re: [PATCH] Enable '-Werror' by default for all kernel builds

2021-09-09 Thread Guenter Roeck
On 9/8/21 10:58 PM, Christoph Hellwig wrote: On Wed, Sep 08, 2021 at 11:58:56PM +0200, Marco Elver wrote: It'd be good to avoid. It has helped uncover build issues with KASAN in the past. Or at least make it dependent on the problematic architecture. For example if arm is a problem, something li

[PATCH] drm/amd/amdkfd: fix possible memory leak in svm_range_restore_pages

2021-09-09 Thread Xiyu Yang
The memory leak issue may take place in an error handling path. When p->xnack_enabled is NULL, the function simply returns with -EFAULT and forgets to decrement the reference count of a kfd_process object bumped by kfd_lookup_process_by_pasid, which may incur memory leaks. Fix it by jumping to lab

Re: [PATCH 2/2] drm/amdgpu: alloc IB extra msg from IB pool

2021-09-09 Thread Christian König
Am 09.09.21 um 07:55 schrieb Pan, Xinhui: [AMD Official Use Only] There is one dedicated IB pool for IB test. So lets use it for extra msg too. For UVD on older HW, use one reserved BO at specific range. Signed-off-by: xinhui pan --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 173 +++

[PATCH] drm/amdgpu: refactor function to init no-psp fw

2021-09-09 Thread Likun Gao
From: Likun Gao Refactor the code of amdgpu_ucode_init_single_fw to make it more readable as too many ucode need to handle on this function currently. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 160 ++ 1 file changed, 75 insertions(+), 85 delet

  1   2   >