This patch fix potential memory leak (clk_src) when function run
into last return NULL.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
b/drivers
This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c:1816:6-8:
WARNING: possible condition with no effect (if == else).
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 --
1 file changed, 2 deletions(-)
diff --git a
This patch trf to fis cocci warning:
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c:
2349:8-34: duplicated argument to && or ||
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c:
3680:8-55: duplicated argument to && or ||
Signed-off-by: Bernard Zhao
This patch trf to fis cocci warning:
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c:
2349:8-34: duplicated argument to && or ||
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c:
3680:8-55: duplicated argument to && or ||
Signed-off-by: Bernard Zhao
This patch fix cocci warning:
drivers/gpu/drm/amd/display/dc/core/dc.c:3335:2-4: WARNING:
possible condition with no effect (if == else).
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers
This patch fix potential memory leak (clk_src) when function run
into last return NULL.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
b/drivers
This patch remove useless if check before kfree.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/tegra/submit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
index 6d6dd8c35475..54ac31bc80f6 100644
--- a
This patch remove useless if(ptr) check to kfree.
Signed-off-by: Bernard Zhao
---
drivers/gpu/host1x/fence.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/host1x/fence.c b/drivers/gpu/host1x/fence.c
index ecab72882192..05b36bfc8b74 100644
--- a/drivers/gpu
n`t do the drm_dp_mst_topology_mgr_destroy job.
In this case, this may bring in the risk of memleak issue.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_dp_mst_topology.c | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/g
/kmb_drv.c:579:1-7: ERROR: missing put_device; call
of_find_device_by_node on line 506, but without a corresponding object release
within this function.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/kmb/kmb_drv.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu
This patch try to fix the potential memleak in error branch.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c
b/drivers/gpu/drm
This patch try to fix potential memleak in error branch.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_dp_mst_topology.c | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c
b/drivers/gpu/drm
This change is to cleanup the code a bit.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
index fbf7da9d9592
This change is to cleanup the code a bit.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/tegra/submit.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c
index 776f825df52f..c2fc9677742e 100644
--- a
This change is to cleanup the code a bit.
Signed-off-by: Bernard Zhao
---
.../drm/amd/display/dc/dcn10/dcn10_resource.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
b/drivers/gpu/drm/amd/display
In function dc_sink_destruct, kfree will check pointer, no need
to check again.
This change is to cleanup the code a bit.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpu/drm
This change is to cleanup the code style a bit.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu
This change is to cleanup the code a bit.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index ecfd82d0afb7
This change is to remove useless break after return.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index b200b9e722d9..8318ee8339f1
This change is to cleanup the code style a bit.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index
In function xen_drm_front_gem_import_sg_table, if in error branch,
there maybe potential memleak if not call gem_free_pages_array.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/xen/xen_drm_front_gem.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm
In function amdgpu_get_xgmi_hive, when kobject_init_and_add failed
There is a potential memleak if not call kobject_put.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
b
ll_64+0x35/0xb0 arch/x86/entry/common.c:80
[] entry_SYSCALL_64_after_hwframe+0x44/0xae
The link is:
https://syzkaller.appspot.com/bug?id=bd059c6ee8aee1d3af51cff3a2849b8c0027b822
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_vma_manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
: Bernard Zhao
---
drivers/gpu/drm/radeon/cik.c | 4 +---
drivers/gpu/drm/radeon/evergreen.c| 4 +---
drivers/gpu/drm/radeon/ni.c | 4 +---
drivers/gpu/drm/radeon/r100.c | 4 +---
drivers/gpu/drm/radeon/r300.c | 4 +---
drivers/gpu/drm/radeon/r420.c | 5
From: "Christian König"
Date: 2021-06-21 00:59:27
To: Bernard Zhao ,Alex Deucher
,David Airlie ,Daniel Vetter
,amd-...@lists.freedesktop.org,dri-devel@lists.freedesktop.org,linux-ker...@vger.kernel.org
Subject: Re: [PATCH 0/4] delete useless function return values & remove
me
Function radeon_fence_driver_init always returns success,
the function type maybe coule be changed to void.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/radeon/radeon.h | 2 +-
drivers/gpu/drm/radeon/radeon_fence.c | 5 +
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git
Function radeon_fence_driver_init always returns success,
remove meaningless if(r) check code.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/radeon/r100.c | 4 +---
drivers/gpu/drm/radeon/r300.c | 4 +---
drivers/gpu/drm/radeon/r420.c | 5 +
drivers/gpu/drm/radeon/r520.c | 4 +---
drivers
Function radeon_fence_driver_init always returns success,
remove meaningless if(r) check code.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/radeon/rs400.c | 4 +---
drivers/gpu/drm/radeon/rs600.c | 4 +---
drivers/gpu/drm/radeon/rs690.c | 4 +---
drivers/gpu/drm/radeon/rv515.c | 4
Function radeon_fence_driver_init always returns success,
remove meaningless if(r) check code.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/radeon/cik.c | 4 +---
drivers/gpu/drm/radeon/evergreen.c | 4 +---
drivers/gpu/drm/radeon/ni.c| 4 +---
drivers/gpu/drm/radeon/si.c
-off-by: Bernard Zhao
Bernard Zhao (4):
drm/radeon: remove meaningless if(r) check code
drm/radeon: remove meaningless if(r) check code
drm/radeon: remove meaningless if(r) check code
drm/radeon: delete useless return values
drivers/gpu/drm/radeon/cik.c | 4 +---
drivers/gpu/drm
cleanup coding style a bit
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
index 82bebb40234d..87e834850e44 100644
--- a
Unneeded variable: "ret". Return "0" on line 880
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dp/dp_panel.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c
b/drivers/gpu/drm/msm/dp/dp_panel.c
index 9cc816663668.
remove no need variable, just return the DC_OK
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
b/drivers/gpu/drm/amd/display/dc
NULL check before kvfree functions is not needed.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
b/drivers/gpu/drm/etnaviv
NULL check before kvfree functions is not needed.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
index
Fix coccicheck warning:
drivers/gpu/drm/mediatek/mtk_dsi.c:1074:2-9: line 1074 is
redundant because platform_get_irq() already prints an error.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu
Fix sparse warning:
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1195:41: warning: Using plain integer
as NULL pointer
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1348:32: warning: Using plain integer
as NULL pointer
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4
From: Daniel Vetter
Date: 2021-05-01 01:42:20
To: kernel test robot
Cc: Bernard Zhao ,Jani Nikula
,Joonas Lahtinen
,Rodrigo Vivi ,David
Airlie ,Daniel Vetter
,intel-...@lists.freedesktop.org,dri-devel@lists.freedesktop.org,linux-ker...@vger.kernel.org,kbuild-...@lists.01.org
Subject: Re
This maybe used lockdep through the fs_reclaim annotations.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/i915/i915_sw_fence.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c
b/drivers/gpu/drm/i915/i915_sw_fence.c
index
This maybe uses lockdep through the fs_reclaim annotations.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/i915/i915_request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_request.c
b/drivers/gpu/drm/i915/i915_request.c
index 9165971c3c47
This patch fix coccicheck warning:
drivers/gpu/drm/msm/dp/dp_link.c:848:5-8: Unneeded variable: "ret". Return "0"
on line 880
Also remove unneeded function return value check.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dp/dp_link.c | 15 +++
1 file c
t no spin_unlock_irqrestore in if/return
branch, seems like a potential bug?
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ba
: Unneeded semicolon
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/kmb/kmb_dsi.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index 4b5d82af84b3..231041b269f5 100644
--- a/drivers/gpu/drm/kmb/kmb_dsi.c
Fix coccicheck warning:
drivers/gpu/drm/gud/gud_internal.h:89:2-3: Unneeded semicolon
drivers/gpu/drm/gud/gud_internal.h:107:2-3: Unneeded semicolon
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/gud/gud_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Fix coccicheck warning:
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c:573:39-44: WARNING: conversion to bool
not needed here
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c:575:39-44: WARNING: conversion to bool
not needed here
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4
From: "Christian König"
Date: 2021-03-31 21:15:22
To: Bernard Zhao ,Huang Rui ,David Airlie
,Daniel Vetter
,dri-devel@lists.freedesktop.org,linux-ker...@vger.kernel.org
Cc: opensource.ker...@vivo.com
Subject: Re: [PATCH] drm/ttm: cleanup coding style a bit>Am 31.03.21 um 1
- consider code refactoring
+ if (vbios_voltage_id <=
leakage_bin[j]) {
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 84
1 file changed, 35 insertions(+), 49 deletions(-)
diff --git
/a6xx_gpu_state.c:198:19: warning: dereference of
noderef expression
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 36 ++---
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
b/drivers/gpu/drm
Fix sparse warning:
drivers/gpu/drm/ttm/ttm_bo.c:52:1: warning: symbol 'ttm_global_mutex' was not
declared. Should it be static?
drivers/gpu/drm/ttm/ttm_bo.c:53:10: warning: symbol 'ttm_bo_glob_use_count' was
not declared. Should it be static?
Signed-off-by: Bernard Zhao
Fix sparse warning:
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1195:41: warning: Using plain integer
as NULL pointer
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1
Fix patch check warning:
WARNING: Prefer kmalloc_array over kmalloc with multiply
+ buf = kmalloc(MAX_KFIFO_SIZE * sizeof(*buf), GFP_KERNEL);
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
ocks
+ if (obj && obj->use < 0) {
+DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n",
obj->head.name);
+ }
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
d
This change is to make the code a bit readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 44 ++---
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
b/drivers/gpu/drm/nouveau/dispnv50
remove unneeded variable: "rc".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dp/dp_panel.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c
b/drivers/gpu/drm/msm/dp/dp_panel.c
index d1780bcac8cc..9cc816663668 100644
---
Line 852 DRM_ERROR is redundant because memory alloc already
prints an error when failed.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
b/drivers
Remove unneeded variable: "pattern".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
b/drivers/gpu/drm/amd/display/dc/core/dc_link_
Line 1826 pr_err is redundant because memory alloc already
prints an error when failed.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers/gpu/drm/msm/dsi/dsi_host.c
index
remove unneeded variable: "ret".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/tegra/dpaux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 105fb9cdbb3b..b8abd55f3ef8 100644
--- a/drivers/gpu
remove unneeded variable: "ret".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/vc4/vc4_gem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index b641252939d8..445d3bab89e0 100644
--- a/drivers/g
Line 1590 DRM_ERROR is redundant because devm_kzalloc() already
prints an error.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
b
Fix check_patch.pl warning:
ERROR: do not use assignment in if condition
+ if ((HALCYON_HEADER2 == (cmd = *buf)) &&
ERROR: do not use assignment in if condition
+ if (HALCYON_HEADER2 == (cmd = *buf))
Signed-off-by: Bernard Zhao
---
drivers
: Bernard Zhao
Reported-by: kernel test robot
---
Changes since V1:
*fix compile error reported by kernel test robot
Link for V1:
*https://lore.kernel.org/patchwork/patch/1340996/
---
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
: Bernard Zhao
---
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
index 83c0d5a3e4fd..b8f6fe1a71e6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
+++ b/drivers/gpu/drm
This change also fix checkpatch.pl warning:
WARNING: Prefer using '"%s...", __func__' to using
'via_driver_irq_postinstall', this function's name, in a string
+ DRM_DEBUG("via_driver_irq_postinstall\n");
Signed-off-by: Bernard Zhao
---
drivers
Fix check_patch.pl warning:
kmalloc_array uses number as first arg, sizeof is generally wrong.
+fences = kmalloc_array(sizeof(void *), id_mgr->num_ids,
GFP_KERNEL);
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
ay has multiply overflow check, which will be safer.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index d0aea5
Optimise CONFIG_ || CONFIG__MODULE to IS_ENABLED().
This change also fix check_patch.pl warning:
WARNING: Prefer IS_ENABLED() to CONFIG_ ||
CONFIG__MODULE
+#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined
(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
Signed-off-by: Bernard Zhao
---
drivers/gpu
Hi:
When call printk, set the KERN_LEVEL is suggested by the community.
This patch sereies add KERN_* level to printk which do not set
this level.
Bernard Zhao (5):
adreno/a2xx_gpu.c: add KERN_LEVEL to printk
adreno/a3xx_gpu.c: add KERN_LEVEL to printk
adreno/a4xx_gpu.c: add KERN_LEVEL to
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
index f29c77d9cd42..64c9a9448f53 100644
--- a
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
index 7e82c41a85f1..33b45d237e56 100644
--- a
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index d6804a802355..c3ac78a32caf 100644
--- a
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 458b5b26d3c2..be752db5abed
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
index 2b93b33b05e4..2206b3b4b191 100644
--- a
Delete the conversion from bool value to bool function return.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
b/drivers/gpu/drm/msm
In function amdgpu_dm_connector_get_modes, drm_edid_is_valid
will check weather (!edid), no need to check again in the if
branch.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
Remove the conversion from bool value to bool variable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
From: Daniel Vetter
Date: 2020-11-02 18:17:24
To: Bernard Zhao
Cc: Maarten Lankhorst ,Maxime Ripard
,Thomas Zimmermann ,David Airlie
,Daniel Vetter
,dri-devel@lists.freedesktop.org,linux-ker...@vger.kernel.org,opensource.ker...@vivo.com
Subject: Re: [PATCH] gpu/drm: make crtc check
Delete the conversion from bool value to bool function return.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
b/drivers/gpu/drm/msm
Fix typoes.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
index 2c6db379afae..e994d233aa21
Remove the conversion from bool value to bool variable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
In function amdgpu_register_gpu_instance, there is no need to
protect DRM_ERROR in mutex mgpu_info.mutex.
This change is to make the code to run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
In function prepare_signaling, crtc check (c==0) is not related
with the next new_connector circle, maybe we can put the crtc
check just after the crtc circle and before new_connector circle.
This change is to make the code to run a bit first.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm
In function drm_bridge_connector_get_modes_edid, drm_edid_is_valid
will check weather (!edid), no need to check again in the if
branch.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_bridge_connector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
From: Sam Ravnborg
Date: 2020-10-25 01:14:57
To: Bernard
Cc: Thomas Zimmermann ,opensource.ker...@vivo.com,David
Airlie
,linux-ker...@vger.kernel.org,dri-devel@lists.freedesktop.org,Dave
Airlie
Subject: Re: Re: [PATCH] gpu/drm/mgag200:remove break after return>Hi Bernard.
>
>On
From: Thomas Zimmermann
Date: 2020-10-23 15:13:30
To: Bernard Zhao ,Dave Airlie ,David
Airlie ,Daniel Vetter
,dri-devel@lists.freedesktop.org,linux-ker...@vger.kernel.org
Cc: opensource.ker...@vivo.com
Subject: Re: [PATCH] gpu/drm/mgag200:remove break after return>Hi
>
>On 23.10
In function mgag200_set_pci_regs, there are some switch cases
returned, then break. These break will never run.
This patch is to make the code a bit readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/mgag200/mgag200_mode.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff
In functions vegam_is_dpm_running & vegam_populate_avfs_parameters,
maybe there is no need to conver bool condition to bool variable
or bool return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
Function mtk_hdmi_aud_set_input always return 0, no need to
keep the return value. Functions mtk_hdmi_aud_enable_packet &
mtk_hdmi_aud_on_off_hw_ncts are the same, these two functions
just call next functions. Maybe it`s a bit better to just call
the inner function.
Signed-off-by: Bernard
Functions armada_drm_crtc_atomic_flush &
armada_drm_crtc_atomic_enable don`t use the second parameter.
So we may get warning like :
warning: unused parameter ‘***’ [-Wunused-parameter].
This change is to fix the compile warning with -Wunused-parameter.
Signed-off-by: Bernard Zhao
---
dri
Functions (disable_all_writeback_pipes_for_stream &
dc_enable_stereo & dc_post_update_surfaces_to_stream)
always return true, there is no need to keep the return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/c
er.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index 4d29568be3f5..6e55ec0e80bb 100644
--- a/drivers/gpu/drm/media
>Cc: "Ira Weiny" , "Mike Marciniszyn"
>, "Dennis Dalessandro"
>, "Doug Ledford" ,
>"Jason Gunthorpe" , "Faisal Latif"
>, "Shiraz Saleem" ,
>"Bernard Metzler" , x...@kernel.org, "Dave Hansen"
Functions (disable_all_writeback_pipes_for_stream &
dc_enable_stereo & dc_post_update_surfaces_to_stream)
always return true, there is no need to keep the return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/c
able.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
index f1bc6a1af7a7..e6da0469b743 100644
--- a/drivers
Change the comment typo: "programm" -> "program".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/radeon/uvd_v1_0.c | 4 ++--
drivers/gpu/drm/radeon/uvd_v2_2.c | 2 +-
drivers/gpu/drm/radeon/uvd_v4_2.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a
Change the comment typo: "programm" -> "program".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +-
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++
In the function dal_ddc_service_query_ddc_data,
get rid of dal_ddc_i2c_payloads_destroy, call
dal_vector_destruct() directly.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
Changes since V1:
*get rid of dal_ddc_i2c_payloads_destroy, call
dal_vector_destruct
From: Alex Deucher
Date: 2020-09-22 03:33:20
To: Bernard Zhao
Cc: Harry Wentland ,Leo Li ,Alex
Deucher ,"Christian König"
,David Airlie ,Daniel Vetter
,Rodrigo Siqueira ,Jun Lei
,Aric Cyr ,Wenjing Liu
,abdoulaye berthe ,Michael
Strauss ,Brandon Syu ,Martin
Leung ,amd-gfx lis
This change will speed-up a bit these ipu_idmac_get &
ipu_idmac_put processing and there is no need to protect
kzalloc & kfree.
Signed-off-by: Bernard Zhao
---
drivers/gpu/ipu-v3/ipu-common.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
Static function dal_ddc_i2c_payloads_destroy is only called
in dal_ddc_service_query_ddc_data, the parameter is &payloads
, there is no point NULL risk, so no need to check.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/
1 - 100 of 164 matches
Mail list logo