public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: intel-gfx@lists.freedesktop.org, mstaudt@suse.de,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 02/16] drm/fb-helper: dpms_legacy(): Only set on connectors in use
Date: Tue, 26 Mar 2019 19:26:22 +0100	[thread overview]
Message-ID: <20190326182622.GR2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190326175546.18126-3-noralf@tronnes.org>

On Tue, Mar 26, 2019 at 06:55:32PM +0100, Noralf Trønnes wrote:
> For each enabled crtc the functions sets dpms on all registered connectors.
> Limit this to only doing it once and on the connectors actually in use.
> 
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Fixes: 023eb571a1d0 ("drm: correctly update connector DPMS status in drm_fb_helper")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Just want to trick the AUTOSEL bot into cherrypicking a silly patch onto
-stable :-)

-Daniel

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index eea15465da7a..b91df658db59 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -639,20 +639,19 @@ static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { };
>  static void dpms_legacy(struct drm_fb_helper *fb_helper, int dpms_mode)
>  {
>  	struct drm_device *dev = fb_helper->dev;
> -	struct drm_crtc *crtc;
>  	struct drm_connector *connector;
> +	struct drm_mode_set *modeset;
>  	int i, j;
>  
>  	drm_modeset_lock_all(dev);
>  	for (i = 0; i < fb_helper->crtc_count; i++) {
> -		crtc = fb_helper->crtc_info[i].mode_set.crtc;
> +		modeset = &fb_helper->crtc_info[i].mode_set;
>  
> -		if (!crtc->enabled)
> +		if (!modeset->crtc->enabled)
>  			continue;
>  
> -		/* Walk the connectors & encoders on this fb turning them on/off */
> -		drm_fb_helper_for_each_connector(fb_helper, j) {
> -			connector = fb_helper->connector_info[j]->connector;
> +		for (j = 0; j < modeset->num_connectors; j++) {
> +			connector = modeset->connectors[j];
>  			connector->funcs->dpms(connector, dpms_mode);
>  			drm_object_property_set_value(&connector->base,
>  				dev->mode_config.dpms_property, dpms_mode);
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
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

  reply	other threads:[~2019-03-26 18:26 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 17:55 [PATCH 00/16] drm/fb-helper: Move modesetting code to drm_client Noralf Trønnes
2019-03-26 17:55 ` [PATCH 01/16] drm/fb-helper: Remove unused gamma_size variable Noralf Trønnes
2019-03-26 18:23   ` Daniel Vetter
2019-04-03  9:19     ` [Intel-gfx] " Noralf Trønnes
2019-03-26 17:55 ` [PATCH 02/16] drm/fb-helper: dpms_legacy(): Only set on connectors in use Noralf Trønnes
2019-03-26 18:26   ` Daniel Vetter [this message]
2019-03-26 17:55 ` [PATCH 03/16] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() Noralf Trønnes
2019-03-26 20:48   ` Daniel Vetter
2019-03-27 13:41     ` [Intel-gfx] " Noralf Trønnes
2019-03-27 13:55       ` Daniel Vetter
2019-03-27 14:27         ` [Intel-gfx] " Noralf Trønnes
2019-03-26 17:55 ` [PATCH 04/16] drm/fb-helper: No need to cache rotation and sw_rotations Noralf Trønnes
2019-03-28  8:03   ` Daniel Vetter
2019-03-26 17:55 ` [PATCH 05/16] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} Noralf Trønnes
2019-03-28  8:19   ` Daniel Vetter
2019-03-26 17:55 ` [PATCH 06/16] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper Noralf Trønnes
2019-03-27 13:33   ` Jani Nikula
2019-03-30 20:50     ` Noralf Trønnes
2019-03-26 17:55 ` [PATCH 07/16] drm/fb-helper: Remove drm_fb_helper_crtc Noralf Trønnes
2019-03-26 17:55 ` [PATCH 08/16] drm/fb-helper: Prepare to move out commit code Noralf Trønnes
2019-03-26 17:55 ` [PATCH 09/16] drm/fb-helper: Move " Noralf Trønnes
2019-03-27 14:13   ` Emmanuel Vadot
2019-03-27 15:01     ` Noralf Trønnes
2019-03-27 15:12       ` Emmanuel Vadot
2019-03-26 17:55 ` [PATCH 10/16] drm/fb-helper: Remove drm_fb_helper_connector Noralf Trønnes
2019-03-26 17:55 ` [PATCH 11/16] drm/fb-helper: Prepare to move out modeset config code Noralf Trønnes
2019-03-26 17:55 ` [PATCH 12/16] drm/fb-helper: Move " Noralf Trønnes
2019-03-26 17:55 ` [PATCH 13/16] drm/fb-helper: Avoid race with DRM userspace Noralf Trønnes
2019-03-28  8:17   ` Daniel Vetter
2019-03-30 21:07     ` Noralf Trønnes
2019-04-01  7:12       ` Daniel Vetter
2019-04-01 13:31         ` Noralf Trønnes
2019-03-26 17:55 ` [PATCH 14/16] drm/client: Add display abstraction Noralf Trønnes
2019-03-26 17:55 ` [PATCH 15/16] drm/client: Hack: Add bootsplash example Noralf Trønnes
2019-03-26 17:55 ` [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done Noralf Trønnes
2019-03-26 20:40   ` Daniel Vetter
2019-03-27 16:36   ` Eric Anholt
2019-04-03  9:20     ` Noralf Trønnes
2019-03-26 21:07 ` ✗ Fi.CI.BAT: failure for drm/fb-helper: Move modesetting code to drm_client Patchwork
2019-03-27 13:45 ` [PATCH 00/16] " Noralf Trønnes
2019-03-27 13:52   ` Thomas Zimmermann
2019-03-28  9:31 ` [Intel-gfx] " Daniel Vetter
2019-03-31 21:18   ` Noralf Trønnes

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=20190326182622.GR2665@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mstaudt@suse.de \
    --cc=noralf@tronnes.org \
    /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