[PATCH] drm/bridge: simplify devm_drm_panel_bridge_add_typed

2021-04-07 Thread Tian Tao
Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Tian Tao Signed-off-by: Yicong Yang --- drivers/gpu/drm/bridge/panel.c | 27 +++ 1 file changed

[PATCH] drm/radeon/r600: Fix variables that are not used after assignment

2021-04-08 Thread Tian Tao
err was not used after being assigned -EINVAL and was given a new value, so here add goto to handle the error case. Signed-off-by: Tian Tao --- drivers/gpu/drm/radeon/r600.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index

[PATCH] drm/panel: panel-dsi-cm: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-04-11 Thread Tian Tao
Fix the following coccicheck warning: drivers/gpu/drm/panel/panel-dsi-cm.c:271:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/panel/panel-dsi-cm.c:251:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/panel/panel-dsi-cm.c | 4 ++-- 1 file changed, 2

[PATCH] drm/nouveau/hwmon: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-04-11 Thread Tian Tao
-by: Tian Tao --- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index 1c3104d..c6e5ee9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c +++ b

[PATCH] drm/radeon/cik: remove set but not used variables

2021-04-12 Thread Tian Tao
The value of pipe_id and queue_id are not used under certain circumstances, so just delete. Signed-off-by: Tian Tao --- drivers/gpu/drm/radeon/cik.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 8b7a4f7..42a8afa 100644

[PATCH] drm/amdgpu: remove set but not used variables

2021-04-13 Thread Tian Tao
The value of ret set but will rewriten, so just delete. Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index

[PATCH] gpu: host1x: mipi: Simplify with dev_err_probe()

2021-03-12 Thread Tian Tao
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Tian Tao --- drivers/gpu/host1x/mipi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/host1x/mipi.c b/drivers

[PATCH] drm/exynos/decon5433: Remove the unused include statements

2021-03-14 Thread Tian Tao
This driver doesn't reference of_gpio.h, so drop it. Signed-off-by: Tian Tao --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 1f79bc2..15

[PATCH] drm/bridge: sii9234: sil-sii8620.c: move to use request_irq by IRQF_NO_AUTOEN flag

2021-03-15 Thread Tian Tao
After this patch cbe16f35bee68 genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() is merged. request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can be replaced by request_irq() with IRQF_NO_AUTOEN flag. Signed-off-by: Tian Tao

[PATCH v2] drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag

2021-03-15 Thread Tian Tao
wrong flags Signed-off-by: Tian Tao --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 7 +++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos

[PATCH v2] drm/bridge: sii9234: sil-sii8620.c: move to use request_irq by IRQF_NO_AUTOEN flag

2021-03-15 Thread Tian Tao
wrong flags Signed-off-by: Tian Tao --- drivers/gpu/drm/bridge/sii9234.c | 4 ++-- drivers/gpu/drm/bridge/sil-sii8620.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c index 15c98a7..54b5097 100644

[PATCH] drm/tegra: dpaux: move to use request_irq by IRQF_NO_AUTOEN flag

2021-03-16 Thread Tian Tao
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. Signed-off-by: Tian Tao --- drivers/gpu/drm/tegra/dpaux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH] drm/sysfs: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-21 Thread Tian Tao
Fix the following coccicheck warning: drivers/gpu/drm/drm_sysfs.c:172:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/drm_sysfs.c:185:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/drm_sysfs.c:159:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu

[PATCH] drm/bridge/lontium-lt9611uxc: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-22 Thread Tian Tao
Fix the following coccicheck warning: drivers/gpu//drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/lontium

[PATCH] drm/radeon/radeon_pm: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-23 Thread Tian Tao
drivers/gpu//drm/radeon/radeon_pm.c:755:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/radeon/radeon_pm.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers

[PATCH] drm/malidp: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-23 Thread Tian Tao
Fix the following coccicheck warning: drivers/gpu//drm/arm/malidp_drv.c:658:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/arm/malidp_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm

[PATCH drm/amdgpu 2/2] drm/amd/pm: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-24 Thread Tian Tao
scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2972:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3006:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3013:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu

[PATCH drm/amdgpu 0/2] Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-24 Thread Tian Tao
Use the generic sysfs_emit() function to take place of snprintf/scnprintf, to avoid buffer overrun. Tian Tao (2): drm/amdgpu: Convert sysfs sprintf/snprintf family to sysfs_emit drm/amd/pm: Convert sysfs sprintf/snprintf family to sysfs_emit drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2

[PATCH drm/amdgpu 1/2] drm/amdgpu: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-24 Thread Tian Tao
: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu

