[PATCH AUTOSEL 6.0 06/44] drm/amd/display: fix overflow on MIN_I64 definition

2022-10-09 Thread Sasha Levin
From: David Gow [ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ] The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about integer overflow, because it is treated as a positive value, which is then negated. The temporary positive value is not necessarily representable. T

[PATCH AUTOSEL 6.0 11/44] drm/amd: fix potential memory leak

2022-10-09 Thread Sasha Levin
From: Bernard Zhao [ Upstream commit 6160216fd2c97107e8a9ab39863b056d677fcd85 ] This patch fix potential memory leak (clk_src) when function run into last return NULL. s/free/kfree/ - Alex Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/dr

[PATCH AUTOSEL 6.0 13/44] drm/amd/display: Fix variable dereferenced before check

2022-10-09 Thread Sasha Levin
From: sunliming [ Upstream commit 45a92f45f4578ff89da7dc5ef50bab4ef870f3b7 ] Fixes the following smatch warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:311 dc_dmub_srv_p_state_delegate() warn: variable dereferenced before check 'dc' (see line 309) Reported-by: kernel test robo

[PATCH AUTOSEL 6.0 14/44] drm/amdgpu: Skip the program of MMMC_VM_AGP_* in SRIOV on MMHUB v3_0_0

2022-10-09 Thread Sasha Levin
From: Yifan Zha [ Upstream commit c1026c6f319724dc88fc08d9d9d35bcbdf492b42 ] [Why] VF should not program these registers, the value were defined in the host. [How] Skip writing them in SRIOV environment and program them on host side. Acked-by: Christian König Signed-off-by: Yifan Zha Signed-

[PATCH AUTOSEL 6.0 15/44] drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF

2022-10-09 Thread Sasha Levin
From: Yifan Zha [ Upstream commit 828418259254863e0af5805bd712284e2bd88e3b ] [Why] There is no CG(Clock Gating)/PG(Power Gating) requirement on SRIOV VF. For multi VF, VF should not enable any CG/PG features. For one VF, PF will program CG/PG related registers. [How] Do not set any cg/pg flag b

[PATCH AUTOSEL 6.0 29/44] drm/amdgpu: SDMA update use unlocked iterator

2022-10-09 Thread Sasha Levin
From: Philip Yang [ Upstream commit 3913f0179ba366f7d7d160c506ce00de1602bbc4 ] SDMA update page table may be called from unlocked context, this generate below warning. Use unlocked iterator to handle this case. WARNING: CPU: 0 PID: 1475 at drivers/dma-buf/dma-resv.c:483 dma_resv_iter_next Call

[PATCH AUTOSEL 6.0 30/44] drm/amd/display: Fix urgent latency override for DCN32/DCN321

2022-10-09 Thread Sasha Levin
From: George Shen [ Upstream commit e7f2f4cd67443ce308480ca461806fcc3456e0ba ] [Why] The urgent latency override is useful when debugging issues relating to underflow. Current overridden variable is not correct and has no effect on DCN3.2 and DCN3.21 DML calculations. [How] For DCN3.2 and DCN3

[PATCH AUTOSEL 6.0 31/44] drm/amd/display: correct hostvm flag

2022-10-09 Thread Sasha Levin
From: Sherry Wang [ Upstream commit 796d6a37ff5ffaf9f2dc0f3f4bf9f4a1034c00de ] [Why] Hostvm should be enabled/disabled accordding to the status of riommu_active, but hostvm always be disabled on DCN31 which causes underflow [How] Set correct hostvm flag on DCN31 Reviewed-by: Charlene Liu Acke

[PATCH AUTOSEL 6.0 32/44] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 6.0 41/44] drm/amd/display: Remove interface for periodic interrupt 1

