From: Gerd Hoffmann <kraxel@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: "P J P" <ppandit@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>,
"Qemu Developers" <qemu-devel@nongnu.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Huawei PSIRT" <psirt@huawei.com>
Subject: Re: [Qemu-devel] [PATCH] display: cirrus: check vga bits per pixel(bpp) value
Date: Wed, 11 Jan 2017 21:43:41 +0100 [thread overview]
Message-ID: <1484167421.26755.10.camel@redhat.com> (raw)
In-Reply-To: <20170111145934.nogaszs5gvmn5bad@perseus.local>
On Mi, 2017-01-11 at 16:59 +0200, Alberto Garcia wrote:
> On Mon, Nov 28, 2016 at 11:52:08AM +0530, P J P wrote:
> > | > --- a/hw/display/cirrus_vga.c
> > | > +++ b/hw/display/cirrus_vga.c
> > | > @@ -272,6 +272,9 @@ static void cirrus_update_memory_access(CirrusVGAState
> > | > *s);
> > | > static bool blit_region_is_unsafe(struct CirrusVGAState *s,
> > | > int32_t pitch, int32_t addr)
> > | > {
> > | > + if (!pitch) {
> > | > + return true;
> > | > + }
> > | >
> > |
> > | That doesn't look directly related to 'cirrus_get_bpp', care to explain?
> >
> > 'blit_region_is_unsafe' is called from 'blit_is_unsafe' to check if blit
> > parameters (cirrus_blt_srcpitch/cirrus_blt_dstpitch) are safe for
> > 'cirrus_do_copy'. These too could lead to div by zero in cirrus_do_copy
>
> This change is causing display artifacts in QEMU 2.8.
>
> What seems to happen is that blit_is_unsafe() is also called for
> CIRRUS_BLTMODE_PATTERNCOPY, but in this case cirrus_blt_srcpitch is
> not used. However, because of this new check if its value is 0 then
> cirrus_bitblt_common_patterncopy() returns early and becomes a no-op.
inflight vga queue pull request has a fix for that.
cheers,
Gerd
next prev parent reply other threads:[~2017-01-11 20:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 7:45 [Qemu-devel] [PATCH] display: cirrus: check vga bits per pixel(bpp) value P J P
2016-11-15 16:43 ` P J P
2016-11-16 14:13 ` Marc-André Lureau
2016-11-28 6:22 ` P J P
2016-12-05 7:33 ` P J P
2017-01-11 14:59 ` Alberto Garcia
2017-01-11 20:43 ` Gerd Hoffmann [this message]
2017-01-20 9:46 ` Wolfgang Bumiller
2017-01-23 11:56 ` 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=1484167421.26755.10.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=berto@igalia.com \
--cc=marcandre.lureau@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=ppandit@redhat.com \
--cc=psirt@huawei.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).