2020-11-11 08:35:59

by 赵军奎

[permalink] [raw]
Subject: [PATCH 0/5] add KERN_LEVEL to printk

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 printk
adreno/a5xx_gpu.c: add KERN_LEVEL to printk
adreno/adreno_gpu.c: add KERN_LEVEL to printk

drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 4 ++--
drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 4 ++--
drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 +++---
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++++++------
5 files changed, 14 insertions(+), 14 deletions(-)

--
2.29.0


2020-11-11 08:37:04

by 赵军奎

[permalink] [raw]
Subject: [PATCH 4/5] adreno/a5xx_gpu.c: add KERN_LEVEL to printk

Add KERN_LEVEL to printk.

Signed-off-by: Bernard Zhao <[email protected]>
---
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/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -847,7 +847,7 @@ static void a5xx_recover(struct msm_gpu *gpu)
adreno_dump_info(gpu);

for (i = 0; i < 8; i++) {
- printk("CP_SCRATCH_REG%d: %u\n", i,
+ printk(KERN_DEBUG "CP_SCRATCH_REG%d: %u\n", i,
gpu_read(gpu, REG_A5XX_CP_SCRATCH_REG(i)));
}

--
2.29.0

2020-11-11 08:53:05

by Thomas Zimmermann

[permalink] [raw]
Subject: Re: [PATCH 0/5] add KERN_LEVEL to printk

Hi

Am 11.11.20 um 09:31 schrieb 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.

I have no say on the msm driver, but IMHO a much better change would be
a conversion to drm_dbg(), drm_err(), etc.

Best regards
Thomas

>
> 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 printk
> adreno/a5xx_gpu.c: add KERN_LEVEL to printk
> adreno/adreno_gpu.c: add KERN_LEVEL to printk
>
> drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 4 ++--
> drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 4 ++--
> drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 +++---
> drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-
> drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++++++------
> 5 files changed, 14 insertions(+), 14 deletions(-)
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer