Re: [PATCH] drm: use trace_printk rather than printk in drm_dbg.

2019-07-31 Thread Fuqian Huang
Joe Perches 於 2019年7月31日週三 下午2:06寫道: > > On Wed, 2019-07-31 at 10:45 +0800, Fuqian Huang wrote: > > In drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c, > > amdgpu_ih_process calls DRM_DEBUG which calls drm_dbg and > > finally calls printk. > > As amdgpu_ih_process is ca

[PATCH v2] drm: use trace_printk rather than printk in drm_dbg.

2019-07-31 Thread Fuqian Huang
a live lock. printk should not be used in IRQ context. Instead, trace_printk is recommended in IRQ context. Link: https://lwn.net/Articles/365835 Reviewed-by: Joe Perches Signed-off-by: Fuqian Huang --- Changes in v2: - Only make the interrupt uses the trace_printk to avoid all 4000

[PATCH] drm: use trace_printk rather than printk in drm_dbg.

2019-07-30 Thread Fuqian Huang
a live lock. printk should not be used in IRQ context. Instead, trace_printk is recommended. Link: https://lwn.net/Articles/365835 Signed-off-by: Fuqian Huang --- drivers/gpu/drm/drm_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers

Re: [PATCH 1/2] drm/ttm: use the same attributes when freeing d_page->vaddr

2019-07-18 Thread Fuqian Huang
Koenig, Christian 於 2019年7月16日週二 下午9:38寫道: > > Am 11.07.19 um 05:10 schrieb Fuqian Huang: > > In function __ttm_dma_alloc_page(), d_page->addr is allocated > > by dma_alloc_attrs() but freed with use dma_free_coherent() in > > __ttm_dma_free_page(). > > Use the

[PATCH] drm/amd/powerplay: remove redundant memset

2019-07-15 Thread Fuqian Huang
kzalloc has already zeroed the memory. So the memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c index

[PATCH v3 05/24] drm/amdgpu: remove memset after kzalloc

2019-07-15 Thread Fuqian Huang
kzalloc has already zeroed the memory during the allocation. So memset is unneeded. Signed-off-by: Fuqian Huang --- Changes in v3: - Fix subject prefix: gpu/drm -> drm/amdgpu drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- drivers/gpu/drm/amd/powerplay/hw

[PATCH v3 24/24] video: fbdev-MMP: Remove call to memset after dma_alloc_coherent

2019-07-14 Thread Fuqian Huang
In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/v

[PATCH 1/2] drm/ttm: use the same attributes when freeing d_page->vaddr

2019-07-11 Thread Fuqian Huang
In function __ttm_dma_alloc_page(), d_page->addr is allocated by dma_alloc_attrs() but freed with use dma_free_coherent() in __ttm_dma_free_page(). Use the correct dma_free_attrs() to free d_page->vaddr. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 6 +-

[PATCH 06/14] drm/i2c: tda9950: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-09 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/i2c/tda9950.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c index 8039fc0d83db..042f6487e6fb 100644 --- a/drivers/gpu/drm/i2c/tda9950.c +++ b/drivers/gpu/drm

[PATCH 05/14] drm/drv: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()

2019-07-09 Thread Fuqian Huang
. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/drm_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 862621494a93..dd004ebbb5fd 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c

[Patch v2 04/10] drm/panfrost: using dev_get_drvdata directly

2019-07-04 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[PATCH v2 08/35] drm/i915: Use kmemdup rather than duplicating its implementation

2019-07-04 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/gpu/drm/i915/gvt/dmabuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c

[PATCH 06/30] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-04 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memset. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++--- drivers/gpu/drm/amd/display/dc/core/dc.c| 6 ++ drivers/gpu/drm/amd/display/dc

[Patch v2 03/10] drm/omapdrm: using dev_get_drvdata directly

2019-07-04 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[PATCH v2 07/35] drm/amdgpu: Use kmemdup rather than duplicating its implementation

2019-07-04 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Reviewed-by: Emil Velikov Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[Patch v2 01/10] drm/exynos: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[Patch v2 02/10] drm/msm: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

[PATCH 07/30] drm/i915: use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memset. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/i915/gvt/dmabuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c index 41c8ebc60c63..fe6fa979f22a

[PATCH 1/4] gpu: Use dev_get_drvdata()

2019-07-01 Thread Fuqian Huang
Using dev_get_drvdata directly. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/msm/adreno/adreno_device.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 13 + drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c| 6 ++ drivers/gpu/drm/msm/dsi/dsi_host.c

[PATCH v2 07/27] gpu: drm: remove memset after zalloc

2019-06-28 Thread Fuqian Huang
zalloc has already zeroed the memory. so memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c| 2

[PATCH v2 23/27] video: fbdev: remove unneeded memset after dma_alloc_coherent

2019-06-27 Thread Fuqian Huang
In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/video/fbdev/mmp/fb/mmpfb.c | 1 - 1 file changed, 1 deletio

[PATCH 18/87] gpu: drm: Remove call to memset after kzalloc in tonga_smumgr.c

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr

[PATCH 17/87] gpu: drm: Remove call to memset after kzalloc in iceland_smumgr.c

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr

[PATCH 14/87] gpu: amd: Remove call to memset after kzalloc

2019-06-27 Thread Fuqian Huang
kzalloc already zerored the memory. so memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH 16/87] gpu: drm: Remove call to memset after kzalloc

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is unneeded. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr

[PATCH 15/87] gpu: drm: Remove call to memset after kzalloc in process_pptable_v1_0.c

2019-06-27 Thread Fuqian Huang
kzalloc has already zeroes the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd

[PATCH 45/87] fbdev: mmp: remove memset after dma_alloc_coherent in mmpfb.c

2019-06-27 Thread Fuqian Huang
In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/video/fbdev/mmp/fb/mmpfb.c | 1 - 1 file changed, 1 deletio