All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Manszewski <c.manszewski@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: Christoph Manszewski <c.manszewski@samsung.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Inki Dae <inki.dae@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	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	[thread overview]
Message-ID: <1543579332-16609-3-git-send-email-c.manszewski@samsung.com> (raw)
In-Reply-To: <1543579332-16609-1-git-send-email-c.manszewski@samsung.com>

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 <c.manszewski@samsung.com>
---
 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


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Manszewski <c.manszewski@samsung.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Christoph Manszewski <c.manszewski@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	David Airlie <airlied@linux.ie>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Inki Dae <inki.dae@samsung.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Kukjin Kim <kgene@kernel.org>, Sean Paul <sean@poorly.run>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] drm/exynos: mixer: Use colorimetry helper function
Date: Fri, 30 Nov 2018 13:02:12 +0100	[thread overview]
Message-ID: <1543579332-16609-3-git-send-email-c.manszewski@samsung.com> (raw)
In-Reply-To: <1543579332-16609-1-git-send-email-c.manszewski@samsung.com>

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 <c.manszewski@samsung.com>
---
 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2018-11-30 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181130120225eucas1p2563258e9ede809b9d82af135e1442d80@eucas1p2.samsung.com>
2018-11-30 12:02 ` [PATCH 0/2] drm: Create and use helper function Christoph Manszewski
2018-11-30 12:02   ` Christoph Manszewski
     [not found]   ` <CGME20181130120228eucas1p17dd7e4da8adb8bb8c88f1e372fb0ebd9@eucas1p1.samsung.com>
2018-11-30 12:02     ` [PATCH 1/2] drm/edid: Add colorimetry " Christoph Manszewski
2018-11-30 12:02       ` Christoph Manszewski
     [not found]   ` <CGME20181130120230eucas1p28cfa1960874470828230d288830f6974@eucas1p2.samsung.com>
2018-11-30 12:02     ` Christoph Manszewski [this message]
2018-11-30 12:02       ` [PATCH 2/2] drm/exynos: mixer: Use " Christoph Manszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543579332-16609-3-git-send-email-c.manszewski@samsung.com \
    --to=c.manszewski@samsung.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=sean@poorly.run \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.