Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13474792ybl; Sun, 29 Dec 2019 12:47:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxmImmSP/JlvgdMMyMKP3V3Df6jNf+Dni1kYxxreOcRuBfe66mKREYhRblvNu2yW1A6k5ht X-Received: by 2002:a9d:4706:: with SMTP id a6mr65342132otf.331.1577652463917; Sun, 29 Dec 2019 12:47:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652463; cv=none; d=google.com; s=arc-20160816; b=OSs5lpkLfFhihYnnlQuvDR2Ed7aIU79zN4lGq2S+FnIgKC2mkNKS+S+r97FZDMUjfB F5gt6fODX3rzn7fboz4vbO9T8xR+LraI1giAM8+KbGFy0mFTVcaDbrVdKKY01EzhKPs5 AgzfMQ0Aiuu2i0sD5cslLioYa4e8LTEiHsTkPffFXjVsUriVTD2DyDY6ayPwyjlclwU9 AsK/LBzjyHAlphbU1w5GJoNRaphbNlQaVcEmHJgVTlNSsDNexCZJ4igCxIdMjh+cJVHW yK7zRUiJkGKPhhILBu6vXXNwSqaNnk0p5MIIKz1IQXOfx4UisfP+ooBS46KI51l4pZ4z ZUNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YF+icgPBmEph/UpdoriRYMbnL/bQMPh34xvxNri93qk=; b=QOTwTRl2vlRj1d35cxMa78OhRMK1/mBIKDwlGlxdXi5kCjqeT1Z/AFaTpm+xMsPUsi 4DY030w72Hgxx0H6LkfFNvrfNs9LkOLBqkqyENP823sJFL6QMjDOqkETbjlesC+zxrCD hNR19yAfuBvP9AT8gIEtnLwkccnD7OGEA3keH/WF4kpwRajqtu5svVJlupo9WAwo9DpU xt3+Lf1zuHXyn4w+W9u5kr0V9hSo4r+doHGPa9GBk1g5uROrrsLm8BQBpqugU5K5BnHC eDrj8FSxtPWNT+JVleRJs8SMgIAQDW6CKJ7ZDReEoGgVerVj2cgkwew+4K9E8u6Z666Y 6pXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jpkz+sLV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si19560391ois.76.2019.12.29.12.47.32; Sun, 29 Dec 2019 12:47:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jpkz+sLV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732303AbfL2Rwe (ORCPT + 99 others); Sun, 29 Dec 2019 12:52:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:38776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732286AbfL2Rwa (ORCPT ); Sun, 29 Dec 2019 12:52:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 78997206DB; Sun, 29 Dec 2019 17:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641949; bh=eQgGoSK8L92lrFgEVaHF+VYPl7BHmvS6Maj48KdwIjQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jpkz+sLVu89PSE4OeV25IJUybAQf02bdR/KKQTP1mtlS1kC6kuY5ta4KWiiQUA8BJ 1BGcBWJkb+3RbB31jQHUKOytGbTClbQcAUL4HhzI7p2k4GWUMVlpoOY4Stf5hAQwqx 6rmchgVbh3DjaAR5obLHugrECH2+zv4orZ3LvBjM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pierre-Louis Bossart , Vinod Koul , Sasha Levin Subject: [PATCH 5.4 277/434] soundwire: intel: fix PDI/stream mapping for Bulk Date: Sun, 29 Dec 2019 18:25:30 +0100 Message-Id: <20191229172720.342150950@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit c134f914e9f55b7817e2bae625ec0e5f1379f7cd ] The previous formula is incorrect for PDI0/1, the mapping is not linear but has a discontinuity between PDI1 and PDI2. This change has no effect on PCM PDIs (same mapping). Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191022232948.17156-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/intel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 13c54eac0cc3..d1839707128a 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -479,7 +479,10 @@ intel_pdi_shim_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi) unsigned int link_id = sdw->instance; int pdi_conf = 0; - pdi->intel_alh_id = (link_id * 16) + pdi->num + 5; + /* the Bulk and PCM streams are not contiguous */ + pdi->intel_alh_id = (link_id * 16) + pdi->num + 3; + if (pdi->num >= 2) + pdi->intel_alh_id += 2; /* * Program stream parameters to stream SHIM register @@ -508,7 +511,10 @@ intel_pdi_alh_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi) unsigned int link_id = sdw->instance; unsigned int conf; - pdi->intel_alh_id = (link_id * 16) + pdi->num + 5; + /* the Bulk and PCM streams are not contiguous */ + pdi->intel_alh_id = (link_id * 16) + pdi->num + 3; + if (pdi->num >= 2) + pdi->intel_alh_id += 2; /* Program Stream config ALH register */ conf = intel_readl(alh, SDW_ALH_STRMZCFG(pdi->intel_alh_id)); -- 2.20.1