The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Eric Anholt <eric@anholt.net>
Subject: Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev
Date: Thu, 15 Nov 2018 17:42:39 +0100	[thread overview]
Message-ID: <20181115174239.773b71e9@bbrezillon> (raw)
In-Reply-To: <20181115163248.21168-1-paul.kocialkowski@bootlin.com>

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;


  reply	other threads:[~2018-11-15 16:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 16:32 [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev Paul Kocialkowski
2018-11-15 16:42 ` Boris Brezillon [this message]
2018-11-19  9:28 ` Maxime Ripard
2018-11-21  9:40   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181115174239.773b71e9@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=sean@poorly.run \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox