From patchwork Fri Nov 30 13:43:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10706359 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 3884517D5 for ; Fri, 30 Nov 2018 13:43:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24A7B30091 for ; Fri, 30 Nov 2018 13:43:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18F8730098; Fri, 30 Nov 2018 13:43:31 +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 C01C630091 for ; Fri, 30 Nov 2018 13:43:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C54A6E5FB; Fri, 30 Nov 2018 13:43:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id 290F66E604 for ; Fri, 30 Nov 2018 13:43:15 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id y139so5815798wmc.5 for ; Fri, 30 Nov 2018 05:43:15 -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:mime-version:content-transfer-encoding; bh=nUl5MjrAt2nNf/2c4ohOygU7HWMJOdWxngvB/jTAZhk=; b=tYXtWMVGB0b2t5Hza6PLRm4YfLhYlwNjtAV2/AXjuzKTMm2rMZtfSA8eoR7R/YuEN0 MayZmbvyrqhSWF5EL/5fWYDrzdBt1bMkZ8hP838NOAEaOrbWRGJ2z2ztyTC0jGTjo4le T4zBDdc2hMMD02wdu/pPT2V9ElClwZDculfaUS65K7q72wOvyNjFOTJe/0dsugZV/lq8 1PFCzdAxfvbc/9E/iu9w2HjWyKZYnK6bZ0wf4gPlVbakYl04jdLIzkkQtjVzfgd8954+ QVD3pavOvRYSdeet67pCGYWy4dQ2h7SVoQfLntj6A47dH58wBCWpprf5pPaLEs5TEYOv kkqw== X-Gm-Message-State: AA+aEWYvE4i+QPAE1CTS+16WGuJXynC01wJ0o4PNon3zP+PeLrxtKD4v 928hJRvh0OzZsFaWvOBuuEdmew== X-Google-Smtp-Source: AFSGD/UyEWOkZp1SvvYRRWcNiHf2uvkRuqWMPrqF2aBPE/CrVmEeZzvLJ6UPUunVeDQYFf1XhRoJDg== X-Received: by 2002:a1c:e3d7:: with SMTP id a206mr5544130wmh.80.1543585393607; Fri, 30 Nov 2018 05:43:13 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id 125sm6864898wml.35.2018.11.30.05.43.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 05:43:13 -0800 (PST) From: Neil Armstrong To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com Subject: [PATCH RFC v2 8/8] drm/meson: Output in YUV444 if sink supports it Date: Fri, 30 Nov 2018 14:43:01 +0100 Message-Id: <20181130134301.17963-9-narmstrong@baylibre.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181130134301.17963-1-narmstrong@baylibre.com> References: <20181130134301.17963-1-narmstrong@baylibre.com> MIME-Version: 1.0 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 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 83360f37d9ce..1b7092ab1be8 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -670,7 +670,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;