From patchwork Thu Dec 7 15:49:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13483591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0EB9C10F07 for ; Thu, 7 Dec 2023 15:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mOO2S5QVBt8n8KnJuQRNCVRqwbkokZhz69VRTJNra7w=; b=VsJ4oNekb8YrTu knHfQDWdV3vpq9/Wg1nDfkwlbeymLBANdLnxJfmInNiHdLvUUKjC+5rEzlfQAMLVkB4ELWcEb9XEn 7PSz+0rXG7PHkQm2DP8lAV9JE4Q14Va1Y6GQi6owmuXSf4vCOz9ngB7Ayg55oYOTEczm45Ng7o0cg LJZnVvL1BCKR1UDaKDb9cSQKP98fDsqSTck6UHSxZMN9+xP6XuJ9soHjpU5ipRnqTJN22gNRDbCgj 7UcwbW+Fkd7tLLTFvOSqLA0Xt0ZTm+WssueFmrTw0Slgq0mfmF3twG0JIZ7jSqMFAADnOoD/kS7y3 joNd9Nys4gpwboOQcbAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBGfj-00DIsR-1Y; Thu, 07 Dec 2023 15:52:19 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBGee-00DHh3-1z; Thu, 07 Dec 2023 15:51:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=q5RJg/5OjdDlmJt8MghkTYWw5w3R16rRKHhBfttjoJ0=; b=C/vaWrv+otTZcuu6EGTqZLyDad Cmh42Eg0SeaOIQDii8kasvLY4pv8q+Az1clby2mxU2IvWtdMfjlP9ZDTjO9E589eTDUydz1OSDo2J 4A27G3hZctgTnvSu0DVfH+ZJSHGddcAZCL9K6OVwWm4RSPjgOkxt/BtDf48Tx+nsI1LrxmucQC2f9 s3nGZ8DLpF7KrNnRxisDNOZIFln1yvoBpvehD6D4RmlKdTzerZz6vGdUSzuTuYPAr8w/yS70T/azb XLZUcmVnhCCltdSwh9qQrQzrBxRX/Yz7DQ5okMGMHIn7nIWOek88T3keQILpks5sTlXjVk0rs/Ip6 vFM1P1Sg==; Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBGeZ-0062eG-2e; Thu, 07 Dec 2023 15:51:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id EE9AFB826AC; Thu, 7 Dec 2023 15:51:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CB55C433C8; Thu, 7 Dec 2023 15:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701964265; bh=qznHkDob5xif2U6ALClDkLNlMhqUUoLAqy8NPCFOlCo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C+mXiOz0cLMJ8D7x9vBVUWKVpfRxV8VVJxKzokbrouwEC2heMtdfMg5qQ8zouXSoq OaYxwTUtX6QT9qr/17C2e/sqW7Kk0MhSlswvWhZ1IRYNwEl+ljCFIHXeu/izA5LSW+ 0bPGk1UaqIYWUsXT9equfT7QEcSbt+V3YywZqklDQFMv8R65/Q4oSNs2EFl2XuSp+2 uI4b+hlgbVhkHU8cCssR6o37SwIpFcCyA4QEmyCpj8u5LZCBTA/mXp5aTfqr+t2coD ioKWvAKaEOdBEPbHBM1YdgWXC+XPuriamYyycRd/ny61avCPpl1so79e0zNTRmUDg3 aztt0E5ddJRMA== From: Maxime Ripard Date: Thu, 07 Dec 2023 16:49:56 +0100 Subject: [PATCH v5 33/44] drm/rockchip: inno_hdmi: Remove useless coeff_csc matrix MIME-Version: 1.0 Message-Id: <20231207-kms-hdmi-connector-state-v5-33-6538e19d634d@kernel.org> References: <20231207-kms-hdmi-connector-state-v5-0-6538e19d634d@kernel.org> In-Reply-To: <20231207-kms-hdmi-connector-state-v5-0-6538e19d634d@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Emma Anholt , Jonathan Corbet , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Hans Verkuil , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, Maxime Ripard X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2860; i=mripard@kernel.org; h=from:subject:message-id; bh=qznHkDob5xif2U6ALClDkLNlMhqUUoLAqy8NPCFOlCo=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDKmFL9u0slrmCu4tajm/IrGV+2oR75xPs1tl2vfFl2f2V xVOZc3uKGVhEONikBVTZIkRNl8Sd2rW6042vnkwc1iZQIYwcHEKwESW2jMynF7ptXyWsQfz1jrx fCG2XSWZQkreXzgq5qdeKD1lxJpyieG/O9eBHRdb63w2JC3a4z7vWEmY6fnchQV5wg+uHvlm8M2 NAQA= X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231207_155108_617474_8C7C498E X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The coeff_csc matrix isn't used anymore, let's remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rockchip/inno_hdmi.c | 70 ------------------------------------ 1 file changed, 70 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 35f44e556fcf..e4fe02b79a98 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -64,76 +64,6 @@ static struct inno_hdmi *connector_to_inno_hdmi(struct drm_connector *connector) return container_of(connector, struct inno_hdmi, connector); } -static const char coeff_csc[][24] = { - /* - * YUV2RGB:601 SD mode(Y[16:235], UV[16:240], RGB[0:255]): - * R = 1.164*Y + 1.596*V - 204 - * G = 1.164*Y - 0.391*U - 0.813*V + 154 - * B = 1.164*Y + 2.018*U - 258 - */ - { - 0x04, 0xa7, 0x00, 0x00, 0x06, 0x62, 0x02, 0xcc, - 0x04, 0xa7, 0x11, 0x90, 0x13, 0x40, 0x00, 0x9a, - 0x04, 0xa7, 0x08, 0x12, 0x00, 0x00, 0x03, 0x02 - }, - /* - * YUV2RGB:601 SD mode(YUV[0:255],RGB[0:255]): - * R = Y + 1.402*V - 248 - * G = Y - 0.344*U - 0.714*V + 135 - * B = Y + 1.772*U - 227 - */ - { - 0x04, 0x00, 0x00, 0x00, 0x05, 0x9b, 0x02, 0xf8, - 0x04, 0x00, 0x11, 0x60, 0x12, 0xdb, 0x00, 0x87, - 0x04, 0x00, 0x07, 0x16, 0x00, 0x00, 0x02, 0xe3 - }, - /* - * YUV2RGB:709 HD mode(Y[16:235],UV[16:240],RGB[0:255]): - * R = 1.164*Y + 1.793*V - 248 - * G = 1.164*Y - 0.213*U - 0.534*V + 77 - * B = 1.164*Y + 2.115*U - 289 - */ - { - 0x04, 0xa7, 0x00, 0x00, 0x07, 0x2c, 0x02, 0xf8, - 0x04, 0xa7, 0x10, 0xda, 0x12, 0x22, 0x00, 0x4d, - 0x04, 0xa7, 0x08, 0x74, 0x00, 0x00, 0x03, 0x21 - }, - - /* - * RGB2YUV:601 SD mode: - * Cb = -0.291G - 0.148R + 0.439B + 128 - * Y = 0.504G + 0.257R + 0.098B + 16 - * Cr = -0.368G + 0.439R - 0.071B + 128 - */ - { - 0x11, 0x5f, 0x01, 0x82, 0x10, 0x23, 0x00, 0x80, - 0x02, 0x1c, 0x00, 0xa1, 0x00, 0x36, 0x00, 0x1e, - 0x11, 0x29, 0x10, 0x59, 0x01, 0x82, 0x00, 0x80 - }, - /* - * RGB2YUV:709 HD mode: - * Cb = - 0.338G - 0.101R + 0.439B + 128 - * Y = 0.614G + 0.183R + 0.062B + 16 - * Cr = - 0.399G + 0.439R - 0.040B + 128 - */ - { - 0x11, 0x98, 0x01, 0xc1, 0x10, 0x28, 0x00, 0x80, - 0x02, 0x74, 0x00, 0xbb, 0x00, 0x3f, 0x00, 0x10, - 0x11, 0x5a, 0x10, 0x67, 0x01, 0xc1, 0x00, 0x80 - }, - /* - * RGB[0:255]2RGB[16:235]: - * R' = R x (235-16)/255 + 16; - * G' = G x (235-16)/255 + 16; - * B' = B x (235-16)/255 + 16; - */ - { - 0x00, 0x00, 0x03, 0x6F, 0x00, 0x00, 0x00, 0x10, - 0x03, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x6F, 0x00, 0x10 - }, -}; - static inline u8 hdmi_readb(struct inno_hdmi *hdmi, u16 offset) { return readl_relaxed(hdmi->regs + (offset) * 0x04);