From patchwork Fri Feb 1 12:07:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10792629 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 8E497922 for ; Fri, 1 Feb 2019 12:08:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F2FA318C6 for ; Fri, 1 Feb 2019 12:08:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7353B31BBC; Fri, 1 Feb 2019 12:08:16 +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 3053F318C6 for ; Fri, 1 Feb 2019 12:08:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 138906EE3C; Fri, 1 Feb 2019 12:08:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 796D16EE35 for ; Fri, 1 Feb 2019 12:08:06 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id x10so6817532wrs.8 for ; Fri, 01 Feb 2019 04:08:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HQOoUB0rgLtmYotjEraQRM2tqr+yR8VV5kceQJyYLDI=; b=L7EVx0bb89YexgnZf0yqiNT9oFoOaX9lfCnRrKBOf9EVNr+bm8TEvWzAOlumwpQK9k I1oH9JO1puczxKJ3p9kTd5R8UAkTxMphTI0s5nLTMoDbfE3yHMw7Gbj4bJPcvy/7wZuy O2C5klabRIO9SYxqjtm7v1KQpcvlK8xpMyIiVtoVMIfkl4XxI7ChUA2ztlUT7TWO/dJD gRXUtcY9kn9MjZfOlZ2ZB+6C7xAqKAJOmTyJ7M3vLFpq7UJKKZo1Uzx036nlGeGI+vve Ww1UyEwLPSAjcTOfU3newzUtv0k+L0BWPn+fGTXiQiFB7uNxvtq3gXi6CZP0wXdaJ0ga wRGg== X-Gm-Message-State: AJcUukfY++7QKCAy/AVMXKC8U5BWjoaMquYlpL+GAYbowIQqvfBVIos+ b1YBdP5CO3o/1aVFFMIrBH+p6g== X-Google-Smtp-Source: ALg8bN6W6UUSJgBgN8zNCuHul8qB4MBOiy7g3LviRj/8/vg/TkfEZrq1xKdupKqZnIdk3MzmrTQ0jQ== X-Received: by 2002:adf:b102:: with SMTP id l2mr37076933wra.296.1549022884854; Fri, 01 Feb 2019 04:08:04 -0800 (PST) Received: from localhost.localdomain ([51.15.160.169]) by smtp.gmail.com with ESMTPSA id m13sm2577103wmd.6.2019.02.01.04.08.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Feb 2019 04:08:03 -0800 (PST) From: Neil Armstrong To: a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, p.zabel@pengutronix.de, Sandy Huang , heiko@sntech.de, maxime.ripard@bootlin.com 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> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549022873-40549-1-git-send-email-narmstrong@baylibre.com> References: <1549022873-40549-1-git-send-email-narmstrong@baylibre.com> 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-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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;