* [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices [not found] <20201112161920.2671430-1-caleb@connolly.tech> @ 2020-11-12 16:22 ` Caleb Connolly 2020-11-17 11:47 ` Akash Asthana 2020-11-22 3:47 ` Bjorn Andersson 0 siblings, 2 replies; 7+ messages in thread From: Caleb Connolly @ 2020-11-12 16:22 UTC (permalink / raw) To: linux-arm-msm, Andy Gross, Bjorn Andersson, Akash Asthana, Mukesh Savaliya Cc: phone-devel, ~postmarketos/upstreaming, Caleb Connolly, linux-i2c, linux-kernel 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 <caleb@connolly.tech> --- 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, struct geni_se *se = &gi2c->se; size_t len = msg->len; - if (!of_machine_is_compatible("lenovo,yoga-c630")) + if (!of_machine_is_compatible("lenovo,yoga-c630") && + !of_machine_is_compatible("oneplus,oneplus6")) dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); if (dma_buf) @@ -399,7 +400,8 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, struct geni_se *se = &gi2c->se; size_t len = msg->len; - if (!of_machine_is_compatible("lenovo,yoga-c630")) + if (!of_machine_is_compatible("lenovo,yoga-c630") && + !of_machine_is_compatible("oneplus,oneplus6")) dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); if (dma_buf) -- 2.29.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices 2020-11-12 16:22 ` [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices Caleb Connolly @ 2020-11-17 11:47 ` Akash Asthana 2020-11-22 3:47 ` Bjorn Andersson 1 sibling, 0 replies; 7+ messages in thread From: Akash Asthana @ 2020-11-17 11:47 UTC (permalink / raw) To: Caleb Connolly, linux-arm-msm, Andy Gross, Bjorn Andersson, Mukesh Savaliya Cc: phone-devel, ~postmarketos/upstreaming, linux-i2c, linux-kernel On 11/12/2020 9:52 PM, 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 <caleb@connolly.tech> Reviewed-by : Akash Asthana <akashast@codeaurora.org> -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices 2020-11-12 16:22 ` [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices Caleb Connolly 2020-11-17 11:47 ` Akash Asthana @ 2020-11-22 3:47 ` Bjorn Andersson 2020-11-22 17:59 ` Caleb Connolly 1 sibling, 1 reply; 7+ messages in thread From: Bjorn Andersson @ 2020-11-22 3:47 UTC (permalink / raw) To: Caleb Connolly Cc: linux-arm-msm, Andy Gross, Akash Asthana, Mukesh Savaliya, phone-devel, ~postmarketos/upstreaming, linux-i2c, linux-kernel 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 <caleb@connolly.tech> > --- > 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, > struct geni_se *se = &gi2c->se; > size_t len = msg->len; > > - if (!of_machine_is_compatible("lenovo,yoga-c630")) > + if (!of_machine_is_compatible("lenovo,yoga-c630") && > + !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@linaro.org/T/#u Regards, Bjorn > dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); > > if (dma_buf) > @@ -399,7 +400,8 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, > struct geni_se *se = &gi2c->se; > size_t len = msg->len; > > - if (!of_machine_is_compatible("lenovo,yoga-c630")) > + if (!of_machine_is_compatible("lenovo,yoga-c630") && > + !of_machine_is_compatible("oneplus,oneplus6")) > dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); > > if (dma_buf) > -- > 2.29.2 > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices 2020-11-22 3:47 ` Bjorn Andersson @ 2020-11-22 17:59 ` Caleb Connolly 2020-12-02 15:39 ` Wolfram Sang 0 siblings, 1 reply; 7+ messages in thread From: Caleb Connolly @ 2020-11-22 17:59 UTC (permalink / raw) To: Bjorn Andersson Cc: linux-arm-msm, Andy Gross, Akash Asthana, Mukesh Savaliya, phone-devel, ~postmarketos/upstreaming, linux-i2c, linux-kernel 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 <caleb@connolly.tech> >> --- >> 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, >> struct geni_se *se = &gi2c->se; >> size_t len = msg->len; >> >> - if (!of_machine_is_compatible("lenovo,yoga-c630")) >> + if (!of_machine_is_compatible("lenovo,yoga-c630") && >> + !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@linaro.org/T/#u > > Regards, > Bjorn > >> dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); >> >> if (dma_buf) >> @@ -399,7 +400,8 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, >> struct geni_se *se = &gi2c->se; >> size_t len = msg->len; >> >> - if (!of_machine_is_compatible("lenovo,yoga-c630")) >> + if (!of_machine_is_compatible("lenovo,yoga-c630") && >> + !of_machine_is_compatible("oneplus,oneplus6")) >> dma_buf = i2c_get_dma_safe_msg_buf(msg, 32); >> >> if (dma_buf) >> -- >> 2.29.2 >> >> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices 2020-11-22 17:59 ` Caleb Connolly @ 2020-12-02 15:39 ` Wolfram Sang 2020-12-02 16:36 ` Bjorn Andersson 0 siblings, 1 reply; 7+ messages in thread From: Wolfram Sang @ 2020-12-02 15:39 UTC (permalink / raw) To: Caleb Connolly Cc: Bjorn Andersson, linux-arm-msm, Andy Gross, Akash Asthana, Mukesh Savaliya, phone-devel, ~postmarketos/upstreaming, linux-i2c, linux-kernel [-- Attachment #1: Type: text/plain, Size: 858 bytes --] > >> - if (!of_machine_is_compatible("lenovo,yoga-c630")) > >> + if (!of_machine_is_compatible("lenovo,yoga-c630") && > >> + !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@linaro.org/T/#u Please don't top-post. I fixed it this time. > It looks like I still have the same issue even with this patch applied. So we still need your patch, am I reading correctly? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices 2020-12-02 15:39 ` Wolfram Sang @ 2020-12-02 16:36 ` Bjorn Andersson 2020-12-02 20:21 ` Wolfram Sang 0 siblings, 1 reply; 7+ messages in thread From: Bjorn Andersson @ 2020-12-02 16:36 UTC (permalink / raw) To: Wolfram Sang, Caleb Connolly Cc: linux-arm-msm, Andy Gross, Akash Asthana, Mukesh Savaliya, phone-devel, ~postmarketos/upstreaming, linux-i2c, linux-kernel On Wed 02 Dec 09:39 CST 2020, Wolfram Sang wrote: > > > >> - if (!of_machine_is_compatible("lenovo,yoga-c630")) > > >> + if (!of_machine_is_compatible("lenovo,yoga-c630") && > > >> + !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@linaro.org/T/#u > > Please don't top-post. I fixed it this time. > > > It looks like I still have the same issue even with this patch applied. > > So we still need your patch, am I reading correctly? > With Doug's recent fixes in the DMA handling and the introduction of proper iommu configuration, which Caleb tested [1], I think we're good without this on the OnePlus. Caleb, please confirm. If I understood Caleb's report he saw exactly the same problem that Lee Jones did that lead to the workaround for the Lenovo Yoga C630, and with the two changes the i2c-hid keyboard came up nicely on my Yoga. So I posted [2]. [1] https://lore.kernel.org/linux-arm-msm/3ba39a64-122b-ebe9-04b3-3a23478334a4@connolly.tech/ [2] https://lore.kernel.org/linux-arm-msm/20201124185743.401946-1-bjorn.andersson@linaro.org/ Regards, Bjorn ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices 2020-12-02 16:36 ` Bjorn Andersson @ 2020-12-02 20:21 ` Wolfram Sang 0 siblings, 0 replies; 7+ messages in thread From: Wolfram Sang @ 2020-12-02 20:21 UTC (permalink / raw) To: Bjorn Andersson Cc: Caleb Connolly, linux-arm-msm, Andy Gross, Akash Asthana, Mukesh Savaliya, phone-devel, ~postmarketos/upstreaming, linux-i2c, linux-kernel [-- Attachment #1: Type: text/plain, Size: 290 bytes --] > With Doug's recent fixes in the DMA handling and the introduction of > proper iommu configuration, which Caleb tested [1], I think we're good > without this on the OnePlus. Caleb, please confirm. Yes, he confirmed already. I missed it was private only. Thanks for your heads up, too! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-12-02 20:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20201112161920.2671430-1-caleb@connolly.tech> 2020-11-12 16:22 ` [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for OnePlus 6 devices Caleb Connolly 2020-11-17 11:47 ` Akash Asthana 2020-11-22 3:47 ` Bjorn Andersson 2020-11-22 17:59 ` Caleb Connolly 2020-12-02 15:39 ` Wolfram Sang 2020-12-02 16:36 ` Bjorn Andersson 2020-12-02 20:21 ` Wolfram Sang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).