From patchwork Wed May 23 11:00:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 136642 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp736592lji; Wed, 23 May 2018 04:00:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrKHGx2bwIbkPTSJPppdaNdUKKF3TlpGMkMAlebSgRJMXoW6mTKNFa/kGEEW/CthxjcrSfo X-Received: by 2002:a62:c413:: with SMTP id y19-v6mr2394724pff.97.1527073235709; Wed, 23 May 2018 04:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527073235; cv=none; d=google.com; s=arc-20160816; b=A+/z6Il62EBUDqJu3zGgH46Be2coLWPKA/Do7y0QH8CvpOQRtUKCg3crkeVUPb56Vm 3PeC8NGaJpwoa6ROsuU1yCnsIdhPzqIfQ2NJXCx/qmphobgGzla9CzoLxWYq0DetNPv9 xfK8MhnBRqKG00wTKUB5wuKKFXswS69avZKXTtMHuiWOKG+JS7CXORN1yjX/xxhd4enp yiwoGgmfykyu2/OuSI6raYd7AC0/dkaaCt0II+6lLzd7ULI8VfYktHGqAhGTjLWhniEe S7B4TfJplmQh3fOv6vkL9rPBqK7u/ksI64o2SExIxg4NTLN2I4OxtaYywYRVm5Ls/Wmd ukyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=SufV6VuUMDLGyttH04UQz4OZBB6CU3x/OEI1dM1n+DY=; b=km9vcQ2ie+w+cwOzLHqwLWmAvP/QMVhxfu9fG+A9yN99qCsn3kO+7kGJJJVg44KsWF cLvJT2OJPOTO4HbC8PikUtRk2x/obANi6bjDY0wTSd0pRE9S/5rup4XE81PAwg5ln49f 4B7rU3gcERCUv7+XmZxyZYPVFOHXGNl7dn4pZSbt8mPG/QT0obuWwl/tkop+i5DA87DR oO+VU5NwGO7nidU8SFiAyebFhsklJvFBE9vJUTaMPcukJvT2aPvElG7IsnbH1ix8ZIa/ Ha2vSquGqzHoc5ZP6Fpw22OmDywjyZrTR9+vDI/7JJLD+uvC/cuVWQq8rSq9RmLobmfh SF/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=hn8XPbUC; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s204-v6si14685685pgs.164.2018.05.23.04.00.35; Wed, 23 May 2018 04:00:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=hn8XPbUC; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932475AbeEWLAb (ORCPT + 3 others); Wed, 23 May 2018 07:00:31 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:56717 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932551AbeEWLA0 (ORCPT ); Wed, 23 May 2018 07:00:26 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180523110023euoutp0106b4dea497e58992595a809297e4c207~xQQGlfL0F3241532415euoutp01S; Wed, 23 May 2018 11:00:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180523110023euoutp0106b4dea497e58992595a809297e4c207~xQQGlfL0F3241532415euoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527073224; bh=+aGKBYM6jDoG+cXNQrogOWLsGsuuBu6Qnd0gaSEsEGc=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=hn8XPbUCanjOYbw8cNSfhH8V4oAP4ctjfic9xm1W8iSjCq3AQ4TC8Q32gIiOgFj/y nvUd1hbE9/GyxYh/5qSBxqN49NPb/0J4SAI9mExHEFkK4vecGk7lXEfhqU4iQHOOgj Kubg3er3fpTrh/gIarL5tfIzUtl9PVOe1s8Do6Ns= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180523110022eucas1p275c4965512722efd854fe8bf08452faf~xQQEyxDPN2022120221eucas1p2t; Wed, 23 May 2018 11:00:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C6.48.17380.4C9450B5; Wed, 23 May 2018 12:00:20 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180523110019eucas1p2b93e9b07b6cc354290f60d93036d3c25~xQQCXQhr-2022120221eucas1p2q; Wed, 23 May 2018 11:00:19 +0000 (GMT) X-AuditID: cbfec7f4-b4fc79c0000043e4-df-5b0549c4f5b2 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 11.BF.04183.3C9450B5; Wed, 23 May 2018 12:00:19 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P96002I9H8D5900@eusync4.samsung.com>; Wed, 23 May 2018 12:00:19 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Andrzej Hajda , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH 3/3] drm/exynos: decon: Add support for hardware windows no 4 and 5 Date: Wed, 23 May 2018 13:00:02 +0200 Message-id: <20180523110002.25512-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.0 In-reply-to: <20180523110002.25512-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCIsWRmVeSWpSXmKPExsWy7djP87pHPFmjDc480bO4te4cq8XGGetZ La58fc9mMen+BBaL8+c3sFvMOL+PyWLtkbtA1uSXbA4cHptWdbJ53O8+zuTRt2UVo8fnTXIB LFFcNimpOZllqUX6dglcGe+mfGQpWC5W0Xysj7mB8bpQFyMnh4SAicSeCQcYuxi5OIQEVjBK vNiwhA3C+cwocXv3YiCHA6xqw2tJiPgyRomvc99DFTUwSfz9+ZcJZBSbgKFE19suNhBbRMBN ounwTFaQImaQooktC9hBEsICoRIf57eAFbEIqEr8PPMRrJlXwFai7cR+Voib5CWeTZ8HVs8p YCex7O4WJpBBEgKNbBJfF/SzQRS5SKw+uArKFpZ4dXwLO4QtI3F5cjcLxNnlEv9OZEGEWxgl 1n7Th7CtJQ4fvwi2i1mAT2LStunMEOW8Eh1t0GDxkLg48wrUdEeJzb9XQj08kVHi+Pt5bBMY pRYwMqxiFE8tLc5NTy02ykst1ytOzC0uzUvXS87P3cQIjMvT/45/2cG460/SIUYBDkYlHt4V YizRQqyJZcWVuYcYJTiYlUR4T/0BCvGmJFZWpRblxxeV5qQWH2KU5mBREueN06iLEhJITyxJ zU5NLUgtgskycXBKNTAKbgm+HsTp4bxHlGN+ulLj17l3OUIN3HUOyTpcTH7L9Ndvnvilkpio hwYrWzdKTy70acu3ETyfefXck7ebAjY9e3R18sGzHP0Ja6vqZYxU5vq/UHqQfjpYr6XE7sem Jl0P07RHG86Y3TlWo7685/Bc5U0eHGdYtCsjVRi3Fjg+6g4yEVsTqKjEUpyRaKjFXFScCACJ U8lQxwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjluLIzCtJLcpLzFFi42I5/e/4Nd3DnqzRBp0tEha31p1jtdg4Yz2r xZWv79ksJt2fwGJx/vwGdosZ5/cxWaw9chfImvySzYHDY9OqTjaP+93HmTz6tqxi9Pi8SS6A JYrLJiU1J7MstUjfLoEr492UjywFy8Uqmo/1MTcwXhfqYuTgkBAwkdjwWrKLkZNDSGAJo8St h+JdjFxAdhOTRNP9XkaQBJuAoUTX2y42EFtEwE2i6fBMVpAiZpCiK2072UESwgKhEitP/Qdr YBFQlfh55iMTiM0rYCvRdmI/K4gtISAv8Wz6PLB6TgE7iWV3tzBBbLaV2HhlA8sERp4FjAyr GEVSS4tz03OLjfSKE3OLS/PS9ZLzczcxAkNn27GfW3Ywdr0LPsQowMGoxMMbIMISLcSaWFZc mXuIUYKDWUmE99QfoBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHe8waVUUIC6YklqdmpqQWpRTBZ Jg5OqQbGC6xvN90Ne3UoMeGliW6fmeyhB1Ivbx4K3vRpmpxAjVpQl49+VvDy8v3/7Z3FFW/Z z2DwUtw5MfWw7Ez+21H2JwsEnbu4WdlPMXDOl06qL9lQo6J3hXHH4+K96T1WOU0hGifvZW59 GrdN54716YqPSUV38rcKTVNTfWFaV7vNoMtAjtd4CqcSS3FGoqEWc1FxIgBI1Gn0GQIAAA== X-CMS-MailID: 20180523110019eucas1p2b93e9b07b6cc354290f60d93036d3c25 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180523110019eucas1p2b93e9b07b6cc354290f60d93036d3c25 X-RootMTR: 20180523110019eucas1p2b93e9b07b6cc354290f60d93036d3c25 References: <20180523110002.25512-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Enable support for 2 more hardware windows. This require enabling a few more clocks and set proper plane type for all windows. In the new configuration primary plane uses hardware window no 3 and cursor uses window no 5. The remaining hardware windows are used for overlays. This gives us an overlay plane both below and above primary plane for both Decon and DeconTV (which uses hardware window nr 0 for background). Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 1c330f2a7a5d..82c95c34447f 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -31,7 +31,10 @@ #define DSD_CFG_MUX 0x1004 #define DSD_CFG_MUX_TE_UNMASK_GLOBAL BIT(13) -#define WINDOWS_NR 3 +#define WINDOWS_NR 5 +#define PRIMARY_WIN 2 +#define CURSON_WIN 4 + #define MIN_FB_WIDTH_FOR_16WORD_BURST 128 #define I80_HW_TRG (1 << 0) @@ -43,6 +46,9 @@ static const char * const decon_clks_name[] = { "aclk_smmu_decon0x", "aclk_xiu_decon0x", "pclk_smmu_decon0x", + "aclk_smmu_decon1x", + "aclk_xiu_decon1x", + "pclk_smmu_decon1x", "sclk_decon_vclk", "sclk_decon_eclk", }; @@ -74,9 +80,8 @@ static const uint32_t decon_formats[] = { }; static const enum drm_plane_type decon_win_types[WINDOWS_NR] = { - DRM_PLANE_TYPE_PRIMARY, - DRM_PLANE_TYPE_OVERLAY, - DRM_PLANE_TYPE_CURSOR, + [PRIMARY_WIN] = DRM_PLANE_TYPE_PRIMARY, + [CURSON_WIN] = DRM_PLANE_TYPE_CURSOR, }; static inline void decon_set_bits(struct decon_context *ctx, u32 reg, u32 mask, @@ -552,12 +557,10 @@ static int decon_bind(struct device *dev, struct device *master, void *data) drm_dev->max_vblank_count = 0xffffffff; for (win = ctx->first_win; win < WINDOWS_NR; win++) { - int tmp = (win == ctx->first_win) ? 0 : win; - ctx->configs[win].pixel_formats = decon_formats; ctx->configs[win].num_pixel_formats = ARRAY_SIZE(decon_formats); - ctx->configs[win].zpos = win; - ctx->configs[win].type = decon_win_types[tmp]; + ctx->configs[win].zpos = win - ctx->first_win; + ctx->configs[win].type = decon_win_types[win]; ret = exynos_plane_init(drm_dev, &ctx->planes[win], win, &ctx->configs[win]); @@ -565,7 +568,7 @@ static int decon_bind(struct device *dev, struct device *master, void *data) return ret; } - exynos_plane = &ctx->planes[ctx->first_win]; + exynos_plane = &ctx->planes[PRIMARY_WIN]; out_type = (ctx->out_type & IFTYPE_HDMI) ? EXYNOS_DISPLAY_TYPE_HDMI : EXYNOS_DISPLAY_TYPE_LCD; ctx->crtc = exynos_drm_crtc_create(drm_dev, &exynos_plane->base,