[PATCH v3 RESEND 16/24] drm/exynos: set cursor plane in exynos_drm_crtc_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch configures cursor plane in exynos_drm_crtc_init.
Since Exynos DRM does not support fast/async path for cursor update,
it must be disabled.

Signed-off-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |  6 ++++--
 drivers/gpu/drm/exynos/exynos_drm_fb.c   | 10 +++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index ec1319781b8b..303df018f0a1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -176,17 +176,19 @@ int exynos_drm_crtc_init(struct exynos_drm_crtc *exynos_crtc,
 			 struct drm_device *drm_dev)
 {
 	struct drm_crtc *crtc = &exynos_crtc->base;
-	struct drm_plane *primary = NULL, *plane;
+	struct drm_plane *primary = NULL, *cursor = NULL, *plane;
 
 	drm_for_each_plane(plane, drm_dev) {
 		if (plane->possible_crtcs != BIT(drm_dev->mode_config.num_crtc))
 			continue;
 		if (!primary && plane->type == DRM_PLANE_TYPE_PRIMARY)
 			primary = plane;
+		if (!cursor && plane->type == DRM_PLANE_TYPE_CURSOR)
+			cursor = plane;
 	}
 
 	drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs);
-	return drm_crtc_init_with_planes(drm_dev, crtc, primary, NULL,
+	return drm_crtc_init_with_planes(drm_dev, crtc, primary, cursor,
 					 &exynos_crtc_funcs, NULL);
 }
 
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index 1f11ab0f8e9d..d705e363f703 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -155,11 +155,19 @@ static struct drm_mode_config_helper_funcs exynos_drm_mode_config_helpers = {
 	.atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
 };
 
+int exynos_drm_atomic_helper_commit(struct drm_device *dev,
+				    struct drm_atomic_state *state,
+				    bool nonblock)
+{
+	state->legacy_cursor_update = false;
+	return drm_atomic_helper_commit(dev, state, nonblock);
+}
+
 static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
 	.fb_create = exynos_user_fb_create,
 	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = drm_atomic_helper_check,
-	.atomic_commit = drm_atomic_helper_commit,
+	.atomic_commit = exynos_drm_atomic_helper_commit,
 };
 
 void exynos_drm_mode_config_init(struct drm_device *dev)
-- 
2.17.1




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux