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: 10706375 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 83F4413B0 for ; Fri, 30 Nov 2018 13:43:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 737F22E621 for ; Fri, 30 Nov 2018 13:43:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67A512EE9A; Fri, 30 Nov 2018 13:43:41 +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 1DE4C2E621 for ; Fri, 30 Nov 2018 13:43:41 +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=RiofmgDJtEfY9tBhoKvt8B5F9isI1FCtiznwqObA3PA=; b=dhmTYSZnCz6Iw/ IfMSE38Ag5GdDIU/Dxo2JEQULHkiRrGfBDO/dAVs80unEhFPZqjJ+KhKv/jc7ehIHIbFiTdTpoFDn Mh6oAfkOUXNOUuMnQ9HINAGy3heyzYd1P1qyKL79/JQoXtPCvAaGk0aqCU9PnLxyH9kMvu2tkivtF 9aDaSsYUrvyjnSuC+d9dSZdHGNcbLyg9o8nT1XdMkQ6y13LqlRzhaY3HXFAFX9Tqi9A38yjndQEAs 26K0dVvf4IapR1Tu6bTrYGiC3LQE9HZirqMXaJcpC2MHjFw9KBy6wLA1QSwLEjkyDSUbJWYGxiMwb J8JRVro8iAlPALlz9Pog==; 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 1gSj51-0003RD-E6; Fri, 30 Nov 2018 13:43:39 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSj4n-0002zc-ET for linux-amlogic@lists.infradead.org; Fri, 30 Nov 2018 13:43:27 +0000 Received: by mail-wm1-x343.google.com with SMTP id r11-v6so5839718wmb.2 for ; Fri, 30 Nov 2018 05:43:15 -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=nUl5MjrAt2nNf/2c4ohOygU7HWMJOdWxngvB/jTAZhk=; b=0ginDUspi3wBncFyoq4T/ydFyUaUic8AiZfvu/JpOXQeaaWB6mfuQsw6gAhUCPL53J 2zkvGhZNol3AmlNO4DxqBR5acirMGHmu4b6gC3AO7kHcr/AY0PH28+gTaAgx6ly1XVHA ceFwYu6QZEhgpD7wQvNQaKvk7ScePDY1DGkgYWdFAB8yeLwc42djDctAf97QZk1hBYOH NC8BSslK/mP2KISZrC+D+zWj2XiVf/8gj+1BY1xQFZjZLC2goWrM/gS8F/IY3MeKEDen KYJEkC7OcklMcl+23y1TNzlmmm7ckkPcNr0Wih2JLnAnI7/TjKaP41FeOzBS5kP8exbb 6gaA== 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=o8i8PW4vKxso+nROnUd6tA2BwjtujAzdlWaIY7ORGJxBPiMy8l4ric3BckYmG+CMVG xPSR6yAFjEdbbfMKr0sEhh/TIWmEB6Mzf014pZ8Zs0pQHCWIH82Zitz0XRD62mNYeKt8 nU+Oe61Sn/Vdiu9qRV9XUFzMZ5UorUv1ciQPOd7JUbeXTvPGdRX7WXy4XIcOC51xx058 4aDsNr5T7f2+nYE+ONMoh2Dv85SmmTX31qA93VUniWX6xwPpAl/dFrviaitDRuAoXKZY vDZc2EB/WxTFzvzsFV2vsWE8Rg4/phwcB0x0FHYoKc2h3Le4LnP6jJ3o+Djq1rFu5f3l HL0w== X-Gm-Message-State: AA+aEWZ0GO5RZsRByMUody8Gtl+2SXuwpG+6SFVBjuXI0ZP2/vGEe6Db NU6/V1tjPA9tBFdtgQ4UkexUzg== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181130_054325_496241_CD66A908 X-CRM114-Status: GOOD ( 10.73 ) 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 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;