To avoid null pointer dereference, Check return value and
conduct error handling.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 2 ++
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 4
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 4
To fix potential overflowed constant warning, modify the variables to u32
for getting the return value of RREG32_SOC15().
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 2 +-
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/mmhub_v3_3.c | 2
To fix potential overflowed constant warning reported by Coverity,
modify the variables to uint32_t.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v12_0.c
b/drivers
The return value of RREG32_SOC15 is unsigned int, so modify variable to
unsigned.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/imu_v12_0.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v12_0.c
b/drivers/gpu/drm/amd/amdgpu
Check return value to avoid null pointer dereference.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
b/drivers/gpu/drm/amd/pm/swsmu/smu13
Check return value to avoid null pointer dereference.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
b/drivers/gpu/drm/amd/pm/swsmu/smu13
Check return value and conduct null pointer handling to avoid null pointer
dereference.
Signed-off-by: Bob Zhou
---
.../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 29 ---
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr
Check return value and conduct null pointer handling to avoid null pointer
dereference.
Signed-off-by: Bob Zhou
---
.../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
b
Check return value and conduct null pointer handling to avoid null pointer
dereference.
Signed-off-by: Bob Zhou
---
.../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 38 +++
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr
To avoid null pointer dereference, add return check and handle null pointer.
Signed-off-by: Bob Zhou
---
.../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 28 +--
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
After amdgpu_i2c_get_byte fail, amdgpu_i2c_put_byte shouldn't be
conducted to put wrong value.
So return and check the i2c transfer result.
Signed-off-by: Bob Zhou
Suggested-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 47 +++--
1 file changed, 28
After amdgpu_i2c_get_byte fail, amdgpu_i2c_put_byte shouldn't be
conducted to put wrong value.
So return and check the i2c transfer result.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 42 +++--
1 file changed, 26 insertions(+), 16 deletions(-)
diff
if the sdma_v4_0_irq_id_to_seq return -EINVAL, the process should
be stop to avoid out-of-bounds read, so directly return -EINVAL.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
b
Because the val isn't initialized, a random variable is set by
amdgpu_i2c_put_byte.
So fix the uninitialized issue.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
b
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages
will be run many times so that double free err_addr in some special case.
So set the err_addr to NULL to avoid the warnings.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 +
1 file changed, 1
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages
will be run many times so that double free err_addr in some special case.
So set the err_addr to NULL to avoid the warnings.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 1 +
1 file changed, 1
x97/0xe0 [amdgpu]
Fixes: be5c7eb10406 ("drm/amdgpu: bypass RAS error reset in some conditions")
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/dr
/0x2c0 [amdgpu]
dc_create+0x23f/0x6b0 [amdgpu]
? dmi_matches+0xa3/0x200
amdgpu_dm_init+0x2bd/0x22a0 [amdgpu]
Fixes: a2815ada8616 ("drm/amd/display: Introduce DML2")
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-
1 file changed, 1 insertion(+),
;)
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index a93db60fe4d9..9cc7a001f9a1 100644
info in amdgpu_bo_print_info")
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 5ac7544cc068..3f98174fb764 100644
--- a/drivers/gpu/drm/
building with gcc and W=1 reports
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:1618:15:
error: unused variable 'domain' [-Werror=unused-variable]
unsigned int domain;
^~
The variable domain is repeated, so remove it.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu
The setting of mes_add_queue_pkt is repeat, so remove it.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
index 8e67e965f7ea..e806331fee42
20 [amdgpu]
uvd_v7_0_sw_init+0x358/0x450 [amdgpu]
amdgpu_device_init.cold+0x198c/0x1fdf [amdgpu]
? pci_bus_read_config_byte+0x40/0x80
? pci_read_config_byte+0x27/0x50
amdgpu_driver_load_kms+0x1a/0x160 [amdgpu]
amdgpu_pci_probe+0x186/0x3c0 [amdgpu]
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/
20 [amdgpu]
uvd_v7_0_sw_init+0x358/0x450 [amdgpu]
amdgpu_device_init.cold+0x198c/0x1fdf [amdgpu]
? pci_bus_read_config_byte+0x40/0x80
? pci_read_config_byte+0x27/0x50
amdgpu_driver_load_kms+0x1a/0x160 [amdgpu]
amdgpu_pci_probe+0x186/0x3c0 [amdgpu]
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/
After drm conduct amdgpu Makefile, amdgpu.ko has been created
and "amdgpu-y +=" in amdxcp Makefile isn't used.
So modify amdgpu-y to amdxcp-y and build amdxcp module.
Signed-off-by: Bob Zhou
---
drivers/gpu/drm/amd/amdxcp/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletion
25 matches
Mail list logo