From patchwork Fri Dec 14 12:10:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Manszewski X-Patchwork-Id: 10732835 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 29AE614DE for ; Mon, 17 Dec 2018 07:53:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20FCE299DD for ; Mon, 17 Dec 2018 07:53:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14CCC299E1; Mon, 17 Dec 2018 07:53:08 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA867299DD for ; Mon, 17 Dec 2018 07:53:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6AC416E29E; Mon, 17 Dec 2018 07:52:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 911AF6F469 for ; Fri, 14 Dec 2018 12:10:40 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181214121039euoutp02dcc31961e27576be3d56d1ce9c84df6a~wMc_CvfIu0903709037euoutp02S for ; Fri, 14 Dec 2018 12:10:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181214121039euoutp02dcc31961e27576be3d56d1ce9c84df6a~wMc_CvfIu0903709037euoutp02S Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181214121038eucas1p1d7dac6bc6d989211d7f26458f232a64d~wMc9M6dk70507605076eucas1p1p; Fri, 14 Dec 2018 12:10:38 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 9F.9B.04441.EBD931C5; Fri, 14 Dec 2018 12:10:38 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181214121037eucas1p2469a23e8e393bdca487a11260b187510~wMc8WEb0k1559015590eucas1p2g; Fri, 14 Dec 2018 12:10:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181214121037eusmtrp16e00c00b128e5a7ae4e1df3913b6c1ec~wMc8EJf4I2638626386eusmtrp1c; Fri, 14 Dec 2018 12:10:37 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-74-5c139dbecf49 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 64.91.04128.DBD931C5; Fri, 14 Dec 2018 12:10:37 +0000 (GMT) Received: from AMDC2034.DIGITAL.local (unknown [106.120.51.41]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181214121036eusmtip248e6713acb29150c20131270465aac16~wMc7WlgIc3233032330eusmtip2x; Fri, 14 Dec 2018 12:10:36 +0000 (GMT) From: Christoph Manszewski To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/6] drm/exynos: plane: Add range property to exynos plane Date: Fri, 14 Dec 2018 13:10:20 +0100 Message-Id: <1544789421-5265-6-git-send-email-c.manszewski@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544789421-5265-1-git-send-email-c.manszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTYRjG+3YuOxsuj5vkh4bBouyipqTwQRFFSgcjqD+SKMNmnpzozHam 5aUSw2yWaRuRXbRCLZmmOZfFJDO1pnkrs6WrqWCB1/I2oejmdpT++73P+7w87/vxUZj0FeFN xSdpWHWSIlFOivH61z96AhqLZVFBg39lyFbdTaD87nYBqi2qIZCloRygPsd3EumGCnE0OvgO RwUjExjq6XksRF3Zk0JkHLES6L35DomKehoF6FGrXYjuzzzB0fDYC4Ds+laAivRj5E4pU1KV wRgNWpJ5ujBMMCXtB5ihyxYBU1d2nrGYbULmqskAmDmj737RYfH2WDYxPpVVb9lxTKzsyikn k6vczkw3m/EsUC/OAyIK0iHwUrYVzwNiSkpXAPgrd4Lgi3kAB0r1JF/MAZj1YgFbHtFa8gV8 4yGAtRNd/0e0vTdJp4ukQ+En+6yLPem18Pc1A3CaMNpMwG8jPwXOhoyOgNX2v8DJOL0ODna+ xJ0soffAaWMO4ON84UC31hUtohn4wFy2pFuF8JZjA89hsK/utpBnGRy3mJZ4NezQX3FdB+kL ANrmrQRfFAL4sjIP513boLF/fHEjanG9jbDGvIWXd8HPudMuGdIrYf+Uh1PGFlFXfwPjZQm8 dFHKu9fDCZOJXI4dnXMsrclAc7tNyD/QbQC/1tqIQrDm1v+wewAYgBebwqniWC44iT0dyClU XEpSXODxkyojWPxcHX8ss8+AozemGdAUkLtJlDpplJRQpHJpqmYAKUzuKYnMkUVJJbGKtHRW fTJanZLIcs3Ah8LlXpKMFcNHpHScQsMmsGwyq17uCiiRdxbQhUVPnUtv6Wy7bi17W2GvDPJf 2RqU6NMU/tgRG67UWnJDT2mysi+ciNyd8PvsbDrTibtrWjra7sobvhQf9belN0U0xU+alAXK EU+fuY37D4a5P9/L+QWo8reGlHtkRoR8bBvOjhktQW9EvqUVboc+zKhRuxzT7du8qu2XX6ay Wo5zSkXwJkzNKf4BozHju1gDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsVy+t/xe7p75wrHGGw4IWJxa905VovecyeZ LDbOWM9qcXz3UkaLK1/fs1lMuj+BxeLFvYssFv2PXzNbnD+/gd3ibNMbdotNj6+xWlzeNYfN Ysb5fUwWa4/cZbdY+HEri8WDl/sZLe5OPsJoMWPySzYHIY95a6o9Nq3qZPPY/u0Bq8e8k4Ee 97uPM3lsXlLvcXzXLXaPvi2rGD0+b5IL4IzSsynKLy1JVcjILy6xVYo2tDDSM7S00DMysdQz NDaPtTIyVdK3s0lJzcksSy3St0vQyzjbupStYA1PxYdDu1gaGLdxdTFyckgImEh0Hu9lArGF BJYySnw4ywgRl5GYd7aPDcIWlvhzrYsNouYTo0Tzd3YQm03AVOL23U9gcREBZYm/E1cB9XJx MAscY5WY+H4VWJGwgJfEurv/wYayCKhK3DtzkAXE5hVwl/iwqRVqmZzEzXOdzCA2p4CHxLJd SxghlrlLvJr5hXECI98CRoZVjCKppcW56bnFRnrFibnFpXnpesn5uZsYgTG07djPLTsYu94F H2IU4GBU4uE9MEUoRog1say4MvcQowQHs5IIb1ircIwQb0piZVVqUX58UWlOavEhRlOgoyYy S4km5wPjO68k3tDU0NzC0tDc2NzYzEJJnPe8QWWUkEB6YklqdmpqQWoRTB8TB6dUA+M8/YpV OoHX5aztqv2OMux5sl20t/jetbScY9sK3t/8s+68xtFPzxeyv7/3sNf5T0aT9t+VK9vvr/fK 7tzH//mOsKbVW4XCTT0Zns4ZjzbfSl/E9I2v4lX1vtzTVXe9jTrKuLev/RtkK+2yyShiRm3K dNN9k72v7g3hfFP59ey1y+8fLerduIlBiaU4I9FQi7moOBEAzvQinrcCAAA= X-CMS-MailID: 20181214121037eucas1p2469a23e8e393bdca487a11260b187510 X-Msg-Generator: CA X-RootMTR: 20181214121037eucas1p2469a23e8e393bdca487a11260b187510 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181214121037eucas1p2469a23e8e393bdca487a11260b187510 References: <1544789421-5265-1-git-send-email-c.manszewski@samsung.com> X-Mailman-Approved-At: Mon, 17 Dec 2018 07:52:24 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz , Christoph Manszewski , Seung-Woo Kim , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , David Airlie , Kyungmin Park , Kukjin Kim , Sean Paul , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Create range property within exynos_drm_plane_init and set to default value in exynos_drm_plane_reset. Signed-off-by: Christoph Manszewski --- drivers/gpu/drm/exynos/exynos_drm_plane.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index cf352d980eee..a6ab0e7277f0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c @@ -140,6 +140,7 @@ static void exynos_drm_plane_reset(struct drm_plane *plane) if (exynos_state) { __drm_atomic_helper_plane_reset(plane, &exynos_state->base); plane->state->zpos = exynos_plane->config->zpos; + plane->state->color_range = exynos_plane->config->range; } } @@ -301,6 +302,10 @@ int exynos_plane_init(struct drm_device *dev, unsigned int supported_modes = BIT(DRM_MODE_BLEND_PIXEL_NONE) | BIT(DRM_MODE_BLEND_PREMULTI) | BIT(DRM_MODE_BLEND_COVERAGE); + + u32 supported_ranges = BIT(DRM_COLOR_LIMITED_RANGE) | + BIT(DRM_COLOR_FULL_RANGE); + struct drm_plane *plane = &exynos_plane->base; err = drm_universal_plane_init(dev, plane, @@ -328,5 +333,9 @@ int exynos_plane_init(struct drm_device *dev, if (config->capabilities & EXYNOS_DRM_PLANE_CAP_WIN_BLEND) drm_plane_create_alpha_property(plane); + if (config->capabilities & EXYNOS_DRM_PLANE_CAP_RANGE) + drm_plane_create_range_property(plane, supported_ranges, + config->range); + return 0; }