[PATCH] drm/tegra: Remove useless error message

2021-03-25 Thread Tian Tao
platform_get_irq() failures. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Signed-off-by: Jay Fang --- drivers/gpu/drm/tegra/dpaux.c | 4 +--- drivers/gpu/drm/tegra/sor.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm

[PATCH] drm/etnaviv: Remove useless error message

2021-03-25 Thread Tian Tao
Fix the following coccicheck report: drivers/gpu/drm/etnaviv/etnaviv_gpu.c:1775:2-9: line 1775 is redundant because platform_get_irq() already prints an error Remove dev_err() messages after platform_get_irq() failures. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Signed-off-by: Jay Fang

[PATCH] drm/komeda: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-29 Thread Tian Tao
scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index ca891ae..cc7664c 100644 --- a

[PATCH] drm/panel: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-29 Thread Tian Tao
Fix the following coccicheck warning: drivers/gpu/drm/panel//panel-tpo-td043mtea1.c:217:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/panel//panel-tpo-td043mtea1.c:189:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao --- drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 4

[PATCH] drm/msm: move to use request_irq by IRQF_NO_AUTOEN flag

2021-04-04 Thread Tian Tao
d. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 5 ++--- drivers/gpu/drm/msm/dp/dp_display.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 71c917f..126c23d 10

[PATCH] drm/hisilicon: Fix build error

2021-01-14 Thread Tian Tao
ot; Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 0a2edc7..abd6250 100644 --- a/drivers/gpu/drm

[PATCH] drm: kirin: use devm_platform_ioremap_resource() to simplify code

2021-01-14 Thread Tian Tao
Use devm_platform_ioremap_resource() to simplify the code. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c| 5 ++--- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon

[PATCH] drm/etnaviv: fix NULL check before some freeing functions is not needed

2021-01-25 Thread Tian Tao
fixed the below warning: drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:84:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH] drm/msm: fix NULL check before some freeing functions is not needed

2021-01-26 Thread Tian Tao
fixed the below warning: ./drivers/gpu/drm/msm/msm_gem.c:991:3-9: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/msm_gem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b

[PATCH] drm/etnaviv: fix coccicheck by ifnullfree.cocci

2021-01-29 Thread Tian Tao
/etnaviv_gem_submit.c:620:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c:622:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 12

[PATCH] drm/msm/adreno: fix debugfs_simple_attr.cocci warnings

2021-02-03 Thread Tian Tao
fixed the below warning: ./drivers/gpu/drm/msm/adreno/a5xx_debugfs.c:141:0-23: WARNING: reset_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] drm/msm/dsi: replace spin_lock_irqsave by spin_lock in hard IRQ

2021-02-07 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dsi/dsi_host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm

[PATCH] drm/tilcdc: replace spin_lock_irqsave by spin_lock in hard IRQ

2021-02-07 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers

[PATCH] drm/amdgpu: fix unnecessary NULL check warnings

2021-02-09 Thread Tian Tao
Remove NULL checks before vfree() to fix these warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:102:2-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH] drm/ioctl: fix space prohibited after that open parenthesis

2021-02-18 Thread Tian Tao
This patch resolves below errors reported by checkpath ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_ioc32.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/drm

[PATCH] drm/drv: Remove initialization of static variables

2021-02-18 Thread Tian Tao
Address the following checkpatch errors: ERROR: do not initialise statics to false Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 20d22e4..c2f78de 100644 --- a

[PATCH] drm/exynos/decon5433: Clean up GPIO includes

2021-03-01 Thread Tian Tao
remove the legacy GPIO headers but what it really uses is since only gpio_desc structs are ever referenced. Signed-off-by: Tian Tao --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos

[PATCH] drm/vboxvideo: Use managed VRAM-helper initialization

2021-03-02 Thread Tian Tao
updated to use drmm_vram_helper_init(). Signed-off-by: Tian Tao --- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vboxvideo/vbox_ttm.c b/drivers/gpu/drm/vboxvideo/vbox_ttm.c index 0066a3c..fd8a53a 100644 --- a

[PATCH] drm/nouveau/pmu: Use %p4cc printk modifier to print FourCC codes

2021-03-02 Thread Tian Tao
Now that we can print FourCC codes directly using printk, make use of the feature in nouveau. Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gt215.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gt215.c b

[PATCH] drm: writeback: Use simple encoder

2021-03-09 Thread Tian Tao
The driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_writeback.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm

[PATCH] drm: mxsfb: Use simple encoder

2021-03-09 Thread Tian Tao
The driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers

[PATCH] drm/imx/dcss: Use simple encoder

