Re: [PATCH 1/2] drm/bridge: chipone-icn6211: Switch to atomic operations

2022-01-04 Thread Robert Foss
Applied to drm-misc-next


Re: [PATCH 1/2] drm/bridge: chipone-icn6211: Switch to atomic operations

2022-01-04 Thread Robert Foss
On Sun, 19 Dec 2021 at 17:41, Jagan Teki  wrote:
>
> On Fri, Nov 19, 2021 at 8:23 PM Jagan Teki  wrote:
> >
> > Replace atomic version of the pre_enable/enable/post_disable
> > operations to continue the transition to the atomic API.
> >
> > Also added default drm atomic operations for duplicate, destroy
> > and reset state API's in order to have smooth transition on
> > atomic API's.
> >
> > Tested on Allwinner R16/R40 DSI.
> >
> > Signed-off-by: Jagan Teki 
> > ---
>
> Gentle ping!

Reviewed-by: Robert Foss 


Re: [PATCH 1/2] drm/bridge: chipone-icn6211: Switch to atomic operations

2021-12-19 Thread Jagan Teki
On Fri, Nov 19, 2021 at 8:23 PM Jagan Teki  wrote:
>
> Replace atomic version of the pre_enable/enable/post_disable
> operations to continue the transition to the atomic API.
>
> Also added default drm atomic operations for duplicate, destroy
> and reset state API's in order to have smooth transition on
> atomic API's.
>
> Tested on Allwinner R16/R40 DSI.
>
> Signed-off-by: Jagan Teki 
> ---

Gentle ping!


[PATCH 1/2] drm/bridge: chipone-icn6211: Switch to atomic operations

2021-11-19 Thread Jagan Teki
Replace atomic version of the pre_enable/enable/post_disable
operations to continue the transition to the atomic API.

Also added default drm atomic operations for duplicate, destroy
and reset state API's in order to have smooth transition on
atomic API's.

Tested on Allwinner R16/R40 DSI.

Signed-off-by: Jagan Teki 
---
 drivers/gpu/drm/bridge/chipone-icn6211.c | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c 
b/drivers/gpu/drm/bridge/chipone-icn6211.c
index a6151db95586..77b3e2c29461 100644
--- a/drivers/gpu/drm/bridge/chipone-icn6211.c
+++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
@@ -4,6 +4,7 @@
  * Author: Jagan Teki 
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -61,7 +62,8 @@ static inline int chipone_dsi_write(struct chipone *icn,  
const void *seq,
chipone_dsi_write(icn, d, ARRAY_SIZE(d));   \
}
 
-static void chipone_enable(struct drm_bridge *bridge)
+static void chipone_atomic_enable(struct drm_bridge *bridge,
+ struct drm_bridge_state *old_bridge_state)
 {
struct chipone *icn = bridge_to_chipone(bridge);
struct drm_display_mode *mode = bridge_to_mode(bridge);
@@ -114,7 +116,8 @@ static void chipone_enable(struct drm_bridge *bridge)
usleep_range(1, 11000);
 }
 
-static void chipone_pre_enable(struct drm_bridge *bridge)
+static void chipone_atomic_pre_enable(struct drm_bridge *bridge,
+ struct drm_bridge_state *old_bridge_state)
 {
struct chipone *icn = bridge_to_chipone(bridge);
int ret;
@@ -145,7 +148,8 @@ static void chipone_pre_enable(struct drm_bridge *bridge)
usleep_range(1, 11000);
 }
 
-static void chipone_post_disable(struct drm_bridge *bridge)
+static void chipone_atomic_post_disable(struct drm_bridge *bridge,
+   struct drm_bridge_state 
*old_bridge_state)
 {
struct chipone *icn = bridge_to_chipone(bridge);
 
@@ -169,10 +173,13 @@ static int chipone_attach(struct drm_bridge *bridge, enum 
drm_bridge_attach_flag
 }
 
 static const struct drm_bridge_funcs chipone_bridge_funcs = {
-   .attach = chipone_attach,
-   .post_disable = chipone_post_disable,
-   .pre_enable = chipone_pre_enable,
-   .enable = chipone_enable,
+   .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
+   .atomic_destroy_state   = drm_atomic_helper_bridge_destroy_state,
+   .atomic_reset   = drm_atomic_helper_bridge_reset,
+   .atomic_pre_enable  = chipone_atomic_pre_enable,
+   .atomic_enable  = chipone_atomic_enable,
+   .atomic_post_disable= chipone_atomic_post_disable,
+   .attach = chipone_attach,
 };
 
 static int chipone_parse_dt(struct chipone *icn)
-- 
2.25.1