From patchwork Wed Mar 20 13:06:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10861579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C67561823 for ; Wed, 20 Mar 2019 13:07:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB92128B92 for ; Wed, 20 Mar 2019 13:07:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A96DF29BD8; Wed, 20 Mar 2019 13:07:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47F4928B92 for ; Wed, 20 Mar 2019 13:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727625AbfCTNHT (ORCPT ); Wed, 20 Mar 2019 09:07:19 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55162 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727415AbfCTNHT (ORCPT ); Wed, 20 Mar 2019 09:07:19 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190320130718euoutp016fa2c297dcaff59e79d0ea02df99f1a4~NrJ18pz-Q0130601306euoutp01J; Wed, 20 Mar 2019 13:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190320130718euoutp016fa2c297dcaff59e79d0ea02df99f1a4~NrJ18pz-Q0130601306euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553087238; bh=xJ8hSSxDM9O2iw0E931zTbBjtcba1ypqvQ9ZdfpdH00=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Rvnz1HyYmhSjnpnaPKVLF68dZHwE34xa5inkY5pO2mhxYkiLXIesYksPa8L5opcyI oVk3112PtWAEhHT7rGNfZ6rCogK2HohS8DAZOZK6BYw78W/t+KSF+9HxSUa2y7zySF 3fjbGSzT0Rh/GaFiN2U8hGw3yVmzHpC5DIiP7BM8= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190320130718eucas1p1c6d40ce57564fe5d72f0f924c702182d~NrJ1hmkGk2305023050eucas1p1z; Wed, 20 Mar 2019 13:07:18 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DD.91.04294.60B329C5; Wed, 20 Mar 2019 13:07:18 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190320130717eucas1p2c75749455fa4b34b4d21f9873b3d9cb6~NrJ08oxTK0223602236eucas1p2p; Wed, 20 Mar 2019 13:07:17 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-be-5c923b06e9f9 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E7.AF.04284.50B329C5; Wed, 20 Mar 2019 13:07:17 +0000 (GMT) Received: from AMDC3748.DIGITAL.local ([106.120.43.17]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POO004P71RZN460@eusync1.samsung.com>; Wed, 20 Mar 2019 13:07:17 +0000 (GMT) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v2 RESEND 14/24] drm/exynos: set cursor plane in exynos_drm_crtc_init Date: Wed, 20 Mar 2019 14:06:57 +0100 Message-id: <20190320130707.25161-15-a.hajda@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190320130707.25161-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsWy7djP87ps1pNiDJ6+5Le4te4cq8XGGetZ La58fc9mMen+BBaL8+c3sFvMOL+PyWLtkbvsDuwem1Z1snnc7z7O5NG3ZRWjx+dNcgEsUVw2 Kak5mWWpRfp2CVwZxxevZS2YKlzRPPssawPjGoEuRk4OCQETiYWv9rN1MXJxCAmsYJQ49LKX EcL5zCjx7XsDG0zVs39voaqWMUocOPGSFcL5zyjRf+ARO0gVm4CmxN/NN8E6RASUJVbta2cH KWIW+M0oMX35NrAiYYFwia6WH8wgNouAqsS2S3+YQGxeAUuJyVtWskKsk5dYveEAWA0nUPzh nP9ggyQEGtkknm/8wwhR5CLRv3MblC0j0dlxkAnCrpe4v6KFGaKhg1Fi64adzBAJa4nDxy+C bWAW4JOYtG06UJwDKM4r0dEmBFHiIXHj1lIWiNd6GCWefN/HOoFRYgEjwypG8dTS4tz01GKj vNRyveLE3OLSvHS95PzcTYzAGDv97/iXHYy7/iQdYhTgYFTi4b3wfEKMEGtiWXFl7iFGCQ5m JRHeCKVJMUK8KYmVValF+fFFpTmpxYcYpTlYlMR5qxkeRAsJpCeWpGanphakFsFkmTg4pRoY V1QxTK5J5Dqd+OJl8b4oXqFvR/zUkiI+y2r0TUtjKwz+cdO76cSPjVknL+g16SzlfH7s8b2a H4q8UgH9Kf0NlaZNi1LtLfe82fBG3KNKcx1P7evEKOvK77zTqjSzl39M11+XH/et6rj5zILf r7ftF/FW//7IWbhZWd2lQe6p6Xn1VoH34jeVWIozEg21mIuKEwHZJU8QrQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42I5/e/4ZV1W60kxBhtX6lvcWneO1WLjjPWs Fle+vmezmHR/AovF+fMb2C1mnN/HZLH2yF12B3aPTas62Tzudx9n8ujbsorR4/MmuQCWKC6b lNSczLLUIn27BK6M44vXshZMFa5onn2WtYFxjUAXIyeHhICJxLN/b9m6GLk4hASWMErsnzOX FcJpZJI483QvK0gVm4CmxN/NN9lAbBEBZYlV+9rZQYqYBX4zSnye8ZUZJCEsEC7R1fIDzGYR UJXYdukPE4jNK2ApMXnLSlaIdfISqzccAKvhBIo/nPOfHcQWErCQWHziLuMERp4FjAyrGEVS S4tz03OLDfWKE3OLS/PS9ZLzczcxAoNm27Gfm3cwXtoYfIhRgINRiYe34umEGCHWxLLiytxD jBIczEoivBFKk2KEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2CyTJx cEo1MM7eG3FuvpyBuvHGpia1ErErofFHKm8wlUsJSmdfcp1xtf3K5b+1lVPybS11fv/Pra+7 skgreuHpgPbmzJXMf1Yd2DFz0n+ht1P7Vabee36Y6yjzx8anrFpu0W/DrbqXnC+9d/X3tNSz 71YJM1/Sqzu/n+VgOvc9q9AZhp9SVk+f/nVujHTS2R9KLMUZiYZazEXFiQCr08uwFgIAAA== X-CMS-MailID: 20190320130717eucas1p2c75749455fa4b34b4d21f9873b3d9cb6 CMS-TYPE: 201P X-CMS-RootMailID: 20190320130717eucas1p2c75749455fa4b34b4d21f9873b3d9cb6 References: <20190320130707.25161-1-a.hajda@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)