From patchwork Mon Oct 24 15:39:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13017738 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 4C3A7ECAAA1 for ; Mon, 24 Oct 2022 15:42:50 +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=LIRk29YmodSr3ECYMVY7TYAvb5q3dQ3ygBOZakgnuec=; b=Py99pA/pAonQC6 v+zd29ca4mgoXn2XljoFph5052oROx3nERoLWeRzBI53nIC78G1eDbG5GjvZ66URRafVFvdw9qL/J if4urvHL6qOXvkvQ+ux2QbqmtXEvSELG/3WCtya/AbsbVzuOkenZNbbzgYpKXENU43AZQf1/KagQp 3zhaq0KN74YFl78hQDLRjfYJ9ZrgkMX4vC80aNP3zvmEz1ej3lB+S7rxgEl6buk4QJql1WoUoDcAs +e34Jl/ddCaJXbuXW9Ft5qJQtv2yD4sVn+JEfNuL7puJOUO+Ar+zMIUTvKPp75bLWv7CWmDehulgn 1RTE6IntrguYujSsWvDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omzaB-0028Dc-3R; Mon, 24 Oct 2022 15:41:43 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omzY2-002723-Kw for linux-arm-kernel@lists.infradead.org; Mon, 24 Oct 2022 15:39:32 +0000 Received: by mail-lj1-x22e.google.com with SMTP id d3so6826601ljl.1 for ; Mon, 24 Oct 2022 08:39:29 -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=4iRQ1ZLI8K+KKo3Mi3lCacL/2gYfLmhjW+eZ+G5VxR0=; b=DK03fHAgU4BsXGUew2FzyG3+wVE1aU4jA6ElvQnlho0LEO32GQFcBY4dd/LkCacBJ2 jPIwbDMb2KnH0lLk1oaf7f2CmWkfUlIO1bnPfDHSgSmzMrI8sNmCR7B37cRbVo3Xb0qW Dk4xPSNWnfO6MqLUqU0BwiV5QT7qiki/jvUIMYxU33HgObQCtr5I/qWByuNiyiQf7wyv y0jFQqxx37K5dKOOaXLzRfVS5Uk5IOWF7L/jw3uXSTx5iFH2VfQzEKNAZHjY9kmLDE4E LaHw9E2HVZl2VkJ5z3LuMkaH3FxatPfoF70MaFt456vIuB3oCBztawgsnK/cu0BcbnSj EE8w== 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=4iRQ1ZLI8K+KKo3Mi3lCacL/2gYfLmhjW+eZ+G5VxR0=; b=nyNwVxSk1YBxJ/vyZ0r+RIcLV3kmctJzk53+YEPSx3XiVkLYTEX7tUMiwMa/HzJRNp rK3bNKG61YWAgZVH5TWHst+oX8FO9Ep2oCXjdkD16RoyQTvqvprkMH9pO4zTmuKo3DVo iWQjMS++qItY+B8WzPBCszvD5ziFsdBWrJNkf66zoJtTwqznXFzlfUC2tqTX3Uv+J/AO /Vii5PraL3/0gC1Il5qudDrB0IgceNhH9TLEgvyaOP932iUEumAlwsNWS0JcPB4k6tX9 5p/m396g6y4bx+4E3hR5BFgrtRQoivNiqj0rdAW+Ca0Q3cKinNYYi/v/C/lWFOvJBEiy mEVQ== X-Gm-Message-State: ACrzQf2tqXQb2owm9o6btV6vXoV1mlm/nPE/QGlxQYbZNu+kqUs7Qb/U ynTvqjIXs+aD3ubiUrqodoU8Tg== X-Google-Smtp-Source: AMsMyM6aZgyFcF24FEeW+Du1bHiLYldBNuRLnhbLGjWtlua2WDhhdBQOeIt39dXfHwX+IO0gs5LU4w== X-Received: by 2002:a05:651c:169a:b0:277:2ee:5e77 with SMTP id bd26-20020a05651c169a00b0027702ee5e77mr4629293ljb.455.1666625968011; Mon, 24 Oct 2022 08:39:28 -0700 (PDT) Received: from eriador.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id f23-20020a19ae17000000b00497b198987bsm452181lfc.26.2022.10.24.08.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 08:39:27 -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 v2 0/7] drm/bridge_connector: perform HPD enablement automatically Date: Mon, 24 Oct 2022 18:39:19 +0300 Message-Id: <20221024153926.3222225-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-20221024_083930_745205_9C5934D1 X-CRM114-Status: UNSURE ( 9.45 ) 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 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 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