From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 427ABC54E58 for ; Thu, 21 Mar 2024 16:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K9NVQUroJKA/7BgOnOc5VR5eAC9NfQQLnoFU+gX3Zxw=; b=hi1Loe+b4MNGUu lypachrxdSs74JVv3XtFt9Id8Qcup4q3q6o9bflvRCbxTg7hUekMHQGYJGZ3oTNY3zP9qexc0Nlqu 4hTYVBqxd2WhUaWmeklJ+FoEGrAzZtzednuddosHLyNpUky4vSPPnLQtAmTzNmYAaIDhrd4L7VFN3 tochsB1Sx4bnuEvxHrPRqupiAvVp7pm0EJN+YFjRwVZl04cHL/3uBmiRGAmerjviKhZ21oqq+R4Hh 5UkT55dlM4zoD9kog7tbf02EL9ycPH5k9T3MUD9VjUxf4HxY58cyLpkXn5ymsy/i3ptCe8/yhwyCC eK9fmyDSizLwm96AX0vQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnKyQ-00000003iXL-1PAm; Thu, 21 Mar 2024 16:08:58 +0000 Received: from out-170.mta0.migadu.com ([91.218.175.170]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnKyM-00000003iWI-0BJf for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2024 16:08:55 +0000 Message-ID: <76831c1e-216f-430b-bacd-2d50f352e61f@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711037331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nYGs6j1CcJBZpXqqpvnZVExRCl/iMQ6GtORK4GaVepw=; b=TGlqxFn8rv4WjNNL+kr5zeS2uvA9xjrL/AHHaAsiK+u4aCpDCFl/lLQwqqfKew/PAgKd6i h2BG1OVzI3HWvHRBnzpGgGbl7a2NFHZbuZDP/SUhcfBZxardWlIVB5JgFmrue+WtCjvcwm KAII2X78oz7JI4lt6vzOWy7op1WzAyU= Date: Thu, 21 Mar 2024 12:08:44 -0400 MIME-Version: 1.0 Subject: Re: [PATCH v2 8/8] drm: zynqmp_dp: Add debugfs interface for compliance testing Content-Language: en-US To: Tomi Valkeinen Cc: Michal Simek , David Airlie , linux-kernel@vger.kernel.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org, Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org References: <20240319225122.3048400-1-sean.anderson@linux.dev> <20240319225122.3048400-9-sean.anderson@linux.dev> <7aa16340-6a87-4110-8114-c1b863b100c9@ideasonboard.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: <7aa16340-6a87-4110-8114-c1b863b100c9@ideasonboard.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240321_090854_543624_F5189120 X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/20/24 03:49, Tomi Valkeinen wrote: > On 20/03/2024 00:51, Sean Anderson wrote: > >> +/** >> + * enum test_pattern - Test patterns for test testing > > "for test testing"? =) > >> @@ -1655,6 +2321,9 @@ static void zynqmp_dp_hpd_irq_work_func(struct work_struct *work) >> u8 status[DP_LINK_STATUS_SIZE + 2]; >> int err; >> + if (READ_ONCE(dp->ignore_hpd)) >> + return; >> + >> mutex_lock(&dp->lock); >> err = drm_dp_dpcd_read(&dp->aux, DP_SINK_COUNT, status, >> DP_LINK_STATUS_SIZE + 2); > > Why do you need READ/WRITE_ONCE() for ignore_hpd? It's not protected by dp->lock so we don't have to take it for zynqmp_dp_hpd_work_func. Although maybe we should make a version of zynqmp_dp_bridge_detect which assumes we already hold the lock. --Sean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F104DC54E68 for ; Thu, 21 Mar 2024 16:08:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26AF810ED37; Thu, 21 Mar 2024 16:08:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.b="TGlqxFn8"; dkim-atps=neutral Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27BE410EBC7 for ; Thu, 21 Mar 2024 16:08:52 +0000 (UTC) Message-ID: <76831c1e-216f-430b-bacd-2d50f352e61f@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711037331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nYGs6j1CcJBZpXqqpvnZVExRCl/iMQ6GtORK4GaVepw=; b=TGlqxFn8rv4WjNNL+kr5zeS2uvA9xjrL/AHHaAsiK+u4aCpDCFl/lLQwqqfKew/PAgKd6i h2BG1OVzI3HWvHRBnzpGgGbl7a2NFHZbuZDP/SUhcfBZxardWlIVB5JgFmrue+WtCjvcwm KAII2X78oz7JI4lt6vzOWy7op1WzAyU= Date: Thu, 21 Mar 2024 12:08:44 -0400 MIME-Version: 1.0 Subject: Re: [PATCH v2 8/8] drm: zynqmp_dp: Add debugfs interface for compliance testing Content-Language: en-US To: Tomi Valkeinen Cc: Michal Simek , David Airlie , linux-kernel@vger.kernel.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org, Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org References: <20240319225122.3048400-1-sean.anderson@linux.dev> <20240319225122.3048400-9-sean.anderson@linux.dev> <7aa16340-6a87-4110-8114-c1b863b100c9@ideasonboard.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: <7aa16340-6a87-4110-8114-c1b863b100c9@ideasonboard.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 3/20/24 03:49, Tomi Valkeinen wrote: > On 20/03/2024 00:51, Sean Anderson wrote: > >> +/** >> + * enum test_pattern - Test patterns for test testing > > "for test testing"? =) > >> @@ -1655,6 +2321,9 @@ static void zynqmp_dp_hpd_irq_work_func(struct work_struct *work) >> u8 status[DP_LINK_STATUS_SIZE + 2]; >> int err; >> + if (READ_ONCE(dp->ignore_hpd)) >> + return; >> + >> mutex_lock(&dp->lock); >> err = drm_dp_dpcd_read(&dp->aux, DP_SINK_COUNT, status, >> DP_LINK_STATUS_SIZE + 2); > > Why do you need READ/WRITE_ONCE() for ignore_hpd? It's not protected by dp->lock so we don't have to take it for zynqmp_dp_hpd_work_func. Although maybe we should make a version of zynqmp_dp_bridge_detect which assumes we already hold the lock. --Sean