Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp443726lqp; Tue, 11 Jun 2024 08:52:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQ1vRMGlB+VwjZE8dCDvjZWmpl7YCQLqZI4WUCDf5TgyGQBX7qtdm+r/DysHqLwWqiJijYY92Gj1viRm7JMmqci6GdB06cS0pRITVZZA== X-Google-Smtp-Source: AGHT+IFmlK3xemuQlfz/JVeRf9dQ5oPTwuH8F2iFPvzQ+bfPI8DYonJiEuOgbjdY9QoqhNU+N8sC X-Received: by 2002:a05:6a21:8cc7:b0:1b6:1a81:5dad with SMTP id adf61e73a8af0-1b61a816214mr9264143637.14.1718121136314; Tue, 11 Jun 2024 08:52:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718121136; cv=pass; d=google.com; s=arc-20160816; b=xVTuE3TNwFitEztJzNlnbt0vaGNdq5QrxoK9qwBDbgYjmFC1deI6Y8cuZ7Y9W8vs79 Q8T3QNuGtsbmwzTXlSp5eSFMO+aChRzIF9Kbp7iCbmGz4RfVAzgpVm5RazLXrD7pRlLt 171i0zoCSCn9tqHBhD4SxUsVxVTUrWKKtot/4790wGRvEWsAr4twXyqZlVI1Ykokte9n c0/EbjwL/V7S/6X4NK+Nd8XshjqTdyJZPIyTcO+9j9AF9LOvz/NdCFR8EAu6jF/CpWzs isodAl3Kxn6gdhqsrEQPmhz8ay0kNOhOqmBpqri+KEhXOVObXkbKRo+twY8oc2D9lqgR cvZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=REtok9etTT8YZD85IuWhOTviPIDsMbrkB4bJID+iBnA=; fh=RlYB0Y2md8rdYnrKVoTlrEmdiF5i9yjfnLS+nw4nIUU=; b=fes3lDJwpkcT1q0iaJgUOITJfJ2de/q/zJiHLZuSljdVz4pgcILMxUo8aTTexREsSp A5HUsioxodLX1X7l0YoCAaasOl0V8kONp4F69yltVYy/Z/seHKVjLAwalrvDOWIKoV3f 1ChEMEWYzrPp6DYrAolO+sajKjWMHLvISfegS5No8mutI6E7ZthEmmZRarPVYMNkjixN N1L4a2cgB3ZJO0EZ6C53jfWZcwR5aiQ186tMGaS9ZRK/b/NvZqPSo5P/UzrSlmgCUbFl CV6CUCjjDwcTWo6Af13raqTXhehP+8DiZarDPk0vE4SFQZG2Jq2rfsd9qdMBAluVoPOB 0Z1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=kcXTApXE; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-210181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-705aa15b4e7si1686618b3a.227.2024.06.11.08.52.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:52:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=kcXTApXE; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-210181-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3E20D281B8D for ; Tue, 11 Jun 2024 15:52:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F7B23B791; Tue, 11 Jun 2024 15:51:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="kcXTApXE" Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3917138FA0 for ; Tue, 11 Jun 2024 15:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.215.223 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718121109; cv=none; b=NcSHvArZH4iTOwtGjJPHdD5j/5dDi0qg+lh/Osk/TR3Ly4ABcM1o/ZD1HrjOmTlut60U79l7zM85bKd8TaePY5dZQs59qZTq6Ohm1w/ghpY947MH226YYoao8wcY+Oona2EnRfZbY6u+n+MLJzHi+bRheDDgZn08J0hGRVs45pc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718121109; c=relaxed/simple; bh=jZZk1d29gTigZH+Kv6p1bJAOLKF6qCjFWdy4VvZ7L/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W03R6caql/d0Sx48EFO8FxxPbWtSBMHKi04eTtytXSoTM4nw3opNsQgiFsteEPwvaiP4bsp4ZIicaHj2ZUhEL4AWWF+hnZ9dUrowLFF+aUVybGfYhMYhJz7UTwoQW3VECUdNygsD6VnxlyqFeGxi0ZShmCssGq4FAR0cUVcDyro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=kcXTApXE; arc=none smtp.client-ip=149.28.215.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be; t=1718121102; bh=REtok9etTT8YZD85IuWhOTviPIDsMbrkB4bJID+iBnA=; b=kcXTApXEFKaVqyQsLlfLwW/a5cltLGEKD5i1GImhfy2kyAsFBPUbuC6GJj5sRGLKRhGveev13 287x76GPsufzLP812jdif2NrlX8uEovQ1c3WVGtPhwjrLC8ZCz+stdsGdH4YS7MCAhmeooNfODx ia8MncqSvNzmPcyichyfOk/KjDVamfZZowZbtGarSqHzRFcLO8Pjm3bo2EalMRtQiUoIrOQQv0+ Nxhu0TpY4PSwbNBRWYCCesC5TOnevX1SkbCmYYMES2GZZgRfLjF8KtQ4o4CH1ngGlsc8hME7Hnb E8Bbp57kMDpkaaaBqqH60WnY5+PUE28w5hHMPQtKzLqA== From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] drm: bridge: dw_hdmi: Invalidate CEC phys addr from connector detect Date: Tue, 11 Jun 2024 15:50:57 +0000 Message-ID: <20240611155108.1436502-6-jonas@kwiboo.se> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240611155108.1436502-1-jonas@kwiboo.se> References: <20240611155108.1436502-1-jonas@kwiboo.se> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-ForwardEmail-ID: 6668728ab913b04293b6dc78 Wait until the connector detect ops is called to invalidate CEC phys addr instead of doing it directly from the irq handler. Signed-off-by: Jonas Karlman --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 9ecf038f551e..0814ca181f04 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2455,7 +2455,17 @@ dw_hdmi_connector_detect(struct drm_connector *connector, bool force) { struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); - return dw_hdmi_detect(hdmi); + enum drm_connector_status status; + + status = dw_hdmi_detect(hdmi); + + if (status == connector_status_disconnected) { + mutex_lock(&hdmi->cec_notifier_mutex); + cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); + mutex_unlock(&hdmi->cec_notifier_mutex); + } + + return status; } static int dw_hdmi_connector_get_modes(struct drm_connector *connector) @@ -3066,12 +3076,6 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id) phy_stat & HDMI_PHY_HPD, phy_stat & HDMI_PHY_RX_SENSE); - if ((phy_stat & (HDMI_PHY_RX_SENSE | HDMI_PHY_HPD)) == 0) { - mutex_lock(&hdmi->cec_notifier_mutex); - cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); - mutex_unlock(&hdmi->cec_notifier_mutex); - } - if (phy_stat & HDMI_PHY_HPD) status = connector_status_connected; -- 2.45.2