From: Eric Anholt <eric@anholt.net>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm: Try to document legacy DPMS uapi a bit better
Date: Wed, 20 Sep 2017 15:48:20 -0700 [thread overview]
Message-ID: <87poaluguj.fsf@anholt.net> (raw)
In-Reply-To: <20170815145519.1162-1-daniel.vetter@ffwll.ch>
[-- Attachment #1.1: Type: text/plain, Size: 2009 bytes --]
Daniel Vetter <daniel.vetter@ffwll.ch> writes:
> Laurent asked for this.
>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_connector.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index ba9f36cef68c..b458eb488128 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -720,6 +720,25 @@ DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,
> * callback. For atomic drivers the remapping to the "ACTIVE" property is
> * implemented in the DRM core. This is the only standard connector
> * property that userspace can change.
> + *
> + * WARNING:
> + *
> + * For userspace also running on legacy drivers the "DPMS" semantics are a
> + * lot more complicated. First, userspace cannot rely on the "DPMS" value
> + * returned by the GETCONNECTOR actually reflecting reality, because many
> + * drivers fail to update it. For atomic drivers this is taken care of in
> + * drm_atomic_helper_update_legacy_modeset_state().
> + *
> + * The second issue is that the DPMS state is only relevant when the
s/relevant/defined/ maybe?
> + * connector is connected to a CRTC. In atomic the DRM core enforces that
> + * "ACTIVE" is off in such a case, no such checks exists for "DPMS".
Maybe another newline here?
> + * Finally, when enabling an output using the legacy SETCONFIG ioctl then
> + * "DPMS" is forced to ON. But see above, that might not be reflected in
> + * the software value.
Maybe add " on legacy drivers"?
> + *
> + * Summarizing: Only set "DPMS" when the connector is known to be enabled,
> + * assume that a successful SETCONFIG call also set "DPMS" to on, and never
"also sets"
> + * read back the value of "DPMS" because it can be incorrect.
With whatever set of my suggestions you like,
Reviewed-by: Eric Anholt <eric@anholt.net>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-09-20 22:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 14:55 [PATCH] drm: Try to document legacy DPMS uapi a bit better Daniel Vetter
2017-08-16 14:49 ` Laurent Pinchart
2017-08-16 16:45 ` Daniel Vetter
2017-09-20 22:48 ` Eric Anholt [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-09-20 22:59 Daniel Vetter
2017-09-20 23:03 ` Sean Paul
2017-09-26 5:13 ` 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=87poaluguj.fsf@anholt.net \
--to=eric@anholt.net \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.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 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.