summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/QemuVideoDxe
Commit message (Collapse)AuthorAgeFilesLines
...
* OvmfPkg: QemuVideoDxe: serialize Start() against callbacksLaszlo Ersek2014-03-221-1/+9
| | | | | | | | | | | | | | | | | | | If Start() succeeds, the callback is only executed when the setup is complete (on the stack of RestoreTPL()), rather than on the stack of InstallMultipleProtocolInterfaces(), when the driver setup may yet be theoretically incomplete. If Start() fails, the protocol interface will have been uninstalled (rolled back) by the time the callback runs (again, on the stack of RestoreTPL()). Since protocol notification callbacks begin with locating the protocol interface in question, such attempts to locate will fail immediately and save some work in the callback. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15371 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: add further BOCHS modesLaszlo Ersek2014-03-031-3/+37
| | | | | | | | | | | This brings the list of BOCHS video modes to par with the QEMU QXL implementation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15289 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: filter BOCHS modes vs. available frame buffer sizeLaszlo Ersek2014-03-031-18/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the next patch we'll add many new BOCHS modes, some of which require large frame buffers. The size of the QXL VGA compatibility framebuffer can be changed with the -global qxl-vga.vgamem_mb=$NUM_MB QEMU option. If $NUM_MB would exceed 32, then the following two QEMU options are necessary instead: -global qxl-vga.vgamem_mb=$NUM_MB \ -global qxl-vga.ram_size_mb=$((NUM_MB*2)) because the compatibility framebuffer can't cover more than half of PCI BAR #0. The latter defaults to 64MB in size, and is controlled by "ram_size_mb". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15288 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: clarify QEMU_VIDEO_MODE_DATA.ModeNumberLaszlo Ersek2014-03-033-10/+19
| | | | | | | | | | | | | | | | | | | The field name "ModeNumber" in QEMU_VIDEO_MODE_DATA is misleading -- it is not immediately obvious whether this field carries a client-visible mode number, in the GOP sense, or an internal, card type specific mode index. After checking all references, rename the field to "InternalModeIndex". Also, when filling in the card type independent QEMU_VIDEO_MODE_DATA array from the card type specific mode array, distinguish the GOP mode number from the internal mode index in the debug message. This patch effects no functional changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15287 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: eliminate useless Private->HardwareNeedsStartingLaszlo Ersek2014-03-032-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Currently, QemuVideoGraphicsOutputQueryMode() reports EFI_NOT_STARTED when this boolean field is set. However, QemuVideoGraphicsOutputQueryMode() is only available to callers after the GOP interface has been installed. That in turn implies that the following partial call tree has succeeded without errors: QemuVideoControllerDriverStart() QemuVideoGraphicsOutputConstructor() QemuVideoGraphicsOutputSetMode(... 0 ...) HardwareNeedsStarting = FALSE InstallMultipleProtocolInterfaces(... GOP ...) That is, when QemuVideoGraphicsOutputQueryMode() is reached, HardwareNeedsStarting is always FALSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15286 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: plug remaining leaks in Stop()Laszlo Ersek2014-03-031-0/+5
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15285 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: disentangle UEFI driver model use in Stop()Laszlo Ersek2014-03-031-11/+20
| | | | | | | | | | | | | | | | A bus driver needs to pay attention whether its Stop() function is being called on the "main" controller handle (NumberOfChildren == 0) or on the child handles (NumberOfChildren > 0). In QemuVideoDxe, all our resources are associated with the one child handle (and the Private data structure) *except* the top-level PciIo protocol reference. Be conscious of which mode Stop() is being called for. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15284 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: simplify UEFI driver model use in Supported() / Start()Laszlo Ersek2014-03-031-86/+24
| | | | | | | | | | | | | | | | | | | A bus driver is allowed to ignore the actual value of RemainingDevicePath in Supported() and Start(), and to produce all child handles at once. This in effect means the following invariants for QemuVideoDxe: - (RemainingDevicePath == NULL), and - (Private->GopDevicePath != NULL) Simplify Supported() and Start() by substituting constant TRUE and FALSE (as appropriate) in expressions that check RemainingDevicePath and/or Private->GopDevicePath. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15283 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuVideoDxe: tidy up error checking/handling in & under Start()Laszlo Ersek2014-03-033-95/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QemuVideoControllerDriverStart(): - remove redundant zero-initialization of: - Private->Handle (2 locations) - Private->GopDevicePath (when at devpath end) - remove fields used for error handling only: - PciAttributesSaved - tigthen scope of temporaries: - MmioDesc - AcpiDeviceNode - supplement missing error checks: - AppendDevicePathNode() can fail with out-of-memory (2 locations) - when installing GopDevicePath - retval of QemuVideoGraphicsOutputConstructor() (can justifiedly fail with out-of-resources) - plug leaks on error: - free GopDevicePath (AppendDevicePathNode() allocates dynamically) - uninstall GopDevicePath - free Private->ModeData - call QemuVideoGraphicsOutputDestructor() - uninstall GOP In QemuVideoGraphicsOutputConstructor(), called by Start(): - supplement missing error checks: - QemuVideoGraphicsOutputSetMode() retval (it can fail with out-of-resources) - plug leaks on error: - free Mode->Info - free Mode In QemuVideoCirrusModeSetup() and QemuVideoBochsModeSetup(), both called by Start(): - supplement missing error checks: - AllocatePool() can fail in both In QemuVideoGraphicsOutputDestructor(), called by Start() on the error path: - plug leaks: - free Private->LineBuffer, which is allocated in Start() -> Constructor() -> SetMode() In QemuVideoGraphicsOutputSetMode(), called by Start() indirectly: - remove redundant zero-assignment to: - Private->LineBuffer Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15282 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/QemuVideoDxe: child handles should have open parent protocol ↵Chris Ruffin2013-12-151-1/+32
| | | | | | | | | | | | | | | BY_CHILD_CONTROLLER The QemuVideoDxe driver creates child controller handles, so it is acting as a hybrid bus driver. The child handles should open the parent's bus protocol BY_CHILD_CONTROLLER to properly maintain the protocol usage count. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Ruffin <chris.ruffin@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14987 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/QemuVideoDxe: don't leak descriptors returned by GetBarAttributesLaszlo Ersek2013-11-202-0/+5
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14877 6f19259b-4bc3-4df7-8a09-765794883524
* QemuVideo: stdvga mmio bar supportjljusten2012-11-273-20/+104
| | | | | | | | | | | | The qemu standard vga has a MMIO bar in qemu 1.3+. Use it if available. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13969 6f19259b-4bc3-4df7-8a09-765794883524
* QemuVideo: Add support for the bochs dispi interfacejljusten2012-11-274-1/+196
| | | | | | | | | | | | | | | Add code to handle qemu-emulated vga cards supporting the bochs dispi interface (standard vga, qxl vga). This requires qemu 1.3+ which provides the bochs dispi interface data register on a aligned io address. See http://git.qemu.org/?p=qemu.git;a=commitdiff;h=df9ffb726ff13f850b8829be1bc85ed621b903ac Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13968 6f19259b-4bc3-4df7-8a09-765794883524
* QemuVideo: prepare to support more hardwarejljusten2012-11-275-64/+133
| | | | | | | | | | | | | | Move to a table-driven hardware detection. Add a table with PCI IDs, card name and variant enum. Use the table for hardware detection and initialization. Rename Cirrus-specific data and code to carry "cirrus" in the name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13967 6f19259b-4bc3-4df7-8a09-765794883524
* Refine file header format to follow coding style.ydong102011-12-161-2/+2
| | | | | | | Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12881 6f19259b-4bc3-4df7-8a09-765794883524
* Remove old COMPRESS keyword, has add new kewword PCI_COMPRESS.ydong102011-09-301-1/+0
| | | | | | | | Signed-off-by: ydong10 Reviewed-by: niruiyu Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12491 6f19259b-4bc3-4df7-8a09-765794883524
* Clean up invalid keywords and missing keywords in [Define] section of ↵lzeng142011-06-281-1/+2
| | | | | | | | | | INF/DEC files. Signed-off-by: lzeng14 Reviewed-by: lhauch Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11906 6f19259b-4bc3-4df7-8a09-765794883524
* update copyright line formathhtian2011-06-071-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11758 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Add QemuVideoDxe driverjljusten2011-04-127-0/+2028
This driver provides a UEFI Graphics Output Protocol (GOP) driver for the QEMU Cirrus VGA hardware. It enables 24-bit color, and uses the standard 32-bit GOP pixel format whenever possible. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11524 6f19259b-4bc3-4df7-8a09-765794883524