From patchwork Sun Sep 3 21:29:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 719956 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 9CF69C83F2D for ; Sun, 3 Sep 2023 21:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348737AbjICV3r (ORCPT ); Sun, 3 Sep 2023 17:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348660AbjICV3q (ORCPT ); Sun, 3 Sep 2023 17:29:46 -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 579E8110 for ; Sun, 3 Sep 2023 14:29:42 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-500c37d479aso1277728e87.2 for ; Sun, 03 Sep 2023 14:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693776580; x=1694381380; darn=vger.kernel.org; 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=LTYtN9ceXzi2tGhWn5q5e7ybJcm3lf5yDMeSzJkSqgc=; b=oN1qyjNhPGdRsawgrQHtWWYdDlemWn3CPoDeosfFzdg7YHrqq/uvBrE+jWZfgJE6oo hEdkIKhFNGS4BJ6PfGTMvmoGuJrl+5BwvzyCh/Q/TMesGiebj+fFQBVo1QsUlunVgOK1 6ccNUSappj4mFhHj2YkWa4b1vTgCiyQhWZf27lal6wmkD6O8hB4T2joz98ghBkvaf/cA e8IfMi54Tdl3ab7S5CSzF+/8+PcKuoFSiF+m1ttHOtJSY2Wk6+PYGm4kJu/LllqtM1Z/ pdM5wa2w7Z7LRvz+BftSbj7bmqY1TuhIMqPo8T4uLn/pce7/rPR1vEg5nHVDHAdLG97v rl+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693776580; x=1694381380; 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=LTYtN9ceXzi2tGhWn5q5e7ybJcm3lf5yDMeSzJkSqgc=; b=P68oM/kNU+AoAYOGskJbbTtFSEyp3zAh6vEpTb6ndJ2scaeRR2fEsJK2Dwu7GY2asb CJku52jXHsFrBSLIGbuNuDl4Bk4msymaPG1RGP+u2Kj7HvV5ynM6EERdYw1QaM1EEtY/ YOMzfnobZ1zYhk1vexDKfiQHR3q9gqSAfTfd5tp2YMyWW7Mi9k3uSqPZcq+5PwhBUK1z x5WLfkW+Xd0hHc7b7cNV/z1DVPZKi+FnmWMDEXP7loYhSSPtVG6GOwZUg3S/Wj07J2p6 lb6Xc2bSrohUVFe1awsoETtOk6zXRPPyUZNQcJC5XqOCAlJdGS7Cog6ZUDqpXw4zQK+b zxaA== X-Gm-Message-State: AOJu0Yzxyv/QVm4fZjUlGjWuaSv4zvQTtUxU6JWSpZ48gls18rsrDUpS F/3TTsMOgtckB+6JoaZ+aS94nQ== X-Google-Smtp-Source: AGHT+IHhuu1XpaE+PO25+uVWIsSs6HgoMj+d3EKB5ectySV1k+e2KdlfTqc8aDVm4kOQSBo9dpyfxQ== X-Received: by 2002:ac2:58ca:0:b0:4f4:d071:be48 with SMTP id u10-20020ac258ca000000b004f4d071be48mr4760118lfo.14.1693776580258; Sun, 03 Sep 2023 14:29:40 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id eq11-20020a056512488b00b004ff8d9ed368sm1412352lfb.258.2023.09.03.14.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Sep 2023 14:29:39 -0700 (PDT) From: Dmitry Baryshkov To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Andy Gross , Bjorn Andersson , Konrad Dybcio , Heikki Krogerus , Greg Kroah-Hartman Cc: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Simon Ser , Janne Grunau , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH v7 2/3] drm/bridge_connector: stop filtering events in drm_bridge_connector_hpd_cb() Date: Mon, 4 Sep 2023 00:29:36 +0300 Message-Id: <20230903212937.2876815-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230903212937.2876815-1-dmitry.baryshkov@linaro.org> References: <20230903212937.2876815-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@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. Reviewed-By: Janne Grunau Signed-off-by: Dmitry Baryshkov --- 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 1da93d5a1f61..10b52224db37 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_connector_hotplug_event(connector);