From: Dongwon Kim <dongwon.kim@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, Vivek Kasireddy <vivek.kasireddy@intel.com>
Subject: Re: [PATCH] ui/gtk: skip any extra draw of same guest scanout blob res
Date: Thu, 23 Sep 2021 16:41:17 -0700 [thread overview]
Message-ID: <20210923234117.GA265@dongwonk-MOBL.amr.corp.intel.com> (raw)
In-Reply-To: <20210917100202.vrdadmmqbeebwp5g@sirius.home.kraxel.org>
On Fri, Sep 17, 2021 at 12:02:02PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > + bool draw_submitted;
> > + QemuMutex mutex;
>
> Why the mutex? I think all the code runs while holding the BQL so it
> should be serialized.
Gerd, I did more experiment and verified mutex is actually not required.
I think I had some wrong belief after seeing some of sync problem
resolved after adding mutex but the code sequence was different at that
time.. I will remove mutex.
>
> > +#ifdef CONFIG_GBM
> > + if (dmabuf) {
> > + qemu_mutex_lock(&dmabuf->mutex);
> > + if (!dmabuf->draw_submitted) {
> > + qemu_mutex_unlock(&dmabuf->mutex);
> > + return;
> > + } else {
> > + dmabuf->draw_submitted = false;
> > + }
> > + }
> > +#endif
>
> Factoring out that into helper functions is probably a good idea. Then
> have stub functions for the CONFIG_GBM=no case and *alot* less #ifdefs
> in the code ...
>
There are oter places controlled by #ifdef CONFIG_GBM.
What about taking care of CONFIG_GBM altogher after v2 (same but no
mutex) of this patch?
> thanks,
> Gerd
>
next prev parent reply other threads:[~2021-09-23 23:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 23:41 [PATCH] ui/gtk: skip any extra draw of same guest scanout blob res Dongwon Kim
2021-09-17 10:02 ` Gerd Hoffmann
2021-09-17 16:34 ` Dongwon Kim
2021-09-23 23:41 ` Dongwon Kim [this message]
2021-09-24 22:51 ` [PATCH v2] " Dongwon Kim
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=20210923234117.GA265@dongwonk-MOBL.amr.corp.intel.com \
--to=dongwon.kim@intel.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vivek.kasireddy@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).