From patchwork Tue Nov 28 10:24:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 170712 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3815133vqx; Tue, 28 Nov 2023 02:29:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdUFGQbm/p8HMYqBgu3DK5cejIGGU4bG/8IJJOG7sPZsQxudgiA1/0U6yt8hPKkz8ROp6D X-Received: by 2002:a17:902:f68b:b0:1d0:8b5:493d with SMTP id l11-20020a170902f68b00b001d008b5493dmr163857plg.22.1701167372498; Tue, 28 Nov 2023 02:29:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701167372; cv=none; d=google.com; s=arc-20160816; b=wICATxYzzkLdZ27K2N9UqfFwu8VoG8f/dMP/TpeEjriTi0vPgvqXgPBe9erPBdhAsf bW0luAfHj0sB5AkrJMe8XuUs9t4CouHqDnz1ujQQWSFeIzC1noDO70KFVqo+N92M2QRr 9FSU4AGqGzrzcfVTMwIIIw9tImd8MhGzr7//6vqEB/BPBJfoXgyYIa3FEDmAi20GkIxe 8Z3LHYAwjeiT/gcjWXOnQzc4BpMJXgCkUTRZNt+FqGX6s8oxRg8MDRdtCNq0WJUL+IMj J/xr0wohgW4iljAdNMIwz4nSpUhV30CwBLfzgQsHPd6aSvKJsgTwACXNt4z6CKlizMxE EZZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=S7f4T0l6PpoxqCn7iWNEX/EJOqhkBPj3G90zL/hmdic=; fh=e6/uyeFf2k7v8JUtB6fPyaAS5iN3eSA1hjtg35V2Rzw=; b=dANLV8lZJyT3tVDSitrDK+Ce8J2Ivt40sRZk8bgwLuvngEpFRve2/quC7LFSNTXiN8 K4xz+8iUajCbwwNnsOYcrec+X8+cSsynSFlUdP6lUvgmjr0vH1vsYuQhA+p9l0TwW0lY v+AZ5kSzcrnJQyqxPXSVDbvseFIGjlHhXWuP+3Xg2JNBmRn6sJTtDeUQEnfGbBV3QR1t MgkCUS4T0OykR4CcLm3Me22hXukkKWOezhz1kPHhelm5zxbLSyQcaIsbY5BbPh9dkoCb HXU+ONvpkKxuis6f3Icr2BhHPjSLhYR7m1ZmMB7EbLo2kkvZX5H2vK+sucrpMBm4srTM h1Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G2ta1p0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id f11-20020a170902ce8b00b001cfb971ee07si6800594plg.165.2023.11.28.02.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:29:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G2ta1p0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 2611080EFC49; Tue, 28 Nov 2023 02:29:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344257AbjK1K3C (ORCPT + 99 others); Tue, 28 Nov 2023 05:29:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234871AbjK1K2D (ORCPT ); Tue, 28 Nov 2023 05:28:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0389B19A8 for ; Tue, 28 Nov 2023 02:26:00 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AC87C433CC; Tue, 28 Nov 2023 10:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701167159; bh=sK2tTZgQCVdrA7dGNcfvvdSbrmQiwQvQZKEMFhNEDU4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G2ta1p0+w+tiEtPeUmHnpsuY9gwaATW4rZ4syVyroKitA5tR1xKCzIzm6JkcpMQ+4 9L2DtjtrFGvMMHDLG4VyDDtNg/sqw0hJs0OsLWtR0FFp4Uhh+OISNBocalc+3JZ/zR PILYXaeFeX9PL5qYQ4pXuHb4+QlIH61dYeey/GUl884m6SkVXTfmqjeCPnmdNNQMmj xAP4q+TMh0AubWK+tIGMJ9pF+poYXG9JE4Haq4ouvKlI4iJ8ReM2fUS8FWzblTtxx/ Q7w6Q+m1TIOV1fQbjXhWrm3wGlNMgS4Rei/QfV1f0xCYNbYuDIVPMVEthxN30smwGT 6uwvfqJu8ur9Q== From: Maxime Ripard Date: Tue, 28 Nov 2023 11:24:45 +0100 Subject: [PATCH v4 34/45] drm/rockchip: inno_hdmi: Remove useless coeff_csc matrix MIME-Version: 1.0 Message-Id: <20231128-kms-hdmi-connector-state-v4-34-c7602158306e@kernel.org> References: <20231128-kms-hdmi-connector-state-v4-0-c7602158306e@kernel.org> In-Reply-To: <20231128-kms-hdmi-connector-state-v4-0-c7602158306e@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=sK2tTZgQCVdrA7dGNcfvvdSbrmQiwQvQZKEMFhNEDU4=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDKmp+y9d/uX54s68rqNnWzvjDug/ZGB2sjg3fVZG7r7w0 3tep9ue6ShlYRDjYpAVU2SJETZfEndq1utONr55MHNYmUCGMHBxCsBElPcz/OGO4zuj1Ko1cZXI dJsHSolPvvyu11ljxqWTLKIZpfTfPpmRYbqSkGyz+PPH1jFpitVPb7EqbmSpenV904F9kw5pVW5 1ZgIA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 02:29:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783803278790756247 X-GMAIL-MSGID: 1783803278790756247 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);