Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp344037pxu; Sun, 22 Nov 2020 10:02:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJybl+CLCiCagGBH4eEHCUqLUViCne3TwaJSkTytsMJgQ+SXdFcnXf/7mjTI7SKR3VOp54yH X-Received: by 2002:a17:906:318f:: with SMTP id 15mr25690638ejy.183.1606068161889; Sun, 22 Nov 2020 10:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606068161; cv=none; d=google.com; s=arc-20160816; b=jffBPM1/gURfLiU/4cLUKVR8I8NQ4xo8VkMlIVXed1bhJGzAubLcD/VKE2oZY1DyMx osg1NzHz3UvNjCyjeILv+t/azn8yWhuHV+NSvN8LfbzioTLK9qfK3WG8OaWN3RcrBB8z 7kVOrAQETKj7f7/UgJrC7xsy9pY2lUkGPMw4aZanzAdCTrb8ENoKQjXz/08thM65/+nO /aSZAbOoAocl5Iv89EctUxVIgkI/5fXZVF9iUHEFhjeGoFCj2QOGpyEVBEE0zrlq3lUX /ysDjIY1qdZk8Srelx+3k9weNEzHFQ/hjysS09pMVBwTBqmmGBORZR9XVrFV55HtwrwK Hrrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=0tDIIuf1Tt9UO5w2d7UPKWMd7FZ0ye8L9YX/ZJ0uO48=; b=EtO6+L1HL69LBcxCax0iR5LYLptJW2hFBtx1+wksX7cLjlx+NknR1JQ9Um+zYTzE0w Gq1nIBrbvyf0WW/jmn0YbNzCgU/k7u/Lb4UXDuhO22p2MireTmNRGehmIrEMLashiRhZ v68Mx5Ncv9RV60pOXnyruSSsdOlAkeDAvN+vN/yenFzwCGxs1cDcKPuTJF7MxAZT8wJu KbCuxm+/VAip8MbTi1YabBWBAHDxyRpqx7oGs52uZb+9AsZ20UiAgR/fL4undi+zfePa jV67WcEt81WuYBGagh/6CJbvtEZtU3vFY579Q6YNijGotgAYdKgVjAvZuQ1xl5meJURI wp7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@connolly.tech header.s=protonmail header.b=N9wfKYz9; 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=connolly.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si5353280ejo.705.2020.11.22.10.02.15; Sun, 22 Nov 2020 10:02:41 -0800 (PST) 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=@connolly.tech header.s=protonmail header.b=N9wfKYz9; 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=connolly.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbgKVR7u (ORCPT + 99 others); Sun, 22 Nov 2020 12:59:50 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:26638 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727317AbgKVR7u (ORCPT ); Sun, 22 Nov 2020 12:59:50 -0500 Date: Sun, 22 Nov 2020 17:59:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1606067987; bh=0tDIIuf1Tt9UO5w2d7UPKWMd7FZ0ye8L9YX/ZJ0uO48=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=N9wfKYz9xQLTcAPvtTX7NH1mNJcxIOInJfKomsHFIQ6O4eZjlNIfHWG2cyw0hNIti gPNQoCZ0l10nk9fpcdC46Ob7SMUr6JYkC6GU2aH18O8fzIpTCxcNVsnqbpmbslZR9i n2v/z/qSRtJbnDTuG2b0X2jbSxTkzQdXak+buDYw= To: Bjorn Andersson From: Caleb Connolly Cc: linux-arm-msm@vger.kernel.org, Andy Gross , Akash Asthana , Mukesh Savaliya , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Caleb Connolly Subject: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices Message-ID: <72a37c8c-12e4-eb51-2644-3436d19cf314@connolly.tech> In-Reply-To: <20201122034709.GA95182@builder.lan> References: <20201112161920.2671430-1-caleb@connolly.tech> <20201112161920.2671430-6-caleb@connolly.tech> <20201122034709.GA95182@builder.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, It looks like I still have the same issue even with this patch applied. Regards, Caleb On 2020-11-22 03:47, Bjorn Andersson wrote: > On Thu 12 Nov 10:22 CST 2020, Caleb Connolly wrote: > >> The OnePlus 6/T has the same issue as the Yoga c630 causing a crash when= DMA >> is used for i2c, so disable it. >> >> https://patchwork.kernel.org/patch/11133827/ >> >> Signed-off-by: Caleb Connolly >> --- >> drivers/i2c/busses/i2c-qcom-geni.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c= -qcom-geni.c >> index 8b4c35f47a70..9acdcfe73be2 100644 >> --- a/drivers/i2c/busses/i2c-qcom-geni.c >> +++ b/drivers/i2c/busses/i2c-qcom-geni.c >> @@ -357,7 +357,8 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *= gi2c, struct i2c_msg *msg, >> =09struct geni_se *se =3D &gi2c->se; >> =09size_t len =3D msg->len; >> >> -=09if (!of_machine_is_compatible("lenovo,yoga-c630")) >> +=09if (!of_machine_is_compatible("lenovo,yoga-c630") && >> +=09 !of_machine_is_compatible("oneplus,oneplus6")) > This hack seems to have been working around two separate issues. First > with iommu active the GENI wrappers needs to have their stream mapping > configured. Secondly there was a bug in the transaction setup that was > recently fixed by Doug Anderson. > > So can you please give the following patch a go? I've yet to test it on > the Lenovo machine, but I think it allows us to remove the quirk. > > https://lore.kernel.org/lkml/20201122034149.626045-1-bjorn.andersson@lina= ro.org/T/#u > > Regards, > Bjorn > >> =09=09dma_buf =3D i2c_get_dma_safe_msg_buf(msg, 32); >> >> =09if (dma_buf) >> @@ -399,7 +400,8 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *= gi2c, struct i2c_msg *msg, >> =09struct geni_se *se =3D &gi2c->se; >> =09size_t len =3D msg->len; >> >> -=09if (!of_machine_is_compatible("lenovo,yoga-c630")) >> +=09if (!of_machine_is_compatible("lenovo,yoga-c630") && >> +=09 !of_machine_is_compatible("oneplus,oneplus6")) >> =09=09dma_buf =3D i2c_get_dma_safe_msg_buf(msg, 32); >> >> =09if (dma_buf) >> -- >> 2.29.2 >> >>