Giter Club home page Giter Club logo

Comments (4)

kraxel avatar kraxel commented on September 27, 2024

The GOP driver should be separate from QemuVideoDxe. It should be
virtio-1.0 only, and should bind our edk2-internal VIRTIO_DEVICE_PROTOCOL
only (enforcing the >=1 protocol revision). PCI details and VGA
compatibility should be ignored (which includes reverting commit 94210dc
94210dc
-- with the new virtio-gpu-pci driver in place, QemuVideoDxe should just
steer clear of the device, and both virtio-gpu-pci and virtio-gpu should be
driven by the new driver.)

Well, it is also possible to have QemuVideoDxe handle virtio-vga and the
new driver virtio-gpu-pci (and virtio-gpu @ mmio).
You can figure which device is which by checking the pci device class,
virtio-vga has DISPLAY_VGA and virtio-gpu-pci has DISPLAY_OTHER.

from edk2.

lersek avatar lersek commented on September 27, 2024

You can figure which device is which by checking the pci device class, virtio-vga has DISPLAY_VGA and virtio-gpu-pci has DISPLAY_OTHER.

This is easy to do in QemuVideoDxe (which is already a PCI device driver).

In the new driver however I'd like to look at the VIRTIO_DEVICE_PROTOCOL interface only. It wouldn't be very hard to find the related PciIo protocol / handle, and check the PCI device class using that (i.e., read the config space through PciIo), but in a sense it would be a "layering violation". The PciIo interface of the device is already in use by Virtio10Dxe (the generic driver that provides the "modern" VIRTIO_DEVICE_PROTOCOL impl. on top of PciIo).

Admittedly, this would be a one-off check, not a permanent reference (the UEFI spec recognizes this difference; EFI_OPEN_PROTOCOL_GET_PROTOCOL vs. EFI_OPEN_PROTOCOL_BY_DRIVER.) Still I feel the separation would be cleaner without accessing PciIo in the new driver.

from edk2.

kraxel avatar kraxel commented on September 27, 2024

2016-07-05 20:09 GMT+02:00 Laszlo Ersek [email protected]:

You can figure which device is which by checking the pci device class,
virtio-vga has DISPLAY_VGA and virtio-gpu-pci has DISPLAY_OTHER.

This is easy to do in QemuVideoDxe (which is already a PCI device driver).

In the new driver however I'd like to look at the VIRTIO_DEVICE_PROTOCOL
interface only. It wouldn't be very hard to find the related PciIo protocol
/ handle, and check the PCI device class using that (i.e., read the config
space through PciIo), but in a sense it would be a "layering violation".
The PciIo interface of the device is already in use by Virtio10Dxe (the
generic driver that provides the "modern" VIRTIO_DEVICE_PROTOCOL impl. on
top of PciIo).

Possibly it is easier to do in the virtio-pci driver: Don't bind to
DISPLAY_VGA devices, so virtio-vga wouldn't show up as VIRTIO_DEVICE in the
first place.

from edk2.

lersek avatar lersek commented on September 27, 2024

This issue is now tracked by
https://tianocore.acgmultimedia.com/show_bug.cgi?id=66

from edk2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.