All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
@ 2018-11-15 16:32 ` Paul Kocialkowski
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Kocialkowski @ 2018-11-15 16:32 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
	Thomas Petazzoni, Eric Anholt, Boris Brezillon,
	Paul Kocialkowski

Writeback connectors do not produce any on-screen output and require
special care for use. Such connectors are hidden from enumeration in
DRM resources by default, but they are still picked-up by fbdev.
This makes rather little sense since fbdev is not really adapted for
dealing with writeback.

Moreover, this is also a source of issues when userspace disables the
CRTC (and associated plane) without detaching the CRTC from the
connector (which is hidden by default). In this case, the connector is
still using the CRTC, leading to am "enabled/connectors mismatch" and
eventually the failure of the associated atomic commit. This situation
happens with VC4 testing under IGT GPU Tools.

Filter out writeback connectors in the fbdev helper to solve this.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index a502f3e519fd..dd852a25d375 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -219,6 +219,9 @@ int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
 	mutex_lock(&fb_helper->lock);
 	drm_connector_list_iter_begin(dev, &conn_iter);
 	drm_for_each_connector_iter(connector, &conn_iter) {
+		if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
+			continue;
+
 		ret = __drm_fb_helper_add_one_connector(fb_helper, connector);
 		if (ret)
 			goto fail;
-- 
2.19.1


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

* [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
@ 2018-11-15 16:32 ` Paul Kocialkowski
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Kocialkowski @ 2018-11-15 16:32 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: Maxime Ripard, Boris Brezillon, Paul Kocialkowski, David Airlie,
	Thomas Petazzoni, Sean Paul

Writeback connectors do not produce any on-screen output and require
special care for use. Such connectors are hidden from enumeration in
DRM resources by default, but they are still picked-up by fbdev.
This makes rather little sense since fbdev is not really adapted for
dealing with writeback.

Moreover, this is also a source of issues when userspace disables the
CRTC (and associated plane) without detaching the CRTC from the
connector (which is hidden by default). In this case, the connector is
still using the CRTC, leading to am "enabled/connectors mismatch" and
eventually the failure of the associated atomic commit. This situation
happens with VC4 testing under IGT GPU Tools.

