From patchwork Wed Nov 28 15:32:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Manszewski X-Patchwork-Id: 10704151 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 EE9721057 for ; Thu, 29 Nov 2018 08:03:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E54002E35B for ; Thu, 29 Nov 2018 08:03:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8F5C2EC30; Thu, 29 Nov 2018 08:03:29 +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 D69662E35B for ; Thu, 29 Nov 2018 08:03:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E1176E460; Thu, 29 Nov 2018 08:03:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6188F6E3D1 for ; Wed, 28 Nov 2018 15:32:36 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181128153235euoutp012cd268064166df7620d8b43f8d040245~rU4tcGmrW2791927919euoutp01T for ; Wed, 28 Nov 2018 15:32:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181128153235euoutp012cd268064166df7620d8b43f8d040245~rU4tcGmrW2791927919euoutp01T Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181128153234eucas1p1de2ec58cbc1ff06b575b22315f21feb8~rU4sv3c9R3210632106eucas1p1H; Wed, 28 Nov 2018 15:32:34 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 72.A7.04441.215BEFB5; Wed, 28 Nov 2018 15:32:34 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629~rU4r6gjjr0556805568eucas1p21; Wed, 28 Nov 2018 15:32:33 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181128153233eusmtrp13c012efff3df553996bacb3e61e1c063~rU4rqxwiS0810708107eusmtrp1e; Wed, 28 Nov 2018 15:32:33 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-47-5bfeb5128a96 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 88.10.04284.115BEFB5; Wed, 28 Nov 2018 15:32:33 +0000 (GMT) Received: from AMDC2034.DIGITAL.local (unknown [106.120.51.41]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20181128153232eusmtip2bdf7be7695531caea5959a410df3dc7d~rU4rDMbJP2013420134eusmtip2C; Wed, 28 Nov 2018 15:32:32 +0000 (GMT) From: Christoph Manszewski To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/exynos: mixer: Fix color format setting Date: Wed, 28 Nov 2018 16:32:11 +0100 Message-Id: <1543419132-16099-2-git-send-email-c.manszewski@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543419132-16099-1-git-send-email-c.manszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTYRjG+3YuO7POOk7DDwsH66qhJiUcu4hGf0wq7J8kVMipB5XmlM2Z FtXUEp1Wc5otkTLwkpdS57RSVBTLRN2wRHTiBcTwiuYNrWZ5PIr//Z7nfd7v4YWPQEQlmDMR o0hglAqZXILboQ1fN8zuovrNkDOvVkja+sGM0U/NXTy61lCN0Z1NJYDuX13Aaf2YDqWnRvtQ +vnELEJbLDV8ujd1jk8bJwYw+kdjIU4bLC08+n3HCJ825E7jfgelxopMXPpxbRyTjmV18qR1 xY+kz0wVQLpsdLmBB9tdjGTkMYmM0tM3zC76V0YvEl++P2m6wIZqQLlACwgCUudg3nSQFtgR IuodgFmjf3FOrABYrK/DOLEM4LdWA7a7oan15/wyAGfLJvc2alr1qBYICJzyhsMjSzjLjtRR aMupAGwIoepR2Nw1yGMHDpQffNuzgLGMUsdh5VATYJmkpHA4xYywDCkXOGTO3GYBFQBzdJYd 38iHuupAjq9AfXf6ju8AZzpNfI6PwO7cbJQthlQagNaVAYwTOgDbKrUol7oAjYMzPPY2hHKF 1Y2e3Jn+sCj7OodCODhvz4aRLdQ3vEQ4m4QZ6SLujRNw1mTCd1unllcBx1I4V7Ww7YuoQgAz p911QFywV1UEQAVwYtSq2ChG5aVg7nqoZLEqtSLKIyIu1gi2Pk/3ZufSJ7D6PbwdUASQHCBh 5WaICJMlqpJj2wEkEIkjqfbdsshIWfI9Rhl3W6mWM6p2cJhAJU7k/X3jISIqSpbA3GGYeEa5 O+URAmcN0BBVLfqZpEvnk3vqOlLw34F/Xq/LhTfzdPYPNm+FScQDgeGfH+dnB6TJF629ogib 4cvIivZfaNgpt/nU0jXryeA3h15465rPbvjKkOr8RXo9/af4IaI7zVtuExb2C4/51E2S2idU 3zWb8Spw7TEGteSVHuXVB4SKE8nLPoxWgqqiZV5uiFIl+w+r+RnROAMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e/4PV3Brf+iDd4/EbO4te4cq0XvuZNM FhtnrGe1OL57KaPFla/v2Swm3Z/AYvHi3kUWi/7Hr5ktzp/fwG5xtukNu8Wmx9dYLS7vmsNm MeP8PiaLtUfuslvMmPySzYHfY9OqTjaP7d8esHrc7z7O5LF5Sb1H35ZVjB6fN8kFsEXp2RTl l5akKmTkF5fYKkUbWhjpGVpa6BmZWOoZGpvHWhmZKunb2aSk5mSWpRbp2yXoZXzsOMtcsJK7 4uWsvywNjCs5uxg5OCQETCQaNjp2MXJxCAksZZR49+IiaxcjJ1BcRmLe2T42CFtY4s+1LjaI ok+MEgcmnwUrYhMwlbh99xNYkYiAssTfiasYQYqYBQ6ySLRsPMMIkhAWcJBYeOY9WAOLgKrE 6pu7weK8Ah4StxvPMUNskJO4ea4TzOYU8JSYOOE8mC0EVLPo6lXWCYx8CxgZVjGKpJYW56bn FhvqFSfmFpfmpesl5+duYgRGw7ZjPzfvYLy0MfgQowAHoxIP74EV/6KFWBPLiitzDzFKcDAr ifCW2gGFeFMSK6tSi/Lji0pzUosPMZoCHTWRWUo0OR8YqXkl8YamhuYWlobmxubGZhZK4rzn DSqjhATSE0tSs1NTC1KLYPqYODilGhjLV5z94iL7Mv0I+949y28f2Zod3STzjHHFed6jJZ2f Jnuryaz+Ffp0zcHsjhvLH7ZE5BhlcPH6PX66R17wkd+5b7L1y/ivr8hiXSglOdt8iTP3dBU5 36sf5n3ubLAUfSz+S+z5yg3xfieeaFy+KOXa873gzM2AhMDbHKKx30S3cv9rCck2PtmvxFKc kWioxVxUnAgAfdZYTZwCAAA= X-CMS-MailID: 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629 X-Msg-Generator: CA X-RootMTR: 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629 References: <1543419132-16099-1-git-send-email-c.manszewski@samsung.com> X-Mailman-Approved-At: Thu, 29 Nov 2018 08:03:11 +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, Bartlomiej Zolnierkiewicz , Christoph Manszewski , Seung-Woo Kim , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , David Airlie , Kyungmin Park , Kukjin Kim , 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 Fix color format decision based on height(pixels). According to CEA-861-E: "High Definition (HD) - A CE video format that, inclusively, has between 720 to 1080 active vertical lines (Vactive) lines per video frame." Tested on Odroid-U3 with Exynos 4412 CPU, kernel next-20181128 using modetest. Signed-off-by: Christoph Manszewski --- drivers/gpu/drm/exynos/exynos_mixer.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index e3a4ecbc503b..bcc26c10095a 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -385,14 +385,9 @@ static void mixer_cfg_rgb_fmt(struct mixer_context *ctx, unsigned int height) { u32 val; - switch (height) { - case 480: - case 576: + if (height < 720) { val = MXR_CFG_RGB601_0_255; - break; - case 720: - case 1080: - default: + } else { val = MXR_CFG_RGB709_16_235; /* Configure the BT.709 CSC matrix for full range RGB. */ mixer_reg_write(ctx, MXR_CM_COEFF_Y, @@ -402,7 +397,6 @@ static void mixer_cfg_rgb_fmt(struct mixer_context *ctx, unsigned int height) MXR_CSC_CT(-0.102, -0.338, 0.440)); mixer_reg_write(ctx, MXR_CM_COEFF_CR, MXR_CSC_CT( 0.440, -0.399, -0.040)); - break; } mixer_reg_writemask(ctx, MXR_CFG, val, MXR_CFG_RGB_FMT_MASK);