From patchwork Wed Nov 2 18:06:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13028732 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 EA7AFC4332F for ; Wed, 2 Nov 2022 18:08:19 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Qbn1kDAs6TRcd2yLJuYB6kfkOY/5mny02inF3sprmGM=; b=LqKF72rloqcwJB pvwz8SXGItZZ5zv637nsPm08yXIWiwXq5Pk1LC9QH7NCuv0J3L3aivNHbuX++X0NHYk+rcGky7XkT MjRxYPAFvUD4EOdJV/C6TI15s4fIUm0yN8qaMmXywmqQyg82W1LW8oc2ws60srJZA1gL47+u781Bv h7WThyyJcxfcePIyU+y5R0flyd0BcjLGrcTJQMen8S1LN+oADQ/ReFYWd4r6K8tZGqOsdtSb4ioxR F+UaYJMl0B5ryWPJ+Ihq1UAh5Ts2lsLAH4Og4wLlAJFHFwYayy4GenkJOs+UZNyyykd7OWXialPH/ pm6GH6zSE4i5ytWpYAMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqI8w-00Cnuu-Ik; Wed, 02 Nov 2022 18:07:14 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqI8r-00CnqV-NO for linux-arm-kernel@lists.infradead.org; Wed, 02 Nov 2022 18:07:11 +0000 Received: by mail-lf1-x12c.google.com with SMTP id r12so29558417lfp.1 for ; Wed, 02 Nov 2022 11:07:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yLIMtWdHyNW3QRIFZNBN+J8XsSTDnHkVJCLrk8KchcY=; b=qwH2zNxBYLu+b0uws77qn+8LXcKet/YEqzS7diEI6VyVeKRWbuciILL49jYJkCIlzL Aq2wNiAyqBHT4iMrSAfzMVqISVig3Knvh4zWHzch1zLY17qpUZvhFWmj2idTKQ9RRxvj uUdyp/r+PSnrXYi6P3a8XZXe2utqPwZgDoeScCf7s+d9VcjDVAPZJfU7slbFtss7FK/X VtjeJ1+IyW9dOAuPQTSnx51omOSbA/vFofGaFjEA2MyF6G57hX2vdbsVqX8Z/YZ6B3Pi nUvBR3ew3k+59PAUHBJgA6yo50VHIe/txckO5EhvS3LyWFpVccmo129Y2qnFEPTSDBFr /mOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yLIMtWdHyNW3QRIFZNBN+J8XsSTDnHkVJCLrk8KchcY=; b=cl1IrqE1TwEE4Bv+N3MzOXzBYfmNw8j/M3dJDVRMIrq+C918oO/V1lieZpb01uVuF7 3ymjgl2i1/Y+gGjFLdINHhz3CrauF2uWO0y6ZxX2FqTft+qr0kAnrmjBcrQlBX6OvDH0 zEJfdCnOxhNOkZyqFRmmmU2ZIaDXxBibbfE2Xx9f2zhUJqo4Br3yA06tLTd8wlwRHNrG TsNmwFdwb/Bd8x54B1C3wKDLj4aWlfEEYFsz5wtFztMKSm8ta4uOk3cnB9yt7Z6XjvBh VSUee9DwR5GxQoa8ATr/ER/KiPLOshSgDXJMcIqo5MEMf0g+4fm3FDTAU1ApnGVvJxiu vAOA== X-Gm-Message-State: ACrzQf11Q6fqlJye0dMwiMUi5yT9T8b0nPCC7ereU74bti5pD6weQuQC tPa1GaF120ovpOK6/fHHiPBHZg== X-Google-Smtp-Source: AMsMyM7wwesxFBYr08LP2U/os88kLqqaIrstEKZ+JgS2GhZl0yWrmwJ8apx8rhQjVn/l4AyRy5hMrQ== X-Received: by 2002:a05:6512:c24:b0:4a2:47f0:5ab5 with SMTP id z36-20020a0565120c2400b004a247f05ab5mr10646987lfu.213.1667412426112; Wed, 02 Nov 2022 11:07:06 -0700 (PDT) Received: from eriador.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id r15-20020ac24d0f000000b00485caa0f5dfsm2085232lfi.44.2022.11.02.11.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 11:07:05 -0700 (PDT) From: Dmitry Baryshkov To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurentiu Palcu , Lucas Stach , Philipp Zabel , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Rob Clark , Sean Paul , Abhinav Kumar , Tomi Valkeinen Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH v3 0/7] drm/bridge_connector: perform HPD enablement automatically Date: Wed, 2 Nov 2022 21:06:58 +0300 Message-Id: <20221102180705.459294-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221102_110709_862099_8C012D2E X-CRM114-Status: GOOD ( 11.64 ) 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 From all the drivers using drm_bridge_connector only iMX/dcss and OMAP DRM driver do a proper work of calling drm_bridge_connector_en/disable_hpd() in right places. Rather than teaching each and every driver how to properly handle drm_bridge_connector's HPD, make that automatic. Add two additional drm_connector helper funcs: enable_hpd() and disable_hpd(). Make drm_kms_helper_poll_* functions call them (as this is the time where the drm_bridge_connector's functions are called by the drivers too). Changes since v2: - Fixed a typo in the commit message of the second patch. Changes since v1: - Rebased on top of v6.1-rc1 - Removed the drm_bridge_connector_enable_hpd() from drm_bridge_connector_init() - Removed extra underscore prefix from drm_bridge_connector_en/disable_hpd() helpers Dmitry Baryshkov (7): drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini() drm/probe-helper: enable and disable HPD on connectors drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd() drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd() drm/omap: stop using drm_bridge_connector_en/disable_hpd() drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd() drivers/gpu/drm/drm_bridge_connector.c | 27 +++------------- drivers/gpu/drm/drm_probe_helper.c | 40 ++++++++++++++++++----- drivers/gpu/drm/imx/dcss/dcss-dev.c | 4 --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 2 -- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 -- drivers/gpu/drm/omapdrm/omap_drv.c | 41 ------------------------ include/drm/drm_bridge_connector.h | 2 -- include/drm/drm_modeset_helper_vtables.h | 22 +++++++++++++ 8 files changed, 59 insertions(+), 81 deletions(-) Reviewed-by: Tomi Valkeinen