From patchwork Mon Jul 15 06:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13732945 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 9ECBFC2BD09 for ; Mon, 15 Jul 2024 06:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=zW4Dkbs/DpuJ5jOJGFiWuBbUi352hxlJAviTa72dXa8=; b=qypI1El6ac0y6ohktFGde3XET0 SmLdjEgQ8dV9FaxAsi5dMRr3keDNIOk9P3yppbbkW/PcD6aMCpjULqenZTges2K7RFurjg2TBEb3j X05HZEyNhw8q39jEeV+jWyX72GsqQt1MIL1l31tixJM1yyFjjDA4m8Wq3gkf6Ah6Pu7ZIueqYesNz avPCXsSpmTgYHhimwtdcE5ezH8nuxE5BBun8vQt95VmHtj31dMCPo2wc6QSxRdtR2Ne3fjcv8h8G7 ZtRgsQTDS6cWfo9U23Ryc6Sanbu42xqIEEYCHPP7dUw0z0lfDJ6WPj/MBg+U0U9gInmV/rfrOiQhw 0+D/dZcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFH3-000000062XI-3Kro; Mon, 15 Jul 2024 06:33:25 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFGv-000000062PP-1PWm for linux-mediatek@lists.infradead.org; Mon, 15 Jul 2024 06:33:20 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52e976208f8so4341721e87.2 for ; Sun, 14 Jul 2024 23:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721025195; x=1721629995; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zW4Dkbs/DpuJ5jOJGFiWuBbUi352hxlJAviTa72dXa8=; b=tSEba18etUf7RwdslVsPLrT8nLgy2oyXgxXxBI+FwiTLOvOFMwcQV/YwX77MGF9KmM O0vrp5T8whblU2Wn9Mas96BtRtLMOEWc7uq69vz9gvcUzwki3Z2jfV+HKq969I1sYram p9KsiT7uzm0ZJCOKF3uHHVTsDn7btqEG0Pfqr/xiQ35UC4YZHHztLbwGusNuroXdta3E PW3cux2fm5KDiTwFY6r0disKzwe4XCcjHrQQOB2TdLZNT/P3w85mntT9exjNOOEOBEN5 eg6B7Oamafz44mAK0fYEXfrCBJA8jIIhezJtL7iNdIZBX+afAqPHntl228ZOH7isEprW JLqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721025195; x=1721629995; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zW4Dkbs/DpuJ5jOJGFiWuBbUi352hxlJAviTa72dXa8=; b=vk4VWwOEgNi66z+LHM2/ieUuwa1joIFJ2n7dD/8Y7nlW47rBgMeGGei+fuIDWMj8ue Mmu12EXq7n20t373DZU3OIyCwdkE1jsNd6jCjlAbmrXfz8NuwZuXqb/b3v5yXa8grCXY 5ylvzkrxJ9cliMAlEpsOd3erGHIvCkUO3SzcLobgUvrcqjSPBzqIvIgjT8Sxn76NjBun ia459BxZ1s0yqu6NHQHxvkgaXUEZx2dqt9n899nVVgFh2iOvTQ6N8OchPeTdTcxeCI/w lD9QUGkjAambcDULCzc2F6eGbbhAt4bY9SmjjmgNHeQ//kynbCV8yOIsXZ5H39KKIZe9 pkrg== X-Forwarded-Encrypted: i=1; AJvYcCUcr6HeniYdyPtapsD4sjAw0E4ot+YTNboT0jTiQaTevV2YsM95BOpaQfQtUgkobcAlafHLql+gONjzsEaHRhIz6InkNtOq97y4ZxQHC5/9c+aD X-Gm-Message-State: AOJu0YyaMl6yogwmal9QjXNisMeyYqjnh0fC64xh507t/E9uKZXW9KfL k4h/jtCKAzt3dKWE0spx1aCR17HjfYLglRdrAMdCyXy3NAMfdyjdge/3t5uEnLQ= X-Google-Smtp-Source: AGHT+IHT4xz2WdhLKgSzBOFGajWmbSWMHs5k5m2atVJlXqSvlJsy3hyS+kPlM6QSPNXfSrtWv1LNGg== X-Received: by 2002:ac2:41da:0:b0:52c:90b6:170f with SMTP id 2adb3069b0e04-52eb99a0e7emr11020892e87.29.1721025195187; Sun, 14 Jul 2024 23:33:15 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ed24e188esm743543e87.47.2024.07.14.23.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 23:33:14 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 15 Jul 2024 09:33:01 +0300 Subject: [PATCH v4 1/5] drm/display: stop depending on DRM_DISPLAY_HELPER MIME-Version: 1.0 Message-Id: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-1-61e6417cfd99@linaro.org> References: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> In-Reply-To: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Stevenson , Laurentiu Palcu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Philipp Zabel , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sean Paul , Marijn Suijten , Tomi Valkeinen , Kieran Bingham , Biju Das , Geert Uytterhoeven , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , Matthias Brugger , AngeloGioacchino Del Regno Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, igt-dev@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2696; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=eQJ3hRch4PVpnxcgcIs2vVrHHBN8kCt55Lg1+zlGYoo=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmlMKouj4z7T/shiz6BaAt6p7GIaGUsCT7QSQ3+ htjgKfZW+aJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZpTCqAAKCRCLPIo+Aiko 1fbaB/9HucxwZ9XXPDZRoDro66r9wo860mrSEB1fXkutEFrGC+zz13rgdDbGHIAnd9uv8iJQ+eZ FnHusEklODaV6JVOBxry88xtNubs2YKCDCryw4tsCNUJYHXtqBVrqFKiiEgV1fVPr24ZnOES7Px Ef31DsPrCnhXzvJAcgn+EE6UnjT0qx1Dz+nQGStxm+6YqKFaq65IMQDATwngmZiTJO6wMQzT85Y E0pyIkvXXAP2khDqrLtpUkroiEy+rITOfqGW43AggLIZgaaB3hI8mzpqjQor1sFYzMyqCtn11OD 0TKL0KUECMJb2hfkYtMQg3IX8xjnSc79S3gqxbWQwws7xLIS X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240714_233317_468587_EBF7F46D X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Kconfig symbols should not declare dependency on DRM_DISPLAY_HELPER. Move all parts of DRM_DISPLAY_HELPER to an if DRM_DISPLAY_HELPER block. It is not possible to make those symbols select DRM_DISPLAY_HELPER because of the link issues when a part of the helper is selected to be built-in, while other part is selected to be as module. In such a case the modular part doesn't get built at all, leading to undefined symbols. The only viable alternative is to split drm_display_helper.ko into several small modules, each of them having their own dependencies. Suggested-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/Kconfig | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index a2e42014ffe0..9c2da1e48b75 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -1,19 +1,20 @@ # SPDX-License-Identifier: MIT +config DRM_DISPLAY_DP_AUX_BUS + tristate + depends on DRM + depends on OF || COMPILE_TEST + config DRM_DISPLAY_HELPER tristate depends on DRM help DRM helpers for display adapters. -config DRM_DISPLAY_DP_AUX_BUS - tristate - depends on DRM - depends on OF || COMPILE_TEST +if DRM_DISPLAY_HELPER config DRM_DISPLAY_DP_AUX_CEC bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support" - depends on DRM && DRM_DISPLAY_HELPER select DRM_DISPLAY_DP_HELPER select CEC_CORE help @@ -25,7 +26,6 @@ config DRM_DISPLAY_DP_AUX_CEC config DRM_DISPLAY_DP_AUX_CHARDEV bool "DRM DP AUX Interface" - depends on DRM && DRM_DISPLAY_HELPER select DRM_DISPLAY_DP_HELPER help Choose this option to enable a /dev/drm_dp_auxN node that allows to @@ -34,7 +34,6 @@ config DRM_DISPLAY_DP_AUX_CHARDEV config DRM_DISPLAY_DP_HELPER bool - depends on DRM_DISPLAY_HELPER help DRM display helpers for DisplayPort. @@ -61,25 +60,23 @@ config DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG config DRM_DISPLAY_DSC_HELPER bool - depends on DRM_DISPLAY_HELPER help DRM display helpers for VESA DSC (used by DSI and DisplayPort). config DRM_DISPLAY_HDCP_HELPER bool - depends on DRM_DISPLAY_HELPER help DRM display helpers for HDCP. config DRM_DISPLAY_HDMI_HELPER bool - depends on DRM_DISPLAY_HELPER help DRM display helpers for HDMI. config DRM_DISPLAY_HDMI_STATE_HELPER bool - depends on DRM_DISPLAY_HELPER select DRM_DISPLAY_HDMI_HELPER help DRM KMS state helpers for HDMI. + +endif # DRM_DISPLAY_HELPER From patchwork Mon Jul 15 06:33:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13732947 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 BDF0BC3DA4A for ; Mon, 15 Jul 2024 06:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=7hD96SukkfsNyjNTVedgkKQiaViidlloIggj4cO+Fh4=; b=AN7kYTpOhIT/WIMaqBDGwhvrSL /hwqGYhYCsyjCdbXgPabP/4B9MUQIJWYF0jatbQpBM5KhTAEvkWPlYcfQGrEuGnosSBx70InRO+5p xPfd4EFM0kUCwdrDLG8BdSfyF523bFk9SHtOfBBbcNdC9e1BSvBuc/3pXzpk15sU24edn55ZDG0pH AUHP/476ZyLJq+NtcRIf/+eH+OXcS9cRL4MCbQUFrnBV+19tEQ4bnLIxToBE80O1Xr+7fZRMnL18b CkVJPJ5q/0SdCXqJnLE9ryvl3ap79a/VY4u9SzomPVyO0QND/qAmti5GbikUcx684PrtTKeEHy2MO CTCaGE1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFHB-000000062eq-2Ri3; Mon, 15 Jul 2024 06:33:33 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFGw-000000062QO-0wcn for linux-mediatek@lists.infradead.org; Mon, 15 Jul 2024 06:33:22 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52e97e5a84bso5349187e87.2 for ; Sun, 14 Jul 2024 23:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721025196; x=1721629996; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7hD96SukkfsNyjNTVedgkKQiaViidlloIggj4cO+Fh4=; b=xPlhsy1t0zAuwXqCg46G6m6QX2H2/zWZoiWZQ3Pok3sDcqghvk/AaAL8eQiv9CLoBC dLHRynwep9aciOwGw1OPLh/JwYg5RMZjfhi86V60V8qUe8uV8gKrfD0kHOIHM9tHrQpp u3Fh32LK80YpglLa/mcmHo82U0LQ5MjpRiy6tydZ92EfgBcT2Trji2Dz0akYVXe7UwEE VJGq5pvh9I11jr/zDIBcf1Ps2J7Bo5QPoXDwbkoPSHZpP9akLmijiXvfPFgNOsdSJm+J ZeB4MiA07GD9gD+O4CcAv8MBNNfpGfaSbGZnhxcn+IrBKWsyHBmLOlAYaRQbFf8pUNcz Rztg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721025196; x=1721629996; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7hD96SukkfsNyjNTVedgkKQiaViidlloIggj4cO+Fh4=; b=G87FcMpezoc4QVcsqlbGJJ4FZE4bqUsD+R1kqvm/GQhYYU/5g/X5Uw9RyqVS36QFrJ K9IOZdIIJi9N4C+bERuXCgJTrxGS7zkoTQjAQDEuVPUSsrVLaox9AeUgP2D/3ysJJif/ pEdEi79gupfCcqAT5FcanZnbp58WPxoDXI9mgq+44kChGXyB+ElXrQLeNzOZ72mE0PQ4 HFD9mHSc02XvUJYwLOeXFkRWvWHiBnuH4EGIlmRQScM5sJBlsCiYtefBgV+72l4xnDA8 EEEbSH+DO9e4JKI6CwDTZyh8QBlDIGWAwTNgPdNfrCUXJaiRdylR5tD5that5Egd4ifK x7jw== X-Forwarded-Encrypted: i=1; AJvYcCVRvM/VZsIs7GZVVWdV4Lz1gjkPDv74kUF5+y8yYkYBLp45FJWgt+Z9av+c7AVJnKMNm8MfsQbtX+m90E30O+qmnT+0uu0VT/tJRKWG6KqZTk5z X-Gm-Message-State: AOJu0YzhWb04fu3A3S+NGYFgyqzVCg30xfbqT1e0VJbeGSAMzuk5gsu+ ylPheGx7nu8jynVrS+vg1i85FgtE33cI93BlpWhgHl40KTucRLJGRe59abzYw60= X-Google-Smtp-Source: AGHT+IFX0QH8GNKb6vSmUPAoENVWks4aXQTHoSfQhbwYfR/OvyXjXMYla/ZB9rPLdfgjOmPqGKpO/g== X-Received: by 2002:ac2:5544:0:b0:52e:751a:a172 with SMTP id 2adb3069b0e04-52eb99d288dmr13038205e87.49.1721025196342; Sun, 14 Jul 2024 23:33:16 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ed24e188esm743543e87.47.2024.07.14.23.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 23:33:15 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 15 Jul 2024 09:33:02 +0300 Subject: [PATCH v4 2/5] drm/drm_property: require DRM_MODE_PROP_IMMUTABLE for single-value props MIME-Version: 1.0 Message-Id: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-2-61e6417cfd99@linaro.org> References: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> In-Reply-To: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Stevenson , Laurentiu Palcu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Philipp Zabel , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sean Paul , Marijn Suijten , Tomi Valkeinen , Kieran Bingham , Biju Das , Geert Uytterhoeven , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , Matthias Brugger , AngeloGioacchino Del Regno Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, igt-dev@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1070; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ElUTEfRFQUeTMBsWyzbhEyDMF5jl1RThHLUf4PWNs3U=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmlMKovm5l+7A24sivlmJ0R0FXE9iAwNjDSrOKP WDSbfR6q0WJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZpTCqAAKCRCLPIo+Aiko 1e+8CACEJovL304bl9alKdbKAOnfEF/R08MCNCfeoeQl2+qtgfzhmRdNpjupcxELHKcsWM+QIMF y5SHMmA5MDdtTOnk1pk9JWqRfeB2hUSWYs3LYMmYEQy7Tz+BYPrK4ScYeUHR6+qj0oCHUZHBpWe jB29sogURM+xEeh1n0770SS5O7ZxzrOm+Hxi3UAo62YKLxcXGsWm6Lyx/3MtlyAPTJKZzM3T3ko biVZKcN3GeHZhA4YojTOl5G8riLQxBO1BmRwBev3679IUvrG/ciHfbmLdysd4FqK1H0pZF5YX4Y mYOPUHKTFUgJ8Z2ftC0dD6tj00ePMiHdUlm/pBEnIMFwUVaU X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240714_233318_478547_37273FE4 X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Document that DRM_MODE_PROP_IMMUTABLE must be set for the properties that are immutable by definition - e.g. ranges with min == max or enums with a single value. This matches the behaviour of the IGT tests, see kms_properties.c / validate_range_prop(), validate_enum_prop(), validate_bitmask_prop(). Signed-off-by: Dmitry Baryshkov --- include/drm/drm_property.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h index 082f29156b3e..d78ec42de42f 100644 --- a/include/drm/drm_property.h +++ b/include/drm/drm_property.h @@ -162,6 +162,9 @@ struct drm_property { * userspace, e.g. the EDID, or the connector path property on DP * MST sinks. Kernel can update the value of an immutable property * by calling drm_object_property_set_value(). + * This flag MUST be set for all properties that have only a + * single value (e.g. min == max or if enum has only a single + * value). */ uint32_t flags; From patchwork Mon Jul 15 06:33:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13732948 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 D06EDC2BD09 for ; Mon, 15 Jul 2024 06:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=hbJUOmvW24quAtGM4HEWCKTnos6XbtfhPM+nK5+e2Tw=; b=kfy9PeiVDdky4bVTn8r3NRRY7E 5QcldxIi3/dEiDTe0xt+O5XcCpcmOlYTc2dEAW/f6+FS3UO6rKAJeVd9GSdGpqkK9SN0gulO91m7b naodpeUcatN6PzWHVDLcc0auabRXOF4AovBqZmQB52+acCRaOCCtqjyY6iriSanzRUL+Fv/xqAsl9 8mvco+fR0or3Z1YHokU+Si75K5PPMOnu/SBWyZo3eJitSwaZpS8Tredh4BwJo/VsyGPdhGmy5+HOg hEDXCdU08lD1Thcvoca0rmYmb237xAXxHWWFiq7sH8p+j4xYGAp2NTgxYYliByjKNyIOq0z4ggtxo +N0bfpjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFHO-000000062qf-088D; Mon, 15 Jul 2024 06:33:46 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFGx-000000062RN-0aXB for linux-mediatek@lists.infradead.org; Mon, 15 Jul 2024 06:33:23 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-52ea0f18500so4021773e87.3 for ; Sun, 14 Jul 2024 23:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721025197; x=1721629997; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hbJUOmvW24quAtGM4HEWCKTnos6XbtfhPM+nK5+e2Tw=; b=nFf2SiAULzqa4KuU4LQDMwN4V+eZsgQYcYt75Sqlcye+U9YYIGs3IMfOO0H2acKq2D hkUHIrCgDwuE+peMB3BHd3LSzMKt8qd987XvFgdp/lRZZPa0fPFMy5ZHtmmC2t/Uht7T SjQXk9z8U+whGo/8peegE7HubwKcB2rS4t8oc6sSbWs2jmq76cR9NXWJTW4tFnDtkIOZ m9Zx27i6sfTkETZmL0Bd2uTyP0furSwYvPoobl4VaePEaciAHY3b+Ntb1LhllqNvtbvQ 0IrGV5qDbKodTz5yedZFrl3PJNAK2J9g6Mkn0LZtWoLyeeSUMuUdNy9KSPQAWteMzhYp kKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721025197; x=1721629997; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hbJUOmvW24quAtGM4HEWCKTnos6XbtfhPM+nK5+e2Tw=; b=qk7y/HVto50zHL/E8tZfcchwWKIMtrqG/5HNeSQu9LvT/dBhNLEWRSZGyJONJRhuGu cA3cA5amrGGQ5jz5Y0HqEzp5UFSHoyg626HpPAyRRC8Oyv0RLh1uh92//oVp3+NVmnvp D/H1ngEObtHoeI174AxWLoqpihYn2Bkg/3WLhqcRFzQeHrodtF0NlHgG5+ED8RD3PsLU ho9uhaFHJ55v6EL4DykERpMjq++bGdh+4ycphzyo+KzQNhNSDhbqo3vUMNNP5Bmnwrc/ QTwJ47+mAkL4VmZXkA/ECmvdpmImWYDr2Mk+gS1yktBn+e3hK0wH9SFBgdRvSqwkarMW Oexg== X-Forwarded-Encrypted: i=1; AJvYcCUlO0IswW0oDhD/G0KcHuPIkFhHMOKYwKHmmJhoRKqTfwFZOFbUUU+6bgPhvTMG6LsFGu/zwQiTGLRh9v5yvOI6drHhV+fDweMwMjQUfQpsgOPk X-Gm-Message-State: AOJu0YwiKe4lSWkG9fB0DTRc3G8jesUoMbs+Q628jgxhh32hMCfp8lOM f10tezM47t1S5+gMSfkE4mRUr6qp7bqHfquPJV/RN4Wk9gRMfbTBXSemoRipPBA= X-Google-Smtp-Source: AGHT+IF+V86J6/2ZIQK/CmixClQVdJF7hjnWLmCjjdRBB6FFYX5j0s7A+kP4jnSIFrfgBCt8vnJuQA== X-Received: by 2002:a19:f706:0:b0:52c:c9d3:a30c with SMTP id 2adb3069b0e04-52eb99a0639mr9397218e87.29.1721025197267; Sun, 14 Jul 2024 23:33:17 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ed24e188esm743543e87.47.2024.07.14.23.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 23:33:16 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 15 Jul 2024 09:33:03 +0300 Subject: [PATCH v4 3/5] drm/connector: automatically set immutable flag for max_bpc property MIME-Version: 1.0 Message-Id: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-3-61e6417cfd99@linaro.org> References: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> In-Reply-To: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Stevenson , Laurentiu Palcu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Philipp Zabel , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sean Paul , Marijn Suijten , Tomi Valkeinen , Kieran Bingham , Biju Das , Geert Uytterhoeven , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , Matthias Brugger , AngeloGioacchino Del Regno Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, igt-dev@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1164; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Ogj1qgSBFy5LiaMGrph8HSRVcootU6FeEO747BTFj9E=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ9qUQysu/J/Xl5n/9o/EfmHLmdY1x3fJXa8q/t5631Izp 6VP4f30TkZjFgZGLgZZMUUWn4KWqTGbksM+7JhaDzOIlQlkCgMXpwBMRPg8B8NKPS4j53+nGRhP VBcpNN70edCVY/lnJcPcZSbfTc/NZDjqy6J4IKKOJ5lRyqf+pLljwNWcn8dbq5ta/jC3fL5Surt 8VnHwiZ8ube0uSdOfHZtUofj4yj2FJZ909eR959nxx9g9rdtcmORwy69fzvGuf/mlJ9ITLxRdKU /VyNt9e8HWnyJSNaJvsvvjVOZ/8xJcrea+Le6pdpiL04no7ZG5l+apXb1wf90jpyWPt1z035Z38 UmCspiUQ5HjJzXNXLbKp8oVKQ0yzQwbTWba5eanp9nPFBKUKtof79uV/nmO00QFK+krh9kFBW1Z lM+2PipLcPhrUlgXZKBucDBt5ZLW8y+WpX08IzaNs3cFAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240714_233319_476421_30C94B63 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org With the introduction of the HDMI Connector framework the driver might end up creating the max_bpc property with min = max = 8. IGT insists that such properties carry the 'immutable' flag. Automatically set the flag if the driver asks for the max_bpc property with min == max. Fixes: aadb3e16b8f3 ("drm/connector: hdmi: Add output BPC to the connector state") Signed-off-by: Dmitry Baryshkov Acked-by: Maxime Ripard --- drivers/gpu/drm/drm_connector.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index ab6ab7ff7ea8..33847fd63628 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -2610,7 +2610,12 @@ int drm_connector_attach_max_bpc_property(struct drm_connector *connector, prop = connector->max_bpc_property; if (!prop) { - prop = drm_property_create_range(dev, 0, "max bpc", min, max); + u32 flags = 0; + + if (min == max) + flags |= DRM_MODE_PROP_IMMUTABLE; + + prop = drm_property_create_range(dev, flags, "max bpc", min, max); if (!prop) return -ENOMEM; From patchwork Mon Jul 15 06:33:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13732950 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 4A1D3C3DA50 for ; Mon, 15 Jul 2024 06:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=+vHeVYfGqNabvibk/9w5FnJgNU6UmH7iNA5EQ4Ui4NI=; b=ZR2a5rDBtohTdfLmfvB5rHqi6W 5lUM2xcyWkAkewKnbj551XxMYu5dXgz/MevTMzcBsh/z6Bsw88OGbiWmH+PYQGbFL6x7MctjKIemd wwSmesIHy1IS57uz3WgWkAHjRpBgTOc8+XC5Rc7WpRiew/JI7cmo8gzyT5g6GAbJ+xnMj9R0F/XGN b3nXwvHGe3MqFsNJHZQcRgYExuTHOZE2TTBVzGE6By9y74uwEuoXPyp6oix4bOVAuVBGSi/mIYjdl I4S60TdCIvE3Ycz4WXdn48BEPL4YpcB/pmo+p0daE5O0ar1Ehg5QCxtTbjE/IGzanxKvyzjsRaI0T 3z9tk5HQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFHY-000000062yu-3Ofe; Mon, 15 Jul 2024 06:33:56 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFH7-000000062aE-2xSU for linux-mediatek@bombadil.infradead.org; Mon, 15 Jul 2024 06:33:30 +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=+vHeVYfGqNabvibk/9w5FnJgNU6UmH7iNA5EQ4Ui4NI=; b=qvn3XVNHTjRIsSh0tJ0g47Cja7 eKNKhY6yxOoXkI2VE+zse0TWJVSpmymPKex4mAT/THrVxccn8fbHUBbluBjkFJcL/Dc/RX0o81rrY 83vwVSfpVwHxzQuIMdpHFAASB/UTAN24MYB+W2YVP0x+aPqC/1699CTCCahbNGCVowSDHvxyRZV28 4mZEvB1xAPnwultZXbZL6qVGBWvJz0f5lVwYMvxCxY9V3vCpMSQ2Z36PBPGcmZAg788jbKgdhtE0Q GssD9LTbhZ6sMWbpqd5jgxRAtvgRgKKqS/XQV0l9qXmrk188vwRaoegIbk7rd6pYip5yHxo1DFUdt KVKpxbkg==; Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFH2-00000001kNO-0f10 for linux-mediatek@lists.infradead.org; Mon, 15 Jul 2024 06:33:28 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-52ea5dc3c66so6049066e87.3 for ; Sun, 14 Jul 2024 23:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721025198; x=1721629998; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+vHeVYfGqNabvibk/9w5FnJgNU6UmH7iNA5EQ4Ui4NI=; b=yrnpl0D84KzCuM+++LDrPjLBW2Bh8XedrAJHLf0EcW/uAw5ySTvmvrIfgkDTjbL3nj nvSvp3hWYSMnS1d4UBDMnaH2WmsctP0J2M+pe9zAenNHwbul7b8poByfcm/OL+1ttfNd vMlf6eKUYO5p5l+GqljFe6y44PTuYPlAdQR25V+fz+X/FFWpExeeKIdUmwU82TefGdHm 7ERfXQsbjav2d6dFdsoSikOmxe/lWUZRG9JEUp9MR94d/6B9FOdRuRj7ObzZe1wqMx9G kQGEg14Hahh1W3/RVT+e3rxWG9c6yhsXF9wD0h7ZoYZGBk6fYZOGx+DfrPo+eNvGDLdl mAdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721025198; x=1721629998; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+vHeVYfGqNabvibk/9w5FnJgNU6UmH7iNA5EQ4Ui4NI=; b=SsR0c7ySdVTyQU7xrLM8NiAExWBM0H7knT+XI4hPc7VdZaJlMQQHnaZvdaZa4tuo8C 7yt2JgOHGZ21sDazm0n5Jknv/qF6O/mWUR40ooxWhDdnasEDp+F6HnJ1HzHGKwKjaDfv nFZkeoH7aYAkgGKk5iAOjWddqYlzRHj9HL/EA6rcnODPjvZDtwJJSDbUvlwUL+yCqJlz q1GwutbJJxZNiVHiKetbkoFbEny2R73fgId04Lo5c1VDz92nwZK12qWYfjV3Lr/2OuGS SXXPs9+KjMxeDathPOcu/yzQv0ne6xR5Ey2/5sJjdNOqW6qwCVJAIxs5fYqsP8a46dMw AOBA== X-Forwarded-Encrypted: i=1; AJvYcCUb0mfAPlAAqfPhdOGZ+7f+AmqmEoDBrpccdNAaF/FDKySaWYJP4/stOyD+UpG5+aIEYQGZfoVAL4RFpO5kCvPyk49GTnMl4E3Wc/h3Q/EXD4uY X-Gm-Message-State: AOJu0YwtSWEI2boWjlPftd4LvWNaumjPvJfY9QNYbambYShmdpvyWCtL igfezY4/UhlHeBm2jFCc8JKjDhhYJSholFVw3XS5CmQ2jmBdytyEhO29Lt64Bs4= X-Google-Smtp-Source: AGHT+IE0Vu1spcM/T87vZurqpzBRz3R7sEgYPkaXWB60TYbxXlOBRFUqmcDFh0xQL1oW+eKZujF6Og== X-Received: by 2002:ac2:442e:0:b0:52c:e17c:cd7b with SMTP id 2adb3069b0e04-52eb999c2cfmr12589424e87.22.1721025198191; Sun, 14 Jul 2024 23:33:18 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ed24e188esm743543e87.47.2024.07.14.23.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 23:33:17 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 15 Jul 2024 09:33:04 +0300 Subject: [PATCH v4 4/5] drm/bridge-connector: move to DRM_DISPLAY_HELPER module MIME-Version: 1.0 Message-Id: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-4-61e6417cfd99@linaro.org> References: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> In-Reply-To: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Stevenson , Laurentiu Palcu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Philipp Zabel , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sean Paul , Marijn Suijten , Tomi Valkeinen , Kieran Bingham , Biju Das , Geert Uytterhoeven , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , Matthias Brugger , AngeloGioacchino Del Regno Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, igt-dev@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=11672; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=SO83gOuowWxufva1NS5CzakE3Qtikarrj4ZVUdAlLjs=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmlMKo1zEhmDhqyXSJMESLI/Rju4KbuGbQa8mf3 v4V90mZu0yJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZpTCqAAKCRCLPIo+Aiko 1b+ZB/47ZtWAGzgu2zqokucxO4rkP1EQuDs+gU6ih1SNNSlN5xVS74lZfht1obZS1dAzdU8j0OU Rg+YtTnfecFTIdN5QmSKAp3/ShJNmr7luercUNhc+CnGOXe5lsLfHtLY8ka7vRL1hYyuBWgao34 oWAhyB+Ot34pLaFffRv/OGkD5iDRxbC/2koEg3LW8QZp4/oEmFf9R3w+OFjIp4S55Bw0FG1ghae W1ScZk5QY4gSx3/fB0u6rpGBwbBB5gkkVQgtrfk2/CMRzMu+RKMtCvggHgMm9flbuFVCjvKCLRM iTZYl9B//pVf9x6i+rX0PIaN117B+oDphsYnbbChKkwkG/2j X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_073324_741483_94266CC0 X-CRM114-Status: GOOD ( 14.07 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org drm_bridge_connector is a "leaf" driver, belonging to the display helper, rather than the "CRTC" drm_kms_helper module. Move the driver to the drm/display and add necessary Kconfig selection clauses. Suggested-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Acked-by: Maxime Ripard --- MAINTAINERS | 2 +- drivers/gpu/drm/Makefile | 1 - drivers/gpu/drm/bridge/Kconfig | 1 + drivers/gpu/drm/display/Kconfig | 5 +++++ drivers/gpu/drm/display/Makefile | 2 ++ drivers/gpu/drm/{ => display}/drm_bridge_connector.c | 0 drivers/gpu/drm/imx/dcss/Kconfig | 2 ++ drivers/gpu/drm/imx/lcdc/Kconfig | 2 ++ drivers/gpu/drm/ingenic/Kconfig | 2 ++ drivers/gpu/drm/kmb/Kconfig | 2 ++ drivers/gpu/drm/mediatek/Kconfig | 2 ++ drivers/gpu/drm/meson/Kconfig | 2 ++ drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/omapdrm/Kconfig | 2 ++ drivers/gpu/drm/renesas/rcar-du/Kconfig | 2 ++ drivers/gpu/drm/renesas/rz-du/Kconfig | 2 ++ drivers/gpu/drm/renesas/shmobile/Kconfig | 2 ++ drivers/gpu/drm/rockchip/Kconfig | 4 ++++ drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tidss/Kconfig | 2 ++ drivers/gpu/drm/xlnx/Kconfig | 1 + 21 files changed, 38 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index fb1df8c29f5a..5b5520ed57fe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7463,8 +7463,8 @@ S: Maintained T: git https://gitlab.freedesktop.org/drm/misc/kernel.git F: Documentation/devicetree/bindings/display/bridge/ F: drivers/gpu/drm/bridge/ +F: drivers/gpu/drm/display/drm_bridge_connector.c F: drivers/gpu/drm/drm_bridge.c -F: drivers/gpu/drm/drm_bridge_connector.c F: include/drm/drm_bridge.h F: include/drm/drm_bridge_connector.h diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 68cc9258ffc4..fa432a1ac9e2 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -128,7 +128,6 @@ obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o drm_kms_helper-y := \ drm_atomic_helper.o \ drm_atomic_state_helper.o \ - drm_bridge_connector.o \ drm_crtc_helper.o \ drm_damage_helper.o \ drm_encoder_slave.o \ diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index c621be1a99a8..3eb955333c80 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -390,6 +390,7 @@ config DRM_TI_SN65DSI86 depends on OF select DRM_DISPLAY_DP_HELPER select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_KMS_HELPER select REGMAP_I2C select DRM_PANEL diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index 9c2da1e48b75..8c174ceb0c4d 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -13,6 +13,11 @@ config DRM_DISPLAY_HELPER if DRM_DISPLAY_HELPER +config DRM_BRIDGE_CONNECTOR + bool + help + DRM connector implementation terminating DRM bridge chains. + config DRM_DISPLAY_DP_AUX_CEC bool "Enable DisplayPort CEC-Tunneling-over-AUX HDMI support" select DRM_DISPLAY_DP_HELPER diff --git a/drivers/gpu/drm/display/Makefile b/drivers/gpu/drm/display/Makefile index a023f72fa139..629c834c3192 100644 --- a/drivers/gpu/drm/display/Makefile +++ b/drivers/gpu/drm/display/Makefile @@ -3,6 +3,8 @@ obj-$(CONFIG_DRM_DISPLAY_DP_AUX_BUS) += drm_dp_aux_bus.o drm_display_helper-y := drm_display_helper_mod.o +drm_display_helper-$(CONFIG_DRM_BRIDGE_CONNECTOR) += \ + drm_bridge_connector.o drm_display_helper-$(CONFIG_DRM_DISPLAY_DP_HELPER) += \ drm_dp_dual_mode_helper.o \ drm_dp_helper.o \ diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c similarity index 100% rename from drivers/gpu/drm/drm_bridge_connector.c rename to drivers/gpu/drm/display/drm_bridge_connector.c diff --git a/drivers/gpu/drm/imx/dcss/Kconfig b/drivers/gpu/drm/imx/dcss/Kconfig index 3ffc061d392b..59e3b6a1dff0 100644 --- a/drivers/gpu/drm/imx/dcss/Kconfig +++ b/drivers/gpu/drm/imx/dcss/Kconfig @@ -2,6 +2,8 @@ config DRM_IMX_DCSS tristate "i.MX8MQ DCSS" select IMX_IRQSTEER select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS depends on DRM && ARCH_MXC && ARM64 diff --git a/drivers/gpu/drm/imx/lcdc/Kconfig b/drivers/gpu/drm/imx/lcdc/Kconfig index 7e57922bbd9d..9c28bb0f4662 100644 --- a/drivers/gpu/drm/imx/lcdc/Kconfig +++ b/drivers/gpu/drm/imx/lcdc/Kconfig @@ -3,5 +3,7 @@ config DRM_IMX_LCDC depends on DRM && (ARCH_MXC || COMPILE_TEST) select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR help Found on i.MX1, i.MX21, i.MX25 and i.MX27. diff --git a/drivers/gpu/drm/ingenic/Kconfig b/drivers/gpu/drm/ingenic/Kconfig index 3db117c5edd9..8cd7b750dffe 100644 --- a/drivers/gpu/drm/ingenic/Kconfig +++ b/drivers/gpu/drm/ingenic/Kconfig @@ -8,6 +8,8 @@ config DRM_INGENIC select DRM_BRIDGE select DRM_PANEL_BRIDGE select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select REGMAP select REGMAP_MMIO diff --git a/drivers/gpu/drm/kmb/Kconfig b/drivers/gpu/drm/kmb/Kconfig index fd011367db1d..e5ae3ec52392 100644 --- a/drivers/gpu/drm/kmb/Kconfig +++ b/drivers/gpu/drm/kmb/Kconfig @@ -3,6 +3,8 @@ config DRM_KMB_DISPLAY depends on DRM depends on ARCH_KEEMBAY || COMPILE_TEST select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select DRM_MIPI_DSI help diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index d6449ebae838..417ac8c9af41 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -9,6 +9,8 @@ config DRM_MEDIATEK depends on MTK_MMSYS select DRM_GEM_DMA_HELPER if DRM_FBDEV_EMULATION select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_MIPI_DSI select DRM_PANEL select MEMORY diff --git a/drivers/gpu/drm/meson/Kconfig b/drivers/gpu/drm/meson/Kconfig index 615fdd0ce41b..2544756538cc 100644 --- a/drivers/gpu/drm/meson/Kconfig +++ b/drivers/gpu/drm/meson/Kconfig @@ -4,6 +4,8 @@ config DRM_MESON depends on DRM && OF && (ARM || ARM64) depends on ARCH_MESON || COMPILE_TEST select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select DRM_DISPLAY_CONNECTOR select VIDEOMODE_HELPERS diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 420385c47193..94d3ed4f7761 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -17,6 +17,7 @@ config DRM_MSM select DRM_DISPLAY_DP_AUX_BUS select DRM_DISPLAY_DP_HELPER select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_EXEC select DRM_KMS_HELPER select DRM_PANEL diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig index 6c49270cb290..0c6d5afc1ef4 100644 --- a/drivers/gpu/drm/omapdrm/Kconfig +++ b/drivers/gpu/drm/omapdrm/Kconfig @@ -4,6 +4,8 @@ config DRM_OMAP depends on DRM && OF depends on ARCH_OMAP2PLUS select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION select VIDEOMODE_HELPERS select HDMI diff --git a/drivers/gpu/drm/renesas/rcar-du/Kconfig b/drivers/gpu/drm/renesas/rcar-du/Kconfig index c17e7c50492c..025677fe88d3 100644 --- a/drivers/gpu/drm/renesas/rcar-du/Kconfig +++ b/drivers/gpu/drm/renesas/rcar-du/Kconfig @@ -5,6 +5,8 @@ config DRM_RCAR_DU depends on ARM || ARM64 || COMPILE_TEST depends on ARCH_RENESAS || COMPILE_TEST select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS help diff --git a/drivers/gpu/drm/renesas/rz-du/Kconfig b/drivers/gpu/drm/renesas/rz-du/Kconfig index 5f0db2c5fee6..e1a6dd322caf 100644 --- a/drivers/gpu/drm/renesas/rz-du/Kconfig +++ b/drivers/gpu/drm/renesas/rz-du/Kconfig @@ -6,6 +6,8 @@ config DRM_RZG2L_DU depends on VIDEO_RENESAS_VSP1 select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select VIDEOMODE_HELPERS help Choose this option if you have an RZ/G2L alike chipset. diff --git a/drivers/gpu/drm/renesas/shmobile/Kconfig b/drivers/gpu/drm/renesas/shmobile/Kconfig index 027220b8fe1c..c329ab8a7a8b 100644 --- a/drivers/gpu/drm/renesas/shmobile/Kconfig +++ b/drivers/gpu/drm/renesas/shmobile/Kconfig @@ -5,6 +5,8 @@ config DRM_SHMOBILE depends on ARCH_RENESAS || ARCH_SHMOBILE || COMPILE_TEST select BACKLIGHT_CLASS_DEVICE select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS help diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 7df875e38517..23c49e91f1cc 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -86,6 +86,8 @@ config ROCKCHIP_LVDS bool "Rockchip LVDS support" depends on DRM_ROCKCHIP depends on PINCTRL && OF + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR help Choose this option to enable support for Rockchip LVDS controllers. Rockchip rk3288 SoC has LVDS TX Controller can be used, and it @@ -96,6 +98,8 @@ config ROCKCHIP_RGB bool "Rockchip RGB support" depends on DRM_ROCKCHIP depends on PINCTRL + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR help Choose this option to enable support for Rockchip RGB output. Some Rockchip CRTCs, like rv1108, can directly output parallel diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 782f51d3044a..e688d8104652 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -8,6 +8,7 @@ config DRM_TEGRA select DRM_DISPLAY_DP_HELPER select DRM_DISPLAY_HDMI_HELPER select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_DISPLAY_DP_AUX_BUS select DRM_KMS_HELPER select DRM_MIPI_DSI diff --git a/drivers/gpu/drm/tidss/Kconfig b/drivers/gpu/drm/tidss/Kconfig index 378600806167..2385c56493b9 100644 --- a/drivers/gpu/drm/tidss/Kconfig +++ b/drivers/gpu/drm/tidss/Kconfig @@ -3,6 +3,8 @@ config DRM_TIDSS depends on DRM && OF depends on ARM || ARM64 || COMPILE_TEST select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER help The TI Keystone family SoCs introduced a new generation of diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig index 68ee897de9d7..626e5ac4c33d 100644 --- a/drivers/gpu/drm/xlnx/Kconfig +++ b/drivers/gpu/drm/xlnx/Kconfig @@ -8,6 +8,7 @@ config DRM_ZYNQMP_DPSUB select DMA_ENGINE select DRM_DISPLAY_DP_HELPER select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select GENERIC_PHY From patchwork Mon Jul 15 06:33:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13732949 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 2BE31C3DA45 for ; Mon, 15 Jul 2024 06:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=cowQ2MZs44p/k7+ocTvDEJFCYMvt/Fw411UD/yRIuZk=; b=UYAeEN3UvVTqtap928CX8UstkP JZuDUsQYaedOO8f44iJ4K9C22AOAYiVzJyIeAOUyVTBXNv0VS6gqs1nTRlHysAQuprmcww97bvGL1 h31zVp/EESXiefhlhy80uAfXlRiOl52YLbLjQ9cCyD+i3vhEF1x2hbcpd7xt+Q6LqmXN74QcxUQ9I vA/IwAUeTcmiJrJz1I+1tC3usQ/WD+YgxtFhTWlW0FyNUXas/5XkpRIXO4EUhq/32Iup6EadEiPTg 4X6xuK7eoQDoLFldCTalVZ+1AOCEYTJnc7MUw0HYhlodCk5hKfiSIp7IxtnqddMR94mKq5Bm5nHID sx/J2Tkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFHX-000000062xT-0N3L; Mon, 15 Jul 2024 06:33:55 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFH7-000000062Zf-1tYm for linux-mediatek@bombadil.infradead.org; Mon, 15 Jul 2024 06:33:29 +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=cowQ2MZs44p/k7+ocTvDEJFCYMvt/Fw411UD/yRIuZk=; b=GdkjIz5R6mzFb6RLkp2x3iV1Qz XoG9F4+7jjo5kfea/iyT+E+alR9TM3f5ov93Ecd31Y5b0g1zev/RGPAHGhfdnA1nv0+4/jrDJ57it QU6P3C2pAjNclCPCeB6flAFHc96DQcb4JgAR+NBLTHWzQGT2MBjgxS1y4dg6YrjLs5bLh6Z7z6lWJ N1GARoZXsqOcUfYeMBKrRhhAOj+RmzZ94sy+2WCVG/ls963+gXfofHK5Q6rQwL/MRNwnmFQkFUtKf E4WFg2s9vixnmzYTz4wWYKk5Fa1Ac4fdHmjkgppc8cAsQx9sTqi2QJ5am+1EmH34nNX4ZyDQZGPKn 9uPJR0NA==; Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTFH2-00000001kNP-0Osh for linux-mediatek@lists.infradead.org; Mon, 15 Jul 2024 06:33:28 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52ea2f58448so5213067e87.1 for ; Sun, 14 Jul 2024 23:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721025199; x=1721629999; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=cowQ2MZs44p/k7+ocTvDEJFCYMvt/Fw411UD/yRIuZk=; b=YFbDHi2bP/xqTJdmMqqyhyPh2AyZOMc1Lz+lbGVnE8A/iJoGkcdFq5uRfwltEIldjv W/RFJ4cicUaKx9bc+aUeY6XNXto3heySX65HOzYMxOgqtBDXg/4i5r+FxcrmmXhva00v JQYwiRbBtJHgSfPaHOgmvxrlSihEWxK+fbiKFvv+kRi1UYaJALA53r54OHqCjjfKBI4s GojmqoYrfHEpgkZyIAXta2rw+IZZ/vkWezduPARemd3NLaEFnYnTJLap2F4QMhJy8Vii wx8ye2ehYmFdGVMFh4BqTxRumnmWZzDp4ufGFItbj4gUihfTAbsZkdyEJOxfLQ9MbOqZ 7/ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721025199; x=1721629999; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cowQ2MZs44p/k7+ocTvDEJFCYMvt/Fw411UD/yRIuZk=; b=hyMUKNN/jlVw03J58cnHxARGhZxvvEe9dt1vVARaR8V7kw1Db9B4kB84K7sQkJbCVW A8WsolBzz30RM6Q6HSHtCXRqWSTjIV1hz9NzJpS815lMgFUKPqMnXTuyIb/Gxc9AA0S8 Z6k+00lgD2UT6Mwurp8oyg7ESoIDE3Bp7hh8stB36Uhvq5/fkrFR8TKnNdtIeRNqjrLx XL7JQrd0si/lbOkX86MEuFgL8aYpGfydaYd/rki7SZepug6IJtBEh59R4G2DI2GpmPr8 jBea3yLdM/GF6GPlivluo9OsPBO8OoKTd9lSYvhXFyy7YT8aXCJdjvrLtZNkVTKG2O+t Niow== X-Forwarded-Encrypted: i=1; AJvYcCW4OwOzu3iYBXItz1eh9N33tORwFovQw9FkSnC9+OV2zpebkuatj9kghelOcaShYELQ9pd9Q6MJGxqlgM2R9LJwBpwu74MAYpVD+3a5KjQmARnj X-Gm-Message-State: AOJu0YzJgapxlU8RA7ka10/oqM+xEakk37qFh7Dt/+2YivPqRoP9pUMt JnXKRiJz8yyWxtcmoDOJZJwhfA6fz8Yr3x+31rgjSunvCcMWrqaj2ikYnCOk3Ks= X-Google-Smtp-Source: AGHT+IHap4bfADCMMdp+9/m6hrqUOR1BGeplBSV1y4IBIjYw8gKprZmmugJo1TIVKbdLpOyzSTxWyQ== X-Received: by 2002:a05:6512:789:b0:52e:954d:3594 with SMTP id 2adb3069b0e04-52eb99cafa9mr9724397e87.52.1721025199105; Sun, 14 Jul 2024 23:33:19 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ed24e188esm743543e87.47.2024.07.14.23.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 23:33:18 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 15 Jul 2024 09:33:05 +0300 Subject: [PATCH v4 5/5] drm/bridge-connector: reset the HDMI connector state MIME-Version: 1.0 Message-Id: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-5-61e6417cfd99@linaro.org> References: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> In-Reply-To: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Stevenson , Laurentiu Palcu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Philipp Zabel , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sean Paul , Marijn Suijten , Tomi Valkeinen , Kieran Bingham , Biju Das , Geert Uytterhoeven , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , Matthias Brugger , AngeloGioacchino Del Regno Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, igt-dev@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2305; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=RSj/GL8gZoJdjbJyGkKZjzhqoxsZ6wLfYZiTk6CBwIc=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmlMKpemzG8GiCsYpbPT9S1Ojj9SgO+0jwg1X5y 9EPZPxXbKOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZpTCqQAKCRCLPIo+Aiko 1RfqCACEDU19Qkxz5DVPRYkK7fDdQdzCC7Ex3ixU9rJztEg0cYygQQ7/N1TTSfpbHd/6dnXTQqr 1EgcPH6TE+tH9eXXMheeF1OS/bhTuKARxi2wWkdHQUGUtyMj8mcHkHdrusMxtne+ZhGO/FIJ2xq Rbf1R+hLTh4esRtay58HxYpazr137omA9Gw8f5vvDWH+/fN0hvMicz3Eg/9i+0frpzphu+S7qVc FVZeAPpLqP6gaJGOvTRZRx1keGxL2vn+faVwbgsOyaVmNQjvZ71zl4YXnlV8oqwC/teMLyW6umJ AqBRzDQGS3iL3PzsMCTRPynE0PUtU41rhweY1t1X4Nq8Idxh X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_073324_598853_CEBB839E X-CRM114-Status: GOOD ( 12.23 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On HDMI connectors which use drm_bridge_connector and DRM_BRIDGE_OP_HDMI IGT chokes on the max_bpc property in several kms_properties tests due to the drm_bridge_connector failing to reset HDMI-related properties. Call __drm_atomic_helper_connector_hdmi_reset() if the drm_bridge_connector has bridge_hdmi. It is impossible to call this function from HDMI bridges, none of the bridge callbacks correspond to the drm_connector_funcs::reset(). Fixes: 6b4468b0c6ba ("drm/bridge-connector: implement glue code for HDMI connector") Reviewed-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Acked-by: Maxime Ripard --- drivers/gpu/drm/display/Kconfig | 1 + drivers/gpu/drm/display/drm_bridge_connector.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/Kconfig b/drivers/gpu/drm/display/Kconfig index 8c174ceb0c4d..3763649ba251 100644 --- a/drivers/gpu/drm/display/Kconfig +++ b/drivers/gpu/drm/display/Kconfig @@ -15,6 +15,7 @@ if DRM_DISPLAY_HELPER config DRM_BRIDGE_CONNECTOR bool + select DRM_DISPLAY_HDMI_STATE_HELPER help DRM connector implementation terminating DRM bridge chains. diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c index 0869b663f17e..7ebb35438459 100644 --- a/drivers/gpu/drm/display/drm_bridge_connector.c +++ b/drivers/gpu/drm/display/drm_bridge_connector.c @@ -216,8 +216,19 @@ static void drm_bridge_connector_debugfs_init(struct drm_connector *connector, } } +static void drm_bridge_connector_reset(struct drm_connector *connector) +{ + struct drm_bridge_connector *bridge_connector = + to_drm_bridge_connector(connector); + + drm_atomic_helper_connector_reset(connector); + if (bridge_connector->bridge_hdmi) + __drm_atomic_helper_connector_hdmi_reset(connector, + connector->state); +} + static const struct drm_connector_funcs drm_bridge_connector_funcs = { - .reset = drm_atomic_helper_connector_reset, + .reset = drm_bridge_connector_reset, .detect = drm_bridge_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,