2021-03-10 Thread Tian Tao
The driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers

[PATCH] drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag

2021-03-12 Thread Tian Tao
After this patch cbe16f35bee68 genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() is merged. request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can be replaced by request_irq() with IRQF_NO_AUTOEN flag. Signed-off-by: Tian Tao

[PATCH v2] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding

2021-05-21 Thread Tian Tao
use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. Signed-off-by: Tian Tao --- v2: drop unnecessary change about if condition. --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH] drm/nouveau/fb/gp102-: use flexible-array member instead of zero-length array

2020-11-24 Thread Tian Tao
fixed the coccicheck: drivers/gpu/drm/nouveau/include/nvfw/hs.h:26:5-9: WARNING use flexible-array member instead. Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/include/nvfw/hs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvfw/hs.h

[PATCH drm/hisilicon 0/3] Add the new api to install irq

2020-11-27 Thread Tian Tao
patch #1 is code refactorings to use devm_drm_dev_alloc and devm_drm_irq_install. patch #2 add the new api to install irq, patch #3 is hibmc driver uses the newly added api to register interrupts. Tian Tao (3): drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to

[PATCH drm/hisilicon 2/3] drm/irq: Add the new api to install irq

2020-11-27 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 34 ++ include/drm/drm_irq.h | 2 +- 2 files changed, 35 insertions(+), 1

[PATCH] drm/vboxvideo: Used the vram helper

2020-11-27 Thread Tian Tao
if the driver uses drmm_vram_helper_init, there is no need to call drm_vram_helper_release_mm when the drm module get unloaded, as this will done automagically. Signed-off-by: Tian Tao --- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH drm/hisilicon 1/3] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-11-27 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a struct hibmc_drm_private. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 51 +++- drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon 3/3] drm/hisilicon: Use the new api devm_drm_irq_install

2020-11-27 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon v2 1/4] drm/hisilicon: Assgin local variable to drm_device

2020-12-02 Thread Tian Tao
Assign local variable to struct drm_device *dev because they are used multiple times within a function. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 30 drivers/gpu/drm/hisilicon

[PATCH drm/hisilicon v2 2/4] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-02 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a struct hibmc_drm_private. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 16 ++-- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 2 +- 2 files changed, 7 insertions(+), 11

[PATCH drm/hisilicon v2 3/4] drm/irq: Add the new api to install irq

2020-12-02 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 35 +++ include/drm/drm_irq.h | 2 +- 2 files changed, 36 insertions(+), 1

[PATCH drm/hisilicon v2 4/4] drm/hisilicon: Use the new api devm_drm_irq_install

2020-12-02 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a

[PATCH drm/hisilicon v2 0/4] Add the new api to install irq

2020-12-02 Thread Tian Tao
comment error in patch #3, and use devm_add_action_or_reset instead of devm_add_action. Tian Tao (4): drm/hisilicon: Assgin local variable to drm_device drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to install irq drm/hisilicon: Use the new api

[PATCH drm/hisilicon v2 0/3] Add the new api to install irq

2020-12-03 Thread Tian Tao
devm_add_action_or_reset returns the correct value. Tian Tao (3): drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to install irq drm/hisilicon: Use the new api devm_drm_irq_install drivers/gpu/drm/drm_irq.c| 32 +++ drivers/gpu/drm

[PATCH drm/hisilicon 1/3] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-03 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a structure hibmc_drm_private. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 46 +++- drivers/gpu/drm/hisilicon/hibmc

[PATCH] drm/hisilicon: Use managed VRAM-helper initialization

2020-12-03 Thread Tian Tao
updated to use drmm_vram_helper_init() Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 19 +++ 3 files changed, 3 insertions(+), 18

[PATCH drm/hisilicon v2 3/3] drm/hisilicon: Use the new api devm_drm_irq_install

2020-12-03 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a

[PATCH drm/hisilicon v2 2/3] drm/irq: Add the new api to install irq

2020-12-03 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 32 include/drm/drm_irq.h | 2 +- 2 files changed, 33 insertions(+), 1

[PATCH drm/hisilicon v2 1/3] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-03 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a structure hibmc_drm_private. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 46

[PATCH drm/hisilicon 0/3] Add the new api to install irq

2020-12-03 Thread Tian Tao
patch #1 is code refactorings to use devm_drm_dev_alloc. patch #2 add the new api to install irq, patch #3 is hibmc driver uses the newly added api to register interrupts. Tian Tao (3): drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to install irq drm/hisilicon

[PATCH drm/hisilicon 2/3] drm/irq: Add the new api to install irq

