From patchwork Thu Jul 23 01:35:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 2791 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id E59651C00D4 for ; Thu, 23 Jul 2026 03:53:28 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=collabora.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-24702-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-24702-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 5B85231C2142 for ; Thu, 23 Jul 2026 01:40:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A01D38E8D8; Thu, 23 Jul 2026 01:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="N8X1IRj3" X-Original-To: linux-sunxi@lists.linux.dev Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F43F381EB5 for ; Thu, 23 Jul 2026 01:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784770549; cv=none; b=ELzStFVtarv8oeHuVv0AOd4OBerc8xedbB/KzhXihu6YS1qd8a5AEDX945EZD/uwcVRtlXCUFgnX2gYysNZgD0ENltUE0PxA7EDkofXBc9YgiKEnkfICJ7IxQpscq+C1JIwdBAtpsKn2e+cy1eaTFMkwWAnU2zs6IPsZsWejZ3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784770549; c=relaxed/simple; bh=UFenE8b9l203KPkwjscWRWUv0CqTKDKqkM2fzA5eH1A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DUhriv4wUnsRM5lW0wQkvpU3U2jPksohV5yk6gfVDpgOMjE4RFFq9LVZe6aYR6JlvgaqhfPpPjIPV1wOfJomqTJnxWU7l2w2jxEMqVSSDlVkjQVY59KfZzPUAqGGrtJn0qyhA/QtzbhWSLGdTCxqBOWZ0e5cfVrhVWnhaViikrw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=N8X1IRj3; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1784770544; bh=UFenE8b9l203KPkwjscWRWUv0CqTKDKqkM2fzA5eH1A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=N8X1IRj3NgXv2W9YL3MFlJRs0DiouHztHVjHdnRQqhPiV57NNcntnIIyCImrH03iF 5y5lPpWpBID3ZYoD46VPQnv9HHn7s3gpCvPguNIWtEn/0kjpWeaB28hgIm9+uwo+m/ j/DCDeuwzIIn0uOFLolEx+bh2OtUqoIW7wKeFrVZw3Qc9ryrxiTFDNrvPeO+As8Cih lrBit/Rj91JdOu01bk/b6tybFvfTZvzYDXnM2wv6RVjG5NzzCYz3S5jPXO2ipfowdn 2Fe7kMlPpcKlZw8m99CbCtRxS7ZESvVfMiDElwpGyFngNrPLuFMIwX1wavaz6t7bfR XWEtBLCQQR+aw== Received: from localhost (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id 80EFC17E38B6; Thu, 23 Jul 2026 03:35:44 +0200 (CEST) From: Cristian Ciocaltea Date: Thu, 23 Jul 2026 04:35:50 +0300 Subject: [PATCH v9 61/61] drm/connector: Drop redundant max_bpc field Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20260723-dw-hdmi-qp-scramb-v9-61-4fb12ea22ac9@collabora.com> References: <20260723-dw-hdmi-qp-scramb-v9-0-4fb12ea22ac9@collabora.com> In-Reply-To: <20260723-dw-hdmi-qp-scramb-v9-0-4fb12ea22ac9@collabora.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chen-Yu Tsai , Samuel Holland , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Algea Cao , Daniel Stone , Liu Ying , Phong LE Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-rockchip@lists.infradead.org X-Mailer: b4 0.15.2 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Now that all users migrated to the new drmm_connector_hdmi_init() signature, max_bpc is provided through struct drm_connector_hdmi_funcs, a reference to which is already stored in drm_connector_hdmi. Drop the redundant connector->max_bpc field and point its users to hdmi.funcs->max_bpc instead. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 6 +++--- drivers/gpu/drm/drm_connector.c | 2 -- include/drm/drm_connector.h | 5 ----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c index 83af9426c69b..f0b9141ab05a 100644 --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c @@ -319,7 +319,7 @@ void __drm_atomic_helper_connector_hdmi_state_init(struct drm_connector *connector, struct drm_connector_state *new_conn_state) { - unsigned int max_bpc = connector->max_bpc; + unsigned int max_bpc = connector->hdmi.funcs ? connector->hdmi.funcs->max_bpc : 0; new_conn_state->max_bpc = max_bpc; new_conn_state->max_requested_bpc = max_bpc; @@ -678,7 +678,7 @@ hdmi_compute_config(const struct drm_connector *connector, { unsigned int max_bpc = clamp_t(unsigned int, conn_state->max_bpc, - 8, connector->max_bpc); + 8, connector->hdmi.funcs->max_bpc); enum drm_output_color_format fmt; int ret; @@ -811,7 +811,7 @@ static int hdmi_generate_hdr_infoframe(const struct drm_connector *connector, if (!connector->hdmi.funcs->hdr_drm.write_infoframe) return 0; - if (connector->max_bpc < 10) + if (connector->hdmi.funcs->max_bpc < 10) return 0; if (!conn_state->hdr_output_metadata) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 27dfc26c6100..5ada9cc579d1 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -670,8 +670,6 @@ int drmm_connector_hdmi_init(struct drm_device *dev, } drm_connector_attach_max_bpc_property(connector, 8, hdmi_funcs->max_bpc); - /* TODO: remove after conversion to new drmm_connector_hdmi_init() */ - connector->max_bpc = hdmi_funcs->max_bpc; if (hdmi_funcs->max_bpc > 8) drm_connector_attach_hdr_output_metadata_property(connector); diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index e2ee5af6f7ac..36221c21a623 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -2385,11 +2385,6 @@ struct drm_connector { */ struct drm_property_blob *path_blob_ptr; - /** - * @max_bpc: Maximum bits per color channel the connector supports. - */ - unsigned int max_bpc; - /** * @max_bpc_property: Default connector property for the max bpc to be * driven out of the connector.