Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3654274imu; Fri, 30 Nov 2018 04:03:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xg3jFhRmknxeHaGm/0l+9ID8f61JoJrwX5uzXLXOoEzQwDlEIRuCOTqtnopyvzh7FX60L6 X-Received: by 2002:a62:4851:: with SMTP id v78mr5378823pfa.97.1543579425217; Fri, 30 Nov 2018 04:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543579425; cv=none; d=google.com; s=arc-20160816; b=xwvlGtklgXjDEjD+arXAvg8KnOeJQ2UM2Lf/4ooFnKv8Xni4NKB72SUGAreWl73kDl 3XbEI9HV40KSyHngMqoqGoOXZJPhXTKP/3rujbWOATgTluSc0WgD7eBCmvPteHKATlrX dNUhdNQC+Fwp1+uWCQSRNlG+ognYy9MczrzvuqRd92Xks16WxTWVYwZ7gHjD7E+ryoPu iItJYkihbNbOC0jpAo4WvHIJkWWuY9dgcZBM2PEV/fq/UfXHu9ZOu2of48QPAJe6ZcVE A39ju+sKGJQxjL7rdlkfyjiVteIB0fkaCDphaxxcFrRAOVwIUjCGHVVwrjUo9hURvL2O GuXA== 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=Z4CGJ14WtfybGXs/Qu45gREy3sZEYMWP3/MaWou4ruw=; b=PNc8We2Yz74Xr75PuKqCmi23aJwYDefT3n2rbfgQXh2nTj13grGwFSqOWmlai7YJWy KQ9GPBIDvRbqi/NLkr66UJrWFD9YQlT/+z7hsuV+Z9MEh8UiKQlCPjHq481mHw4abUdj lw4YwREoUsU9vAAqGbg3cQbWhfht6NCnumg3O22PNM86CSH+Xb3g5R50BEcsnH0VI31z 7DNvM2dk3bLujKhwGd3owVLILV5JjYaBXHMeZ47WOMO1AZJzq3jAcIeM+5n4/XXJ08fb H5JJwQtHiVwnDlspzyLRKJWKcZkhqK7IZt4Cv+A4gaq4FsDklk3+kgMXyoQYrNeWsyiE 7roQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=njHRf7oR; 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 t10si5042361plh.307.2018.11.30.04.03.19; Fri, 30 Nov 2018 04:03:45 -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=njHRf7oR; 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 S1726966AbeK3XLg (ORCPT + 99 others); Fri, 30 Nov 2018 18:11:36 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:55026 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbeK3XLf (ORCPT ); Fri, 30 Nov 2018 18:11:35 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181130120231euoutp02b74ca89398e5882a80533eeaae6a34de~r5T37yX7w1090810908euoutp02e for ; Fri, 30 Nov 2018 12:02:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181130120231euoutp02b74ca89398e5882a80533eeaae6a34de~r5T37yX7w1090810908euoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543579351; bh=Z4CGJ14WtfybGXs/Qu45gREy3sZEYMWP3/MaWou4ruw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=njHRf7oRpMJtz4/IqFqrjN+HAug4s/OP92SJxJ98G6tDzBZmMlX2UKJI3wq3lVkXR KK58vWdmL/jb0K7BGQ3KGuNuAFc5GzrD3yhrs+w41kohoUoeQ9YQk+XIE6ykVXC2NR Gfv9SXIe7yU5xlbaYarQfl4XqVtouEc2O5d9Uxfc= 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 Cc: Christoph Manszewski , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.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 FQQJMwOZk7ZNZ4Y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smMkuJJucDYzivJN7Q 1NDcwtLQ3Njc2MxCSZz3vEFllJBAemJJanZqakFqEUwfEwenVAOjzsX5sZKdkklmd5MOP9Q3 nMkyXyY7/OHES+yWD/cFmxrtePdrSszfaB7Zld7zTupXnNa5x7LlzLNin4rLlTe3O25ifbMn b02B7w/+30sMjrY+s7mnJ33WNObX68iLAXGan3Omv9Vz4Lqi9qNJ+8XRe1uiiwL3fPvXtN5Z fRPvPomS9soL+mUrlViKMxINtZiLihMB0fFxq6kCAAA= X-CMS-MailID: 20181130120230eucas1p28cfa1960874470828230d288830f6974 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181130120230eucas1p28cfa1960874470828230d288830f6974 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181130120230eucas1p28cfa1960874470828230d288830f6974 References: <1543579332-16609-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 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; -- 2.7.4