2022-10-09 Thread Sasha Levin
From: Aric Cyr [ Upstream commit 97d8d6f075bd8f988589be02b91f6fa644d0b0b8 ] [why] Only a single VLINE interrupt is available so interface should not expose the second one which is used by DMU firmware. [how] Remove references to periodic_interrupt1 and VLINE1 from DC interfaces. Reviewed-by: J

[PATCH AUTOSEL 6.0 42/44] drm/amd/display: polling vid stream status in hpo dp blank

2022-10-09 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit e32df0c7ecead95d70ca89f39b1b2b02a59ff691 ] [why] vid stream control is double bufferred, if we don't wait for video stream enable set to 0, we may get temporary image corruption showing on the stream when setting PIXEL_TO_SYMBOL_FIFO_ENABLE to 0. Reviewed-by:

[PATCH AUTOSEL 6.0 43/44] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-10-09 Thread Sasha Levin
From: Hamza Mahfooz [ Upstream commit 5d8c3e836fc224dfe633e41f7f2856753b39a905 ] Address the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subs

[PATCH AUTOSEL 6.0 44/44] drm/amdkfd: Fix UBSAN shift-out-of-bounds warning

2022-10-09 Thread Sasha Levin
From: Felix Kuehling [ Upstream commit b292cafe2dd02d96a07147e4b160927e8399d5cc ] This was fixed in initialize_cpsch before, but not in initialize_nocpsch. Factor sdma bitmap initialization into a helper function to apply the correct implementation in both cases without duplicating it. v2: Adde

[PATCH AUTOSEL 5.19 06/36] drm/amd/display: fix overflow on MIN_I64 definition

2022-10-09 Thread Sasha Levin
From: David Gow [ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ] The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about integer overflow, because it is treated as a positive value, which is then negated. The temporary positive value is not necessarily representable. T

[PATCH AUTOSEL 5.19 11/36] drm/amdgpu: Skip the program of MMMC_VM_AGP_* in SRIOV on MMHUB v3_0_0

2022-10-09 Thread Sasha Levin
From: Yifan Zha [ Upstream commit c1026c6f319724dc88fc08d9d9d35bcbdf492b42 ] [Why] VF should not program these registers, the value were defined in the host. [How] Skip writing them in SRIOV environment and program them on host side. Acked-by: Christian König Signed-off-by: Yifan Zha Signed-

[PATCH AUTOSEL 5.19 12/36] drm/admgpu: Skip CG/PG on SOC21 under SRIOV VF

2022-10-09 Thread Sasha Levin
From: Yifan Zha [ Upstream commit 828418259254863e0af5805bd712284e2bd88e3b ] [Why] There is no CG(Clock Gating)/PG(Power Gating) requirement on SRIOV VF. For multi VF, VF should not enable any CG/PG features. For one VF, PF will program CG/PG related registers. [How] Do not set any cg/pg flag b

[PATCH AUTOSEL 5.19 25/36] drm/amdgpu: SDMA update use unlocked iterator

2022-10-09 Thread Sasha Levin
From: Philip Yang [ Upstream commit 3913f0179ba366f7d7d160c506ce00de1602bbc4 ] SDMA update page table may be called from unlocked context, this generate below warning. Use unlocked iterator to handle this case. WARNING: CPU: 0 PID: 1475 at drivers/dma-buf/dma-resv.c:483 dma_resv_iter_next Call

[PATCH AUTOSEL 5.19 26/36] drm/amd/display: correct hostvm flag

2022-10-09 Thread Sasha Levin
From: Sherry Wang [ Upstream commit 796d6a37ff5ffaf9f2dc0f3f4bf9f4a1034c00de ] [Why] Hostvm should be enabled/disabled accordding to the status of riommu_active, but hostvm always be disabled on DCN31 which causes underflow [How] Set correct hostvm flag on DCN31 Reviewed-by: Charlene Liu Acke

[PATCH AUTOSEL 5.19 27/36] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 5.19 33/36] drm/amd/display: Remove interface for periodic interrupt 1

