All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: jfalempe@redhat.com, airlied@redhat.com, daniel@ffwll.ch,
	 airlied@gmail.com, maarten.lankhorst@linux.intel.com,
	 dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm/probe-helper: Optionally report single connected output per CRTC
Date: Tue, 16 Jul 2024 11:01:55 +0200	[thread overview]
Message-ID: <20240716-dexterous-pristine-leech-8ca3f2@houat> (raw)
In-Reply-To: <20240715093936.793552-3-tzimmermann@suse.de>

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

Hi,

On Mon, Jul 15, 2024 at 11:38:58AM GMT, Thomas Zimmermann wrote:
> For CRTCs with multiple outputs (i.e., encoders plus connectors),
> only report at most a single connected output to userspace. Make
> this configurable via CONFIG_DRM_REPORT_SINGLE_CONNECTED_CRTC_OUTPUT.
> 
> Having multiple connected outputs on the same CRTC complicates
> display-mode and format selection, so most userspace does not
> support this. This is mostly not a problem in practice, as modern
> display hardware provides a separate CRTC for each output.

Do they?

At least the RaspberryPi has multiple connectors on a single CRTC, and
for multiple CRTCs.

My understanding is that it's definitely expected, and any decent
user-space should expect it.

Did you have any bug with this?

And if it was the case, we wouldn't support cloning at all. I couldn't
really find how cloning works exactly, but my understanding was that
it's the difference between drm_encoder.possible_crtcs and
possible_clones: possible_crtcs lists the CRTCs it can be connected to,
and possible_clones the other encoders that can run with in parallel.

> On old hardware or hardware with BMCs, a single CRTC often drives
> multiple displays. Only reporting one of them as connected makes
> the hardware compatible with common userspace.
> 
> Add the field prioritized_connectors to struct drm_connector. The
> bitmask signals which other connectors have priority. Also provide
> the helper drm_probe_helper_prioritize_connectors() that sets
> default priorities for a given set of connectors. Calling the
> helper should be enough to set up the functionality for most drivers.
> 
> With the prioritization bits in place, update connector-status
> detection to test against prioritized conenctors. So when the probe
> helpers detect a connector as connected, test against the prioritized
> connectors. If any is also connected, set the connector status to
> disconnected.
> 
> Please note that this functionality is a workaround for limitations
> in userspace. If your compositor supports multiple outputs per CRTC,
> CONFIG_DRM_REPORT_SINGLE_CONNECTED_CRTC_OUTPUT should be disabled.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

The whole "is it actually needed" discussion aside, I'm not sure it's a
good idea to use a config option for that. Chances are distros will
either enable it or disable it depending on what they/their customers
workload will typically look like, and it won't make the kernel or
compositor's job any easier.

Could we use a client capability for that maybe?

Maxime

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

  reply	other threads:[~2024-07-16  9:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15  9:38 [PATCH 0/7] drm/probe-helpers: Work around multi-outputs-per-CRTC problem Thomas Zimmermann
2024-07-15  9:38 ` [PATCH 1/7] drm/probe-helper: Call connector detect functions in single helper Thomas Zimmermann
2024-07-16  8:21   ` Maxime Ripard
2024-07-15  9:38 ` [PATCH 2/7] drm/probe-helper: Optionally report single connected output per CRTC Thomas Zimmermann
2024-07-16  9:01   ` Maxime Ripard [this message]
2024-07-16 10:47     ` Thomas Zimmermann
2024-07-16  9:46   ` Daniel Vetter
2024-07-16 10:37     ` Thomas Zimmermann
2024-07-15  9:38 ` [PATCH 3/7] drm/ast: Set connector priorities Thomas Zimmermann
2024-07-15  9:39 ` [PATCH 4/7] drm/ast: Remove struct ast_bmc_connector Thomas Zimmermann
2024-07-15  9:39 ` [PATCH 5/7] drm/ast: Support ASTDP and VGA at the same time Thomas Zimmermann
2024-07-16  8:42   ` oushixiong
2024-07-15  9:39 ` [PATCH 6/7] drm/mgag200: Set connector priorities Thomas Zimmermann
2024-07-15  9:39 ` [PATCH 7/7] drm/mgag200: Remove struct mgag200_bmc_connector Thomas Zimmermann
2024-07-17 12:54 ` [PATCH 0/7] drm/probe-helpers: Work around multi-outputs-per-CRTC problem Thomas Zimmermann

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=20240716-dexterous-pristine-leech-8ca3f2@houat \
    --to=mripard@kernel.org \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=tzimmermann@suse.de \
    /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 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.