From patchwork Fri Apr 29 18:51:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 12832611 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 43ACDC433FE for ; Fri, 29 Apr 2022 18:53:47 +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=RAHKkJVa24QZrLj3/FjOJYG2q51SvARrXnOCCoDZWiU=; b=lJV0UYdP/VMCmY rdBu7JZHhdq7fzy6Oqe9VGL2+TcJvfoIoZ/kchPIiA5ucOHg9F9t7DkJnQSSLpluAI/IyKnUO1yeA MumhNhAct6zlEInTAuIgwfeybjO384U5Q4KTHWVRHcW603vq6T4SVGcFMpt+k/dnclHHXe39zK15U ABsj3MKiLsyaijwX16FT44+QbGxgzOxkzcckrxUNr8NfOk1lODZDtA01aJnYiX7fciAlQ+CaHDD8O F6Xk3A1IECfbJgpl5UUjcSUTf+4MvxwoktBMYuyxraSaGR63s2nDkorTpx+vMnNJCBKGZpJB+gvni E2ql6PjXNiA6iHYvoY6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkVjG-00CF88-Uj; Fri, 29 Apr 2022 18:52:35 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkVis-00CEy2-Fg for linux-arm-kernel@lists.infradead.org; Fri, 29 Apr 2022 18:52:14 +0000 Received: by mail-lf1-x12d.google.com with SMTP id k12so15573039lfr.9 for ; Fri, 29 Apr 2022 11:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xwez25fKOJIvbl7FDqYv3cgN984+GGk1naedmnAxP4Y=; b=f6UQK3n7miUzxs2paCC6ywUzmEX+m7QGx0RlW8FVo/fkmsFewBjKlBMwNCesVufZuu 4RbgPVHjkZP2+5rOxual28+DY3ujiTSbRTLt9LkUKLxJKMKlHF6fWTiS3gFjBE/uk7od CfVCFSm45qg11pesASMxdEnXqyQ2QSzvGtq10iuoBCe11ykoMJmTIrWeQ08yn+LG3Eq0 qgev94VxC+Kabu3PrpwRpR3SNzjjz5JC7hVb7mzE6LG+wtYG0enwP/FrpwO/1IZcCgsk 61t5FYvPPEQjhMDWLAh76uFYRJ1Wy6KtIdrZtZ0njK3jSWMY7MvfsGfEhhlYCUQjZB2B aD9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xwez25fKOJIvbl7FDqYv3cgN984+GGk1naedmnAxP4Y=; b=OVxyIsfgP70vwg8DkvpAUe6gE0JzMNEZUfIhSIZOOjRgIlAAGqLINfkkuw7Ua5WSnh o2Y+pUj73SqrNb2f66LOWNH571NR0I7tIV6y22HDmgUCWhzjcJn0yV/p0BW7KUXh25k4 FyefbEnB04Uvv5vIqUiBvLEbVJqNimrd/zKeCJSY1Q+cCYe/2CH8v2r/eMD7qdGfVGrc BAUtgcVFqvqHs95HwSOxuJjz/r8pdyv9/6ZJ1GDW40G2y7YnG45+0/R7p/dppn0d2KWw zEV+TbGumkf+Ncee1AMvLbWEEEOXZEYb5+P2f3J7rhionswGDPkxCdKRV9L8a7DYhZmO jD1Q== X-Gm-Message-State: AOAM532fLWY7bJcrx2IN6S/PesDTa99UqyYHtSduTpoq+K/cCc2ILgcj slOtaygZ9EybDGeqbgxD7hbq6g== X-Google-Smtp-Source: ABdhPJyOpcUR4T0Pwv1R1szusK+QmnoIsr3FyUCxNx60L0+9tc1KiURMI8qpfG2pF8k5oYd/gJbjjQ== X-Received: by 2002:a05:6512:6cb:b0:471:ce8a:cfaf with SMTP id u11-20020a05651206cb00b00471ce8acfafmr404904lff.635.1651258319965; Fri, 29 Apr 2022 11:51:59 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id z25-20020a19e219000000b00472230888a5sm295313lfg.121.2022.04.29.11.51.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:51:59 -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 v1 0/7] drm/bridge_connector: perform HPD enablement automatically Date: Fri, 29 Apr 2022 21:51:50 +0300 Message-Id: <20220429185157.3673633-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-20220429_115210_569648_019E3E05 X-CRM114-Status: UNSURE ( 8.39 ) 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). 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 | 23 +++---------- 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 | 4 --- 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, 58 insertions(+), 80 deletions(-)