From nobody Sat Feb 7 15:26:33 2026 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9E143385A3 for ; Tue, 6 Jan 2026 17:02:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767718949; cv=none; b=gtWoAd/Y1472ZLliwqeeHxNz5/WgMND/Srx3rEnEEkQVnzE/RDhvti7pn/IGJpTOxvSuXNpSOXSm62+XAwVR+V1g59b7tpN+4YnrB6KKHlnCJX51B18heS+HNEn+VfC03Dz8CnHbf6vb6kHoeT7rFndX2/zfKRrYI4xjriaPVRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767718949; c=relaxed/simple; bh=EPY6CKbSqt+H5S8GBFOMhYVfy8sPeNqL7S9hMry67YA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bhntU7D8DlkAJK+QtU9mmKaPAW2lhnpSScFZuR9SlogzBTbhuobEji9nWwmsQ+bT67Rlyd1cdywajMQuzUKJ/jbmDoqIUdiRAuv5fbLa2LioCvLNwmaj3Ex1tk7EVGNpeUAWabTvx80tVhuqbESovuVnMoN61+rqIVAa2mEu/DU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=w7LwEy50; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="w7LwEy50" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1767718946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TqzdzzYSnHYqd7lgLdiNXL8RderpADhP5hUHZURlmAE=; b=w7LwEy50CG4d2rzgHh8MXAXS93w19v6C6ZdjF6NUmSRRQhAqC/V2umFn5Fu3/87a8ksfnm ITJ8KG4jiOECT76LBzLNtpOOOUhCq0OE0NsxdV0d+vVDkd8nOCSvJZRWGqN0eZWOVwpHXm uwmrrsmQbbB2nhOQqpeYMECZazyORew= From: Sean Anderson To: Laurent Pinchart , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org Cc: David Airlie , Michal Simek , Simona Vetter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH v3 2/3] drm: zynqmp_dp: Use smp_load/store for status Date: Tue, 6 Jan 2026 12:01:35 -0500 Message-Id: <20260106170136.501044-3-sean.anderson@linux.dev> In-Reply-To: <20260106170136.501044-1-sean.anderson@linux.dev> References: <20260106170136.501044-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" dp->status is read asynchronously by the AUX bus. Therefore, all reads outside of dp->lock must be atomic. Similarly, writes must be atomic as well. Reads with dp->lock held do not need to be atomic. Fixes: a7d5eeaa57d7 ("drm: zynqmp_dp: Add locking") Signed-off-by: Sean Anderson --- (no changes since v1) drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp= _dp.c index f39c78b08e6a..caf2e0ce3644 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1111,7 +1111,7 @@ zynqmp_dp_aux_transfer(struct drm_dp_aux *aux, struct= drm_dp_aux_msg *msg) return msg->size; } =20 - if (dp->status =3D=3D connector_status_disconnected) { + if (READ_ONCE(dp->status) =3D=3D connector_status_disconnected) { dev_dbg(dp->dev, "no connected aux device\n"); if (dp->ignore_aux_errors) goto fake_response; @@ -1697,7 +1697,7 @@ static enum drm_connector_status __zynqmp_dp_bridge_d= etect(struct zynqmp_dp *dp) } =20 if (state & ZYNQMP_DP_INTERRUPT_SIGNAL_STATE_HPD) { - dp->status =3D connector_status_connected; + WRITE_ONCE(dp->status, connector_status_connected); ret =3D drm_dp_dpcd_read(&dp->aux, 0x0, dp->dpcd, sizeof(dp->dpcd)); if (ret < 0) { @@ -1716,7 +1716,7 @@ static enum drm_connector_status __zynqmp_dp_bridge_d= etect(struct zynqmp_dp *dp) } =20 disconnected: - dp->status =3D connector_status_disconnected; + WRITE_ONCE(dp->status, connector_status_disconnected); return connector_status_disconnected; } =20 --=20 2.35.1.1320.gc452695387.dirty