Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp598396lqp; Thu, 21 Mar 2024 09:51:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUFsBMdQ1lBNovqR+okP3PKAipybZL+25GTCuEdO1f5iL7/OUe4wNMET3xNLM8OqJbv5h6c0K0ZnJrvUmUINQy0xlU7n1sD7F7JshjjDQ== X-Google-Smtp-Source: AGHT+IHatBTSO3j110oKZSAEH0PHBTwLaV8DRq/QCPonp68AyYJsXjcwd0m+USyFMnTBn/uoQD5y X-Received: by 2002:a17:90a:d78e:b0:29f:cf88:c2d2 with SMTP id z14-20020a17090ad78e00b0029fcf88c2d2mr8200449pju.12.1711039883600; Thu, 21 Mar 2024 09:51:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711039883; cv=pass; d=google.com; s=arc-20160816; b=QWCaK1qCA5sSyACMWwDzYZ+dCxxHMy2cHLs2FjjolA3iurbGwXEBviVjT/Zhy+VA2p LwwtkdOpfNS6HWAYmI2VIE9hZ3yaPAmE/OVvjV79eUBJehnBIPKGGZhAjmx2Cs2gmyb+ JQgql7bH6mL+dypnWFLV2Z8TDnmFAXkkZ6XCzNxNFiPHFmpSYy2/OPSguHr7+Ux6uIAn jdvxiHF7CruG22Ok2s1BPSn9YK0Fth+kYD9wjtseTFGG14wpUt0EhR1CaNf5DrtBJVc7 4yR4885LbNUTYJsIUfZ8YqMFCD/zGlDIjwVGoVWLPMsOFNlmRgliuMBKM30A6pIIkoN8 CVPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=65hUeG8OX6ql2/GX16GupJklYGDvMlauJgw18xRPFmI=; fh=Tjrdt/RtV1BbMi/RWh79PEXdRY8Dlhde1AbpWkRi2R0=; b=g43ZSb5M0FWV+iOGOwHzvqMDKKX51rG7Qi73OPkNtAFfyrngTRT8j0qNNYxqK6x3Aw FH/6S4r7zTN3WmuTiFDXZvOSbPhLW9BqLZm4XbgOgZZ5BzhV/6ybju/cjt8zGpvjpjhw JkIwXi9ZFUX6Oa3aqf6WzAjpgCzUkfSurW4qnRjMErk7P2mU05pT9VSURHrYvNJ9QtwP 0AKIH6V0xZYKalPUh64Og1lvMjN0sKxQO38EOhf6ahj0+9CFHB2fq8LK8kSDSV6aQPmd xMrelcnsN93UHt52JnwpdAU3cFJ/IyATAEknNjhMGIBp+Z4mWY1C/mm7h6WLOlbhKMmX ufvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tNlPkdk9; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-110351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m17-20020a17090a7f9100b0029de65cf372si3804888pjl.66.2024.03.21.09.51.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 09:51:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tNlPkdk9; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-110351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8EF64B22788 for ; Thu, 21 Mar 2024 16:35:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2D99B673; Thu, 21 Mar 2024 16:35:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="tNlPkdk9" Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 49BF62C80 for ; Thu, 21 Mar 2024 16:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711038928; cv=none; b=W6QGMwxadVMSizXPhxdqzVQKnja50Th0GfSCOIULo8obb+XsOY82OmkkCFILn4z2dZrFP0kcMltMjzLZj6KUymE9vDwxVA4yHcrhWaFNtUc1qfYAEvQh0RCjuQfTHUXXAIZZeMhMY/9Mh+sBoYJPS1qYtBzukzKq3oi5yQ8WPp4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711038928; c=relaxed/simple; bh=lJdB0lQOeW6FIOveDvwdGLKWA9MXOQA168fe5u8Q/DI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HNhbO2Rvc8J/1fp3oD1JD2V/hl28AG4sLv0YEh46ulfeIalttOLfN3hFKo7/m4h5oaQ856i7eWahztiOAIUgVTHytWtT9OTIE4tACMieULZXYeLzzvohXaUG+NXp5lNvz73UbrrXRBKTDq1CwDwUtTgh7cCrnfPZV0GvgVJ6znA= 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=tNlPkdk9; arc=none smtp.client-ip=91.218.175.186 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 Message-ID: <9990db8b-ec05-4557-aa8c-654ed6cf9ab4@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711038924; 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=65hUeG8OX6ql2/GX16GupJklYGDvMlauJgw18xRPFmI=; b=tNlPkdk9LOBP9JJygHsaW3toD5a18XuWBNbevoDMet1kmCy7TfmZyvz0NtGAgQbIlQrfOh bfnQhfnlzyUGbgSLOxbnzAtwlBDQY8n6olMmHKOhWs+uy8TfTPylonyX/imCUyIRlyVYFk 1jxHrHFUZNFzU0v0QclBvcCY1Vc9Ux4= Date: Thu, 21 Mar 2024 12:35:18 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> <76831c1e-216f-430b-bacd-2d50f352e61f@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sean Anderson In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 3/21/24 12:31, Tomi Valkeinen wrote: > On 21/03/2024 18:08, Sean Anderson wrote: >> 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. > > Does using the macros solve some potential issue, or is it just for documenting that this variable is accessed without lock? Without this the compiler is free to issue multiple loads for this variable, which could be incorrect. --Sean