From patchwork Fri Apr 29 18:51:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 567558 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 7FD7BC433EF for ; Fri, 29 Apr 2022 18:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356733AbiD2SzW (ORCPT ); Fri, 29 Apr 2022 14:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378934AbiD2SzV (ORCPT ); Fri, 29 Apr 2022 14:55:21 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75790CC50F for ; Fri, 29 Apr 2022 11:52:02 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id k12so15573116lfr.9 for ; Fri, 29 Apr 2022 11:52:02 -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=egoM2XNXIqCFT4+22sOj5Td+05iys3AKcQL89KtNa7Y=; b=skwtRUUkWT/EYLdN443is8LXG02fqfEXAigHCT4YqvC/QvQc0HjYZKLkJHNxf1V9QV jP6pCTYXh9TTvGYLBRzsUanMufNk1twjqWHMNyKtXDiKWKGkY3jDz6+OZDGypy/TJTqa +fDQN6wPUEU4PAxtUbg4jb0C1ylEo6KsPEOoKOSOX3paEMpfsT9/guSG9JBnDhYxwHOg ITKXhlGnYZvGD3GdaZM8SB6YHUj+Jka06c4nrqf1R7siWQq1v3NSWNQzHfesx9+JM5P4 6b/48SP2xRRbHdZQNdhRZStKmFm2v/lCdUnFSehFsx11G2lAbChaAo5GrJj78ulN/Lxu eQfQ== 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=egoM2XNXIqCFT4+22sOj5Td+05iys3AKcQL89KtNa7Y=; b=BlmHttdGHaxPMmWwis02XPMVmOd1RczsFBuU6GcsMoS1y2vlZPI78fUJ7Iym+lgtBz 2WhAbDTx/fMI98yAnC2f5XPIABsMp4AtdG9mu0fB9OECBFP30EfWRX3wo4qyrWLm3EzF iVO1Y3sDy5g8Jal/FKRDrBXwkmUa208Rdnf0xYKy2wZ9as+k6mVjNlRJ8MNmEasMpf4k QSvNbaVaghd/gAyLWKEx39gckFU6UDkkXNCmSow+7aUkrm9LEs5izPc435QGb7w28nac I+DVRAkFHkkZ6qohIJwVhzhbS4pWAZ8t9fqnjTwFqQxpDyZlBe4WRsPAZM2gLuVJDuLU jZXQ== X-Gm-Message-State: AOAM531C16O5ILTb16zM6K6f0jtoLgY48PmhPkoYTcj6MyBDGzX7xDp9 U4aMpEEYXf1Q84Ihoij1jdQ4kQ== X-Google-Smtp-Source: ABdhPJyjCsbQEtPyBhi3kbQoUQtQQ4PYG8E9Jw9FZt0MDn+fGgl5lwgg1u2usJx/LpkmGJqDdvO7ag== X-Received: by 2002:a05:6512:3290:b0:472:b9c:751 with SMTP id p16-20020a056512329000b004720b9c0751mr394067lfe.591.1651258320849; Fri, 29 Apr 2022 11:52:00 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52:00 -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 1/7] drm/poll-helper: merge drm_kms_helper_poll_disable() and _fini() Date: Fri, 29 Apr 2022 21:51:51 +0300 Message-Id: <20220429185157.3673633-2-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 Merge drm_kms_helper_poll_disable() and drm_kms_helper_poll_fini() code into a common helper function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_probe_helper.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 682359512996..204f6999113f 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -754,6 +754,17 @@ bool drm_kms_helper_is_poll_worker(void) } EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); +static void drm_kms_helper_poll_disable_fini(struct drm_device *dev, bool fini) +{ + if (!dev->mode_config.poll_enabled) + return; + + if (fini) + dev->mode_config.poll_enabled = false; + + cancel_delayed_work_sync(&dev->mode_config.output_poll_work); +} + /** * drm_kms_helper_poll_disable - disable output polling * @dev: drm_device @@ -770,9 +781,7 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); */ void drm_kms_helper_poll_disable(struct drm_device *dev) { - if (!dev->mode_config.poll_enabled) - return; - cancel_delayed_work_sync(&dev->mode_config.output_poll_work); + drm_kms_helper_poll_disable_fini(dev, false); } EXPORT_SYMBOL(drm_kms_helper_poll_disable); @@ -810,11 +819,7 @@ EXPORT_SYMBOL(drm_kms_helper_poll_init); */ void drm_kms_helper_poll_fini(struct drm_device *dev) { - if (!dev->mode_config.poll_enabled) - return; - - dev->mode_config.poll_enabled = false; - cancel_delayed_work_sync(&dev->mode_config.output_poll_work); + drm_kms_helper_poll_disable_fini(dev, true); } EXPORT_SYMBOL(drm_kms_helper_poll_fini); From patchwork Fri Apr 29 18:51:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 568228 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 207D2C433F5 for ; Fri, 29 Apr 2022 18:52:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378934AbiD2Sz0 (ORCPT ); Fri, 29 Apr 2022 14:55:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380077AbiD2SzZ (ORCPT ); Fri, 29 Apr 2022 14:55:25 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4A31CC50F for ; Fri, 29 Apr 2022 11:52:03 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id k12so15573195lfr.9 for ; Fri, 29 Apr 2022 11:52:03 -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=mNmsSu5EFMsnDMxNTzSovNKF0T/u6pITv3O7/Fgf9Jc=; b=McZLPyglK/9tU+mYeWuO/1tmJahwwBbj4r7sgq0WslepjKDaME/CtmzyGsyk/VBQNu NaLRMyuLPEsgsYFDvZJ3N8sm1P99XtaZgTGrTECvw4GLONdP13VhuY6RRhH3ahExtPho PnHgPwe3N6BvUL5LV4le75QjdS0lbr0Ua+9uHg0koB0pLNOPJleIXBDx5G57ncei+eF8 F7zDQMb7Imr9GBi19tFIM6D3LSKFp1lk1PS1Yy1oYl3Sde6d/HQeaDodZ8NEfYVPY1VQ tZHjvz4JnoFMUPlYB4uBZR0fcEV6Gmrh3mNPd4DfmZhqAMr1DWwsjULDLGoF5WXvnCOQ HXgA== 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=mNmsSu5EFMsnDMxNTzSovNKF0T/u6pITv3O7/Fgf9Jc=; b=1PQxMVZBa4GdtPH+veEsmlPe7hqOhFqI6NPlFqszoY140x+U0jqpKVMknymSOO+Sw1 X0RQH6ozAdvK/HkclYSPrB4+qsLYgh31EZCJLVfgofax6Ue0ZAnco9P5MtbF/yRt3zF3 3c6XY/BWkCzWpSS7Ke83+TZRe9m7A9Q1Z1q2IcTpmvGZn9dfUsUHgmgu8iNBfhOYLMBT KYMXTG1y2Lo0PiStwoqrwr4E5WAnkiOBCc1AyDWYbfXedEtQ9W4B3SV4MIgMBAVKcaUe hpymhv6bcPit7BV3wkF8cCkxQx68l6BJFnuD312xUfxySLqyWArV+JNn1B0wdCfRICUY ezjw== X-Gm-Message-State: AOAM531KVi0drK5eoOs2c2rkNsU0vWE8rZrXh1rInTe7OduYHmezVQh9 gLUiSDOi53y5K20gR/2zijl9dg== X-Google-Smtp-Source: ABdhPJytbJr6ns9XOXOBR4HEVk85eizRt7BmJyw1M+DX9Ve/Bpz0VhLYSogBpCzoLFACGwmxzaJ6vg== X-Received: by 2002:a05:6512:3c86:b0:472:1ea6:52bb with SMTP id h6-20020a0565123c8600b004721ea652bbmr440553lfv.334.1651258321866; Fri, 29 Apr 2022 11:52:01 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52:01 -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 2/7] drm/probe-helper: enable and disable HPD on connectors Date: Fri, 29 Apr 2022 21:51:52 +0300 Message-Id: <20220429185157.3673633-3-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 Intruct two drm_connector_helper_funcs: enable_hpd() and disable_hpd(). They are called by drm_kms_helper_poll_enable() and drm_kms_helper_poll_disable() (and thus drm_kms_helper_poll_init() and drm_kms_helper_poll_fini()) respectively. This allows drivers to rely on drm_kms_helper_poll for enabling and disabling HPD detection rather than doing that manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_probe_helper.c | 19 +++++++++++++++++++ include/drm/drm_modeset_helper_vtables.h | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 204f6999113f..7fef16cd80ff 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -251,6 +251,12 @@ void drm_kms_helper_poll_enable(struct drm_device *dev) drm_connector_list_iter_begin(dev, &conn_iter); drm_for_each_connector_iter(connector, &conn_iter) { + const struct drm_connector_helper_funcs *funcs = + connector->helper_private; + + if (funcs && funcs->enable_hpd) + funcs->enable_hpd(connector); + if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT)) poll = true; @@ -756,12 +762,25 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); static void drm_kms_helper_poll_disable_fini(struct drm_device *dev, bool fini) { + struct drm_connector *connector; + struct drm_connector_list_iter conn_iter; + if (!dev->mode_config.poll_enabled) return; if (fini) dev->mode_config.poll_enabled = false; + drm_connector_list_iter_begin(dev, &conn_iter); + drm_for_each_connector_iter(connector, &conn_iter) { + const struct drm_connector_helper_funcs *funcs = + connector->helper_private; + + if (funcs && funcs->disable_hpd) + funcs->disable_hpd(connector); + } + drm_connector_list_iter_end(&conn_iter); + cancel_delayed_work_sync(&dev->mode_config.output_poll_work); } diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index fdfa9f37ce05..7fa67017d303 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -1143,6 +1143,28 @@ struct drm_connector_helper_funcs { */ void (*cleanup_writeback_job)(struct drm_writeback_connector *connector, struct drm_writeback_job *job); + + /** + * @enable_hpd: + * + * Enable hot-plug detection for the connector. + * + * This operation is optional. + * + * This callback is used by the drm_kms_helper_poll_enable() helpers. + */ + void (*enable_hpd)(struct drm_connector *connector); + + /** + * @disable_hpd: + * + * Disable hot-plug detection for the connector. + * + * This operation is optional. + * + * This callback is used by the drm_kms_helper_poll_disable() helpers. + */ + void (*disable_hpd)(struct drm_connector *connector); }; /** 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, }; /* ----------------------------------------------------------------------------- From patchwork Fri Apr 29 18:51:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 567557 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 010AEC43217 for ; Fri, 29 Apr 2022 18:52:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380078AbiD2Sz1 (ORCPT ); Fri, 29 Apr 2022 14:55:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380082AbiD2SzZ (ORCPT ); Fri, 29 Apr 2022 14:55:25 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CED3CCE4B1 for ; Fri, 29 Apr 2022 11:52:05 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id g16so6054111lja.3 for ; Fri, 29 Apr 2022 11:52:05 -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=AyU7BonIGwyxpeC2bOo+UtiaB+LwIrj5CM8fTIllsQE=; b=P92cNaj0ZHc/r99hsBpAnOLZGkmzH1bBE9tBUT1eqad0V6Fma0kGCy/grop1zEbclq WYpxnm+PON4K2dLSohp8oXPqt4qJuAbccZrNj19cNjvyhzLHshfECAZjbCdzYNOCpZdL rz1ZktAIHbvYOtTHuR7Hp2VkGVWnEjzVQL7LJBL/NwDLFkHArFChkCWTFC01UlBpEKt0 27Xfh0xECWPOU/TwlI7ghByATy3l5HvYvdl+45uNfFZUftr4xkXKUK3OC2Xwqq6tH1rf d/LbG6Q1ISIfO69URuzNhPM2PUAgekJLwr8+ZLzzgqVm2V5VJwA6cirRR4YCFs87d+c3 0Lgg== 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=AyU7BonIGwyxpeC2bOo+UtiaB+LwIrj5CM8fTIllsQE=; b=6bnmBKxYFV1BTLy6/ZKsLVnqIG3+h7+qtbhQaEODnhhet7zHy30Ba6wq5gQ00qBDLf ZQZBkJWY6SUYqRjjxaBXOs8xUVqAYg53z09YsMO88rErs0FW1vpylygS0YzpEI1Db2Y0 uMYB+OwOyGBboFDuZNQB+fDcs0znkiAH3H4z7i8fJqbCVkd27D6pLLGrOqiLf7we1tuQ A8i6d2MHnkljzadVIabiX2tpVgkZeOH8dQvdfxq75Ou+EgVkEzWDwoL/dznyd74rbdhe mM1qq6zCR3UX73wN4O9qjl1d7G97BPQ79hJt6Rm9KDbtg4ZSkSjaLepAaKU8oPgYFGqE KnNQ== X-Gm-Message-State: AOAM532wem1ICKyazHwV3w++4yvQxtx3hNiKSyzOXlDpRVnr3yI6qpsZ 0eIqTbNxsEn1cFDenlEW9DDoJQ== X-Google-Smtp-Source: ABdhPJyZHl0WHe7eWa5m4Kb1bDgSwHmoXE/Zb1qZAcNGCEnxYagQPlTox6AC3dQdDtaeyeq6dSzjGQ== X-Received: by 2002:a2e:8917:0:b0:24f:3bb6:b399 with SMTP id d23-20020a2e8917000000b0024f3bb6b399mr382679lji.246.1651258324208; Fri, 29 Apr 2022 11:52:04 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52:03 -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 4/7] drm/imx/dcss: stop using drm_bridge_connector_en/disable_hpd() Date: Fri, 29 Apr 2022 21:51:54 +0300 Message-Id: <20220429185157.3673633-5-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 The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/dcss/dcss-dev.c | 4 ---- drivers/gpu/drm/imx/dcss/dcss-kms.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c index c849533ca83e..62c5f7cd5906 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-dev.c +++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c @@ -254,8 +254,6 @@ int dcss_dev_suspend(struct device *dev) struct dcss_kms_dev *kms = container_of(ddev, struct dcss_kms_dev, base); int ret; - drm_bridge_connector_disable_hpd(kms->connector); - drm_mode_config_helper_suspend(ddev); if (pm_runtime_suspended(dev)) @@ -289,8 +287,6 @@ int dcss_dev_resume(struct device *dev) drm_mode_config_helper_resume(ddev); - drm_bridge_connector_enable_hpd(kms->connector); - return 0; } #endif /* CONFIG_PM_SLEEP */ diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index 9b84df34a6a1..614073eb70b0 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.c +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c @@ -142,8 +142,6 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss) drm_kms_helper_poll_init(drm); - drm_bridge_connector_enable_hpd(kms->connector); - ret = drm_dev_register(drm, 0); if (ret) goto cleanup_crtc; @@ -153,7 +151,6 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss) return kms; cleanup_crtc: - drm_bridge_connector_disable_hpd(kms->connector); drm_kms_helper_poll_fini(drm); dcss_crtc_deinit(crtc, drm); @@ -169,7 +166,6 @@ void dcss_kms_detach(struct dcss_kms_dev *kms) struct drm_device *drm = &kms->base; drm_dev_unregister(drm); - drm_bridge_connector_disable_hpd(kms->connector); drm_kms_helper_poll_fini(drm); drm_atomic_helper_shutdown(drm); drm_crtc_vblank_off(&kms->crtc.base); From patchwork Fri Apr 29 18:51:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 567556 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 49E15C433F5 for ; Fri, 29 Apr 2022 18:52:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380084AbiD2Sz2 (ORCPT ); Fri, 29 Apr 2022 14:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380057AbiD2Sz0 (ORCPT ); Fri, 29 Apr 2022 14:55:26 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B570FCFBB3 for ; Fri, 29 Apr 2022 11:52:06 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id bu29so15669021lfb.0 for ; Fri, 29 Apr 2022 11:52:06 -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=hjSZhFhF/WBNlx59PX4NcX4slNS4MZfzeRNT5ytZejs=; b=k7YLfZxbvtM5355pTD0NC0W3r4ppNFyePl/eewijAPJmmPuRZOuf01TBxYpR4jnWx3 o2I7fMHX55U5QFrUI5pAtWxayXrJwzIq0eM5rj8COJ3eN4ijcxrW90QD33kJpDS48V7a K2R7RBXdGjG281Y6ScUOryRfql9Z86/0OISsB8lxF44gU10f3CapzB+FRCIcODZE/tg0 4uve+Q+kV5xReWjP+2miP9fTdYh0/Wwcf/or5NFbfZqo8OJumuXlYlXbCegGluZkwaAj +IchpppaHq9FhQ8LuTy6T80SMqJNME9hcJVTl6r9F4W72EuFdPPGCdPpXqHCR2/LOC26 YY7Q== 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=hjSZhFhF/WBNlx59PX4NcX4slNS4MZfzeRNT5ytZejs=; b=pm3Cf7gV2kWsXJ/QvdhBfY92XkiSDZwhfvyMgoV8xG+KTxwtImIVNQ6dl7h7nYZYIt ow7VvVl/omtaZIvPCGLYniEX+AwteZeP7zkktNZiw6ShOdPhb+Q1CpTYdvwGKqdAVo+d LYcqQYpeQIX+tUZz/9q5S8DNnA6QyA6BNdYvgb+Clc3i6G9K1Wsw9kiy/PAz2IxcGRBy 16yhimy/ZNuH3Dassc9dNfSfQ0egSunsmR4FiaR66W59vzyb+ZUbeHJrd7kUIttgUr7V 940SekaxMzx0G/0Yrp1d4kwf3ZSsX2ImF4jbJaunjkUGJDSl5Hky9/yoNRpoWw/vUcIL 10nw== X-Gm-Message-State: AOAM5310k5ngV87n6aFuUvmKIGIOkSABZb7rFI4NE15JXUHHHwwz7fZp HC8bGXFHZ8SxKMiHMTKdRf49Ag== X-Google-Smtp-Source: ABdhPJzzf2Gqpio3FiOmbjIAFCoKFglhxH/wJqpGfDRxpm4zP2G1J1gbWPGUhYrluI3eZC4OE/CZ4A== X-Received: by 2002:a05:6512:3b2a:b0:472:2c74:2b48 with SMTP id f42-20020a0565123b2a00b004722c742b48mr420328lfv.277.1651258325147; Fri, 29 Apr 2022 11:52:05 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52:04 -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 5/7] drm/msm/hdmi: stop using drm_bridge_connector_en/disable_hpd() Date: Fri, 29 Apr 2022 21:51:55 +0300 Message-Id: <20220429185157.3673633-6-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 The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index cf24e68864ba..da889175dd86 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -317,8 +317,6 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, goto fail; } - drm_bridge_connector_enable_hpd(hdmi->connector); - ret = msm_hdmi_hpd_enable(hdmi->bridge); if (ret < 0) { DRM_DEV_ERROR(&hdmi->pdev->dev, "failed to enable HPD: %d\n", ret); From patchwork Fri Apr 29 18:51:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 568226 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 1477BC433EF for ; Fri, 29 Apr 2022 18:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380057AbiD2Sz2 (ORCPT ); Fri, 29 Apr 2022 14:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380077AbiD2Sz1 (ORCPT ); Fri, 29 Apr 2022 14:55:27 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BB7ACFBBB for ; Fri, 29 Apr 2022 11:52:07 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id bq30so15616769lfb.3 for ; Fri, 29 Apr 2022 11:52:07 -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=lqeu0gWL+fbuCou+DZo8aED2KhTyfiRcmIANTVXwORA=; b=F3fxtRfDEpSVXHZlP/WwK/IVfVqcq/oG9b9SN8h1W8LtnEJd3SM2+7KX3sB4vO1dUx fQEA2lTPMWME+JsnR0jbrqc/ctTE7cn8U71pSe7k9OyXsgA3OSD5Ae1vrfquhu6eBrES OqI6ACqg2WYTibjed7me1Cxpa+yWlA+E+7V+giepGgw/ynsOm1O3i2Y8ifWhwmukGNcz NYmNDlEmtQAoTJmZ2OqeP+H/EGgEPzkn+Ruum//XDh6H1PfwZsLtq2WJQYPf/XgoHdJ7 9Ed83Eic/hdHtb+ThZ2xuF+jUFKtlSEfOXCJVE341ecOpcRjjDTt6eTzWryIjmSFNZAY jgWw== 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=lqeu0gWL+fbuCou+DZo8aED2KhTyfiRcmIANTVXwORA=; b=zZaQQkTIZLhiePgEMMENLG+fFjcIRIL2MUZzYJzkdgikEBTerOahMKnQYCVUg7c5iA xu9xNaH7orZ804wH12SuwTiW99eUALEJxlaxUzkOoB8pSdtY6T7y5oJ3Rbf5WQxSZt1S LtRAnRXuKfFRL4sN44lALAC/n0UqEcOGzKB6q9alkW7GdI0mbthaZN85tpvKbcxfEmF+ Mt+2y8AMKwMeeHF0k+nRHSYfJcdV72AxZZx6lnqq0gM4/dtLC8l8blYPz18TvplL1Mkm 4ub3aoWRWt5s5Lv3ARcK9Pc1s0DP8hWpSxRNRIFdp6oZIqb+LFToJKqrqeivIPaqKYVJ vIGA== X-Gm-Message-State: AOAM530dkwrtIhQE3IeVQ7DbpP5xfw+lTPgKLMVyyWL/1Fm5nmFszyu1 OTHrCWSYWzUdLUTgW8/da/AIAQ== X-Google-Smtp-Source: ABdhPJypKbEZWtx1y5Anvfkf2zXysSjtu5YU/Qrc3Zglyg4silcqJGbTm6SvkihY4hifXkIzm6xk+g== X-Received: by 2002:a05:6512:39c1:b0:471:b37e:fe5a with SMTP id k1-20020a05651239c100b00471b37efe5amr388736lfu.527.1651258325946; Fri, 29 Apr 2022 11:52:05 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52: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 v1 6/7] drm/omap: stop using drm_bridge_connector_en/disable_hpd() Date: Fri, 29 Apr 2022 21:51:56 +0300 Message-Id: <20220429185157.3673633-7-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 The functionality of drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() is provided automatically by the drm_kms_poll helpers. Stop calling these functions manually. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/omapdrm/omap_drv.c | 41 ------------------------------ 1 file changed, 41 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index eaf67b9e5f12..699ed814e021 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -545,44 +545,6 @@ static void omap_modeset_fini(struct drm_device *ddev) drm_mode_config_cleanup(ddev); } -/* - * Enable the HPD in external components if supported - */ -static void omap_modeset_enable_external_hpd(struct drm_device *ddev) -{ - struct omap_drm_private *priv = ddev->dev_private; - unsigned int i; - - for (i = 0; i < priv->num_pipes; i++) { - struct drm_connector *connector = priv->pipes[i].connector; - - if (!connector) - continue; - - if (priv->pipes[i].output->bridge) - drm_bridge_connector_enable_hpd(connector); - } -} - -/* - * Disable the HPD in external components if supported - */ -static void omap_modeset_disable_external_hpd(struct drm_device *ddev) -{ - struct omap_drm_private *priv = ddev->dev_private; - unsigned int i; - - for (i = 0; i < priv->num_pipes; i++) { - struct drm_connector *connector = priv->pipes[i].connector; - - if (!connector) - continue; - - if (priv->pipes[i].output->bridge) - drm_bridge_connector_disable_hpd(connector); - } -} - /* * drm ioctl funcs */ @@ -782,7 +744,6 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) omap_fbdev_init(ddev); drm_kms_helper_poll_init(ddev); - omap_modeset_enable_external_hpd(ddev); /* * Register the DRM device with the core and the connectors with @@ -795,7 +756,6 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) return 0; err_cleanup_helpers: - omap_modeset_disable_external_hpd(ddev); drm_kms_helper_poll_fini(ddev); omap_fbdev_fini(ddev); @@ -822,7 +782,6 @@ static void omapdrm_cleanup(struct omap_drm_private *priv) drm_dev_unregister(ddev); - omap_modeset_disable_external_hpd(ddev); drm_kms_helper_poll_fini(ddev); omap_fbdev_fini(ddev); From patchwork Fri Apr 29 18:51:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 567555 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 949D6C43219 for ; Fri, 29 Apr 2022 18:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380077AbiD2Sz3 (ORCPT ); Fri, 29 Apr 2022 14:55:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380082AbiD2Sz1 (ORCPT ); Fri, 29 Apr 2022 14:55:27 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57CA7CC50F for ; Fri, 29 Apr 2022 11:52:08 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id x33so15641540lfu.1 for ; Fri, 29 Apr 2022 11:52:08 -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=UcCYVcTme16+uWpUP90xtTFpl/uKSWYcTwwPaiNEnH4=; b=qM8Xa/+knMRPfLTwlN+fR5Ci35dl6BlRHNoNMYX0hVxDfbUjon+grBnYTYSLc3wpKT x4zV6cHCKHtbc51lv2Ah2HUBs9k2H86hvUof04MJ+L1RWBgmtKiX1u9XICgIb4T3AWaJ m4FUPRzbY7leMHH75zT6l4BjTs5XX2FRI5CUANIwhQ7zdCt+NFhKOGFTpqUu6dfyHv6E E4XiPnOg22O0wCoqh1noIhgC01FYKxIVgoGqmFMWCxjXFP/2gHCiaRjXcYzL5MMYMF4x ymA6+KoQHsW5hk1e2FGsMk1QRstd2BiHSgXf9rG9TiNHEwN6aK1f8PzkltynBJS2R4sG ms2Q== 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=UcCYVcTme16+uWpUP90xtTFpl/uKSWYcTwwPaiNEnH4=; b=CWYClWhuRVE3jAst2+/fWGXCDOMP3OOfTnB/WZTVosbbLdQbiSJjjj0ipPnbkCJ/zi AokhDxlzww/e5q883XA8ilHrloIh+D4ClSdXw0W7niBw14ibhi6tRmvH2smoDEj8p8xr qt3zwFYBtEmSC/nnjCFP7mBT4/NPhLDGvablr+nNZc2y3cU7RtQz6GeEse/yombHZaAq RhglIwk981fnsbyorRO506U+8bRbEgCaltkFgg4G8nYX4n39X3VGk+WBbt+jDShXJgVi wNgadzvbvqsT1wPyBHeqyay0f1S4Ow6UYtUlntpc2Q1SZCnGpyfTKSi4yJaGaF7VV2zP 0vOw== X-Gm-Message-State: AOAM532oDz6Vo3qnuntwLWLLb0x7ufgZyaWWtxrCc2SRVN7+jjIzhI/j X6tXfj/MlCJWh64kOOeK9igMHP6Pt32fjA== X-Google-Smtp-Source: ABdhPJxDM1J9ZFOYujHwlnlADYTDFV6bTMCQTzicA80l40xvHlgv3/pXMH1AjfPq7g134d5qn59tqw== X-Received: by 2002:ac2:52b4:0:b0:445:ba75:7513 with SMTP id r20-20020ac252b4000000b00445ba757513mr442866lfm.248.1651258326717; Fri, 29 Apr 2022 11:52:06 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 11:52:06 -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 7/7] drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd() Date: Fri, 29 Apr 2022 21:51:57 +0300 Message-Id: <20220429185157.3673633-8-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 Now as all drivers stopped calling drm_bridge_connector_enable_hpd() and drm_bridge_connector_disable_hpd() it is safe to remove them complelely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_bridge_connector.c | 25 ------------------------- include/drm/drm_bridge_connector.h | 2 -- 2 files changed, 27 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index 1592da3b9403..d9c1f61b6fb6 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -128,18 +128,6 @@ static void drm_bridge_connector_hpd_cb(void *cb_data, drm_kms_helper_hotplug_event(dev); } -/** - * drm_bridge_connector_enable_hpd - Enable hot-plug detection for the connector - * @connector: The DRM bridge connector - * - * This function enables hot-plug detection for the given bridge connector. - * 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 = @@ -151,19 +139,6 @@ static void _drm_bridge_connector_enable_hpd(struct drm_connector *connector) bridge_connector); } -/** - * drm_bridge_connector_disable_hpd - Disable hot-plug detection for the - * connector - * @connector: The DRM bridge connector - * - * This function disables hot-plug detection for the given bridge connector. - * 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 = diff --git a/include/drm/drm_bridge_connector.h b/include/drm/drm_bridge_connector.h index 33f6c3bbdb4a..69630815fb09 100644 --- a/include/drm/drm_bridge_connector.h +++ b/include/drm/drm_bridge_connector.h @@ -10,8 +10,6 @@ struct drm_connector; struct drm_device; struct drm_encoder; -void drm_bridge_connector_enable_hpd(struct drm_connector *connector); -void drm_bridge_connector_disable_hpd(struct drm_connector *connector); struct drm_connector *drm_bridge_connector_init(struct drm_device *drm, struct drm_encoder *encoder);