Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp156121pxa; Wed, 26 Aug 2020 07:18:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvIyUMIu+SmIGvaHh1pPeYCywTyeqnD4lxxI9bnzRLMmPSX78OmIUX/b9vaALcMSMwFNqH X-Received: by 2002:a17:906:5246:: with SMTP id y6mr15605960ejm.316.1598451527820; Wed, 26 Aug 2020 07:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598451527; cv=none; d=google.com; s=arc-20160816; b=oBcV0VU61yIHe8QQBL/HJhIftC2tJn3gk25HIwZ0dpltYX3dyYVbtIuCsHNtaIrOd4 JdezCFEtUa/wrAhQV0KUO21wRhE/SS/OrBACFkpq5M0Ihj5Qhsm2rwrCtr+dg85iJfwr oG8NPp0/rKl34hQugJ7oNtVy71HnD2+/X77qNl45G2XNcwNOX3E9OZLFRtLjG2TYa5Lv UF9ZLks9pTNqkkMnhq3gTbuJYqADimr+buwcteQAXOm+H7RyshYRQP1b3GBFjKB52JoI ip06w5CLL7s/YueEXQ+8mYw/BID7Huk7BZAmXRQHOVPZk5+q49rdoaw8/bkWTc1ueM7s yZzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/+M25RpmBcRoL5VbNUjltyelm7aOAQW5HdRIDG5iyr4=; b=B38DeOJBEtUOZH4YB5wY1i6j8P/f49HQo2ucgn/Duz4/GPYMNQ2CqrPMHULnH9qQAK hdq3jVtXFH0wyQfa2mylWj3XUPPfvQe2UJX7OXAGS9oWfU75f1cSV200K9oJgQKa+VC3 88XxzK7KfdgrW6UO5wSpVFZ++d0uJ4WOzallAD9eaXVfcY/pTnoy1oywBtHxXISWyfmf t3r1BQdAgGvrw8VdcHAMe7CNnUcI6V8yKGv6xv1SFTjwkcLSPpMdruVHpelTj4a+ukFR lngBSkUD+2lox1LUojzuRUj9vFnjDv7v0Gg9SFotF0Ss0FYoaJGC/jPr5lJst2TcPfMP ijDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pnbo60x+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 23si1550643edv.203.2020.08.26.07.18.24; Wed, 26 Aug 2020 07:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pnbo60x+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728211AbgHZJo0 (ORCPT + 99 others); Wed, 26 Aug 2020 05:44:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:46624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728017AbgHZJoZ (ORCPT ); Wed, 26 Aug 2020 05:44:25 -0400 Received: from localhost (unknown [122.171.38.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C8102071E; Wed, 26 Aug 2020 09:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598435065; bh=rEb2MjfXopgqQeFyttJe5xNt6mctXJvZcBIyl2JNJFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pnbo60x+x4RKK8IUE3UDFFHizRC5B1LAzK+MU9u5cUbaPc5HZLc43w2cIeBiOU6Nn MAl8LV3NHMddNmyG179zjvTCJbp8LT+b15OcWBqzh1k22QTP/1C4YZboaEu839QvYq UN0Z4qfDKPTiHjK9w7l8jTrBVYInbXcVlz7fBzXo= Date: Wed, 26 Aug 2020 15:14:20 +0530 From: Vinod Koul To: Bard Liao Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: Re: [PATCH 05/11] soundwire: bus: update multi-link definition with hw sync details Message-ID: <20200826094420.GA2639@vkoul-mobl> References: <20200818024120.20721-1-yung-chuan.liao@linux.intel.com> <20200818024120.20721-6-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200818024120.20721-6-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-08-20, 10:41, Bard Liao wrote: > From: Pierre-Louis Bossart > > Hardware-based synchronization is typically required when the > bus->multi_link flag is set. > > On Intel platforms, when the Cadence IP is configured in 'Multi Master > Mode', the hardware synchronization is required even when a stream > only uses a single segment. The existing code only deal with hardware > synchronization when a stream uses more than one segment so to remain > backwards compatible we add a configuration threshold. For Intel cases > this threshold will be set to one, other platforms may be able to use > the SSP-based sync in those cases. > > Signed-off-by: Pierre-Louis Bossart > Signed-off-by: Bard Liao > --- > include/linux/soundwire/sdw.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h > index 76052f12c9f7..9adbe4fd7980 100644 > --- a/include/linux/soundwire/sdw.h > +++ b/include/linux/soundwire/sdw.h > @@ -827,6 +827,11 @@ struct sdw_master_ops { > * @multi_link: Store bus property that indicates if multi links > * are supported. This flag is populated by drivers after reading > * appropriate firmware (ACPI/DT). > + * @hw_sync_min_links: Number of links used by a stream above which > + * hardware-based synchronization is required. This value is only > + * meaningful if multi_link is set. If set to 1, hardware-based > + * synchronization will be used even if a stream only uses a single > + * SoundWire segment. Soundwire spec does not say anything about multi-link so this is left to implementer. Assuming that value of 1 would mean hw based sync will be used even for single stream does not make sense in generic terms. Maybe yes for Intel but may not be true for everyone? We already use m_rt_count in code for this, so the question is why is that not sufficient? > */ > struct sdw_bus { > struct device *dev; > @@ -850,6 +855,7 @@ struct sdw_bus { > unsigned int clk_stop_timeout; > u32 bank_switch_timeout; > bool multi_link; > + int hw_sync_min_links; > }; > > int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent, > -- > 2.17.1 -- ~Vinod