All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
@ 2017-09-27 18:23 ` Haneen Mohammed
  0 siblings, 0 replies; 9+ messages in thread
From: Haneen Mohammed @ 2017-09-27 18:23 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, outreachy-kernel, gregkh

Since the output has 1:1 relationship between connectors and encoders,
and the driver is relying on the atomic helpers, remove the custom
best_encoder() and let the core call drm_atomic_helper_best_encoder().

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index a57da05..275844d 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
 	return ret;
 }
 
-static struct drm_encoder *
-cdn_dp_connector_best_encoder(struct drm_connector *connector)
-{
-	struct cdn_dp_device *dp = connector_to_dp(connector);
-
-	return &dp->encoder;
-}
-
 static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
 				       struct drm_display_mode *mode)
 {
@@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
 
 static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
 	.get_modes = cdn_dp_connector_get_modes,
-	.best_encoder = cdn_dp_connector_best_encoder,
 	.mode_valid = cdn_dp_connector_mode_valid,
 };
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
@ 2017-09-27 18:23 ` Haneen Mohammed
  0 siblings, 0 replies; 9+ messages in thread
From: Haneen Mohammed @ 2017-09-27 18:23 UTC (permalink / raw)
  To: dri-devel
  Cc: Mark Yao, David Airlie, Heiko Stuebner, outreachy-kernel, gregkh,
	Daniel Vetter, Sean Paul

Since the output has 1:1 relationship between connectors and encoders,
and the driver is relying on the atomic helpers, remove the custom
best_encoder() and let the core call drm_atomic_helper_best_encoder().

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index a57da05..275844d 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
 	return ret;
 }
 
-static struct drm_encoder *
-cdn_dp_connector_best_encoder(struct drm_connector *connector)
-{
-	struct cdn_dp_device *dp = connector_to_dp(connector);
-
-	return &dp->encoder;
-}
-
 static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
 				       struct drm_display_mode *mode)
 {
@@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
 
 static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
 	.get_modes = cdn_dp_connector_get_modes,
-	.best_encoder = cdn_dp_connector_best_encoder,
 	.mode_valid = cdn_dp_connector_mode_valid,
 };
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
  2017-09-27 18:23 ` Haneen Mohammed
@ 2017-09-27 20:06   ` Sean Paul
  -1 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2017-09-27 20:06 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: gregkh, dri-devel, outreachy-kernel, Daniel Vetter

On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> Since the output has 1:1 relationship between connectors and encoders,
> and the driver is relying on the atomic helpers, remove the custom
> best_encoder() and let the core call drm_atomic_helper_best_encoder().
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Thanks for the patch, I've applied it to drm-misc-next.

I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
hanging around. Any interest in removing those as well?

Sean


> ---
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index a57da05..275844d 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
>  	return ret;
>  }
>  
> -static struct drm_encoder *
> -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> -{
> -	struct cdn_dp_device *dp = connector_to_dp(connector);
> -
> -	return &dp->encoder;
> -}
> -
>  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
>  				       struct drm_display_mode *mode)
>  {
> @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
>  
>  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
>  	.get_modes = cdn_dp_connector_get_modes,
> -	.best_encoder = cdn_dp_connector_best_encoder,
>  	.mode_valid = cdn_dp_connector_mode_valid,
>  };
>  
> -- 
> 2.7.4
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
@ 2017-09-27 20:06   ` Sean Paul
  0 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2017-09-27 20:06 UTC (permalink / raw)
  To: Haneen Mohammed
  Cc: dri-devel, Mark Yao, David Airlie, Heiko Stuebner,
	outreachy-kernel, gregkh, Daniel Vetter, Sean Paul

On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> Since the output has 1:1 relationship between connectors and encoders,
> and the driver is relying on the atomic helpers, remove the custom
> best_encoder() and let the core call drm_atomic_helper_best_encoder().
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Thanks for the patch, I've applied it to drm-misc-next.

I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
hanging around. Any interest in removing those as well?

Sean


> ---
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index a57da05..275844d 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
>  	return ret;
>  }
>  
> -static struct drm_encoder *
> -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> -{
> -	struct cdn_dp_device *dp = connector_to_dp(connector);
> -
> -	return &dp->encoder;
> -}
> -
>  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
>  				       struct drm_display_mode *mode)
>  {
> @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
>  
>  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
>  	.get_modes = cdn_dp_connector_get_modes,
> -	.best_encoder = cdn_dp_connector_best_encoder,
>  	.mode_valid = cdn_dp_connector_mode_valid,
>  };
>  
> -- 
> 2.7.4
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
  2017-09-27 20:06   ` Sean Paul
  (?)
