All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: document that user-space should force-probe connectors
@ 2020-11-30  9:08 Simon Ser
  2020-11-30 15:16 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Ser @ 2020-11-30  9:08 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

It seems like we can't have nice things, so let's just document the
disappointing behaviour instead.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 2ac5ef3b2362 ("drm: document drm_mode_get_connector")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
---
 include/uapi/drm/drm_mode.h | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index b49fbf2bdc40..2e99f29d7f81 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -414,15 +414,10 @@ enum drm_mode_subconnector {
  *
  * If the @count_modes field is set to zero, the kernel will perform a forced
  * probe on the connector to refresh the connector status, modes and EDID.
- * A forced-probe can be slow and the ioctl will block. A force-probe can cause
- * flickering and temporary freezes, so it should not be performed
- * automatically.
+ * A forced-probe can be slow and the ioctl will block.
  *
- * User-space shouldn't need to force-probe connectors in general: the kernel
- * will automatically take care of probing connectors that don't support
- * hot-plug detection when appropriate. However, user-space may force-probe
- * connectors on user request (e.g. clicking a "Scan connectors" button, or
- * opening a UI to manage screens).
+ * User-space needs to force-probe connectors to ensure their metadata is
+ * up-to-date.
  */
 struct drm_mode_get_connector {
 	/** @encoders_ptr: Pointer to ``__u32`` array of object IDs. */
-- 
2.29.2


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

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

* Re: [PATCH] drm: document that user-space should force-probe connectors
  2020-11-30  9:08 [PATCH] drm: document that user-space should force-probe connectors Simon Ser
@ 2020-11-30 15:16 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2020-11-30 15:16 UTC (permalink / raw)
  To: Simon Ser; +Cc: Daniel Vetter, dri-devel

On Mon, Nov 30, 2020 at 09:08:23AM +0000, Simon Ser wrote:
> It seems like we can't have nice things, so let's just document the
> disappointing behaviour instead.
> 
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Fixes: 2ac5ef3b2362 ("drm: document drm_mode_get_connector")
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> ---
>  include/uapi/drm/drm_mode.h | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index b49fbf2bdc40..2e99f29d7f81 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -414,15 +414,10 @@ enum drm_mode_subconnector {
>   *
>   * If the @count_modes field is set to zero, the kernel will perform a forced
>   * probe on the connector to refresh the connector status, modes and EDID.
> - * A forced-probe can be slow and the ioctl will block. A force-probe can cause
> - * flickering and temporary freezes, so it should not be performed
> - * automatically.
> + * A forced-probe can be slow and the ioctl will block.

I think we should still have a notice here along the lines of "without a
reason". Some compositors have done polling every 30s or other dumb stuff
like that "A forced-probe should not be done without a need like a hotplug
event from the kernel, explicit request for output probing from the user,
or when starting the compositor."

Also I'd keep the "can be slow, might cause flickering, and the ioctl will
block" or so.

>   *
> - * User-space shouldn't need to force-probe connectors in general: the kernel
> - * will automatically take care of probing connectors that don't support
> - * hot-plug detection when appropriate. However, user-space may force-probe
> - * connectors on user request (e.g. clicking a "Scan connectors" button, or
> - * opening a UI to manage screens).
> + * User-space needs to force-probe connectors to ensure their metadata is
> + * up-to-date.

I'd add a "after receiving a hotplug event" here.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

>   */
>  struct drm_mode_get_connector {
>  	/** @encoders_ptr: Pointer to ``__u32`` array of object IDs. */
> -- 
> 2.29.2
> 
> 

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

end of thread, other threads:[~2020-11-30 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30  9:08 [PATCH] drm: document that user-space should force-probe connectors Simon Ser
2020-11-30 15:16 ` 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.