summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2019-03-20 13:47:52 +0100
committerAndrzej Hajda <a.hajda@samsung.com>2019-03-20 13:52:04 +0100
commit473f4376e952ac84f2f70ca989648b0b5866576e (patch)
treed0a9a686154fee449a5c16602fc0c88be55d2930
parentb793fbdcc43a5f29826e5d7cae0872aeb3b99c38 (diff)
downloadlinux-exynos-473f4376e952ac84f2f70ca989648b0b5866576e.tar.gz
linux-exynos-473f4376e952ac84f2f70ca989648b0b5866576e.tar.bz2
linux-exynos-473f4376e952ac84f2f70ca989648b0b5866576e.zip
drm/exynos: set cursor plane in exynos_drm_crtc_init
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@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.c10
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)