@ 2017-09-28  1:03   ` Haneen Mohammed
  -1 siblings, 0 replies; 9+ messages in thread
From: Haneen Mohammed @ 2017-09-28  1:03 UTC (permalink / raw)
  To: Sean Paul; +Cc: outreachy-kernel

On Wed, Sep 27, 2017 at 04:06:21PM -0400, Sean Paul wrote:
> On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> > Since the output has 1:1 relationship between connectors and encoders,
> > and the driver is relying on the atomic helpers, remove the custom
> > best_encoder() and let the core call drm_atomic_helper_best_encoder().
> > 
> > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> 
> Thanks for the patch, I've applied it to drm-misc-next.
> 
> I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
> hanging around. Any interest in removing those as well?
> 
> Sean
> 
> 

sure, I will check them out.

Thank you,
Haneen

> > ---
> >  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
> >  1 file changed, 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > index a57da05..275844d 100644
> > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
> >  	return ret;
> >  }
> >  
> > -static struct drm_encoder *
> > -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> > -{
> > -	struct cdn_dp_device *dp = connector_to_dp(connector);
> > -
> > -	return &dp->encoder;
> > -}
> > -
> >  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> >  				       struct drm_display_mode *mode)
> >  {
> > @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> >  
> >  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
> >  	.get_modes = cdn_dp_connector_get_modes,
> > -	.best_encoder = cdn_dp_connector_best_encoder,
> >  	.mode_valid = cdn_dp_connector_mode_valid,
> >  };
> >  
> > -- 
> > 2.7.4
> > 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
  2017-09-27 20:06   ` Sean Paul
@ 2017-10-09 23:18     ` Haneen Mohammed
  -1 siblings, 0 replies; 9+ messages in thread
From: Haneen Mohammed @ 2017-10-09 23:18 UTC (permalink / raw)
  To: Sean Paul; +Cc: gregkh, dri-devel, outreachy-kernel, Daniel Vetter

On Wed, Sep 27, 2017 at 04:06:21PM -0400, Sean Paul wrote:
> On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> > Since the output has 1:1 relationship between connectors and encoders,
> > and the driver is relying on the atomic helpers, remove the custom
> > best_encoder() and let the core call drm_atomic_helper_best_encoder().
> > 
> > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> 
> Thanks for the patch, I've applied it to drm-misc-next.
> 
> I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
> hanging around. Any interest in removing those as well?
> 
> Sean
> 
> 

I have found three instances, the one in bridge/synopsys/sw-hdmi.c I
checked and the log msg of commit c2a441fe8f7 mentioned that an explicit
assginment to the best_encoder is needed because the bridge is compatible
with both atomic and non-atomic devices.

I suspect this is the same case for vmwgfx/vmwgfx_/ldu/scrn/stdu.c from
checking commit d947d1b71.

Lastly, there is an instance in tinydrm/core/tinydrm-pipe.c but I am not
sure how to verify if the driver supports atomic and non-atomic devices
as well, hence justify deleting it. 

- Haneen

> > ---
> >  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
> >  1 file changed, 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > index a57da05..275844d 100644
> > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
> >  	return ret;
> >  }
> >  
> > -static struct drm_encoder *
> > -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> > -{
> > -	struct cdn_dp_device *dp = connector_to_dp(connector);
> > -
> > -	return &dp->encoder;
> > -}
> > -
> >  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> >  				       struct drm_display_mode *mode)
> >  {
> > @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> >  
> >  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
> >  	.get_modes = cdn_dp_connector_get_modes,
> > -	.best_encoder = cdn_dp_connector_best_encoder,
> >  	.mode_valid = cdn_dp_connector_mode_valid,
> >  };
> >  
> > -- 
> > 2.7.4
> > 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
@ 2017-10-09 23:18     ` Haneen Mohammed
  0 siblings, 0 replies; 9+ messages in thread