2020-12-03 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 35 +++ include/drm/drm_irq.h | 2 +- 2 files changed, 36 insertions(+), 1

[PATCH drm/hisilicon 3/3] drm/hisilicon: Use the new api devm_drm_irq_install

2020-12-03 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a

[PATCH] drm/nouveau/fb/gp102-: use flexible-array member instead of zero-length array

2020-12-04 Thread Tian Tao
fixed the coccicheck: drivers/gpu/drm/nouveau/include/nvfw/hs.h:26:5-9: WARNING use flexible-array member instead. Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/include/nvfw/hs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvfw/hs.h

[PATCH] drm/fsl-dcu: remove redundant platform_get_irq error message

2020-12-04 Thread Tian Tao
Function dev_err() after platform_get_irq() is redundant because platform_get_irq() already prints an error. Signed-off-by: Tian Tao --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl

[PATCH] drm/nouveau: Use vmemdup_user()

2020-12-04 Thread Tian Tao
Replace alloc and copy with vmemdup_user() Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/nouveau_gem.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 787d05e..df986d9

[PATCH] drm/tilcdc: Remove unnecessary THIS_MODULE

2020-12-04 Thread Tian Tao
As THIS_MODULE has been set in platform_driver_register(), so remove it. Signed-off-by: Tian Tao --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 00efc30..4235780

[PATCH v2] drm/hisilicon: Delete the entire file hibmc_ttm.c

2020-12-04 Thread Tian Tao
Delete the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load(). hibmc_dumb_create() and hibmc_mode_funcs can go to hibmc_drm_drv.c v2: change Deletted to Delete Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc

[PATCH] drm/msm/dsi: Replace spin_lock_irqsave by spin_lock in hard IRQ

2020-12-04 Thread Tian Tao
It is redundant to do irqsave and irqrestore in hardIRQ context. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dsi/dsi_host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index b17ac6c

[PATCH] drm/hisilicon: Deletted the entire file hibmc_ttm.c

2020-12-04 Thread Tian Tao
Deletted the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load(). hibmc_dumb_create() and hibmc_mode_funcs can go to hibmc_drm_drv.c Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/Makefile| 2 +- drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon v3 0/2] support reading resolutions from EDID

2020-12-04 Thread Tian Tao
I2C_SCL_MASK Tian Tao (2): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters drm/hisilicon: Features to support reading resolutions from EDID drivers/gpu/drm/hisilicon/hibmc/Makefile | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 25 +- drivers/gpu/drm

[PATCH] drm/vc4: Deleted the drm_device declaration

2020-12-04 Thread Tian Tao
drm_modeset_lock.h already declares struct drm_device, so there's no need to declare it in vc4_drv.h Signed-off-by: Tian Tao --- drivers/gpu/drm/vc4/vc4_drv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index 8c8d96b..87

[PATCH drm/hisilicon 0/3] support reading resolutions from EDID

2020-12-04 Thread Tian Tao
patch #1 add a new file to implements i2c adapters, #2 read the resolution from the edid, if that fails, set the resolution to fixed. patch #3 update the destroy callback function to release the i2c adapters. Tian Tao (3): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters

[PATCH drm/hisilicon 0/3] support reading resolutions from EDID

2020-12-04 Thread Tian Tao
patch #1 add a new file to implements i2c adapters, #2 read the resolution from the edid, if that fails, set the resolution to fixed. patch #3 update the destroy callback function to release the i2c adapters. Tian Tao (3): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters

[PATCH 1/2] drm/hisilicon: Use managed mode-config init

2020-12-04 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b

[PATCH v2] drm/hisilicon: Delete the entire file hibmc_ttm.c

2020-12-04 Thread Tian Tao
Delete the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load(). hibmc_dumb_create() and hibmc_mode_funcs can go to hibmc_drm_drv.c v2: change Deletted to Delete Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc

[PATCH 2/2] drm/hisilicon: Deletted unused local parameters

2020-12-04 Thread Tian Tao
deletted unused variable ‘priv’. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 04fee18

[PATCH] drm/ttm: remove unused varibles

2020-12-04 Thread Tian Tao
fixed the following warnings drivers/gpu/drm/nouveau/nouveau_bo.c:1227:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_bo.c:1251:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tian Tao --- drivers

[PATCH] gpu: ipu-v3: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-12-04 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/gpu/ipu-v3/ipu-image-convert.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers

[PATCH] drm/msm/dp: remove duplicate include statement

2020-12-04 Thread Tian Tao
linux/rational.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dp/dp_catalog.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c b/drivers/gpu/drm/msm/dp/dp_catalog.c index b15b4ce..10