2022-10-09 Thread Sasha Levin
From: Aric Cyr [ Upstream commit 97d8d6f075bd8f988589be02b91f6fa644d0b0b8 ] [why] Only a single VLINE interrupt is available so interface should not expose the second one which is used by DMU firmware. [how] Remove references to periodic_interrupt1 and VLINE1 from DC interfaces. Reviewed-by: J

[PATCH AUTOSEL 5.19 34/36] drm/amd/display: polling vid stream status in hpo dp blank

2022-10-09 Thread Sasha Levin
From: Wenjing Liu [ Upstream commit e32df0c7ecead95d70ca89f39b1b2b02a59ff691 ] [why] vid stream control is double bufferred, if we don't wait for video stream enable set to 0, we may get temporary image corruption showing on the stream when setting PIXEL_TO_SYMBOL_FIFO_ENABLE to 0. Reviewed-by:

[PATCH AUTOSEL 5.19 36/36] drm/amdkfd: Fix UBSAN shift-out-of-bounds warning

2022-10-09 Thread Sasha Levin
From: Felix Kuehling [ Upstream commit b292cafe2dd02d96a07147e4b160927e8399d5cc ] This was fixed in initialize_cpsch before, but not in initialize_nocpsch. Factor sdma bitmap initialization into a helper function to apply the correct implementation in both cases without duplicating it. v2: Adde

[PATCH AUTOSEL 5.19 35/36] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-10-09 Thread Sasha Levin
From: Hamza Mahfooz [ Upstream commit 5d8c3e836fc224dfe633e41f7f2856753b39a905 ] Address the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subs

[PATCH AUTOSEL 5.15 06/25] drm/amd/display: fix overflow on MIN_I64 definition

2022-10-09 Thread Sasha Levin
From: David Gow [ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ] The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about integer overflow, because it is treated as a positive value, which is then negated. The temporary positive value is not necessarily representable. T

[PATCH AUTOSEL 5.15 18/25] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 5.15 24/25] drm/amd/display: Remove interface for periodic interrupt 1

2022-10-09 Thread Sasha Levin
From: Aric Cyr [ Upstream commit 97d8d6f075bd8f988589be02b91f6fa644d0b0b8 ] [why] Only a single VLINE interrupt is available so interface should not expose the second one which is used by DMU firmware. [how] Remove references to periodic_interrupt1 and VLINE1 from DC interfaces. Reviewed-by: J

[PATCH AUTOSEL 5.15 25/25] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-10-09 Thread Sasha Levin
From: Hamza Mahfooz [ Upstream commit 5d8c3e836fc224dfe633e41f7f2856753b39a905 ] Address the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subs

[PATCH AUTOSEL 5.10 05/22] drm/amd/display: fix overflow on MIN_I64 definition

2022-10-09 Thread Sasha Levin
From: David Gow [ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ] The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about integer overflow, because it is treated as a positive value, which is then negated. The temporary positive value is not necessarily representable. T

[PATCH AUTOSEL 5.10 16/22] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 5.10 21/22] drm/amd/display: Remove interface for periodic interrupt 1

2022-10-09 Thread Sasha Levin
From: Aric Cyr [ Upstream commit 97d8d6f075bd8f988589be02b91f6fa644d0b0b8 ] [why] Only a single VLINE interrupt is available so interface should not expose the second one which is used by DMU firmware. [how] Remove references to periodic_interrupt1 and VLINE1 from DC interfaces. Reviewed-by: J

[PATCH AUTOSEL 5.10 22/22] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-10-09 Thread Sasha Levin
From: Hamza Mahfooz [ Upstream commit 5d8c3e836fc224dfe633e41f7f2856753b39a905 ] Address the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subs

[PATCH AUTOSEL 5.4 04/14] drm/amd/display: fix overflow on MIN_I64 definition