From: Haneen Mohammed @ 2017-10-09 23:18 UTC (permalink / raw)
  To: Sean Paul
  Cc: dri-devel, Mark Yao, David Airlie, Heiko Stuebner,
	outreachy-kernel, gregkh, Daniel Vetter

On Wed, Sep 27, 2017 at 04:06:21PM -0400, Sean Paul wrote:
> On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> > Since the output has 1:1 relationship between connectors and encoders,
> > and the driver is relying on the atomic helpers, remove the custom
> > best_encoder() and let the core call drm_atomic_helper_best_encoder().
> > 
> > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> 
> Thanks for the patch, I've applied it to drm-misc-next.
> 
> I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
> hanging around. Any interest in removing those as well?
> 
> Sean
> 
> 

I have found three instances, the one in bridge/synopsys/sw-hdmi.c I
checked and the log msg of commit c2a441fe8f7 mentioned that an explicit
assginment to the best_encoder is needed because the bridge is compatible
with both atomic and non-atomic devices.

I suspect this is the same case for vmwgfx/vmwgfx_/ldu/scrn/stdu.c from
checking commit d947d1b71.

Lastly, there is an instance in tinydrm/core/tinydrm-pipe.c but I am not
sure how to verify if the driver supports atomic and non-atomic devices
as well, hence justify deleting it. 

- Haneen

> > ---
> >  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
> >  1 file changed, 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > index a57da05..275844d 100644
> > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
> >  	return ret;
> >  }
> >  
> > -static struct drm_encoder *
> > -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> > -{
> > -	struct cdn_dp_device *dp = connector_to_dp(connector);
> > -
> > -	return &dp->encoder;
> > -}
> > -
> >  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> >  				       struct drm_display_mode *mode)
> >  {
> > @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> >  
> >  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
> >  	.get_modes = cdn_dp_connector_get_modes,
> > -	.best_encoder = cdn_dp_connector_best_encoder,
> >  	.mode_valid = cdn_dp_connector_mode_valid,
> >  };
> >  
> > -- 
> > 2.7.4
> > 
> 
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
  2017-10-09 23:18     ` Haneen Mohammed
@ 2017-10-10  9:06       ` Daniel Vetter
  -1 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2017-10-10  9:06 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: gregkh, dri-devel, outreachy-kernel, Daniel Vetter

On Mon, Oct 09, 2017 at 05:18:57PM -0600, Haneen Mohammed wrote:
> On Wed, Sep 27, 2017 at 04:06:21PM -0400, Sean Paul wrote:
> > On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> > > Since the output has 1:1 relationship between connectors and encoders,
> > > and the driver is relying on the atomic helpers, remove the custom
> > > best_encoder() and let the core call drm_atomic_helper_best_encoder().
> > > 
> > > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> > 
> > Thanks for the patch, I've applied it to drm-misc-next.
> > 
> > I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
> > hanging around. Any interest in removing those as well?
> > 
> > Sean
> > 
> > 
> 
> I have found three instances, the one in bridge/synopsys/sw-hdmi.c I
> checked and the log msg of commit c2a441fe8f7 mentioned that an explicit
> assginment to the best_encoder is needed because the bridge is compatible
> with both atomic and non-atomic devices.

Yes, this is blocked on armada not yet being converted to atomic.

Might be good to add a comment to assignment in the code.

> I suspect this is the same case for vmwgfx/vmwgfx_/ldu/scrn/stdu.c from
> checking commit d947d1b71.

vmgfx is fully atomic.

> Lastly, there is an instance in tinydrm/core/tinydrm-pipe.c but I am not
> sure how to verify if the driver supports atomic and non-atomic devices
> as well, hence justify deleting it. 

Same for tinydrm.

You can check this by looking for drm_crtc_helper_set_config() - if a
driver is using that then it's a legacy one, if not, then it's atomic.
-Daniel

