From: Igor Mitsyanko <i.mitsyanko@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, kraxel@redhat.com, i.mitsyanko@samsung.com
Subject: [Qemu-devel] [PATCH 1/2] exynos4210_fimd.c: fix display resize bug introduced after console revamp
Date: Tue, 19 Mar 2013 23:44:55 +0400 [thread overview]
Message-ID: <1363722296-29940-2-git-send-email-i.mitsyanko@gmail.com> (raw)
In-Reply-To: <1363722296-29940-1-git-send-email-i.mitsyanko@gmail.com>
In exynos4210 display update function, we were acquiring DisplaySurface
pointer before calling screen resize function, not paying attention that resize
procedure can replace current DisplaySurface with newly allocated one.
Right thing to do is to initialize DisplaySurface AFTER a call to resize function.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
---
hw/exynos4210_fimd.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/exynos4210_fimd.c b/hw/exynos4210_fimd.c
index bf316c6..333456a 100644
--- a/hw/exynos4210_fimd.c
+++ b/hw/exynos4210_fimd.c
@@ -1243,7 +1243,7 @@ static void exynos4210_update_resolution(Exynos4210fimdState *s)
static void exynos4210_fimd_update(void *opaque)
{
Exynos4210fimdState *s = (Exynos4210fimdState *)opaque;
- DisplaySurface *surface = qemu_console_surface(s->console);
+ DisplaySurface *surface;
Exynos4210fimdWindow *w;
int i, line;
hwaddr fb_line_addr, inc_size;
@@ -1256,11 +1256,12 @@ static void exynos4210_fimd_update(void *opaque)
const int global_height = ((s->vidtcon[2] >> FIMD_VIDTCON2_VER_SHIFT) &
FIMD_VIDTCON2_SIZE_MASK) + 1;
- if (!s || !s->console || !surface_bits_per_pixel(surface) ||
- !s->enabled) {
+ if (!s || !s->console || !s->enabled ||
+ surface_bits_per_pixel(qemu_console_surface(s->console)) == 0) {
return;
}
exynos4210_update_resolution(s);
+ surface = qemu_console_surface(s->console);
for (i = 0; i < NUM_OF_WINDOWS; i++) {
w = &s->window[i];
--
1.7.5.4
next prev parent reply other threads:[~2013-03-19 19:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 19:44 [Qemu-devel] [PATCH 0/2] Fix display resize bugs introduced after recent console revamp Igor Mitsyanko
2013-03-19 19:44 ` Igor Mitsyanko [this message]
2013-03-19 19:44 ` [Qemu-devel] [PATCH 2/2] hw/vmware_vga.c: fix screen resize bug introduced after " Igor Mitsyanko
2013-03-20 6:49 ` [Qemu-devel] [PATCH 0/2] Fix display resize bugs introduced after recent " 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=1363722296-29940-2-git-send-email-i.mitsyanko@gmail.com \
--to=i.mitsyanko@gmail.com \
--cc=i.mitsyanko@samsung.com \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--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).