2022-10-09 Thread Sasha Levin
From: David Gow [ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ] The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about integer overflow, because it is treated as a positive value, which is then negated. The temporary positive value is not necessarily representable. T

[PATCH AUTOSEL 5.4 11/14] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 5.4 14/14] drm/amd/display: fix array-bounds error in dc_stream_remove_writeback()

2022-10-09 Thread Sasha Levin
From: Hamza Mahfooz [ Upstream commit 5d8c3e836fc224dfe633e41f7f2856753b39a905 ] Address the following error: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c: In function ‘dc_stream_remove_writeback’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:527:55: error: array subs

[PATCH AUTOSEL 4.19 03/10] drm/amd/display: fix overflow on MIN_I64 definition

2022-10-09 Thread Sasha Levin
From: David Gow [ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ] The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about integer overflow, because it is treated as a positive value, which is then negated. The temporary positive value is not necessarily representable. T

[PATCH AUTOSEL 4.19 09/10] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 4.14 6/6] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH AUTOSEL 4.9 4/4] drm/amdgpu: fix initial connector audio value

2022-10-09 Thread Sasha Levin
From: hongao [ Upstream commit 4bb71fce58f30df3f251118291d6b0187ce531e6 ] This got lost somewhere along the way, This fixes audio not working until set_property was called. Signed-off-by: hongao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_con

[PATCH 1/4] drm/amdgpu: remove check for CE in RAS error address query

2022-10-09 Thread Tao Zhou
Only RAS UE error address is queried currently, no need to check CE status. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/umc_v6_1.c | 10 ++-- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 67 +++--- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 52 +--- driv

[PATCH 2/4] drm/amdgpu: define RAS convert_error_address API

2022-10-09 Thread Tao Zhou
Make the code reusable and remove redundant code. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 7 +- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 148 ++-- 3 files changed, 64 insertions(+), 93 deletion

[PATCH 3/4] drm/amdgpu: define convert_error_address for umc v8.7

2022-10-09 Thread Tao Zhou
So the code can be simplified. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 47 ++- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v8_7.c b/drivers/gpu/drm/amd/amdgpu/umc_v8_7.c index e2623685cb44..b7

[PATCH 4/4] drm/amdgpu: fix coding style issue for mca notifier

2022-10-09 Thread Tao Zhou
Fix some issues found by checkpatch script. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index c2f9970e851c..2dad7aa

[PATCH 2/4] drm/amdgpu: Add software ring callbacks for gfx9 (v8)

2022-10-09 Thread jiadong.zhu
From: "Jiadong.Zhu" Set ring functions with software ring callbacks on gfx9. The software ring could be tested by debugfs_test_ib case. v2: Set sw_ring 2 to enable software ring by default. v3: Remove the parameter for software ring enablement. v4: Use amdgpu_ring_init/fini for software rings.

[PATCH 1/2] drm/amdgpu: Update umc v8_10_0 headers

2022-10-09 Thread Candice Li
Add GeccCtrl offset and mask to umc v8_10_0 headers. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/include/asic_reg/umc/umc_8_10_0_offset.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/umc/umc_8_10_0_sh_mask.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/inclu

[PATCH 2/2] drm/amdgpu: Add poison mode query for umc v8_10_0

2022-10-09 Thread Candice Li
Add poison mode query support on umc v8_10_0. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v8_10.c b/drivers/gpu/drm/amd/amdgpu/umc_v8_10.c index 36a2053f2e8b94

RE: [PATCH 2/2] drm/amdgpu: Add poison mode query for umc v8_10_0

2022-10-09 Thread Zhou1, Tao
[AMD Official Use Only - General] The series is: Reviewed-by: Tao Zhou > -Original Message- > From: amd-gfx On Behalf Of Candice > Li > Sent: Monday, October 10, 2022 2:47 PM > To: amd-gfx@lists.freedesktop.org > Cc: Li, Candice > Subject: [PATCH 2/2] drm/amdgpu: Add poison mode query