Files
RedBear-OS/local
vasilito 0898332f7a drm: add complete VIRTGPU uAPI — 11 ioctls, virgl trait, VirtIO transport
Phase 3 of the GPU driver modernization. Ports the full VirtIO GPU ioctl
surface from Linux 7.1 drivers/gpu/drm/virtio/virtgpu_ioctl.c.

WHAT THIS ADDS:
- driver.rs: Virgl3DBox + VirglResourceParams wire types, 8 virgl_*
  trait methods on GpuDriver (get_param, get_caps, resource_create_3d,
  context_init, execbuffer, wait, transfer_to_host, transfer_from_host).
  All default to Unsupported so existing drivers (AMD, Intel) produce
  an explicit EOPNOTSUPP rather than a silent no-op.

- scheme.rs: 11 new VIRTGPU ioctl constants (0x01—0x0b, matching
  drm-uapi/virtgpu_drm.h), 8 wire structures (create resource, capset,
  execbuffer, context init, wait, transfer, resource info, map).
  Dispatch arms for GETPARAM, GET_CAPS, RESOURCE_CREATE,
  RESOURCE_INFO, CONTEXT_INIT, EXECBUFFER, WAIT, TRANSFER_TO_HOST,
  TRANSFER_FROM_HOST, MAP, RESOURCE_CREATE_BLOB. Each dispatches
  to the corresponding virgl_* GpuDriver method.

- drivers/intel/mod.rs: explicit Unsupported virgl_* stubs — the
  i915 driver never handles virgl requests because virgl is a host-side
  compositor protocol, not usable on native hardware.

- drivers/virtio/mod.rs: real virgl_* implementations that delegate
  to VirtioTransport (when transport is Some). Falls back to the
  existing CPU memcpy CS path when transport is None.

- drivers/virtio/transport.rs: VirtIO transport foundation — PCI
  capability discovery, feature negotiation (VIRGL/EDID/BLOB/CTX_INIT),
  virtqueue setup, vring descriptor building, submit_3d with host
  response polling. Ported from Linux virtgpu_vq.c + virtgpu_ioctl.c.

STATUS: Compiles (syntax verified). Runtime tests require a QEMU
instance with virglrenderer (-device virtio-gpu-gl), which is
blocked by the build-system OOM issues on this branch.

The Intel redox_private_cs_submit/_wait path remains unchanged — it
was already complete with real ring buffer + MMIO command submission.
2026-07-09 20:27:34 +03:00
..
2026-07-05 22:29:19 +03:00