From patchwork Fri Nov 23 14:02:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10695819 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 3E40115A7 for ; Fri, 23 Nov 2018 14:03:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BF102C26D for ; Fri, 23 Nov 2018 14:03:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F3022C272; Fri, 23 Nov 2018 14:03:01 +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,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A40352C26D for ; Fri, 23 Nov 2018 14:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j/T9mk53BWzwMa98sYYhvrLdoCjIV5f2Lh5N/ZQ9uyk=; b=PgcvFLD+xsd1pu i7ZCP8Fbfa1NV3qq3VIiNxHO/D0jTrDweifejQl7vKjgtf/jy0XToPwxmspM5RBwzLcq7HuZLyz4V IB+x55Te/CgCfOTkjKtG0H/1GgY9Iie/FYHS9lNeJUmhg0VNMOCpsEnX2dOXNPec3An9MpeVPyxI0 g1DJ1dCSvtzDmKjP0q8VGVuQWef+tbspA5mDdJe2mPHqB5Icdq8slGZ82uR44JFIyAR0T/sA6rXX7 BnAu/FvMy3WlTz2JFCyIG3MBapOPrBwnmAPlEYpk3rWeBY3T9IE43xwheL5o3uhvLFOZakxrZSvTq CXKgD7OCAgw4ijzxAuEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQC2t-0003hY-UU; Fri, 23 Nov 2018 14:02:59 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQC2p-0003S1-Pl for linux-amlogic@lists.infradead.org; Fri, 23 Nov 2018 14:02:58 +0000 Received: by mail-wm1-x342.google.com with SMTP id p2-v6so12053007wmc.2 for ; Fri, 23 Nov 2018 06:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SIJT5QqO0Ood+YfrWWDW0Calk9kUt/xKiJMwTKVygRA=; b=UIIfmXrjtCP/n7VMS3ZKBcqWVMlafkJEkceR28ylOAbK2qj3rWGRHEXZQBfZfgLqEC rBZTMC2nQYudehjF9RFWDthl9dKCcwwXDCgrcwB7lUtGR3s7LcdgyaQMicfyxuWpl/yu 6UN7An0c6DUT+Fk3a45UF9XixrSOaNS3IS7yqw+wW3hvUflEvVVjmNe02J0yEiD62L+x cYhO3BECw6yBwhd9O+SBk5NHPfMEMLe2UkcLRpcUXUtZt1ffcozsdnP83yxP8EGMZIbO WvqO5KhaiFVek/4zuoVibyliiv9jTq9DSNaoYXgqKBEWcinSOJYwUO155EAd/y3SNJWb FhyA== 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=SIJT5QqO0Ood+YfrWWDW0Calk9kUt/xKiJMwTKVygRA=; b=Mih4OMnmEmWhk5w2KcnchBoYX7aCBRo8RdtahgW4SHp9T7XRBRj6snukwm1IvbSUtp g6mg4kwTGuhb9T+7P8w8Ab2oktZPTvt2YohZipm8t2MYphXohCGzIrJDmsOG08AkjacI Bnnmuu+n0npyhnDr613Sme4OSgeV+Du8VX5RdYHmsruh03Tt85FYoX/2iJyt0/Uv66zD ChXdTiwIR30wk3XOGS8lZ6maSJSM2SJzszQ44g46h075WT881p9ax1378odvlkAAgW8O +aXyNgYIPMFVMM41flxLg9Kh/BjQ5cIxvSIn+2Ff8qJVJDWsaeNIC3TqhDCKmnWKdxy/ sx0g== X-Gm-Message-State: AA+aEWYGhr1+yuWNB5z+vPcYW3mLDuZnx9U2I/IDNdOr3Umbpg+zWvhQ t3Ru60d/I2H8vSoVBYjof3PNKQ== X-Google-Smtp-Source: AJdET5eAPcZ9Ku85dss+v39pgv/YUeCxdqKg889SvevlBC2Oz9OZmjHMC3m35bcLm08KmM/MyVK0oQ== X-Received: by 2002:a1c:b7c1:: with SMTP id h184-v6mr13929589wmf.33.1542981763977; Fri, 23 Nov 2018 06:02:43 -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 x8sm15172185wrd.53.2018.11.23.06.02.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Nov 2018 06:02:42 -0800 (PST) From: Neil Armstrong To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com Subject: [PATCH RFC 8/8] drm/meson: Output in YUV444 if sink supports it Date: Fri, 23 Nov 2018 15:02:21 +0100 Message-Id: <20181123140221.15700-9-narmstrong@baylibre.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181123140221.15700-1-narmstrong@baylibre.com> References: <20181123140221.15700-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_060256_120937_0AEF4A4A X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org 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 0b9ecbfe65b4..6df124c1bba5 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;