From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Armstrong Subject: [PATCH v2 8/8] drm/meson: Output in YUV444 if sink supports it Date: Fri, 1 Feb 2019 12:07:53 +0000 Message-ID: <1549022873-40549-9-git-send-email-narmstrong@baylibre.com> References: <1549022873-40549-1-git-send-email-narmstrong@baylibre.com> Return-path: In-Reply-To: <1549022873-40549-1-git-send-email-narmstrong@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org To: a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, p.zabel@pengutronix.de, Sandy Huang , heiko@sntech.de, maxime.ripard@bootlin.com Cc: Neil Armstrong , dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org With the YUV420 handling, we can dynamically setup the HDMI output pixel format depending on the mode and connector info. So now, we can output in YUV444, which is the native video pipeline format, directly to the HDMI Sink if it's supported without necessarily involving the HDMI Controller CSC. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 540971a..69f9b2a 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -664,7 +664,10 @@ static int meson_venc_hdmi_encoder_atomic_check(struct drm_encoder *encoder, dw_hdmi->output_bus_format = MEDIA_BUS_FMT_UYYVYY8_0_5X24; } else { dw_hdmi->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24; - dw_hdmi->output_bus_format = MEDIA_BUS_FMT_RGB888_1X24; + if (info->color_formats & DRM_COLOR_FORMAT_YCRCB444) + dw_hdmi->output_bus_format = MEDIA_BUS_FMT_YUV8_1X24; + else + dw_hdmi->output_bus_format = MEDIA_BUS_FMT_RGB888_1X24; } return 0; -- 2.7.4