[Freedreno] [Resend][PATCH] drm/msm: use kthread_create_worker instead of kthread_run

2020-07-20 Thread Bernard
Use kthread_create_worker to simplify the code and optimise the manager struct: msm_drm_thread. With this change, we could remove struct element (struct task_struct *thread & struct kthread_worker worker), instead, use one point (struct kthread_worker *worker). Signed-off-by: Bernard

[Freedreno] [Resend][PATCH] drm/msm: delete conversion from bool value to bool return

2020-11-10 Thread Bernard
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

[Freedreno] [Resend][PATCH] drm/msm: delete conversion from bool value to bool variable

2020-11-10 Thread Bernard
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

[Freedreno] [PATCH] /msm/adreno: fix different address spaces warning

2021-03-31 Thread Bernard Zhao
/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

[Freedreno] [PATCH] msm/disp: dpu_plane cleanup-coding-style-a-bit

2021-03-31 Thread 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

[Freedreno] [PATCH] drm/msm: remove unneeded variable ret

2021-04-07 Thread Bernard Zhao
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

[Freedreno] [PATCH] drm/msm: fix warning "using plain integer as NULL pointer"

2021-05-09 Thread Bernard Zhao
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

[Freedreno] [PATCH] drm/msm: remove no need local variable

2021-06-05 Thread Bernard Zhao
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.

[Freedreno] [PATCH] drm/msm: cleanup coding style a bit

2021-06-07 Thread Bernard Zhao
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

[Freedreno] [PATCH] drm/msm: fix potential memleak in error branch

2020-06-11 Thread Bernard Zhao
In fucntin msm_submitqueue_create, the queue is a local variable, in return -EINVAL branch, queue didn`t add to ctx`s list yet, and also didn`t kfree, this maybe bring in potential memleak. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/msm/msm_submitqueue.c | 4 +++- 1 file changed, 3

[Freedreno] [PATCH] drm/msm: fix potential memleak issue

2020-06-11 Thread Bernard Zhao
Function msm_gpu_crashstate_capture maybe called for several times, and then the state->bos is a potential memleak. Also the state->pos maybe alloc failed, but now without any handle. This change is to fix some potential memleak and add error handle when alloc failed. Signed-off-by: Bernar

[Freedreno] [PATCH] drm/msm: use kthread_create_worker instead of kthread_run

2020-07-14 Thread Bernard Zhao
Use kthread_create_worker to simplify the code and optimise the manager struct: msm_drm_thread. With this change, we could remove struct element (struct task_struct *thread & struct kthread_worker worker), instead, use one point (struct kthread_worker *worker). Signed-off-by: Bernard

[Freedreno] [PATCH] drm/msm/adreno: remove return value of function XX_print

2020-08-14 Thread Bernard Zhao
XX_print like pfp_print/me_print/meq_print/roq_print are just used in file a5xx_debugfs.c. And these function always return 0, this return value is meaningless. This change is to make the code a bit more readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 21

[Freedreno] [PATCH] drm/msm/disp: add error value record in for circle`s error index

2020-10-09 Thread Bernard Zhao
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

[Freedreno] [PATCH] drm/msm: delete conversion from bool value to bool variable

2020-11-02 Thread Bernard Zhao
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

[Freedreno] [PATCH] drm/msm: delete conversion from bool value to bool return

2020-11-02 Thread Bernard Zhao
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

[Freedreno] [PATCH 4/5] adreno/a5xx_gpu.c: add KERN_LEVEL to printk

2020-11-11 Thread Bernard Zhao
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

[Freedreno] [PATCH 2/5] adreno/a3xx_gpu.c: add KERN_LEVEL to printk

2020-11-11 Thread Bernard Zhao
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

[Freedreno] [PATCH 0/5] add KERN_LEVEL to printk

2020-11-11 Thread Bernard Zhao
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

[Freedreno] [PATCH 1/5] adreno/a2xx_gpu.c: add KERN_LEVEL to printk

2020-11-11 Thread Bernard Zhao
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

[Freedreno] [PATCH 3/5] adreno/a4xx_gpu.c: add KERN_LEVEL to printk

2020-11-11 Thread Bernard Zhao
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

[Freedreno] [PATCH 5/5] adreno/adreno_gpu.c: add KERN_LEVEL to printk

2020-11-11 Thread Bernard Zhao
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

[Freedreno] [PATCH] gpu/drm/msm: remove redundant when devm_kzalloc failed

2021-02-02 Thread Bernard Zhao
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

[Freedreno] [PATCH] drm/msm: remove unneeded variable: "rc"

2021-02-02 Thread Bernard Zhao
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 ---