Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1299088imu; Wed, 28 Nov 2018 07:34:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/UHNH8VdJu2aN63zsv1RxyGaeAK66KUYLUAYOLUVMQvPqsGLdjZBnBIR9RdaypDx+BmyWVY X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr37504973plx.232.1543419284964; Wed, 28 Nov 2018 07:34:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543419284; cv=none; d=google.com; s=arc-20160816; b=gklad631V5emMU+ZJE/fYfW2MAz2An94V7MztPWMzkiJf6aEk/le6scMIDm2Toecll Rs5vnFvGk4qo2qoZqHXVsjGzd+TxNH3cycvfgfnB3ISqDH/YjHHOT8G6oe2meKEguAZc ngR4xSWd7iV2DZRM24ASqFf/QRNYoBLl0QWmhedp/zgrsMjtHe/Q5ZJI/XnM4KKKA4wm qtuppvRKT8ZvxK8qiLzwghWC6M0abH6kYLbyzImIftq9pg/NThtZVLSWS8yZv4Mi8fKY vgebj0B/5KAN2y66h7VyMQ+vd7j8e6e1YN4IaZfgNVxZM5nuNIkEgejGhWXic4bQRSoO UvOA== 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; bh=bG+eXSgqOEq+2CgtyyiU+MDO0vGklIiPQGnS7BenaTM=; b=UB7TIB1yVHEcOxpf7EhbUqHoEqIOnJUA/y3XiYLlB021bH9WOXuVWywWOBxd0DAmWF upXx43L+r+TcCSPWKLMqW44wi9KAlvxYK5EU7Y1bGCvmNboGpRWb5M8x411McUCaANgE 2MTpnrUXx5yu171yZQT9pzHuWTGmUC01GbrBBR2Iz7LvkZ21cymhvyFlDH1d05HAwcJA IJVua2gpXTbnkMK2YNJhKDy3PAX315fGeZ+JQWOWsT1Is+DwiWuaAzzfMTfA++TNkqqO lOfqma/E7EUNMgxh2h60sWFG/26x6uxb0vcU69jAtlqyhwc/pWFQL9DdDbuQDXb7QL4Y gvqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ssx41Wij; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 x186si7239202pgb.33.2018.11.28.07.34.08; Wed, 28 Nov 2018 07:34:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ssx41Wij; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbeK2Cej (ORCPT + 99 others); Wed, 28 Nov 2018 21:34:39 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:41089 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728163AbeK2Cej (ORCPT ); Wed, 28 Nov 2018 21:34:39 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181128153235euoutp026199417e259d264ba28855ecc9c6091a~rU4tvZi5E2386823868euoutp02j for ; Wed, 28 Nov 2018 15:32:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181128153235euoutp026199417e259d264ba28855ecc9c6091a~rU4tvZi5E2386823868euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543419155; bh=bG+eXSgqOEq+2CgtyyiU+MDO0vGklIiPQGnS7BenaTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ssx41WijAbhBxD8Q925Qz/gRW63DK96P1Vk4/cx+YP6QVL58XZkQpspJ/+JosbgUS 55g/vw95kNJ4/+BIPd+N/t1TA3ID2QFvdSkx9xJnobMJegELSH2AwkrZQXMiFGkK6+ rxAaG4/nhOJNlTa3ccTNF6Nl6J2AzawqJ6yiWNJY= 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 Cc: Christoph Manszewski , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie , Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz , Marek Szyprowski , Andrzej Hajda 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+sCj7OodCODhvz4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jhATSE0tSs1NTC1KLYPqYODilGhjLV5z94iL7Mv0I+949y28f2Zod3STzjHHFed6jJZ2f Jnuryaz+Ffp0zcHsjhvLH7ZE5BhlcPH6PX66R17wkd+5b7L1y/ivr8hiXSglOdt8iTP3dBU5 36sf5n3ubLAUfSz+S+z5yg3xfieeaFy+KOXa873gzM2AhMDbHKKx30S3cv9rCck2PtmvxFKc kWioxVxUnAgAfdZYTZwCAAA= X-CMS-MailID: 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181128153233eucas1p2e5224bacb69616fdd794751593dc1629 References: <1543419132-16099-1-git-send-email-c.manszewski@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.7.4