From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Clark <rob.clark@linaro.org>
Cc: Rob Clark <rob@ti.com>,
patches@linaro.org, dri-devel@lists.freedesktop.org,
rogerq@ti.com
Subject: Re: [PATCH] drm: call connector->dpms(OFF) when disabling
Date: Fri, 28 Sep 2012 11:56:05 +0200 [thread overview]
Message-ID: <20120928095605.GJ2098@bremse> (raw)
In-Reply-To: <1348817238-30228-1-git-send-email-rob.clark@linaro.org>
On Fri, Sep 28, 2012 at 09:27:18AM +0200, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
>
> When disabling unused connectors, be sure to call connector->dpms(OFF),
> so if there is actually some IP to turn off (such as external bridge
> chips, etc), these actually do get turned off.
>
> Signed-off-by: Rob Clark <rob@ti.com>
> Tested-by: Roger Quadros <rogerq@ti.com>
I think this runs counter to the crtc helper design: connectors are pretty
much just dummy entities, and any dpms handling is done in the
encoders/crtcs. If you call connector->funcs->dpms you don't call a crtc
helper function, but actually the official dpms interface (which then
again calls down into the encoder/crtc dpms callbacks (which are again
crtc helper private). This functions are called again a few lines down in
disable_unused_functions anyway, so the only way this changes behaviour is
if you already overwrite the dpms interface and don't directly use
drm_helper_connector_dpms.
Which is imo a clear sign that the crtc helper is a misfit for your hw and
you should stop using it ;-) And adding special-case handling like this
into common code, especially if it weakens the semantic concepts in the
helper layer is a recipe for a maintainance disaster a few years down the
road. Hence
NACKed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cheers, Daniel
>
> ---
> drivers/gpu/drm/drm_crtc_helper.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index 3252e70..000cda4 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -244,16 +244,16 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
> struct drm_crtc *crtc;
>
> list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
> - if (!connector->encoder)
> - continue;
> if (connector->status == connector_status_disconnected)
> connector->encoder = NULL;
> + if (!connector->encoder)
> + connector->funcs->dpms(connector, DRM_MODE_DPMS_OFF);
> }
>
> list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
> if (!drm_helper_encoder_in_use(encoder)) {
> drm_encoder_disable(encoder);
> - /* disconnector encoder from any connector */
> + /* disconnect encoder from any connector */
> encoder->crtc = NULL;
> }
> }
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
>
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2012-09-28 9:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 7:27 [PATCH] drm: call connector->dpms(OFF) when disabling Rob Clark
2012-09-28 9:56 ` Daniel Vetter [this message]
2012-09-28 10:54 ` Rob Clark
2012-09-28 11:55 ` Daniel Vetter
2012-09-28 12:11 ` Ville Syrjälä
2012-09-28 12:19 ` Rob Clark
2012-09-28 13:36 ` Alex Deucher
2012-09-28 14:03 ` Daniel Vetter
2012-09-28 12:52 ` Alan Cox
2012-09-28 13:06 ` Rob Clark
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=20120928095605.GJ2098@bremse \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=patches@linaro.org \
--cc=rob.clark@linaro.org \
--cc=rob@ti.com \
--cc=rogerq@ti.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.