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

2021-05-24 Thread Tian Tao
use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle to avoid continuing to increase the refcount when pm_runtime_get_sync fails. Signed-off-by: Tian Tao Reviewed-by: Daniel Vetter --- v2: drop unnecessary change about if condition. v3: update the commit

[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/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] 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/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/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/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/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/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..126c

[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/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

[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/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/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/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 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/malidp: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-24 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/radeon/radeon_pm: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-24 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/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/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/tegra: dpaux: move to use request_irq by IRQF_NO_AUTOEN flag

2021-03-17 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 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 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] 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] drm/exynos/decon5433: Remove the unused include statements

2021-03-15 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..1510e4e

[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: 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] 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: 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: 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/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/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

[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/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

[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_ioc32.c b

[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/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/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/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/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: 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 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: 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/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: arc: Use simple encoder

2021-01-11 Thread Tian Tao
The arc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/arc/arcpgu_hdmi.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu_hdmi.c b/drivers

[PATCH] drm/hisilicon: Use drm_crtc_mask()

2021-01-11 Thread Tian Tao
Use drm_crtc_mask() where appropriate. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c index

[PATCH] drm/hisilicon: Delete the empty function mode_valid

2021-01-09 Thread Tian Tao
Based on the drm_connector_mode_valid, if the hibmc implementation of mode_valid only returns MODE_OK, then we can not implement the mode_valid function. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 7 --- 1 file changed, 7 deletions(-) diff --git

[RFC] drm/connector: Set the default callback function for drm_connector_funcs

2021-01-08 Thread Tian Tao
The member functions of drm_connector_funcs are not specific to each manufacturer's driver, so drm_connector_funcs is allowed to use default values, which prevents all drivers from setting the same member functions for drm_connector_funcs. Signed-off-by: Tian Tao --- drivers/gpu/drm

[PATCH] drm/amd/display: remove unused including

2020-12-31 Thread Tian Tao
Remove including that don't need it. Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 - 3 files changed, 3 deletions

[PATCH] drm/tve200: remove unused including

2020-12-30 Thread Tian Tao
Remove including that don't need it. Signed-off-by: Tian Tao --- drivers/gpu/drm/tve200/tve200_display.c | 1 - drivers/gpu/drm/tve200/tve200_drv.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/tve200/tve200_display.c b/drivers/gpu/drm/tve200/tve200_display.c index

[PATCH] drm/pl111: remove unused including

2020-12-30 Thread Tian Tao
Remove including that don't need it. Signed-off-by: Tian Tao --- drivers/gpu/drm/pl111/pl111_display.c | 1 - drivers/gpu/drm/pl111/pl111_drv.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index 69c02e7

[PATCH] drm/msm/dp: Delete unused local parameters

2020-12-29 Thread Tian Tao
Fixes coccicheck warnings: drivers/gpu/drm/msm/dp/dp_link.c:848:5-8: Unneeded variable: "ret". Return "0" on line 880 Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dp/dp_link.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dp

[PATCH] drm/qxl: Use managed mode-config init

2020-12-29 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index

[PATCH] drm/pci: Use pcim_enable_device()

2020-12-29 Thread Tian Tao
Using the managed function simplifies the error handling. After unloading the driver, the PCI device should now get disabled as well. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_pci.c b/drivers

[PATCH] drm/amd/display: fix comparison pointer to bool warning in dc.c

2020-12-29 Thread Tian Tao
/core/dc.c:976:15-44: WARNING: Comparison to bool Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/display/dc/core/dc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 58eb0d6

[PATCH] drm/amd/display: Fix duplicate included drm/drm_hdcp.h

2020-12-28 Thread Tian Tao
drm/drm_hdcp.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH] drm/msm/dp: remove unneeded semicolon

2020-12-28 Thread Tian Tao
Fix the following warning: drivers/gpu/drm/msm/dp/dp_ctrl.c:1161:2-3: Unneeded semicolon Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dp/dp_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c index

[PATCH] drm/hisilicon: Use simple encoder

2020-12-28 Thread Tian Tao
The hibmc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon

[PATCH] drm/kmb: remove unneeded semicolon

2020-12-28 Thread Tian Tao
: Unneeded semicolon Signed-off-by: Tian Tao --- 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 4b5d82a..231041b 100644 --- a/drivers/gpu/drm/kmb/kmb_dsi.c +++ b/drivers/gpu

[PATCH v2] drm/hisilicon: Add load and unload callback functions

2020-12-25 Thread Tian Tao
Add the callback functions of drm_driver structure member functions load and unload, no need to call load in the hibmc_pci_probe function and unload in the hibmc_pci_remove function. v2: remove the hibmc_unload called from hibmc_pic_remove. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon

[PATCH] drm/hisilicon: Add load and unload callback functions

2020-12-23 Thread Tian Tao
Add the callback functions of drm_driver structure member functions load and unload, no need to call load in the hibmc_pci_probe function and unload in the hibmc_pci_remove function. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 17 +++-- 1 file

[PATCH] drm/hisilicon: Remove drm_dev_put in hibmc

2020-12-23 Thread Tian Tao
Hibmc use the devm_drm_dev_alloc function in hibmc_pci_probe, if hibmc_pci_probe returns non-zero, devm_drm_dev_alloc will call devm_drm_dev_init, which will call devm_drm_dev_init_release to release drm_dev_put. There is no need for hibmc to call drm_dev_put separately. Signed-off-by: Tian Tao

[PATCH] drm/amd/display: remove useless else if

2020-12-22 Thread Tian Tao
Fix the following coccinelle report: drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c:1357:6-8: WARNING: possible condition with no effect (if == else) Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH] drm/hisilicon: Use pcim_enable_device()

2020-12-21 Thread Tian Tao
Using the managed function simplifies the error handling. After unloading the driver, the PCI device should now get disabled as well. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu

[PATCH] drm/bridge: use devm_add_action_or_reset() to handle failed condition

2020-12-17 Thread Tian Tao
switch to using devm_add_action_or_reset() instead of devm_add_action to avoid call the cec_delete_adapter,when devm_add_action_or_reset return failed. Signed-off-by: Tian Tao --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH] drm/hisilicon: Add the CONFIG_PM_SLEEP