[PATCH] drm/drv: switch to using devm_add_action_or_reset()

2020-12-07 Thread Tian Tao
switch to using devm_add_action_or_reset() instead of devm_add_action. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7343038..b92f7fd 100644 --- a

[PATCH drm/hisilicon 2/2] drm/hisilicon: Delete unused local parameters

2020-12-07 Thread Tian Tao
delete unused variable ‘priv’ to avoid warning. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

[PATCH drm/hisilicon 1/2] drm/hisilicon: Use managed mode-config init

2020-12-07 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b

[PATCH drm/hisilicon 0/2] Code refactoring

2020-12-07 Thread Tian Tao
patch #1 is used drmm_mode_config_init() to do code refactoring. patch #2 is deleted unused variable ‘priv’ to avoid warning. Tian Tao (2): drm/hisilicon: Use managed mode-config init drm/hisilicon: Delete unused local parameters drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 18

[PATCH drm/hisilicon v2 0/2] Code refactoring

2020-12-08 Thread Tian Tao
patch #1 is used drmm_mode_config_init() to do code refactoring. patch #2 is deleted unused variable ‘priv’ to avoid warning. Changes since v1: patch #1 is removed the unused structure member variable mode_config_initialized. Tian Tao (2): drm/hisilicon: Use managed mode-config init drm

[PATCH drm/hisilicon v2 2/2] drm/hisilicon: Delete unused local parameters

2020-12-08 Thread Tian Tao
delete unused variable ‘priv’ to avoid warning. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm

[PATCH] drm/tidss: Use the new api devm_drm_irq_install

2020-12-08 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not needed to be called. Signed-off-by: Tian Tao --- drivers/gpu/drm/tidss/tidss_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss

[PATCH drm/hisilicon v2 0/2] Code refactoring

2020-12-08 Thread Tian Tao
patch #1 is used drmm_mode_config_init() to do code refactoring. patch #2 is deleted unused variable ‘priv’ to avoid warning. Changes since v1: Remove the unused structure member variable mode_config_initialized. Tian Tao (2): drm/hisilicon: Use managed mode-config init drm/hisilicon: Delete

[PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init

2020-12-08 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. v2: Remove the unused structure member variable mode_config_initialized. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 +++--- drivers/gpu

[PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init

2020-12-08 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 +++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git

[PATCH drm/hisilicon v2 2/2] drm/hisilicon: Delete unused local parameters

2020-12-08 Thread Tian Tao
delete unused variable ‘priv’ to avoid warning. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm

[PATCH] drm/tidss: Use the new api devm_drm_irq_install

2020-12-09 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not needed to be called. Signed-off-by: Tian Tao --- drivers/gpu/drm/tidss/tidss_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss

[PATCH] drm/drv: Remove invalid assignments

2020-12-11 Thread Tian Tao
it's not necessary to assign a value of 0 to ret here, because if the previous functions were executed correctly, ret would be 0. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_

[PATCH] drm/hisilicon: Add the CONFIG_PM_SLEEP

2020-12-11 Thread Tian Tao
add the CONFIG_PM_SLEEP to isolate the function of resume and suspend. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc

[PATCH] drm/qxl: use flexible-array member instead of zero-length array

2020-12-11 Thread Tian Tao
Use flexible-array member introduced in C99 instead of zero-length array. Most of zero-length array was already taken care in previous patch [1]. Now modified few more cases which were not handled earlier. [1]. https://patchwork.kernel.org/patch/11394197/ Signed-off-by: Tian Tao --- drivers

[PATCH] drm: Add the new api to install irq

2020-11-03 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 23 +++ include/drm/drm_drv.h | 3 ++- 2 files changed, 25 insertions(+), 1 deletion

[PATCH v2] drm: Add the new api to install irq

2020-11-03 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. v2: fixed the wrong parameter. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 23 +++ include/drm/drm_drv.h | 3 ++- 2 files changed

[PATCH] drm/fsl-dcu: remove redundant platform_get_irq error message

2020-11-10 Thread Tian Tao
Function dev_err() after platform_get_irq() is redundant because platform_get_irq() already prints an error. Signed-off-by: Tian Tao --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl

[PATCH] drm/amd/pm: Use kmemdup instead of kmalloc and memcpy

2020-11-10 Thread Tian Tao
Fixes coccicheck warning: drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c:255: 36-43: WARNING opportunity for kmemdup Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH] drm/nouveau: Use vmemdup_user()

2020-11-12 Thread Tian Tao
Replace alloc and copy with vmemdup_user() Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/nouveau_gem.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 787d05e..df986d9

  1   2   3   >