* [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution
@ 2011-10-28 19:24 John Baboval
2011-11-01 8:58 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: John Baboval @ 2011-10-28 19:24 UTC (permalink / raw)
To: qemu-devel
760p TV panels have a 1366x768 resolution, and have been popular
recently as low-cost monitors. The 1366 resolution doesn't pass
the (xres & 7) == 0 test.
Signed-off-by: John V. Baboval <john.baboval@virtualcomputer.com>
---
hw/vga.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/vga.c b/hw/vga.c
index 8003eda..f12a371 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -680,7 +680,7 @@ static void vbe_ioport_write_data(void *opaque,
uint32_t addr, uint32_t val)
}
break;
case VBE_DISPI_INDEX_XRES:
- if ((val <= vs.max_xres) && ((val & 7) == 0)) {
+ if (val <= vs.max_xres) {
s->vbe_regs[s->vbe_index] = val;
}
break;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution
2011-10-28 19:24 [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution John Baboval
@ 2011-11-01 8:58 ` Gerd Hoffmann
2011-11-01 13:39 ` John Baboval
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2011-11-01 8:58 UTC (permalink / raw)
To: John Baboval; +Cc: qemu-devel
On 10/28/11 21:24, John Baboval wrote:
> 760p TV panels have a 1366x768 resolution, and have been popular
> recently as low-cost monitors. The 1366 resolution doesn't pass
> the (xres & 7) == 0 test.
Why is it save to simply remove the test?
Guess there is a reason why it is there in the first place?
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution
2011-11-01 8:58 ` Gerd Hoffmann
@ 2011-11-01 13:39 ` John Baboval
2011-11-01 16:57 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: John Baboval @ 2011-11-01 13:39 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
I don't know of any reason for it.
-John
On Nov 1, 2011, at 4:58 AM, "Gerd Hoffmann" <kraxel@redhat.com> wrote:
> On 10/28/11 21:24, John Baboval wrote:
>> 760p TV panels have a 1366x768 resolution, and have been popular
>> recently as low-cost monitors. The 1366 resolution doesn't pass
>> the (xres & 7) == 0 test.
>
> Why is it save to simply remove the test?
> Guess there is a reason why it is there in the first place?
>
> cheers,
> Gerd
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution
2011-11-01 13:39 ` John Baboval
@ 2011-11-01 16:57 ` Gerd Hoffmann
2011-11-03 15:03 ` John Baboval
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2011-11-01 16:57 UTC (permalink / raw)
To: John Baboval; +Cc: qemu-devel
On 11/01/11 14:39, John Baboval wrote:
> I don't know of any reason for it.
I'd guess it is alignment, probably not important for all color depts.
Maybe it is a good idea to do all sanity checks in the
VBE_DISPI_INDEX_ENABLE branch where the actual mode switch happens. Then
you already know xres, yres and depth when applying the checks. You can
calculate the scanline length, then check the scanline alignment instead
of being overly strict on xres in high color modes to satisfy alignment
requirements in low color modes.
You can also simply calculate how much memory the video mode needs and
check that against the configured video ram instead of pulling xres and
yres limits out of thin air.
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution
2011-11-01 16:57 ` Gerd Hoffmann
@ 2011-11-03 15:03 ` John Baboval
0 siblings, 0 replies; 5+ messages in thread
From: John Baboval @ 2011-11-03 15:03 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
This is a good idea. I'm going to re-work the patch, but I have a lot of
other stuff going on too, so it may be a week or so before I get back to it.
On 11/01/2011 12:57 PM, Gerd Hoffmann wrote:
> On 11/01/11 14:39, John Baboval wrote:
>> I don't know of any reason for it.
> I'd guess it is alignment, probably not important for all color depts.
>
> Maybe it is a good idea to do all sanity checks in the
> VBE_DISPI_INDEX_ENABLE branch where the actual mode switch happens. Then
> you already know xres, yres and depth when applying the checks. You can
> calculate the scanline length, then check the scanline alignment instead
> of being overly strict on xres in high color modes to satisfy alignment
> requirements in low color modes.
>
> You can also simply calculate how much memory the video mode needs and
> check that against the configured video ram instead of pulling xres and
> yres limits out of thin air.
>
> cheers,
> Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-03 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-28 19:24 [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution John Baboval
2011-11-01 8:58 ` Gerd Hoffmann
2011-11-01 13:39 ` John Baboval
2011-11-01 16:57 ` Gerd Hoffmann
2011-11-03 15:03 ` John Baboval
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).