From patchwork Fri Apr 29 18:51:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 12832609 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 D168EC433EF for ; Fri, 29 Apr 2022 18:53:41 +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:References:In-Reply-To: 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: List-Owner; bh=dU6fZmvof9f/ge3+7soiKElnGxSVaZg0a7zGtYGqZqg=; b=BZ1uOxoPJEOyBA 0+oK5iBRxfq7iaQR/86trxQ5UyLgsJIW5aNTr3EiXyZfRkd/J252o4g6ylPv00n+dAgyjgROP3TsA oaoixN8wV/RPGEpG+hz7OD0Fu1GBAcaZ1m6q/K9bDjgvH6ytZiphdbs66ev+4J4O+GH5oGvnn4PRr jrOirgQagQE33V517gDYA0UsGSkEWpjEhI35NlsjzzLr1XuJ+zUYsu9VFOKz7PQF0k+vZmGPFZ96Q OBnKmJ8ibehxvUFDppWmzANtiYl1eku55ukatei/KSxCtjPPIcZoXe8QOhMa3i3Egfq/fhrIjPyWO yAnSFFaCYZSdfOiQ8qTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkViw-00CF1v-4P; Fri, 29 Apr 2022 18:52:14 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkVis-00CEyL-4R for linux-arm-kernel@lists.infradead.org; Fri, 29 Apr 2022 18:52:11 +0000 Received: by mail-lf1-x12a.google.com with SMTP id w1so15596142lfa.4 for ; Fri, 29 Apr 2022 11:52:04 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=0sz6Xf+FMEM6Pg9TYenwhocv3Ys8GJokg7Junnjnvhs=; b=P3bH5SyuxOC+W7nJIP8uFiQe8mfa57voGW/CujGwdt+uWBwVjW1y5jIQ0qwioyG8a5 z0XoyCQTmflVsbpvWWmnfyZSoAUrVOBSz+OUilUPh+oJKepu6NMiasv4yoF+Luv0X4eY sIoQZYtzjlcbAcsQ4ks5JVCZIexkyadB/BGybVVYx8pNJaZC6briTt4ejRa8N1hqiOeZ x06azzmpObZd/gZfhoKiqr4FhF8MqvQ6WRZpgNQUlgDauqHAlU+wTWl5BldqUvIpf7ZO VSwKGHeA8tVyaASkzh3ReNiFVS7G7nwLykrIYgBkZmuAuWsl0A/v/Z9QwOacS3xoIF9U k8lg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0sz6Xf+FMEM6Pg9TYenwhocv3Ys8GJokg7Junnjnvhs=; b=VGE+SlrO4v5rZ/cjoygeXyUFvZxUM6qOOaKtdWL3PQhetwKfKmgTNYNzQ8pxp4OO3o E44LmcH9J1DvCGoM0BqpkjFaTE5OY1x0JxLUUytWGr2zRlCKQ8IRKEyvkSXykqup/c9L Pu/c8rS2R1bWJsoTOIzxRkkh6B0+xa8CKaIrHNrsMCaBQ78B0Wl/wSOudcOPBB/DHGPp N6N6YUxvrAEMm+gr10sWkLPldnFXn9fogb3h5DV877Mk6qrbbilFpUfXLt7nd7dEaxFa XJIPwTUicWaj+gXJl41krG8fiDWN0dXI8uyJEf2zWWX2Y7gWLVfrLv4PgzcDQ8y+y+kY 7ADQ== X-Gm-Message-State: AOAM532o9rEsTy49hC5x1xzVFvsztIWwLl3qLze1bSryjNg20xqd5vVo 3YjjDLBKGhAnJAybF3nFcs99Yg== X-Google-Smtp-Source: ABdhPJyFf6J2Z655udBCglne4L6bEQy6aXnOSp8JiHE9dIuE3sE2sj/KEZZXkudFN4tE22D7lR+/zQ== X-Received: by 2002:ac2:5d6a:0:b0:464:efd7:f964 with SMTP id h10-20020ac25d6a000000b00464efd7f964mr433509lft.70.1651258322849; Fri, 29 Apr 2022 11:52:02 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id z25-20020a19e219000000b00472230888a5sm295313lfg.121.2022.04.29.11.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52:02 -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 3/7] drm/bridge_connector: rely on drm_kms_helper_poll_* for HPD enablement Date: Fri, 29 Apr 2022 21:51:53 +0300 Message-Id: <20220429185157.3673633-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429185157.3673633-1-dmitry.baryshkov@linaro.org> References: <20220429185157.3673633-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220429_115210_233737_BE0CFF37 X-CRM114-Status: GOOD ( 13.13 ) 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 Use drm_connector's helpers enable_hpd and disable_hpd to enable and disable HPD automatically by the means of drm_kms_helper_poll_* functions. As the drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() functions are now unused, replace them with stubs to ease driver migration. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index 60923cdfe8e1..1592da3b9403 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -136,6 +136,11 @@ static void drm_bridge_connector_hpd_cb(void *cb_data, * This is typically used by display drivers in their resume handler. */ void drm_bridge_connector_enable_hpd(struct drm_connector *connector) +{ +} +EXPORT_SYMBOL_GPL(drm_bridge_connector_enable_hpd); + +static void _drm_bridge_connector_enable_hpd(struct drm_connector *connector) { struct drm_bridge_connector *bridge_connector = to_drm_bridge_connector(connector); @@ -145,7 +150,6 @@ void drm_bridge_connector_enable_hpd(struct drm_connector *connector) drm_bridge_hpd_enable(hpd, drm_bridge_connector_hpd_cb, bridge_connector); } -EXPORT_SYMBOL_GPL(drm_bridge_connector_enable_hpd); /** * drm_bridge_connector_disable_hpd - Disable hot-plug detection for the @@ -156,6 +160,11 @@ EXPORT_SYMBOL_GPL(drm_bridge_connector_enable_hpd); * This is typically used by display drivers in their suspend handler. */ void drm_bridge_connector_disable_hpd(struct drm_connector *connector) +{ +} +EXPORT_SYMBOL_GPL(drm_bridge_connector_disable_hpd); + +static void _drm_bridge_connector_disable_hpd(struct drm_connector *connector) { struct drm_bridge_connector *bridge_connector = to_drm_bridge_connector(connector); @@ -164,7 +173,6 @@ void drm_bridge_connector_disable_hpd(struct drm_connector *connector) if (hpd) drm_bridge_hpd_disable(hpd); } -EXPORT_SYMBOL_GPL(drm_bridge_connector_disable_hpd); /* ----------------------------------------------------------------------------- * Bridge Connector Functions @@ -305,6 +313,8 @@ static int drm_bridge_connector_get_modes(struct drm_connector *connector) static const struct drm_connector_helper_funcs drm_bridge_connector_helper_funcs = { .get_modes = drm_bridge_connector_get_modes, /* No need for .mode_valid(), the bridges are checked by the core. */ + .enable_hpd = _drm_bridge_connector_enable_hpd, + .disable_hpd = _drm_bridge_connector_disable_hpd, }; /* -----------------------------------------------------------------------------