From patchwork Fri Nov 30 12:02:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Manszewski X-Patchwork-Id: 10708325 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 8CAD51057 for ; Sun, 2 Dec 2018 21:23:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DFCD29DE0 for ; Sun, 2 Dec 2018 21:23:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71DB029FD9; Sun, 2 Dec 2018 21:23:44 +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 244BC29DE0 for ; Sun, 2 Dec 2018 21:23:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB05989D83; Sun, 2 Dec 2018 21:23:30 +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 A8ABE6E5F6 for ; Fri, 30 Nov 2018 12:02:32 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181130120231euoutp0264d617e637b6a3255d587133a1f4537d~r5T32vbQP1198111981euoutp02D for ; Fri, 30 Nov 2018 12:02:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181130120231euoutp0264d617e637b6a3255d587133a1f4537d~r5T32vbQP1198111981euoutp02D Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181130120230eucas1p198fed9cacd4f72890d4fe39361f6f68a~r5T3KXC-g1333813338eucas1p1F; Fri, 30 Nov 2018 12:02:30 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id D6.BE.04806.6D6210C5; Fri, 30 Nov 2018 12:02:30 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181130120230eucas1p28cfa1960874470828230d288830f6974~r5T2Xa7Y10360203602eucas1p21; Fri, 30 Nov 2018 12:02:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20181130120229eusmtrp2cc865aa031bc4cb1543e1956f68fe051~r5T2Hqwkq2249222492eusmtrp2n; Fri, 30 Nov 2018 12:02:29 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-d5-5c0126d66611 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F4.A1.04128.5D6210C5; Fri, 30 Nov 2018 12:02:29 +0000 (GMT) Received: from AMDC2034.DIGITAL.local (unknown [106.120.51.41]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181130120229eusmtip2d4668d4dd19400f0fc6a5e3ddac67421~r5T1f5TEP0089000890eusmtip2z; Fri, 30 Nov 2018 12:02:29 +0000 (GMT) From: Christoph Manszewski To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/exynos: mixer: Use colorimetry helper function Date: Fri, 30 Nov 2018 13:02:12 +0100 Message-Id: <1543579332-16609-3-git-send-email-c.manszewski@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543579332-16609-1-git-send-email-c.manszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGKsWRmVeSWpSXmKPExsWy7djP87rX1BhjDKa8UrHoPXeSyeL47qWM Fle+vmezmHR/AovFi3sXWSz6H79mtjh/fgO7xdmmN+wWmx5fY7W4vGsOm8WM8/uYLBZ+3Mpi 8eDlfkaLu5OPMFrMmPySzYHfY96aao9NqzrZPLZ/e8DqMe9koMf97uNMHpuX1Hsc33WL3aNv yypGj8+b5AI4o7hsUlJzMstSi/TtErgyXs45ylzwjb3iQttt5gbGh2xdjJwcEgImEu9nf2Hu YuTiEBJYwSix4/5dNgjnC6PEzpd3WCGcz4wSZ1sfsMK0vPmzHaplOaPE95NH2eFabt1cwQxS xSZgKnH77iewJSICyhJ/J65iBCliFljDItF4exvYKGEBd4mrV1aBNbAIqEp8n98PFOfg4BXw kOg8ag+xTU7i5rlOsBJOAU+JS9vfgG2WEDjGLvH26W6oL1wkpt68xQhhC0u8Or6FHcKWkfi/ cz4TREMz0HVfrrFCOBMYJQ6u7mKBqLKW2HTjFRPIZmYBTYn1u/Qhwo4SnTtfsoOEJQT4JG68 FQQJMwOZk7ZNZ4YI80p0tAlBVKtJvN6yhQ1m7YvPX6HO8ZD4ce0wNEznMEpc63vKPoFRfhbC sgWMjKsYxVNLi3PTU4uN81LL9YoTc4tL89L1kvNzNzECU9Ppf8e/7mDc9yfpEKMAB6MSD6/D r//RQqyJZcWVuYcYJTiYlUR4z7UxxAjxpiRWVqUW5ccXleakFh9ilOZgURLnrWZ4EC0kkJ5Y kpqdmlqQWgSTZeLglGpglFFaVXrik0qLb3mWUMcHp8MM13Y3rz61nGvSzZeWm450TDWYrSGa XbzX7JKNnlwH2yGRiSFyEpse/Z2g/5Sp5clVj/iaNUHNH561GEUI/fuz99TDfa8cffc7vp1o e6M2xvu9GusloU4d9sWt/97OWx++7h3v/7WuGdNypNwOvN7eE3rrz/zWZ0osxRmJhlrMRcWJ AOF3F5ZJAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGIsWRmVeSWpSXmKPExsVy+t/xe7pX1RhjDK5t07boPXeSyeL47qWM Fle+vmezmHR/AovFi3sXWSz6H79mtjh/fgO7xdmmN+wWmx5fY7W4vGsOm8WM8/uYLBZ+3Mpi 8eDlfkaLu5OPMFrMmPySzYHfY96aao9NqzrZPLZ/e8DqMe9koMf97uNMHpuX1Hsc33WL3aNv yypGj8+b5AI4o/RsivJLS1IVMvKLS2yVog0tjPQMLS30jEws9QyNzWOtjEyV9O1sUlJzMstS i/TtEvQyXs45ylzwjb3iQttt5gbGh2xdjJwcEgImEm/+bGfuYuTiEBJYyijx6cNbZoiEjMS8 s31QRcISf651sUEUfWKUeHL9KBNIgk3AVOL23U9gRSICyhJ/J65iBCliFtjBIvHt8x4WkISw gLvE1SurwKayCKhKfJ/fz9rFyMHBK+Ah0XnUHmKBnMTNc51gJZwCnhKXtr8Bs4WASo4eXcEy gZFvASPDKkaR1NLi3PTcYiO94sTc4tK8dL3k/NxNjMA42Xbs55YdjF3vgg8xCnAwKvHwOvz6 Hy3EmlhWXJl7iFGCg1lJhPdcG0OMEG9KYmVValF+fFFpTmrxIUZToJsmMkuJJucDYzivJN7Q 1NDcwtLQ3Njc2MxCSZz3vEFllJBAemJJanZqakFqEUwfEwenVAOjzsX5sZKdkklmd5MOP9Q3 nMkyXyY7/OHES+yWD/cFmxrtePdrSszfaB7Zld7zTupXnNa5x7LlzLNin4rLlTe3O25ifbMn b02B7w/+30sMjrY+s7mnJ33WNObX68iLAXGan3Omv9Vz4Lqi9qNJ+8XRe1uiiwL3fPvXtN5Z fRPvPomS9soL+mUrlViKMxINtZiLihMB0fFxq6kCAAA= X-CMS-MailID: 20181130120230eucas1p28cfa1960874470828230d288830f6974 X-Msg-Generator: CA X-RootMTR: 20181130120230eucas1p28cfa1960874470828230d288830f6974 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181130120230eucas1p28cfa1960874470828230d288830f6974 References: <1543579332-16609-1-git-send-email-c.manszewski@samsung.com> X-Mailman-Approved-At: Sun, 02 Dec 2018 21:23:01 +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: linux-samsung-soc@vger.kernel.org, Christoph Manszewski , Seung-Woo Kim , David Airlie , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Maxime Ripard , Kyungmin Park , Kukjin Kim , Sean Paul , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use drm_default_colorimetry helper function to determine the default colorspace type (ITU-R BT.601 or ITU-R BT.709). Signed-off-by: Christoph Manszewski --- drivers/gpu/drm/exynos/exynos_mixer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 2a25822bd6a1..895c6268025d 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -384,9 +384,10 @@ static void mixer_cfg_scan(struct mixer_context *ctx, int width, int height) static void mixer_cfg_rgb_fmt(struct mixer_context *ctx, struct drm_display_mode *mode) { enum hdmi_quantization_range range = drm_default_rgb_quant_range(mode); + enum hdmi_colorimetry format = drm_default_colorimetry(mode); u32 val; - if (mode->vdisplay < 720) { + if (format == HDMI_COLORIMETRY_ITU_601) { val = MXR_CFG_RGB601; } else { val = MXR_CFG_RGB709;