Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Dave Airlie <airlied@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/fb_helper: move deferred fb checking into restore mode
Date: Wed, 26 Nov 2014 08:39:05 +0100	[thread overview]
Message-ID: <20141126073905.GD32117@phenom.ffwll.local> (raw)
In-Reply-To: <1416971843-2122-2-git-send-email-airlied@gmail.com>

On Wed, Nov 26, 2014 at 01:17:23PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> On MST systems the monitors don't appear when we set the fb up,
> but plymouth opens the drm device and holds it open while they
> come up, when plymouth finishes and lastclose gets called we
> don't do the delayed fb probe, so the monitor never appears on the
> console.
> 
> Fix this by moving the delayed checking into the mode restore.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index c7f2778..8ba36cf 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -350,6 +350,11 @@ bool drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
>  	drm_modeset_lock_all(dev);
>  	ret = restore_fbdev_mode(fb_helper);
>  	drm_modeset_unlock_all(dev);
> +
> +	if (fb_helper->delayed_hotplug) {
> +		fb_helper->delayed_hotplug = false;
> +		drm_fb_helper_hotplug_event(fb_helper);

Preexisting bug but ->delayed_hotplug is protected in the hotplug handler
by mode_config.mutex. But fixing that will get annoying so not sure if
it's worth it. Just wrapping the access with the lock shouldn't hurt
though I think.
-Daniel

> +	}
>  	return ret;
>  }
>  EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode_unlocked);
> @@ -888,10 +893,6 @@ int drm_fb_helper_set_par(struct fb_info *info)
>  
>  	drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
>  
> -	if (fb_helper->delayed_hotplug) {
> -		fb_helper->delayed_hotplug = false;
> -		drm_fb_helper_hotplug_event(fb_helper);
> -	}
>  	return 0;
>  }
>  EXPORT_SYMBOL(drm_fb_helper_set_par);
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-11-26  7:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  3:17 [PATCH 1/2] drm/dp: retry AUX transactions 32 times Dave Airlie
2014-11-26  3:17 ` [PATCH 2/2] drm/fb_helper: move deferred fb checking into restore mode Dave Airlie
2014-11-26  7:39   ` Daniel Vetter [this message]
2014-11-26 17:37   ` [PATCH 2/2] drm/fb_helper: move deferred fb checking shuang.he
2014-11-26  3:20 ` [PATCH 1/2] drm/dp: retry AUX transactions 32 times Tom Stellard
2014-11-26  3:22   ` Dave Airlie
2014-11-26  9:24 ` Jani Nikula
2014-12-08 23:55   ` Dave Airlie

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=20141126073905.GD32117@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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