summaryrefslogtreecommitdiff
path: root/hw/display/jazz_led.c
AgeCommit message (Collapse)AuthorFilesLines
2017-05-10jazz_led: fix bad snprintfPaolo Bonzini1-2/+2
Detected by GCC 7's -Wformat-truncation. snprintf writes at most 2 bytes here including the terminating NUL, so the result is truncated. In addition, the newline at the end is pointless. Fix the buffer size and the format string. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-05-13hw/display: QOM'ify jazz_led.cxiaoqiang.zhao1-7/+11
* Drop the old SysBus init function and use instance_init * Move graphic_console_init into realize stage Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
2016-01-29hw/display: Clean up includesPeter Maydell1-0/+1
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-21-git-send-email-peter.maydell@linaro.org
2016-01-08ui/curses: Fix color attribute of monitor for cursesOGAWA Hirofumi1-2/+4
Current text_console_update() writes totally broken color attributes to console_write_ch(). The format now is writing, [WRONG] bold << 21 | fg << 12 | bg << 8 | char fg == 3bits curses color number bg == 3bits curses color number I can't see this format is where come from. Anyway, this doesn't work at all. What curses expects is actually (and vga.c is using), [RIGHT] bold << 21 | bg << 11 | fg << 8 | char fg == 3bits vga color number bg == 3bits vga color number And curses set COLOR_PAIR() up to match this format, and curses's chtype. I.e, bold | color_pair | char color_pair == (bg << 3 | fg) To fix, this simply uses VGA color number everywhere except curses.c internal. Then, convert it to above [RIGHT] format to write by console_write_ch(). And as bonus, this reduces to expose curses define to other parts (removes COLOR_* from console.c). [Tested the first line is displayed as white on blue back for monitor in curses console] Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Message-id: 87r3j95407.fsf@mail.parknet.co.jp Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-24jazz_led: Add missing break in switch caseSaravanakumar1-0/+1
Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com> Reviewed-by: Paolo Bonizni <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-14savevm: Remove all the unneeded version_minimum_id_old (rest)Juan Quintela1-1/+0
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong: .fields = (VMStateField []) { and .fields = (VMStateField []) { Change all the combinations to: .fields = (VMStateField[]){ The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-05console: add head to index to qemu consoles.Gerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-07-29jazz_led: QOM cast cleanupAndreas Färber1-4/+8
Introduce a type constant, use QOM casts and rename the parent field. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-04hw/d*: pass owner to memory_region_init* functionsPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04memory: add owner argument to initialization functionsPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-25console: add device link to QemuConsolesGerd Hoffmann1-1/+1
So it is possible to figure which qemu console displays which device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: add GraphicHwOpsGerd Hoffmann1-3/+7
Pass a single GraphicHwOps struct pointer to graphic_console_init, instead of a bunch of function pointers. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-16console: simplify screendumpGerd Hoffmann1-1/+0
Screendumps are alot simpler as we can update non-active QemuConsoles now. So we only need to update the QemuConsole we want write out, then dump the DisplaySurface content into a ppm file. Done. No console switching needed. No special support code in the gfx card emulation needed. Zap it all. Also move ppm_save out of the vga code and next to the qmp_screendump function. For now screen dumping is limited to console #0 (like it used to be), even though it is dead simple to extend it to other consoles. I wanna finish the console cleanup before setting new qapi interfaces into stone. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini1-0/+304
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>