From patchwork Sun Jul 9 20:25:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 701169 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 2A6C0C001B0 for ; Sun, 9 Jul 2023 20:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbjGIUZ3 (ORCPT ); Sun, 9 Jul 2023 16:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbjGIUZ2 (ORCPT ); Sun, 9 Jul 2023 16:25:28 -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 ABDFC1BC for ; Sun, 9 Jul 2023 13:25:16 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fb94b1423eso5435985e87.1 for ; Sun, 09 Jul 2023 13:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688934314; x=1691526314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TJYjNiYNzWjxH+XhoyNFMKctuYtv2+kbNIyIzjM3yLU=; b=dNbFYDDOpfu3/30IkacmEnAuX8CK9yjZLUV6BzUnhf+Xu3xuyi4MyekvEQTGbKHNN7 0Bang2RpWbwtVKEvWZLIju6Tbs4cCFXquItHCpo9RYYeO4qGP/DxylkufphyMdzJ+rT2 8RbiGPng+THaC8+Z/pFbQMZPd6V2A2xzq5WINmMpDqvgYzsUtLmNlmARWoGWIyHzPiHn qMg23FI/nIAvgxv+75Hus3tG7p9KUMM1VJd7apsQPsWrVnhvi7AgqFKawLrG4QA9PW5G CjjgpQ8nWqoFdpPrpMr162eHezlo92Df3TqsvIrB27b3wJN/ljJi5+qnyGgU9QxPeWni 0OTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688934314; x=1691526314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TJYjNiYNzWjxH+XhoyNFMKctuYtv2+kbNIyIzjM3yLU=; b=JETlP6WcmaQTIe5r0k0R4oCQBW0IySGxArLmGKG5W2ngRDIu4ANrGlo0qLWqDGs9tE 2w0aWbeh1uWEQ4+uZC5QhMrw4Xkmka6+huD73EmBnVBlkw8xf5h7uEe2F40WLUnt2VHr nIkykdsAAHh42YirdaeIx8RVNrgu7FLODy561O94P0206qeQQrQ8aAbsDe0NTDM0zK57 DBRbsU0w8ujoRa1FeJMebHp6yjpOqIRM5zXNt6dxI09OqTyOCKG0MKEi/7FnF47xFnTI sh9HvT1fXU8LrvcvBd8FlY2Y/6DCPTd9wjE9f+3JFPdpTzI4F4gLZ8dxns6ospblxuiA Tsbw== X-Gm-Message-State: ABy/qLZ2HQwtIV0Hf9Zb8AIrYAihlQ41gIBohLpgSCcnpQ+TJ2Gv5ltP tps/or/l7gaLlqaXETP+JuepQw== X-Google-Smtp-Source: APBJJlEmPdDgTcOcgJy1Svh3J1rW749yo7h2edRtD81ukwCUxhzygq9W5ZfYJtHiWlfYaIFc8OBLdg== X-Received: by 2002:a19:6601:0:b0:4fb:7592:7e03 with SMTP id a1-20020a196601000000b004fb75927e03mr8096173lfc.20.1688934314774; Sun, 09 Jul 2023 13:25:14 -0700 (PDT) Received: from lothlorien.lan (dzdqv0yyyyyyyyyyybm5y-3.rev.dnainternet.fi. [2001:14ba:a0db:1f00::ab2]) by smtp.gmail.com with ESMTPSA id 8-20020ac24828000000b004fb771a5b2dsm1428774lft.1.2023.07.09.13.25.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 13:25:14 -0700 (PDT) From: Dmitry Baryshkov To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Heikki Krogerus , Greg Kroah-Hartman , =?utf-8?b?VmlsbGUgU3lyasOk?= =?utf-8?b?bMOk?= Cc: Rob Clark , Sean Paul , Abhinav Kumar , Bjorn Andersson , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH v6 2/3] drm/bridge_connector: stop filtering events in drm_bridge_connector_hpd_cb() Date: Sun, 9 Jul 2023 23:25:10 +0300 Message-Id: <20230709202511.287794-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230709202511.287794-1-dmitry.baryshkov@linaro.org> References: <20230709202511.287794-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In some cases the bridge drivers would like to receive hotplug events even in the case new status is equal to the old status. In the DP case this is used to deliver "attention" messages to the DP host. Stop filtering the events in the drm_bridge_connector_hpd_cb() and let drivers decide whether they would like to receive the event or not. Signed-off-by: Dmitry Baryshkov Reviewed-By: Janne Grunau --- drivers/gpu/drm/drm_bridge_connector.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index 19ae4a177ac3..84d8d310ef04 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -113,16 +113,11 @@ static void drm_bridge_connector_hpd_cb(void *cb_data, struct drm_bridge_connector *drm_bridge_connector = cb_data; struct drm_connector *connector = &drm_bridge_connector->base; struct drm_device *dev = connector->dev; - enum drm_connector_status old_status; mutex_lock(&dev->mode_config.mutex); - old_status = connector->status; connector->status = status; mutex_unlock(&dev->mode_config.mutex); - if (old_status == status) - return; - drm_bridge_connector_hpd_notify(connector, status); drm_kms_helper_hotplug_event(dev);