All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Subject: Re: bochs_hw_init fails to request framebuffer on EFI boot with plymouth visible
Date: Fri, 17 Jan 2020 16:22:11 +0100	[thread overview]
Message-ID: <20200117152211.GZ1314@mail-itl> (raw)
In-Reply-To: <20200117125825.3in2t2m6nxbblsaf@sirius.home.kraxel.org>


[-- Attachment #1.1: Type: text/plain, Size: 1380 bytes --]

On Fri, Jan 17, 2020 at 01:58:25PM +0100, Gerd Hoffmann wrote:
> > Should switching to bochsdrmfb be deferred until efifb gets properly
> > destroyed? How?
> 
> Should be in do_remove_conflicting_framebuffers, everyone might run into
> this.  So lets try wait for all (other) references went away:

Yes, this solves the problem. I guess the proper solution would be to
replace it with some wait queue or such, right?
Is there any guarantee that the process holding /dev/fb0 (plymouthd in
this case) will eventually release it? If not, what could this
(indefinite then) wait cause? Is there any lock held here that could
hang other operations?

> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
> index d04554959ea7..2d4911cc7ec4 100644
> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -1726,7 +1726,9 @@ static void do_unregister_framebuffer(struct fb_info *fb_info)
>  	fbcon_fb_unregistered(fb_info);
>  	console_unlock();
>  
> -	/* this may free fb info */
> +	while (atomic_read(&fb_info->count) > 1)
> +		msleep(10);
> +	/* this will free fb info */
>  	put_fb_info(fb_info);
>  }
>  
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2020-01-17 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 16:32 bochs_hw_init fails to request framebuffer on EFI boot with plymouth visible Marek Marczykowski-Górecki
2020-01-13  7:19 ` Gerd Hoffmann
2020-01-15  0:33   ` Marek Marczykowski-Górecki
     [not found]     ` <20200115100821.qcdraolkoki6e5tz@sirius.home.kraxel.org>
2020-01-15 13:41       ` Marek Marczykowski-Górecki
2020-01-15 14:13         ` Gerd Hoffmann
2020-01-15 14:27           ` Marek Marczykowski-Górecki
2020-01-15 16:16             ` Gerd Hoffmann
2020-01-16  2:52               ` Marek Marczykowski-Górecki
2020-01-17 12:58                 ` Gerd Hoffmann
2020-01-17 15:22                   ` Marek Marczykowski-Górecki [this message]
2020-01-20  9:58                     ` Gerd Hoffmann

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=20200117152211.GZ1314@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=kraxel@redhat.com \
    --cc=virtualization@lists.linux-foundation.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 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.