From patchwork Mon Mar 25 07:13:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10868041 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 08B4917EE for ; Mon, 25 Mar 2019 07:14:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E40672924E for ; Mon, 25 Mar 2019 07:14:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D830329257; Mon, 25 Mar 2019 07:14:03 +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 6FA2A2924E for ; Mon, 25 Mar 2019 07:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729814AbfCYHOD (ORCPT ); Mon, 25 Mar 2019 03:14:03 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:41952 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729786AbfCYHOC (ORCPT ); Mon, 25 Mar 2019 03:14:02 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190325071400euoutp015ae540026bf6a9896b052ef5b702d189~PIjzMJDuj0750807508euoutp01T; Mon, 25 Mar 2019 07:14:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190325071400euoutp015ae540026bf6a9896b052ef5b702d189~PIjzMJDuj0750807508euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553498041; bh=xJ8hSSxDM9O2iw0E931zTbBjtcba1ypqvQ9ZdfpdH00=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=WkMianBN2Y21miv5zQhgixENj3BIRzcOXoYWTdXIlL+4GNQHIe11WI2gLubifzjFb PkpWoiqD6AcBiycvD2Zjzx/IvPGEppjqU0sAlpfXdIA90VzBdkn0expkT4btYC2Lh5 4ems2l7guPnRh2XrUdDXDr5yTEZJWDWwAnQcEaHs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190325071400eucas1p17c778f72e49b6c225cd0fa7841a03541~PIjyzr7df1835018350eucas1p1j; Mon, 25 Mar 2019 07:14:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 03.6E.04298.8BF789C5; Mon, 25 Mar 2019 07:14:00 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190325071359eucas1p1b97bf55b51b840f4a049df4779800f11~PIjyK3uhY3105231052eucas1p1s; Mon, 25 Mar 2019 07:13:59 +0000 (GMT) X-AuditID: cbfec7f2-3615e9c0000010ca-c4-5c987fb8f143 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 45.69.04146.7BF789C5; Mon, 25 Mar 2019 07:13:59 +0000 (GMT) Received: from AMDC3748.DIGITAL.local ([106.120.51.74]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POW003QHUR43P00@eusync3.samsung.com>; Mon, 25 Mar 2019 07:13:59 +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 v3 RESEND 16/24] drm/exynos: set cursor plane in exynos_drm_crtc_init Date: Mon, 25 Mar 2019 08:13:41 +0100 Message-id: <20190325071349.22600-17-a.hajda@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190325071349.22600-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsWy7djPc7o76mfEGJzoFLK4te4cq8XGGetZ La58fc9mMen+BBaL8+c3sFvMOL+PyWLtkbvsDuwem1Z1snnc7z7O5NG3ZRWjx+dNcgEsUVw2 Kak5mWWpRfp2CVwZxxevZS2YKlzRPPssawPjGoEuRk4OCQETiXunXjB2MXJxCAmsYJRob7jM DOF8ZpQ4ubeNGabq1Z/PbBCJZYwSxw9cYYFw/jNKLPl1gRGkik1AU+Lv5ptsILaIgLLEqn3t 7CBFzAK/GSWmL9/GDpIQFgiXmDn/JJjNIqAq8f35bjCbV8BSYsqf3awQ6+QlVm84ALaaEyj+ //QlsJskBP6ySix/9AjqJheJVbOnskDYMhKdHQeZIOx6ifsrWqAaOhgltm7YCdVgLXH4+EWw DcwCfBKTtk0HinMAxXklOtqEIEo8JGYc7IeGRg+jxM2Jj1kmMEosYGRYxSieWlqcm55abJiX Wq5XnJhbXJqXrpecn7uJERhjp/8d/7SD8eulpEOMAhyMSjy8L3ZOjxFiTSwrrsw9xCjBwawk wvtEdEaMEG9KYmVValF+fFFpTmrxIUZpDhYlcd5qhgfRQgLpiSWp2ampBalFMFkmDk6pBkaW 903Ksq/D0hxkKn4kFW8RTvddJTf/Vnm+vWmi0uaHzoG3yl57Xsvjq3FSEjo6L04jLf5OnOSf sJ7Np7NdGlavmCh6qMF77UaxzZt+fP7DtXlKgl2cs1AN7xRvh/re6x12viXHntZbXmf9n7if ef7+FwfUhBQzFY4cPhFV7b38zeSYHXUKV5RYijMSDbWYi4oTAZ56uoqtAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42I5/e/4Vd3t9TNiDC7sNLK4te4cq8XGGetZ La58fc9mMen+BBaL8+c3sFvMOL+PyWLtkbvsDuwem1Z1snnc7z7O5NG3ZRWjx+dNcgEsUVw2 Kak5mWWpRfp2CVwZxxevZS2YKlzRPPssawPjGoEuRk4OCQETiVd/PrN1MXJxCAksYZR427GJ BcJpZJLouT+ZEaSKTUBT4u/mm2wgtoiAssSqfe3sIEXMAr8ZJT7P+MoMkhAWCJeYOf8kO4jN IqAq8f35bjCbV8BSYsqf3awQ6+QlVm84AFbPCRT/f/oSmC0kYCGxd1kj+wRGngWMDKsYRVJL i3PTc4sN9YoTc4tL89L1kvNzNzECg2bbsZ+bdzBe2hh8iFGAg1GJh9dhz/QYIdbEsuLK3EOM EhzMSiK8T0RnxAjxpiRWVqUW5ccXleakFh9ilOZgURLnPW9QGSUkkJ5YkpqdmlqQWgSTZeLg lGpgzHLbvqWoQPag7R6XcLVuoxsHghZ9f//DzPSyKN+6t+6ppR+OmCzlmJHmy5kqFeVQPKPi nJlQ8qtFbxttNh76sWL74ykrj684beFwR6dnnauNQLTloUOuG1sCN+1jqv7e5vLqR6LZR+G6 svAjsxWvl77//4VxSsSbDY+WPbWen73k+fz2MFauzUosxRmJhlrMRcWJALPejuUWAgAA X-CMS-MailID: 20190325071359eucas1p1b97bf55b51b840f4a049df4779800f11 CMS-TYPE: 201P X-CMS-RootMailID: 20190325071359eucas1p1b97bf55b51b840f4a049df4779800f11 References: <20190325071349.22600-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)