From patchwork Sat May 9 10:26:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 6369211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 37972BEEE1 for ; Sat, 9 May 2015 10:30:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D5D12025B for ; Sat, 9 May 2015 10:30:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78B9A200E1 for ; Sat, 9 May 2015 10:30:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yr1z6-0000xP-60; Sat, 09 May 2015 10:27:52 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yr1yP-0000Oj-2m for linux-arm-kernel@lists.infradead.org; Sat, 09 May 2015 10:27:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Date:Sender:Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References:In-Reply-To; bh=LEpWxOUwZu87m7UkFHv+HQxodvnMneeIxgAQSrHeXnk=; b=KPQ7QRODcVRvU5ZCdnl3pqAnCe6THVvnNYn2/+kBkWj4VLl8zBysw9MmRBfWvINd3EIdioIGdu5dO8ASnrFTmAwC3X7grU0l6mXvp9xWhD96DOdLX3pDk00qapsQOluA1vAQ0iqH3SKvMWEYETbP3k6N6OsubxCpsYFDZy4A0yw=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2002:4e20:1eda:1:222:68ff:fe15:37dd]:37372 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Yr1xe-0004zk-8k; Sat, 09 May 2015 11:26:22 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Yr1xY-0006ko-R9; Sat, 09 May 2015 11:26:16 +0100 In-Reply-To: <20150509102501.GO2067@n2100.arm.linux.org.uk> References: <20150509102501.GO2067@n2100.arm.linux.org.uk> From: Russell King To: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 05/13] drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a little MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Sat, 09 May 2015 11:26:16 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150509_032710_119049_FE132724 X-CRM114-Status: GOOD ( 11.67 ) X-Spam-Score: -0.1 (/) Cc: Fabio Estevam , David Airlie , Jaroslav Kysela , Takashi Iwai , Mark Brown , Philipp Zabel , Yakir Yang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When a YCBCR format is selected, we can merely copy the colorimetry information directly as we use the same definitions for both the unpacked AVI info frame and the hdmi_data_info structure. Signed-off-by: Russell King --- drivers/gpu/drm/bridge/dw_hdmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 0f3ccfa3ccfc..a8bd3fbf4300 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -943,10 +943,7 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) frame.extended_colorimetry = HDMI_EXTENDED_COLORIMETRY_XV_YCC_709; } else if (hdmi->hdmi_data.enc_out_format != RGB) { - if (hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_601) - frame.colorimetry = HDMI_COLORIMETRY_ITU_601; - else /*hdmi->hdmi_data.colorimetry == HDMI_COLORIMETRY_ITU_709*/ - frame.colorimetry = HDMI_COLORIMETRY_ITU_709; + frame.colorimetry = hdmi->hdmi_data.colorimetry; frame.extended_colorimetry = HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; } else { /* Carries no data */ frame.colorimetry = HDMI_COLORIMETRY_NONE;