2020-12-17 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 v2] drm/hisilicon: Fix rmmod hibmc_drm failed

2020-12-16 Thread Tian Tao
) ---[ end trace 310d94ee8abef44f ]--- Kernel panic - not syncing: Oops - BUG: Fatal exception v2: update the commit log to indicate the patch that needs to be revert. Signed-off-by: Tian Tao Acked-by: Daniel Vetter --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +- 1 file changed, 5

[PATCH drm/hisilicon 1/2] drm/irq: Add the new api to enable pci msi

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

[PATCH drm/hisilicon 2/2] drm/hisilicon: Use the new api devm_drm_msi_install

2020-12-16 Thread Tian Tao
Use devm_drm_msi_install to enable pci msi so that pci_disable_msi is not called when hibmc is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon 0/2] Add the new api to enable msi

2020-12-16 Thread Tian Tao
patch #1 add the new api to enable pci mis. patch #2 is hibmc driver uses the newly added api to enable msi. Tian Tao (2): drm/irq: Add the new api to enable pci msi drm/hisilicon: Use the new api devm_drm_msi_install drivers/gpu/drm/drm_irq.c | 33

[PATCH] drm/hisilicon: Fix use-after-free

2020-12-15 Thread Tian Tao
-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 - 1 file changed, 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 7e91ef1..e3ab765b 100644 --- a/drivers/gpu/drm/hisilicon/hibmc

[PATCH] drm/hisilicon: Fix rmmod hibmc_drm failed

2020-12-15 Thread Tian Tao
- not syncing: Oops - BUG: Fatal exception Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +- 1 file changed, 5 insertions(+), 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 e3ab765b

[PATCH] dma-buf: system_heap: Use PTR_ERR_OR_ZERO() to simplify code

2020-12-15 Thread Tian Tao
Fixes coccicheck warning: drivers/dma-buf/heaps/system_heap.c:437:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Tian Tao --- drivers/dma-buf/heaps/system_heap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma

[PATCH] drm/sun4i: hdmi: Use PTR_ERR_OR_ZERO() to simplify code

2020-12-15 Thread Tian Tao
Fixes coccicheck warning: drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:281:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Tian Tao --- drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c b

[PATCH] drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code

2020-12-15 Thread Tian Tao
Fixes coccicheck warning: drivers/gpu/drm/tegra/drm.c:350:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Tian Tao --- drivers/gpu/drm/tegra/drm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index

[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/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/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_drv.c

[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/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/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 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 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/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 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/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 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 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 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/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

[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..105fa65

[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/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 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 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 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 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] 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..8717a1c

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

2020-12-04 Thread Tian Tao
to 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

  1   2   3   >