2020-10-07 18:21:50

by Caleb Connolly

[permalink] [raw]
Subject: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6

The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
is used for i2c, so disable it.

https://patchwork.kernel.org/patch/11133827/
Signed-off-by: Caleb Connolly <[email protected]>
---
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 dead5db3315a..50a0674a6553 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -358,7 +358,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)
@@ -400,7 +401,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.28.0



2020-10-08 10:06:54

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6

On Wed, Oct 07, 2020 at 05:49:35PM +0000, Caleb Connolly wrote:
> The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
> is used for i2c, so disable it.
>
> https://patchwork.kernel.org/patch/11133827/
> Signed-off-by: Caleb Connolly <[email protected]>

May I ask for a quick review here, so we can get this into 5.9 if
qcom-geni maintainers agree this is good to go?

> ---
> 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 dead5db3315a..50a0674a6553 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -358,7 +358,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)
> @@ -400,7 +401,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.28.0
>
>


Attachments:
(No filename) (1.55 kB)
signature.asc (849.00 B)
Download all attachments

2020-10-08 11:43:27

by Caleb Connolly

[permalink] [raw]
Subject: Re: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6

On 2020-10-08 11:03, Wolfram Sang wrote:
> On Wed, Oct 07, 2020 at 05:49:35PM +0000, Caleb Connolly wrote:
>> The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
>> is used for i2c, so disable it.
>>
>> https://patchwork.kernel.org/patch/11133827/
>> Signed-off-by: Caleb Connolly <[email protected]>
> May I ask for a quick review here, so we can get this into 5.9 if
> qcom-geni maintainers agree this is good to go?

Sorry it wasn't mentioned in my first message, this patch depends on the
rest in the series found here:
https://lore.kernel.org/linux-arm-msm/[email protected]/#r

>> ---
>> 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 dead5db3315a..50a0674a6553 100644
>> --- a/drivers/i2c/busses/i2c-qcom-geni.c
>> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
>> @@ -358,7 +358,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)
>> @@ -400,7 +401,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.28.0
>>
>>


2020-10-08 12:21:06

by Wolfram Sang

[permalink] [raw]
Subject: Re: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6

On Thu, Oct 08, 2020 at 10:46:05AM +0000, Caleb Connolly wrote:
> On 2020-10-08 11:03, Wolfram Sang wrote:
> > On Wed, Oct 07, 2020 at 05:49:35PM +0000, Caleb Connolly wrote:
> >> The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
> >> is used for i2c, so disable it.
> >>
> >> https://patchwork.kernel.org/patch/11133827/
> >> Signed-off-by: Caleb Connolly <[email protected]>
> > May I ask for a quick review here, so we can get this into 5.9 if
> > qcom-geni maintainers agree this is good to go?
>
> Sorry it wasn't mentioned in my first message, this patch depends on the
> rest in the series found here:
> https://lore.kernel.org/linux-arm-msm/[email protected]/#r

Ah, so the device is not upstream yet and there is no hurry. Good to
know. Thanks!


Attachments:
(No filename) (827.00 B)
signature.asc (849.00 B)
Download all attachments

2020-10-09 06:37:22

by Akash Asthana

[permalink] [raw]
Subject: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6

On 10/7/2020 11:19 PM, Caleb Connolly wrote:
> The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
> is used for i2c, so disable it.
>
> https://patchwork.kernel.org/patch/11133827

Reviewed-by: Akash Asthana <[email protected]>

> Signed-off-by: Caleb Connolly <[email protected]>
> ---
> 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 dead5db3315a..50a0674a6553 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -358,7 +358,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)
> @@ -400,7 +401,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)

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project

2020-10-09 06:37:35

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6

On Fri, Oct 09, 2020 at 10:56:15AM +0530, Akash Asthana wrote:
> On 10/7/2020 11:19 PM, Caleb Connolly wrote:
> > The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
> > is used for i2c, so disable it.
> >
> > https://patchwork.kernel.org/patch/11133827
>
> Reviewed-by: Akash Asthana <[email protected]>

Thanks!

Acked-by: Wolfram Sang <[email protected]>

So, this patch can go in via whatever tree seems apropriate. Let me know
if I should take this patch individually.


Attachments:
(No filename) (517.00 B)
signature.asc (849.00 B)
Download all attachments

2020-10-09 06:56:21

by Mukesh, Savaliya

[permalink] [raw]
Subject: Re: [PATCH 5/5] i2c: geni: sdm845: dont perform DMA for the oneplus6


On 10/8/2020 3:33 PM, Wolfram Sang wrote:
> On Wed, Oct 07, 2020 at 05:49:35PM +0000, Caleb Connolly wrote:
>> The OnePlus 6/T has the same issues as the c630 causing a crash when DMA
>> is used for i2c, so disable it.
>>
>> https://patchwork.kernel.org/patch/11133827/
>> Signed-off-by: Caleb Connolly <[email protected]>
Reviewed-by: Mukesh Kumar Savaliya <[email protected]>
> May I ask for a quick review here, so we can get this into 5.9 if
> qcom-geni maintainers agree this is good to go?
>
>> ---
>> 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 dead5db3315a..50a0674a6553 100644
>> --- a/drivers/i2c/busses/i2c-qcom-geni.c
>> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
>> @@ -358,7 +358,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)
>> @@ -400,7 +401,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.28.0
>>
>>