> 
> - Haneen
> 
> > > ---
> > >  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
> > >  1 file changed, 9 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > > index a57da05..275844d 100644
> > > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > > @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
> > >  	return ret;
> > >  }
> > >  
> > > -static struct drm_encoder *
> > > -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> > > -{
> > > -	struct cdn_dp_device *dp = connector_to_dp(connector);
> > > -
> > > -	return &dp->encoder;
> > > -}
> > > -
> > >  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> > >  				       struct drm_display_mode *mode)
> > >  {
> > > @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> > >  
> > >  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
> > >  	.get_modes = cdn_dp_connector_get_modes,
> > > -	.best_encoder = cdn_dp_connector_best_encoder,
> > >  	.mode_valid = cdn_dp_connector_mode_valid,
> > >  };
> > >  
> > > -- 
> > > 2.7.4
> > > 
> > 
> > -- 
> > Sean Paul, Software Engineer, Google / Chromium OS

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior
@ 2017-10-10  9:06       ` Daniel Vetter
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2017-10-10  9:06 UTC (permalink / raw)
  To: Haneen Mohammed
  Cc: Sean Paul, dri-devel, Mark Yao, David Airlie, Heiko Stuebner,
	outreachy-kernel, gregkh, Daniel Vetter

On Mon, Oct 09, 2017 at 05:18:57PM -0600, Haneen Mohammed wrote:
> On Wed, Sep 27, 2017 at 04:06:21PM -0400, Sean Paul wrote:
> > On Wed, Sep 27, 2017 at 12:23:17PM -0600, Haneen Mohammed wrote:
> > > Since the output has 1:1 relationship between connectors and encoders,
> > > and the driver is relying on the atomic helpers, remove the custom
> > > best_encoder() and let the core call drm_atomic_helper_best_encoder().
> > > 
> > > Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> > 
> > Thanks for the patch, I've applied it to drm-misc-next.
> > 
> > I noticed a few instances of .best_encoder = drm_atomic_helper_best_encoder
> > hanging around. Any interest in removing those as well?
> > 
> > Sean
> > 
> > 
> 
> I have found three instances, the one in bridge/synopsys/sw-hdmi.c I
> checked and the log msg of commit c2a441fe8f7 mentioned that an explicit
> assginment to the best_encoder is needed because the bridge is compatible
> with both atomic and non-atomic devices.

Yes, this is blocked on armada not yet being converted to atomic.

Might be good to add a comment to assignment in the code.

> I suspect this is the same case for vmwgfx/vmwgfx_/ldu/scrn/stdu.c from
> checking commit d947d1b71.

vmgfx is fully atomic.

> Lastly, there is an instance in tinydrm/core/tinydrm-pipe.c but I am not
> sure how to verify if the driver supports atomic and non-atomic devices
> as well, hence justify deleting it. 

Same for tinydrm.

You can check this by looking for drm_crtc_helper_set_config() - if a
driver is using that then it's a legacy one, if not, then it's atomic.
-Daniel

> 
> - Haneen
> 
> > > ---
> > >  drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 ---------
> > >  1 file changed, 9 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > > index a57da05..275844d 100644
> > > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> > > @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
> > >  	return ret;
> > >  }
> > >  
> > > -static struct drm_encoder *
> > > -cdn_dp_connector_best_encoder(struct drm_connector *connector)
> > > -{
> > > -	struct cdn_dp_device *dp = connector_to_dp(connector);
> > > -
> > > -	return &dp->encoder;
> > > -}
> > > -
> > >  static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> > >  				       struct drm_display_mode *mode)
> > >  {
> > > @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector,
> > >  
> > >  static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = {
> > >  	.get_modes = cdn_dp_connector_get_modes,
> > > -	.best_encoder = cdn_dp_connector_best_encoder,
> > >  	.mode_valid = cdn_dp_connector_mode_valid,
> > >  };
> > >  
> > > -- 
> > > 2.7.4
> > > 
> > 
> > -- 
> > Sean Paul, Software Engineer, Google / Chromium OS

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-10  9:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 18:23 [PATCH] drm/rockchip: Rely on the default best_encoder() behavior Haneen Mohammed
2017-09-27 18:23 ` Haneen Mohammed
2017-09-27 20:06 ` Sean Paul
2017-09-27 20:06   ` Sean Paul
2017-09-28  1:03   ` Haneen Mohammed
2017-10-09 23:18   ` Haneen Mohammed
2017-10-09 23:18     ` Haneen Mohammed
2017-10-10  9:06     ` Daniel Vetter
2017-10-10  9:06       ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.