From patchwork Wed May 23 10:15:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 136639 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp697690lji; Wed, 23 May 2018 03:16:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp/0NqhWS3Uu7bFs/sKSwglnERfmvvud+9fsxbFQsjjv2taeJIVR0SBh8b0Pv4dS2Xe2YVF X-Received: by 2002:a62:4b16:: with SMTP id y22-v6mr2288085pfa.29.1527070571696; Wed, 23 May 2018 03:16:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527070571; cv=none; d=google.com; s=arc-20160816; b=Drro59QKm0lYX1tgn2lP8zDNhE3nWYGTQPd0c8E9nBoeZUBVNOk8XGngLZstuNwfza ZiyqcoaWQVy06ERaefvfVABIteNAMgMBQYJIV/I8tQWNFjlil0RAkK4sC4TWL5q1OPC/ bRIktThtuxBxVF9IzRpfQr6wq2vN86il2MhnCw0PetTJDtAuqW2hLfXpjCzqdkVTjwIw quul0RN1EuUipqs2FPMSaCHSWW9gwDnxd4MjpZIBoixWYPOylnWsNkRKHRy0MzgQ1OSY +U4GqvnncaSZLWtY1gewbPb6DdbtSrIbw4CG3hYR6f7OL0G+O10TfhXJkg11osd7VhcV 1r8A== 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:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=vMvjwvfURMn14pS/WH3KYIXXWoqQ0cj8vAom9Dg4uEg=; b=MR0po2pkW7BynkiNaSQM18xGt0F7IKB5y2JQfPYJzB0kYQywELvIIejDVQg72w7udI FXZa3OSgkQYuOPW1Sj52SKvj1VpXiWJ3yB4pwwk8fWSbU9I34CxBFM09zksTQKEr5DFX +ZQVO5316V4lI05cJHqMoZsSWjaZK3WFm4dCRKgp/KYJJbfMZ/kr2+c090VEgZCI0Mep /fwl9JCmCDuyY+OnTHk0cVRuAmsTYqc8XsLF9ct9eQEydQ8MixcAX2MEsh7p24k8SV+R I51seVy0ZNEwk+TDn1ISv1eYXFd80tJ18Ne9tyPZaRVjFQ9ERQYnis7tmmw4GgHTlonz ZB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=UB7J9zRp; 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 v16-v6si2084437plo.186.2018.05.23.03.16.11; Wed, 23 May 2018 03:16:11 -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=UB7J9zRp; 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 S932257AbeEWKQL (ORCPT + 3 others); Wed, 23 May 2018 06:16:11 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43137 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932221AbeEWKQJ (ORCPT ); Wed, 23 May 2018 06:16:09 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180523101607euoutp01e84c5d87509d4439cdfba2a0adeffad8~xPpciaXzS0945309453euoutp01v; Wed, 23 May 2018 10:16:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180523101607euoutp01e84c5d87509d4439cdfba2a0adeffad8~xPpciaXzS0945309453euoutp01v DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527070567; bh=5fxh47JGf3SSNEyUcVe99n+M2c5pd696OGPm4v/GaIk=; h=From:To:Cc:Subject:Date:References:From; b=UB7J9zRpHaVMY278wJTQ1vZwlCCI1KOzr5eU4bmahtNyNbCZ9NDw2vyV9RU4Knv66 TYFI1PaDjwC6XAQqKef/kx4lrO5niZJIlnZNXosxxpcFVE51ZI3G2b8HuJqccJ+IOe Dvz4JUHmziWm5XOzy5GODsVmCN5A90iu3EjghwAs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180523101606eucas1p2b69b9e67ef26a45a780d624960c9b244~xPpbiCLGz1470714707eucas1p2h; Wed, 23 May 2018 10:16:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 0E.E3.05700.66F350B5; Wed, 23 May 2018 11:16:06 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180523101605eucas1p1674542a34da0a42bc319299262d5d596~xPpa2ru2i0450804508eucas1p1W; Wed, 23 May 2018 10:16:05 +0000 (GMT) X-AuditID: cbfec7f2-1dbff70000011644-85-5b053f6668cd Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F9.C8.04178.56F350B5; Wed, 23 May 2018 11:16:05 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P96001IPF6OP040@eusync1.samsung.com>; Wed, 23 May 2018 11:16:05 +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] drm/exynos: Fix default value for zpos plane property Date: Wed, 23 May 2018 12:15:50 +0200 Message-id: <20180523101550.1448-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsWy7djPc7pp9qzRBo0zOCxurTvHarFxxnpW iytf37NZTLo/gcXi/PkN7BYzzu9jslh75C6QNfklmwOHx6ZVnWwe97uPM3n0bVnF6PF5k1wA SxSXTUpqTmZZapG+XQJXxrNFF1kKZvJWLN+5lLWBcSp3FyMnh4SAicTVVfPYuxi5OIQEVjBK bHvbywiSEBL4zCixd6oJTNHaQ9tZIYqWMUos+fqGDcJpYJJ4u/A3K0gVm4ChRNfbLjYQW0TA TaLp8EywDmaQooktC9hBEsJAiQc/vzOD2CwCqhJTVxwDW8crYCPx9OAadoh18hLPpkPcJCHw lFWiYfIEVoiEi8TchgtQRcISr45vgbJlJDo7DjJ1MXIA2eUS/05kQYRbGCXWftOHsK0lDh+/ CDaGWYBPYtK26cwQ5bwSHW1CECUeEjOu9ENtcpR4eeYDCyQkYiWO9c5jm8AouYCRYRWjeGpp cW56arFhXmq5XnFibnFpXrpecn7uJkZg9J3+d/zTDsavl5IOMQpwMCrx8AaIsEQLsSaWFVfm HmKU4GBWEuE99QcoxJuSWFmVWpQfX1Sak1p8iFGag0VJnDdOoy5KSCA9sSQ1OzW1ILUIJsvE wSnVwChWI5OTUCVXffXr2hlee7LP1LLeErWP9fls/3zJs6rw4mLGv/P5z4sYXHG+J+4XcjHo 40XVkKjXG2aJ6SRI/Ldi3TNryTLlPVU3eT7ZXz+wN6qQe83TM4qTWQzuzG1gvT21zXGPUGy7 Q6ZMBTvv37atL1cFrLKUKN5trfW+yHiO+2z9O21sekosxRmJhlrMRcWJAB36XcK6AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAJMWRmVeSWpSXmKPExsVy+t/xy7qp9qzRBmtuaVjcWneO1WLjjPWs Fle+vmezmHR/AovF+fMb2C1mnN/HZLH2yF0ga/JLNgcOj02rOtk87ncfZ/Lo27KK0ePzJrkA ligum5TUnMyy1CJ9uwSujGeLLrIUzOStWL5zKWsD41TuLkZODgkBE4m1h7azdjFycQgJLGGU +LRsBxOE08QksfPTe1aQKjYBQ4mut11sILaIgJtE0+GZYB3MIEVX2naygySEgRIPfn5nBrFZ BFQlpq44xghi8wrYSDw9uIYdYp28xLPp89gnMHItYGRYxSiSWlqcm55bbKhXnJhbXJqXrpec n7uJERgO24793LyD8dLG4EOMAhyMSjy8K8RYooVYE8uKK3MPMUpwMCuJ8J76AxTiTUmsrEot yo8vKs1JLT7EKM3BoiTOe96gMkpIID2xJDU7NbUgtQgmy8TBKdXAWL7I8NpJxgd/lqU9qz24 MNxyqdniTVbcd3T9q3aLrxGJCn+/YM7Tdf78M2t+rDFM+H0+Oc5CyjBRXfd2sb240nzD/ADl m9vqKu4v7D3qdGTuyWLx9wsWKmVfS+z6du175OrCNv/e5W+eSZ47+/rttoPF8brFx14lPb4j mm4steR0w37NIrdJd5RYijMSDbWYi4oTAZg5Ar0DAgAA X-CMS-MailID: 20180523101605eucas1p1674542a34da0a42bc319299262d5d596 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180523101605eucas1p1674542a34da0a42bc319299262d5d596 X-RootMTR: 20180523101605eucas1p1674542a34da0a42bc319299262d5d596 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The default zpos property for all planes in Exynos DRM was fixed as zero. Fix this by providing proper value provided by hardware drivers, which typically matches hardware window number. Reported-by: Seung-Woo Kim Fixes: e47726a11e11 ("drm/exynos: use generic code for managing zpos plane property") Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_plane.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 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/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index d2a90dae5c71..38a2a7f1204b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -289,13 +289,12 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = { }; static void exynos_plane_attach_zpos_property(struct drm_plane *plane, - bool immutable) + int zpos, bool immutable) { - /* FIXME */ if (immutable) - drm_plane_create_zpos_immutable_property(plane, 0); + drm_plane_create_zpos_immutable_property(plane, zpos); else - drm_plane_create_zpos_property(plane, 0, 0, MAX_PLANE - 1); + drm_plane_create_zpos_property(plane, zpos, 0, MAX_PLANE - 1); } int exynos_plane_init(struct drm_device *dev, @@ -320,7 +319,7 @@ int exynos_plane_init(struct drm_device *dev, exynos_plane->index = index; exynos_plane->config = config; - exynos_plane_attach_zpos_property(&exynos_plane->base, + exynos_plane_attach_zpos_property(&exynos_plane->base, config->zpos, !(config->capabilities & EXYNOS_DRM_PLANE_CAP_ZPOS)); return 0;