drm/panel/synaptics-r63353: Use _multi variants
PATCH 1/1 drm/panel/synaptics-r63353: Use _multi variants
Move away from using deprecated API and use _multi variants if available. Use mipi_dsi_msleep() and mipi_dsi_usleep_range() instead of msleep() and usleep_range() respectively.
Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifier dsi_var;
identifier r;
identifier func;
type t;
position p;
expression dsi_device;
expression list es;
@@
t func(...) {
...
struct mipi_dsi_device *dsi_var = dsi_device; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var }; <+...
(
-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);
|
-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);
|
-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);
|
....rest of API
..
)
-if(r < 0) {
-...
-}
...+>
---
Previous attempt for this change was addressed in:[1] The series did not handle returns properly and still used msleep() and usleep_range() API.
It also collided with an Tejas's similar efforts.
Will be sending the patches per driver instead of major haul of changes.
Following [2] for reference.
[1] -> https://patchwork.freedesktop.org/series/144824/
[2] -> https://lore.kernel.org/dri-devel/[email protected]/#iZ31drivers:gpu:drm:panel:panel-sony-td4353-jdi.c
--- drivers/gpu/drm/panel/panel-synaptics-r63353.c | 64 +++++++------------------- 1 file changed, 17 insertions(+), 47 deletions(-)
drivers/gpu/drm/panel/panel-synaptics-r63353.c +17 -47
@@ -106,53 +106,32 @@ static int r63353_panel_power_off(struct r63353_panel *rpanel)static int r63353_panel_activate (struct r63353_panel *rpanel) {struct mipi_dsi_device *dsi = rpanel->dsi; -struct device *dev = &dsi->dev; -int i, ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; +int i; - ret =mipi_dsi_dcs_soft_reset (dsi); -if (ret <0 ) { -dev_err (dev,"Failed to do Software Reset (%d)\n" , ret); - goto fail; - } +mipi_dsi_dcs_soft_reset_multi (&dsi_ctx); -usleep_range (15000 ,17000 ); +mipi_dsi_usleep_range (&dsi_ctx,15000 ,17000 ); - ret =mipi_dsi_dcs_enter_sleep_mode (dsi); -if (ret <0 ) { -dev_err (dev,"Failed to enter sleep mode (%d)\n" , ret); - goto fail; - } +mipi_dsi_dcs_enter_sleep_mode_multi (&dsi_ctx);for (i =0 ; i < rpanel->pdata->init_length; i++) {const struct r63353_instr *instr = &rpanel->pdata->init[i]; - ret =mipi_dsi_dcs_write_buffer (dsi, instr->data, instr->len); -if (ret <0 ) - goto fail; +mipi_dsi_dcs_write_buffer_multi (&dsi_ctx, instr->data, + instr->len); } -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); - ret =mipi_dsi_dcs_exit_sleep_mode (dsi); -if (ret <0 ) { -dev_err (dev,"Failed to exit sleep mode (%d)\n" , ret); - goto fail; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx); -usleep_range (5000 ,10000 ); +mipi_dsi_usleep_range (&dsi_ctx,5000 ,10000 ); - ret =mipi_dsi_dcs_set_display_on (dsi); -if (ret <0 ) { -dev_err (dev,"Failed to set display ON (%d)\n" , ret); - goto fail; - } - -return 0 ; +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); -fail: -gpiod_set_value (rpanel->reset_gpio,0 ); +return dsi_ctx.accum_err; -return ret; }static int r63353_panel_prepare (struct drm_panel *panel)
@@ -181,24 +160,15 @@ static int r63353_panel_prepare(struct drm_panel *panel)static int r63353_panel_deactivate (struct r63353_panel *rpanel) {struct mipi_dsi_device *dsi = rpanel->dsi; -struct device *dev = &dsi->dev; -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; - ret =mipi_dsi_dcs_set_display_off (dsi); -if (ret <0 ) { -dev_err (dev,"Failed to set display OFF (%d)\n" , ret); -return ret; - } +mipi_dsi_dcs_set_display_off_multi (&dsi_ctx); -usleep_range (5000 ,10000 ); +mipi_dsi_usleep_range (&dsi_ctx,5000 ,10000 ); - ret =mipi_dsi_dcs_enter_sleep_mode (dsi); -if (ret <0 ) { -dev_err (dev,"Failed to enter sleep mode (%d)\n" , ret); -return ret; - } +mipi_dsi_dcs_enter_sleep_mode_multi (&dsi_ctx); -return 0 ; +return dsi_ctx.accum_err; }static int r63353_panel_unprepare (struct drm_panel *panel)
---
base-commit: ced7486468ac3b38d59a69fca5d97998499c936b
change-id: 20250305-mipi-synaptic-1-a2043543cd3a
Best regards,
Signature · 1 line
Anusha Srivatsa <[email protected]>
Quoted 67 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..
)(quoted diff) +0
-3-if(r < 0) { -... -}...+>
Cc Maxime Ripard <[email protected]>Cc Dmitry Baryshkov <[email protected]>Cc Tejas Vipin <[email protected]>Cc Doug Anderson <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>---
Previous attempt for this change was addressed in:[1] The series did not handle returns properly and still usedmsleep()andusleep_range()API.
It also collided with an Tejas's similar efforts.Will be sending the patches per driver instead of major haul of changes.
Following [2] for reference.
[1] -> https://patchwork.freedesktop.org/series/144824/
[2] -> https://lore.kernel.org/dri-devel/[email protected]/#iZ31drivers:gpu:drm:panel:panel-sony-td4353-jdi.c--- drivers/gpu/drm/panel/panel-synaptics-r63353.c | 64 +++++++------------------- 1 file changed, 17 insertions(+), 47 deletions(-)drivers/gpu/drm/panel/panel-synaptics-r63353.c +0
-2- ret =mipi_dsi_dcs_set_display_on (dsi); -if (ret <0 ) {
drivers/gpu/drm/panel/panel-synaptics-r63353.c static int r63353_panel_power_off(struct r63353_panel *rpanel) · line 133
Quoted 10 lines
drivers/gpu/drm/panel/panel-synaptics-r63353.c +2
-7-dev_err (dev,"Failed to set display ON (%d)\n" , ret); - goto fail; - } - -return 0 ; +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); -fail: -gpiod_set_value (rpanel->reset_gpio,0 ); +return dsi_ctx.accum_err;
You've lost panel reset in case of an error. The rest LGTM.
Quoted 5 lines
drivers/gpu/drm/panel/panel-synaptics-r63353.c +0
-1-return ret; }static int r63353_panel_prepare (struct drm_panel *panel)
Signature · 2 lines
With best wishes Dmitry
Maxime Ripard
maintainerHi Anusha,
Quoted 40 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..
)(quoted diff) +0
-3-if(r < 0) { -... -}
Quoted 1 line
...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
Quoted 1 line
Cc Maxime Ripard <[email protected]>
That hasn't been my email address for 6 years :)
Maxime
Quoted 39 lines · Maxime Ripard
Hi Anusha,
Quoted 36 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..
Quoted 10 lines
Quoted 5 lines
)
(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
I was actually thinking of sending patches per driver this time around since Tejas also seems to be looking into similar parts....Thoughts?
Quoted 5 lines
Cc Maxime Ripard <[email protected]>That hasn't been my email address for 6 years :)
My bad. Will change this.
Anusha
Quoted 2 lines
Maxime
Quoted 54 lines · Anusha Srivatsa
Quoted 40 lines · Maxime Ripard
Hi Anusha,
Quoted 36 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..Quoted 9 lines
Quoted 5 lines
)
(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
Quoted 1 line
I was actually thinking of sending patches per driver this time around since Tejas also seems to be looking into similar parts....Thoughts?
Have you discussed it with Tejas? What is his next target?
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Cc Maxime Ripard <[email protected]>That hasn't been my email address for 6 years :)
My bad. Will change this.
Signature · 2 lines
With best wishes Dmitry
Quoted 55 lines · Dmitry Baryshkov
Quoted 54 lines · Anusha Srivatsa
Quoted 49 lines · Maxime Ripard
Hi Anusha,
Quoted 40 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..
)(quoted diff) +0
-3-if(r < 0) { -... -}Quoted 1 line
...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
Quoted 6 lines
Quoted 1 line
I was actually thinking of sending patches per driver this time around
since Tejas also seems to be looking into similar parts....Thoughts?
Have you discussed it with Tejas? What is his next target?
I was hoping he will have some feedback on this patch and we could take it
from there.....
It *should* be okay for me to send all changes in a single series...
Anusha
Quoted 13 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Cc Maxime Ripard <[email protected]>That hasn't been my email address for 6 years :)
My bad. Will change this.
--
With best wishes
Dmitry
Quoted 61 lines · Anusha Srivatsa
Quoted 58 lines · Dmitry Baryshkov
Quoted 54 lines · Anusha Srivatsa
Quoted 40 lines · Maxime Ripard
Hi Anusha,
Quoted 36 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..Quoted 9 lines
Quoted 5 lines
)
(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
Quoted 1 line
I was actually thinking of sending patches per driver this time around
since Tejas also seems to be looking into similar parts....Thoughts?
Quoted 8 lines
Quoted 3 lines
Have you discussed it with Tejas? What is his next target?
I was hoping he will have some feedback on this patch and we could take it
from there.....
It *should* be okay for me to send all changes in a single series...Anusha
There's 5 more panels that use dcs/generic write_seq(). Maybe I could work on those (himax-hx8394, samsung-sofef00, samsung-s6d7aa0, boe-bf060y8m-aj0, jdi-lpm102a188a) while you work on transitioning the rest of the panels (excluding these) that use other functions in the old API? When either of us finishes before the other we could have another discussion about splitting work if necessary. I'm open to other suggestions too.
Quoted 14 lines
Quoted 13 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Cc Maxime Ripard <[email protected]>That hasn't been my email address for 6 years :)
My bad. Will change this.
--
With best wishes
Dmitry
Signature · 1 line
Tejas Vipin
Quoted 77 lines · Tejas Vipin
Quoted 4 lines · Anusha Srivatsa
Quoted 1 line · Dmitry Baryshkov
On Thu, 6 Mar 2025 at 17:10, Anusha Srivatsa <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
On Thu, Mar 6, 2025 at 4:31 AM Maxime Ripard <[email protected]>
Quoted 39 lines · wrote:
Quoted 39 lines
Quoted 39 lines
Quoted 39 lines
Hi Anusha,
Quoted 35 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of APIQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
..
)(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle
script,
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
so you must put the entire script you used here.
I was actually thinking of sending patches per driver this time around
since Tejas also seems to be looking into similar parts....Thoughts?
Have you discussed it with Tejas? What is his next target?
I was hoping he will have some feedback on this patch and we could take
it
Quoted 5 lines
from there.....
It *should* be okay for me to send all changes in a single series...Anusha
Quoted 8 lines
There's 5 more panels that use dcs/generic
write_seq(). Maybe I could work on those (himax-hx8394, samsung-sofef00, samsung-s6d7aa0, boe-bf060y8m-aj0, jdi-lpm102a188a) while you work on transitioning the rest of the panels (excluding these) that use other functions in the old API? When either of us finishes before the other we could have another discussion about splitting work if necessary. I'm open to other suggestions too
Like the suggestion! Thanks Tejas.
Anusha
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Cc Maxime Ripard <[email protected]>That hasn't been my email address for 6 years :)
My bad. Will change this.
Quoted 6 lines
Quoted 5 lines
--
With best wishes
Dmitry--
Tejas Vipin
Maxime Ripard
maintainerQuoted 50 lines · Anusha Srivatsa
Quoted 39 lines · Maxime Ripard
Hi Anusha,
Quoted 36 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..Quoted 8 lines
Quoted 5 lines
)
(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
Quoted 2 lines
I was actually thinking of sending patches per driver this time around since Tejas also seems to be looking into similar parts....Thoughts?
Not really?
The point of doing it with one driver was to make sure the coccinelle script was fine before rolling it to other drivers. And actually, it doesn't really matter: the whole point of putting the script in the commit log is to be able to review and document the script you used. If you're not going to put the one you used, it's kind of pointless.
And yeah, you should absolutely sync with Tejas, but it's unrelated to coccinelle.
Maxime
Hi,
Quoted 55 lines · Maxime Ripard
Quoted 50 lines · Anusha Srivatsa
Quoted 39 lines · Maxime Ripard
Hi Anusha,
Quoted 36 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..Quoted 8 lines
Quoted 5 lines
)
(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle script, so you must put the entire script you used here.
Quoted 2 lines
I was actually thinking of sending patches per driver this time around since Tejas also seems to be looking into similar parts....Thoughts?
Quoted 7 lines
Not really?
The point of doing it with one driver was to make sure the coccinelle script was fine before rolling it to other drivers. And actually, it doesn't really matter: the whole point of putting the script in the commit log is to be able to review and document the script you used. If you're not going to put the one you used, it's kind of pointless.
Personally, I don't have any interest in reviewing the coccinelle script so I don't need it and, from my point of view, you could just remove it from the patch description (or point to it indirectly or something). I'll review each patch on its own merits. I am a bit curious if you ended up fully generating this patch with a coccinelle script or if you used a coccinelle script to start and then had to manually tweak the patch after. Actually, I guess I'll take it back. If you manage to fully generate conversions for all the panels with a single cocinelle script, I would love to take a glance at your full script just to satisfy my curiosity for how you handled everything properly. :-P
-Doug
Quoted 68 lines · Doug Anderson
Hi,
Quoted 3 lines · Maxime Ripard
Quoted 1 line · Anusha Srivatsa
On Thu, Mar 6, 2025 at 4:31 AM Maxime Ripard <[email protected]>
Quoted 39 lines · wrote:
Quoted 39 lines
Quoted 39 lines
Hi Anusha,
Quoted 35 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of APIQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
..
)(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle
script,
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
so you must put the entire script you used here.
I was actually thinking of sending patches per driver this time around since Tejas also seems to be looking into similar parts....Thoughts?
Quoted 7 lines
Not really?
The point of doing it with one driver was to make sure the coccinelle script was fine before rolling it to other drivers. And actually, it doesn't really matter: the whole point of putting the script in the commit log is to be able to review and document the script you used. If you're not going to put the one you used, it's kind of pointless.
Quoted 12 lines
Personally, I don't have any interest in reviewing the coccinelle script so I don't need it and, from my point of view, you could just remove it from the patch description (or point to it indirectly or something). I'll review each patch on its own merits. I am a bit curious if you ended up fully generating this patch with a coccinelle script or if you used a coccinelle script to start and then had to manually tweak the patch after. Actually, I guess I'll take it back. If you manage to fully generate conversions for all the panels with a single cocinelle script, I would love to take a glance at your full script just to satisfy my curiosity for how you handled everything properly. :-P
managed to get all conversions other than the usleep_range() and mslee() because I was trying to replace them with mipi_dsi_* variants only in functions that I was touching and not each and every occurrence. Didnt spend enough time to get the script smart enough to do that and did only usleep() and msleep change manually. Here goes the script:
@rule_1@
identifier dsi_var;
expression dsi_device;
expression list es;
@@
struct mipi_dsi_device *dsi_var = dsi_device; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var }; <+...
-mipi_dsi_dcs_write_seq(dsi_var,es); +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);
...+>
//rule_2
@@
expression list es;
identifier jdi;
@@
static int jdi_write_dcdc_registers(struct jdi_panel *jdi) {
+struct mipi_dsi_multi_context dsi_ctx1 = { .dsi = jdi->link1 }; +struct mipi_dsi_multi_context dsi_ctx2 = { .dsi = jdi->link2 }; <+...
-mipi_dsi_generic_write_seq(jdi->link1,es); +mipi_dsi_generic_write_seq_multi(&dsi_ctx1,es); -mipi_dsi_generic_write_seq(jdi->link2,es); +mipi_dsi_generic_write_seq_multi(&dsi_ctx2,es);
...+>
}
@rule_3@
identifier dsi_var;
identifier r;
identifier func;
type t;
position p;
expression dsi_device;
expression list es;
@@
t func(...) {
...
struct mipi_dsi_device *dsi_var = dsi_device;
+struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var }; <+...
(
-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);
|
-r = mipi_dsi_dcs_exit_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
|
-r = mipi_dsi_dcs_enter_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
|
|
-r = mipi_dsi_dcs_write_buffer(dsi_var,es)@p; +mipi_dsi_dcs_write_buffer_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_set_display_off(dsi_var,es)@p; +mipi_dsi_dcs_set_display_off_multi(&dsi_ctx,es);
|
-r = mipi_dsi_compression_mode_ext(dsi_var,es)@p; +mipi_dsi_compression_mode_ext_multi(&dsi_ctx,es);
|
-r = mipi_dsi_compression_mode(dsi_var,es)@p; +mipi_dsi_compression_mode_multi(&dsi_ctx,es);
|
-r = mipi_dsi_picture_parameter_set(dsi_var,es)@p; +mipi_dsi_picture_parameter_set_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_set_display_on(dsi_var,es)@p; +mipi_dsi_dcs_set_display_on_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_set_tear_on(dsi_var)@p; +mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx);
|
-r = mipi_dsi_turn_on_peripheral(dsi_var)@p; +mipi_dsi_turn_on_peripheral_multi(&dsi_ctx);
|
-r = mipi_dsi_dcs_soft_reset(dsi_var)@p; +mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);
|
-r = mipi_dsi_dcs_set_display_brightness(dsi_var,es)@p; +mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx,es); |
-r = mipi_dsi_dcs_set_pixel_format(dsi_var,es)@p; +mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_set_column_address(dsi_var,es)@p; +mipi_dsi_dcs_set_column_address_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_set_page_address(dsi_var,es)@p; +mipi_dsi_dcs_set_page_address_multi(&dsi_ctx,es);
|
-r = mipi_dsi_dcs_set_tear_scanline(dsi_var,es)@p; +mipi_dsi_dcs_set_tear_scanline_multi(&dsi_ctx,es);
)
-if(r < 0) {
-...
-}
...+>
}
Thanks,
Anusha
Quoted 3 lines
-Doug
Maxime Ripard
maintainerQuoted 180 lines · Anusha Srivatsa
Quoted 66 lines · Doug Anderson
Quoted 3 lines · Maxime Ripard
Quoted 1 line · Anusha Srivatsa
On Thu, Mar 6, 2025 at 4:31 AM Maxime Ripard <[email protected]>
Quoted 39 lines · wrote:
Quoted 39 lines
Quoted 39 lines
Hi Anusha,
Quoted 35 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of APIQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
..
)(quoted diff) +0
-3-if(r < 0) { -... -}...+>
The point of sending a single patch was to review the coccinelle
script,
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
so you must put the entire script you used here.
I was actually thinking of sending patches per driver this time around since Tejas also seems to be looking into similar parts....Thoughts?
Quoted 7 lines
Not really?
The point of doing it with one driver was to make sure the coccinelle script was fine before rolling it to other drivers. And actually, it doesn't really matter: the whole point of putting the script in the commit log is to be able to review and document the script you used. If you're not going to put the one you used, it's kind of pointless.
Quoted 12 lines
Personally, I don't have any interest in reviewing the coccinelle script so I don't need it and, from my point of view, you could just remove it from the patch description (or point to it indirectly or something). I'll review each patch on its own merits. I am a bit curious if you ended up fully generating this patch with a coccinelle script or if you used a coccinelle script to start and then had to manually tweak the patch after. Actually, I guess I'll take it back. If you manage to fully generate conversions for all the panels with a single cocinelle script, I would love to take a glance at your full script just to satisfy my curiosity for how you handled everything properly. :-P
managed to get all conversions other than the
usleep_range()andmslee()because I was trying to replace them with mipi_dsi_* variants only in functions that I was touching and not each and every occurrence. Didnt spend enough time to get the script smart enough to do that and did onlyusleep()and msleep change manually. Here goes the script:@rule_1@
identifierdsi_var;
expressiondsi_device;
expression list es;
@@
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...(quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es); +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);...+>
//rule_2
@@
expression list es;
identifier jdi;
@@
static intjdi_write_dcdc_registers(struct jdi_panel *jdi){(quoted diff) +2
-0+struct mipi_dsi_multi_context dsi_ctx1 = { .dsi = jdi->link1 }; +struct mipi_dsi_multi_context dsi_ctx2 = { .dsi = jdi->link2 };<+...
(quoted diff) +2
-2-mipi_dsi_generic_write_seq(jdi->link1,es); +mipi_dsi_generic_write_seq_multi(&dsi_ctx1,es); -mipi_dsi_generic_write_seq(jdi->link2,es); +mipi_dsi_generic_write_seq_multi(&dsi_ctx2,es);...+>
}
@rule_3@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_exit_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_enter_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);|
|(quoted diff) +1
-1-r = mipi_dsi_dcs_write_buffer(dsi_var,es)@p; +mipi_dsi_dcs_write_buffer_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_display_off(dsi_var,es)@p; +mipi_dsi_dcs_set_display_off_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_compression_mode_ext(dsi_var,es)@p; +mipi_dsi_compression_mode_ext_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_compression_mode(dsi_var,es)@p; +mipi_dsi_compression_mode_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_picture_parameter_set(dsi_var,es)@p; +mipi_dsi_picture_parameter_set_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_display_on(dsi_var,es)@p; +mipi_dsi_dcs_set_display_on_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_tear_on(dsi_var)@p; +mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_turn_on_peripheral(dsi_var)@p; +mipi_dsi_turn_on_peripheral_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_soft_reset(dsi_var)@p; +mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_display_brightness(dsi_var,es)@p; +mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_pixel_format(dsi_var,es)@p; +mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_column_address(dsi_var,es)@p; +mipi_dsi_dcs_set_column_address_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_page_address(dsi_var,es)@p; +mipi_dsi_dcs_set_page_address_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_tear_scanline(dsi_var,es)@p; +mipi_dsi_dcs_set_tear_scanline_multi(&dsi_ctx,es);
Quoted 1 line
)
You're not matching on msleep because it doesn't return anything, and here you're expecting a return value. You need to make 'r =' optional.
Maxime
Quoted 191 lines · Maxime Ripard
Quoted 1 line · Anusha Srivatsa
On Thu, Mar 6, 2025 at 12:54 PM Doug Anderson <[email protected]>
Quoted 1 line · wrote:
Quoted 1 line
On Thu, Mar 6, 2025 at 9:20 AM Maxime Ripard <[email protected]>
Quoted 51 lines · wrote:
Quoted 51 lines
Quoted 3 lines · Anusha Srivatsa
Quoted 1 line
On Thu, Mar 6, 2025 at 4:31 AM Maxime Ripard <[email protected]>
Quoted 47 lines · wrote:
Quoted 47 lines
Quoted 47 lines
Hi Anusha,
Quoted 40 lines · Anusha Srivatsa
Move away from using deprecated API and use
_multivariants if available. Usemipi_dsi_msleep()andmipi_dsi_usleep_range()instead ofmsleep()andusleep_range()respectively.Used Coccinelle to find the multiple occurences. SmPl patch:
@rule@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es)@p; +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write_seq(dsi_var,es)@p; +mipi_dsi_generic_write_seq_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-mipi_dsi_generic_write(dsi_var,es)@p; +mipi_dsi_generic_write_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
....rest of API
..
)(quoted diff) +0
-3-if(r < 0) { -... -}Quoted 1 line
...+>
The point of sending a single patch was to review the coccinelle
Quoted 4 lines
Quoted 4 lines
script,
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
so you must put the entire script you used here.
I was actually thinking of sending patches per driver this time
around
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
since Tejas also seems to be looking into similar
parts....Thoughts?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Not really?
The point of doing it with one driver was to make sure the coccinelle script was fine before rolling it to other drivers. And actually, it doesn't really matter: the whole point of putting the script in the commit log is to be able to review and document the script you used.
If
Quoted 115 lines
Quoted 14 lines
Quoted 1 line
you're not going to put the one you used, it's kind of pointless.
Personally, I don't have any interest in reviewing the coccinelle script so I don't need it and, from my point of view, you could just remove it from the patch description (or point to it indirectly or something). I'll review each patch on its own merits. I am a bit curious if you ended up fully generating this patch with a coccinelle script or if you used a coccinelle script to start and then had to manually tweak the patch after. Actually, I guess I'll take it back. If you manage to fully generate conversions for all the panels with a single cocinelle script, I would love to take a glance at your full script just to satisfy my curiosity for how you handled everything properly. :-P
managed to get all conversions other than the
usleep_range()andmslee()because I was trying to replace them with mipi_dsi_* variants only in functions that I was touching and not each and every occurrence. Didnt spend enough time to get the script smart enough to do that and did onlyusleep()and msleep change manually. Here goes the script:@rule_1@
identifierdsi_var;
expressiondsi_device;
expression list es;
@@
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...(quoted diff) +1
-1-mipi_dsi_dcs_write_seq(dsi_var,es); +mipi_dsi_dcs_write_seq_multi(&dsi_ctx,es);...+>
//rule_2
@@
expression list es;
identifier jdi;
@@
static intjdi_write_dcdc_registers(struct jdi_panel *jdi){(quoted diff) +2
-0+struct mipi_dsi_multi_context dsi_ctx1 = { .dsi = jdi->link1 }; +struct mipi_dsi_multi_context dsi_ctx2 = { .dsi = jdi->link2 };<+...
(quoted diff) +2
-2-mipi_dsi_generic_write_seq(jdi->link1,es); +mipi_dsi_generic_write_seq_multi(&dsi_ctx1,es); -mipi_dsi_generic_write_seq(jdi->link2,es); +mipi_dsi_generic_write_seq_multi(&dsi_ctx2,es);...+>
}
@rule_3@
identifierdsi_var;
identifier r;
identifier func;
type t;
position p;
expressiondsi_device;
expression list es;
@@
t func(...) {
...
structmipi_dsi_device*dsi_var=dsi_device; +structmipi_dsi_multi_contextdsi_ctx= { .dsi =dsi_var}; <+...
((quoted diff) +1
-1-r = mipi_dsi_dcs_nop(dsi_var)@p; +mipi_dsi_dcs_nop_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_exit_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_enter_sleep_mode(dsi_var)@p; +mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);|
|(quoted diff) +1
-1-r = mipi_dsi_dcs_write_buffer(dsi_var,es)@p; +mipi_dsi_dcs_write_buffer_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_display_off(dsi_var,es)@p; +mipi_dsi_dcs_set_display_off_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_compression_mode_ext(dsi_var,es)@p; +mipi_dsi_compression_mode_ext_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_compression_mode(dsi_var,es)@p; +mipi_dsi_compression_mode_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_picture_parameter_set(dsi_var,es)@p; +mipi_dsi_picture_parameter_set_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_display_on(dsi_var,es)@p; +mipi_dsi_dcs_set_display_on_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_tear_on(dsi_var)@p; +mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_turn_on_peripheral(dsi_var)@p; +mipi_dsi_turn_on_peripheral_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_soft_reset(dsi_var)@p; +mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_display_brightness(dsi_var,es)@p; +mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_pixel_format(dsi_var,es)@p; +mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_column_address(dsi_var,es)@p; +mipi_dsi_dcs_set_column_address_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_page_address(dsi_var,es)@p; +mipi_dsi_dcs_set_page_address_multi(&dsi_ctx,es);|
(quoted diff) +1
-1-r = mipi_dsi_dcs_set_tear_scanline(dsi_var,es)@p; +mipi_dsi_dcs_set_tear_scanline_multi(&dsi_ctx,es);Quoted 1 line
)
You're not matching on msleep because it doesn't return anything, and here you're expecting a return value. You need to make 'r =' optional.
Quoted 1 line
Yup! works now :)
Anusha
Quoted 2 lines
Maxime