[PATCH 11/12] drm: vc4: Use drm_atomic_helper_shutdown() to disable planes on removal
Laurent Pinchart
laurent.pinchart+renesas at ideasonboard.com
Wed Jan 17 21:55:34 UTC 2018
The plane cleanup handler currently calls drm_plane_helper_disable(),
which is a legacy helper function. Replace it with a call to
drm_atomic_helper_shutdown() at removal time. The plane .destroy()
handler now consisting only of a call to drm_plane_cleanup(), replace it
with direct calls to that function.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
---
drivers/gpu/drm/msm/Kconfig | 1 -
drivers/gpu/drm/vc4/Kconfig | 1 -
drivers/gpu/drm/vc4/vc4_drv.c | 3 +++
drivers/gpu/drm/vc4/vc4_plane.c | 8 +-------
drivers/gpu/drm/zte/Kconfig | 2 +-
5 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index 99d39b2aefa6..d6b0685ca129 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -2,7 +2,6 @@
config DRM_MSM
tristate "MSM DRM"
depends on DRM
- depends on ARCH_QCOM || (ARM && COMPILE_TEST)
depends on OF && COMMON_CLK
depends on MMU
select QCOM_MDT_LOADER if ARCH_QCOM
diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig
index fdae18aeab4f..412d7a06f0db 100644
--- a/drivers/gpu/drm/vc4/Kconfig
+++ b/drivers/gpu/drm/vc4/Kconfig
@@ -1,6 +1,5 @@
config DRM_VC4
tristate "Broadcom VC4 Graphics"
- depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST
depends on DRM
depends on SND && SND_SOC
depends on COMMON_CLK
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index ceb385fd69c5..ed2c1c233c39 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -31,6 +31,7 @@
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <drm/drm_atomic_helper.h>
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_fb_helper.h>
@@ -299,6 +300,8 @@ static void vc4_drm_unbind(struct device *dev)
drm_fb_cma_fbdev_fini(drm);
+ drm_atomic_helper_shutdown(drm);
+
drm_mode_config_cleanup(drm);
drm_dev_unref(drm);
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 515f97997624..9fcc55078ff7 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -825,12 +825,6 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = {
.cleanup_fb = vc4_cleanup_fb,
};
-static void vc4_plane_destroy(struct drm_plane *plane)
-{
- drm_plane_helper_disable(plane);
- drm_plane_cleanup(plane);
-}
-
/* Implements immediate (non-vblank-synced) updates of the cursor
* position, or falls back to the atomic helper otherwise.
*/
@@ -910,7 +904,7 @@ vc4_update_plane(struct drm_plane *plane,
static const struct drm_plane_funcs vc4_plane_funcs = {
.update_plane = vc4_update_plane,
.disable_plane = drm_atomic_helper_disable_plane,
- .destroy = vc4_plane_destroy,
+ .destroy = drm_plane_cleanup,
.set_property = NULL,
.reset = vc4_plane_reset,
.atomic_duplicate_state = vc4_plane_duplicate_state,
diff --git a/drivers/gpu/drm/zte/Kconfig b/drivers/gpu/drm/zte/Kconfig
index 5b36421ef3e5..76d63bcc5c3a 100644
--- a/drivers/gpu/drm/zte/Kconfig
+++ b/drivers/gpu/drm/zte/Kconfig
@@ -1,6 +1,6 @@
config DRM_ZTE
tristate "DRM Support for ZTE SoCs"
- depends on DRM && ARCH_ZX
+ depends on DRM
select DRM_KMS_CMA_HELPER
select DRM_KMS_FB_HELPER
select DRM_KMS_HELPER
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list