From: Avi Kivity <avi@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Brian Kress <kressb@moose.net>, Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel <qemu-devel@nongnu.org>,
KVM list <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus
Date: Wed, 12 May 2010 17:27:08 +0300 [thread overview]
Message-ID: <4BEABABC.6080305@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1005121349070.11380@kaball-desktop>
On 05/12/2010 04:45 PM, Stefano Stabellini wrote:
>
>
>> Note it's just during mode changes. During normal operation I'm sure
>> the pitches are equal.
>>
>>
> The source blt pitch as set by the driver is always equal to the display
> pitch (apart from the case reported above).
> However cirrus_blt_srcpitch is not always equal to the display pitch
> because of CIRRUS_BLTMODE_BACKWARDS: cirrus_blt_srcpitch can also be
> negative and equal to -display_pitch.
>
Yes.
> I suggest to start using the display pitch (with the proper sign)
> instead of cirrus_blt_srcpitch in cirrus_do_copy at least when
> cirrus_blt_srcpitch doesn't have a proper value.
>
Why switch from one bug to the other?
It's perfectly possible to take into account both values. Of course
when abs(blt_pitch) != display pitch we can't use console_copy, but so what.
>> I think the code should be something like
>>
>> if bitblt destination intersects display memory:
>> if bitblt pitch == display pitch
>> use console_copy
>> else
>> invalidate entire display
>>
>>
> I think the following should be enough:
>
> if bitblt destination intersects display memory:
> qemu_console_copy
> else
> invalidate region
>
> why do we need if bitblt pitch == display pitch or to invalidate
> everything?
>
Because the region is not a rectangle anymore. We could compute exactly
what needs to be invalidated, but since it will never happen, there's no
point in optimizing it.
>>>> 31c05501c says this breaks bitblt, but I can't see why this is true.
>>>> The copy should update the display. This is probably due to a
>>>> miscalculation of the affected region, and now we have two invalidates
>>>> instead of one, reducing performance.
>>>>
>>>>
>>>>
>>> I agree with you: qemu_console_copy does imply that the copied portion
>>> of the screen changed, so there is no reason to invalidate it again if
>>> qemu_console_copy is called.
>>>
>>>
>> Well, we can't just revert 31c05501c. There's probably another bug
>> involved.
>>
>>
> Sure, we have to fix the other one first :)
>
And find it.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2010-05-12 14:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4BE32178.2090103@msgid.tls.msk.ru>
2010-05-10 7:41 ` [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus Avi Kivity
2010-05-10 8:15 ` Avi Kivity
2010-05-12 12:20 ` Stefano Stabellini
2010-05-12 12:36 ` Avi Kivity
2010-05-12 13:45 ` Stefano Stabellini
2010-05-12 14:27 ` Avi Kivity [this message]
2010-05-12 15:57 ` Stefano Stabellini
2010-05-12 16:07 ` Avi Kivity
2010-05-12 16:55 ` Stefano Stabellini
2010-05-12 16:57 ` Avi Kivity
2010-05-12 17:07 ` Jamie Lokier
2010-05-12 18:11 ` Stefano Stabellini
2010-05-12 19:12 ` Michael Tokarev
2010-05-13 6:49 ` Avi Kivity
2010-05-13 13:48 ` Stefano Stabellini
2010-05-13 14:13 ` Michael Tokarev
2010-05-13 18:03 ` Stefano Stabellini
2010-05-13 16:04 ` Jamie Lokier
2010-05-28 20:51 ` Michael Tokarev
2010-05-30 8:24 ` Avi Kivity
2010-05-13 7:36 ` Paolo Bonzini
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=4BEABABC.6080305@redhat.com \
--to=avi@redhat.com \
--cc=kressb@moose.net \
--cc=kvm@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.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).