Filter out writeback connectors in the fbdev helper to solve this.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
 drivers/gpu/drm/drm_fb_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index a502f3e519fd..dd852a25d375 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -219,6 +219,9 @@ int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
 	mutex_lock(&fb_helper->lock);
 	drm_connector_list_iter_begin(dev, &conn_iter);
 	drm_for_each_connector_iter(connector, &conn_iter) {
+		if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
+			continue;
+
 		ret = __drm_fb_helper_add_one_connector(fb_helper, connector);
 		if (ret)
 			goto fail;
-- 
2.19.1

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

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

* Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
  2018-11-15 16:32 ` Paul Kocialkowski
@ 2018-11-15 16:42   ` Boris Brezillon
  -1 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-11-15 16:42 UTC (permalink / raw)
  To: Paul Kocialkowski
  Cc: dri-devel, linux-kernel, Maarten Lankhorst, Maxime Ripard,
	Sean Paul, David Airlie, Thomas Petazzoni, Eric Anholt

On Thu, 15 Nov 2018 17:32:48 +0100
Paul Kocialkowski <paul.kocialkowski@bootlin.com> wrote:

> Writeback connectors do not produce any on-screen output and require
> special care for use. Such connectors are hidden from enumeration in
> DRM resources by default, but they are still picked-up by fbdev.
> This makes rather little sense since fbdev is not really adapted for
> dealing with writeback.
> 
> Moreover, this is also a source of issues when userspace disables the
> CRTC (and associated plane) without detaching the CRTC from the
> connector (which is hidden by default). In this case, the connector is
> still using the CRTC, leading to am "enabled/connectors mismatch" and

				   ^an

> eventually the failure of the associated atomic commit. This situation
> happens with VC4 testing under IGT GPU Tools.
> 
> Filter out writeback connectors in the fbdev helper to solve this.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index a502f3e519fd..dd852a25d375 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -219,6 +219,9 @@ int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
>  	mutex_lock(&fb_helper->lock);
>  	drm_connector_list_iter_begin(dev, &conn_iter);
>  	drm_for_each_connector_iter(connector, &conn_iter) {
> +		if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
> +			continue;
> +
>  		ret = __drm_fb_helper_add_one_connector(fb_helper, connector);
>  		if (ret)
>  			goto fail;


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

* Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
@ 2018-11-15 16:42   ` Boris Brezillon
  0 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-11-15 16:42 UTC (permalink / raw)
  To: Paul Kocialkowski
  Cc: Maxime Ripard, linux-kernel, dri-devel, David Airlie,
	Thomas Petazzoni, Sean Paul

On Thu, 15 Nov 2018 17:32:48 +0100
Paul Kocialkowski <paul.kocialkowski@bootlin.com> wrote:

> Writeback connectors do not produce any on-screen output and require
> special care for use. Such connectors are hidden from enumeration in
> DRM resources by default, but they are still picked-up by fbdev.
> This makes rather little sense since fbdev is not really adapted for
> dealing with writeback.
> 
> Moreover, this is also a source of issues when userspace disables the
> CRTC (and associated plane) without detaching the CRTC from the
> connector (which is hidden by default). In this case, the connector is
> still using the CRTC, leading to am "enabled/connectors mismatch" and

				   ^an

> eventually the failure of the associated atomic commit. This situation
> happens with VC4 testing under IGT GPU Tools.
> 
> Filter out writeback connectors in the fbdev helper to solve this.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index a502f3e519fd..dd852a25d375 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -219,6 +219,9 @@ int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
>  	mutex_lock(&fb_helper->lock);
>  	drm_connector_list_iter_begin(dev, &conn_iter);
>  	drm_for_each_connector_iter(connector, &conn_iter) {
> +		if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
> +			continue;
> +
>  		ret = __drm_fb_helper_add_one_connector(fb_helper, connector);
>  		if (ret)
>  			goto fail;

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

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

* Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
  2018-11-15 16:32 ` Paul Kocialkowski
  (?)
  (?)
@ 2018-11-19  9:28 ` Maxime Ripard
  2018-11-21  9:40     ` Daniel Vetter
  -1 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2018-11-19  9:28 UTC (permalink / raw)
  To: Paul Kocialkowski
  Cc: dri-devel, linux-kernel, Maarten Lankhorst, Sean Paul,
	David Airlie, Thomas Petazzoni, Eric Anholt, Boris Brezillon

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

On Thu, Nov 15, 2018 at 05:32:48PM +0100, Paul Kocialkowski wrote:
> Writeback connectors do not produce any on-screen output and require
> special care for use. Such connectors are hidden from enumeration in
> DRM resources by default, but they are still picked-up by fbdev.
> This makes rather little sense since fbdev is not really adapted for
> dealing with writeback.
> 
> Moreover, this is also a source of issues when userspace disables the
> CRTC (and associated plane) without detaching the CRTC from the
> connector (which is hidden by default). In this case, the connector is
> still using the CRTC, leading to am "enabled/connectors mismatch" and
> eventually the failure of the associated atomic commit. This situation
> happens with VC4 testing under IGT GPU Tools.
> 
> Filter out writeback connectors in the fbdev helper to solve this.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>

Thanks!
Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
  2018-11-19  9:28 ` Maxime Ripard
@ 2018-11-21  9:40     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2018-11-21  9:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Paul Kocialkowski, Boris Brezillon, David Airlie, linux-kernel,
	dri-devel, Thomas Petazzoni, Sean Paul

On Mon, Nov 19, 2018 at 10:28:35AM +0100, Maxime Ripard wrote:
> On Thu, Nov 15, 2018 at 05:32:48PM +0100, Paul Kocialkowski wrote:
> > Writeback connectors do not produce any on-screen output and require
> > special care for use. Such connectors are hidden from enumeration in
> > DRM resources by default, but they are still picked-up by fbdev.
> > This makes rather little sense since fbdev is not really adapted for
> > dealing with writeback.
> > 
> > Moreover, this is also a source of issues when userspace disables the
> > CRTC (and associated plane) without detaching the CRTC from the
> > connector (which is hidden by default). In this case, the connector is
> > still using the CRTC, leading to am "enabled/connectors mismatch" and
> > eventually the failure of the associated atomic commit. This situation
> > happens with VC4 testing under IGT GPU Tools.
> > 
> > Filter out writeback connectors in the fbdev helper to solve this.
> > 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> 
> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
> Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>

Applied with a cc: stable to drm-misc-fixes. Btw, 2 r-b from committers,
someone should have pushed this I think :-)

Thanks for patch&review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
@ 2018-11-21  9:40     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2018-11-21  9:40 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: David Airlie, linux-kernel, dri-devel, Paul Kocialkowski,
	Boris Brezillon, Thomas Petazzoni, Sean Paul

On Mon, Nov 19, 2018 at 10:28:35AM +0100, Maxime Ripard wrote:
> On Thu, Nov 15, 2018 at 05:32:48PM +0100, Paul Kocialkowski wrote:
> > Writeback connectors do not produce any on-screen output and require
> > special care for use. Such connectors are hidden from enumeration in
> > DRM resources by default, but they are still picked-up by fbdev.
> > This makes rather little sense since fbdev is not really adapted for
> > dealing with writeback.
> > 
> > Moreover, this is also a source of issues when userspace disables the
> > CRTC (and associated plane) without detaching the CRTC from the
> > connector (which is hidden by default). In this case, the connector is
> > still using the CRTC, leading to am "enabled/connectors mismatch" and
> > eventually the failure of the associated atomic commit. This situation
> > happens with VC4 testing under IGT GPU Tools.
> > 
> > Filter out writeback connectors in the fbdev helper to solve this.
> > 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> 
> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
> Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>

Applied with a cc: stable to drm-misc-fixes. Btw, 2 r-b from committers,
someone should have pushed this I think :-)

Thanks for patch&review.
-Daniel
-- 
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] 7+ messages in thread

end of thread, other threads:[~2018-11-21  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 16:32 [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev Paul Kocialkowski
2018-11-15 16:32 ` Paul Kocialkowski
2018-11-15 16:42 ` Boris Brezillon
2018-11-15 16:42   ` Boris Brezillon
2018-11-19  9:28 ` Maxime Ripard
2018-11-21  9:40   ` Daniel Vetter
2018-11-21  9:40     ` 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.