@@ -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);
}
@@ -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)
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> --- 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(-)