dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/probe-helper: Fix modes reporting for writeback connector
@ 2018-07-12  8:48 Alexandru Gheorghe
  2018-07-12  8:55 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandru Gheorghe @ 2018-07-12  8:48 UTC (permalink / raw)
  To: gustavo, maarten.lankhorst, seanpaul, airlied, dri-devel,
	liviu.dudau, brian.starkey
  Cc: nd, Alexandru Gheorghe

Writeback connector is reported as disconnected, currently this causes
the setting of the edid property to null and then exit.
In order to properly get the modes for writeback we need to add an
exception when connector type is DRM_MODE_CONNECTOR_WRITEBACK.

Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
---
 drivers/gpu/drm/drm_probe_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 52774339..c7bdbe2 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -472,7 +472,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 
 	dev->mode_config.poll_running = drm_kms_helper_poll;
 
-	if (connector->status == connector_status_disconnected) {
+	if (connector->status == connector_status_disconnected &&
+	    connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) {
 		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
 			connector->base.id, connector->name);
 		drm_mode_connector_update_edid_property(connector, NULL);
-- 
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] 4+ messages in thread

* Re: [PATCH] drm/probe-helper: Fix modes reporting for writeback connector
  2018-07-12  8:48 [PATCH] drm/probe-helper: Fix modes reporting for writeback connector Alexandru Gheorghe
@ 2018-07-12  8:55 ` Daniel Vetter
  2018-07-12  9:20   ` Alexandru-Cosmin Gheorghe
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2018-07-12  8:55 UTC (permalink / raw)
  To: Alexandru Gheorghe; +Cc: airlied, liviu.dudau, dri-devel, nd

On Thu, Jul 12, 2018 at 09:48:02AM +0100, Alexandru Gheorghe wrote:
> Writeback connector is reported as disconnected, currently this causes
> the setting of the edid property to null and then exit.
> In order to properly get the modes for writeback we need to add an
> exception when connector type is DRM_MODE_CONNECTOR_WRITEBACK.
> 
> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>

Why do you even need a mode list for writeback?

Also, if you're already faking a mode list for the writeback connector,
why can't you also fake it's connection status?
-Daniel

> ---
>  drivers/gpu/drm/drm_probe_helper.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 52774339..c7bdbe2 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -472,7 +472,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
>  
>  	dev->mode_config.poll_running = drm_kms_helper_poll;
>  
> -	if (connector->status == connector_status_disconnected) {
> +	if (connector->status == connector_status_disconnected &&
> +	    connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) {
>  		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
>  			connector->base.id, connector->name);
>  		drm_mode_connector_update_edid_property(connector, NULL);
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
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] 4+ messages in thread

* Re: [PATCH] drm/probe-helper: Fix modes reporting for writeback connector
  2018-07-12  8:55 ` Daniel Vetter
@ 2018-07-12  9:20   ` Alexandru-Cosmin Gheorghe
  2018-07-12 13:08     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandru-Cosmin Gheorghe @ 2018-07-12  9:20 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: airlied, liviu.dudau, dri-devel, nd

On Thu, Jul 12, 2018 at 10:55:47AM +0200, Daniel Vetter wrote:
> On Thu, Jul 12, 2018 at 09:48:02AM +0100, Alexandru Gheorghe wrote:
> > Writeback connector is reported as disconnected, currently this causes
> > the setting of the edid property to null and then exit.
> > In order to properly get the modes for writeback we need to add an
> > exception when connector type is DRM_MODE_CONNECTOR_WRITEBACK.
> > 
> > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
> 
> Why do you even need a mode list for writeback?

It's used by userspace to know how big the writeback buffer could be.

> 
> Also, if you're already faking a mode list for the writeback connector,
> why can't you also fake it's connection status?
> -Daniel

AFAIK Reporting it as disconnected was a way of making sure it will be
ignored by userspace that's not aware of writeback connectorsa. Do you
think it's superfluous with DRM_CLIENT_CAP_WRITEBACK_CONNECTORS ?

> 
> > ---
> >  drivers/gpu/drm/drm_probe_helper.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> > index 52774339..c7bdbe2 100644
> > --- a/drivers/gpu/drm/drm_probe_helper.c
> > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > @@ -472,7 +472,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
> >  
> >  	dev->mode_config.poll_running = drm_kms_helper_poll;
> >  
> > -	if (connector->status == connector_status_disconnected) {
> > +	if (connector->status == connector_status_disconnected &&
> > +	    connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) {
> >  		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
> >  			connector->base.id, connector->name);
> >  		drm_mode_connector_update_edid_property(connector, NULL);
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

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

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

* Re: [PATCH] drm/probe-helper: Fix modes reporting for writeback connector
  2018-07-12  9:20   ` Alexandru-Cosmin Gheorghe
@ 2018-07-12 13:08     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2018-07-12 13:08 UTC (permalink / raw)
  To: Alexandru-Cosmin Gheorghe; +Cc: airlied, dri-devel, liviu.dudau, nd

On Thu, Jul 12, 2018 at 10:20:35AM +0100, Alexandru-Cosmin Gheorghe wrote:
> On Thu, Jul 12, 2018 at 10:55:47AM +0200, Daniel Vetter wrote:
> > On Thu, Jul 12, 2018 at 09:48:02AM +0100, Alexandru Gheorghe wrote:
> > > Writeback connector is reported as disconnected, currently this causes
> > > the setting of the edid property to null and then exit.
> > > In order to properly get the modes for writeback we need to add an
> > > exception when connector type is DRM_MODE_CONNECTOR_WRITEBACK.
> > > 
> > > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
> > 
> > Why do you even need a mode list for writeback?
> 
> It's used by userspace to know how big the writeback buffer could be.
> 
> > 
> > Also, if you're already faking a mode list for the writeback connector,
> > why can't you also fake it's connection status?
> > -Daniel
> 
> AFAIK Reporting it as disconnected was a way of making sure it will be
> ignored by userspace that's not aware of writeback connectorsa. Do you
> think it's superfluous with DRM_CLIENT_CAP_WRITEBACK_CONNECTORS ?

Yes, since we're filtering writeback connectors from userspace that can't
deal with them I think a cleaner solution would be to just mark them as
connected. Old userspace won't ever see them, new userspace should already
correctly ignore them.
-Daniel

> 
> > 
> > > ---
> > >  drivers/gpu/drm/drm_probe_helper.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> > > index 52774339..c7bdbe2 100644
> > > --- a/drivers/gpu/drm/drm_probe_helper.c
> > > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > > @@ -472,7 +472,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
> > >  
> > >  	dev->mode_config.poll_running = drm_kms_helper_poll;
> > >  
> > > -	if (connector->status == connector_status_disconnected) {
> > > +	if (connector->status == connector_status_disconnected &&
> > > +	    connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) {
> > >  		DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
> > >  			connector->base.id, connector->name);
> > >  		drm_mode_connector_update_edid_property(connector, NULL);
> > > -- 
> > > 2.7.4
> > > 
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> 
> -- 
> Cheers,
> Alex G

-- 
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] 4+ messages in thread

end of thread, other threads:[~2018-07-12 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12  8:48 [PATCH] drm/probe-helper: Fix modes reporting for writeback connector Alexandru Gheorghe
2018-07-12  8:55 ` Daniel Vetter
2018-07-12  9:20   ` Alexandru-Cosmin Gheorghe
2018-07-12 13:08     ` Daniel Vetter

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).