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: 568227 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73C4FC433FE for ; Fri, 29 Apr 2022 18:52:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380069AbiD2Sz0 (ORCPT ); Fri, 29 Apr 2022 14:55:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380078AbiD2SzZ (ORCPT ); Fri, 29 Apr 2022 14:55:25 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD961CEE33 for ; Fri, 29 Apr 2022 11:52:04 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id h29so8336053lfj.2 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=cji89CGEx/F2XgThn8D+n2SAlIWIi+/3ypQQYqW5lcpt+lO6r5enNQnKwn8KyZK1V/ fA5U5JOOW1bkxrZ2TJiG+rEB+gNnLIVhxmGeeUDRqtjzzQDAsy74Jxt8u0tJbyp0S4x2 XN9G1XQ4ImtGTspSZ6fgjRQReTdVzbBo2XHKDOh/OQiM1fldRYavL36tlO2/mBs6jcC7 r9aJMStzZcGKftfdCrb+nFSKQdkcO8/zhcZRGn0Fb5Zdq6mugOh1CIrIuC/yuvygXtmS AIofEzSwEcsip2TK3VnLTC7mMYkI7S8evjOWbG/j32ZuLbn7MhjC/z7sT2VASN9HH0SM /ZoQ== X-Gm-Message-State: AOAM530RKFtAQSWVJYa5sa1oHwjIdau6FW/AC31EspTLAd6GKs+rDXsH lCQroB/TkTG3Deuaf7DMMV1p9A== 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.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, }; /* -----------------------------------------------------------------------------