[PATCH v4 0/9] ati-vga: Implement HOST_DATA transfers to enable X.org text rendering

Chad Jablonski posted 9 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260106185700.2102742-1-chad@jablonski.xyz
There is a newer version of this series
hw/display/ati.c      | 162 ++++++++++++++++--
hw/display/ati_2d.c   | 371 +++++++++++++++++++++++++++++++-----------
hw/display/ati_dbg.c  |   9 +
hw/display/ati_int.h  |  31 +++-
hw/display/ati_regs.h |  44 ++++-
5 files changed, 500 insertions(+), 117 deletions(-)
[PATCH v4 0/9] ati-vga: Implement HOST_DATA transfers to enable X.org text rendering
Posted by Chad Jablonski 1 month ago
This series implements HOST_DATA as a blit source enabling text rendering in
xterm under X.org with 2D acceleration.

The series builds up functionality incrementally:

* Patches 1-5:   Bug fixes and register implementations
* Patches 6-7:   Scissor clipping and destination setup refactor
* Patches 8-9:   HOST_DATA register writes, color expansion, and
                 accumulator flush

Tested with xterm on X.org using the r128 driver built with
--disable-dri (MMIO mode).

Hardware tests can be found at:
https://codeberg.org/cjab/ati-tests/src/branch/main/tests/host_data.c

Changes from v3:
- New patch 1 fixing DP_DATATYPE/MIX register aliasing, this supersedes old patch 5
- Fix MSB/LSB HOST_DATA bit ordering, it is per-byte rather than per-word
- Fixed a missing break in register write handler
- Squashed and reorganized the dst/scissor helper patches (per BALATON)
- Simplified register field constants and increment logic (per BALATON)
- Tested with MorphOS and TVPaint (opaque bitmap fonts now work)

Changes from v2:

- Verified with hardware that clipping default bit latches
- Verified with hardware that pitch/offset default bits latch
  (supersedes BALATON's "ati-vga: Separate default control bit for
  source")
- A new approach to HOST_DATA using a 128-bit accumulator instead of a
  large buffer
- Fixed a longstanding bug in (DST/SRC)_PITCH reads that zeroed pitch value.
- Removed mask from the DP_GUI_MASTER_CNTL write, all fields are
  important
- Created helpers for code shared between ati_2d_blt and
  ati_host_data_flush

Changes from v1:

- Split monolithic patch into 7 logical patches as requested
- Integrate HOST_DATA blit into existing ati_2d_blt()
- Add fallback implementation for non-pixman builds
- Remove unnecessary initialization in realize (kept in reset only)
- Fixed DP_GUI_MASTER_CNTL mask to preserve GMC_SRC_SOURCE field
- Implement scissor clipping

Chad Jablonski (9):
  ati-vga: Store DP_DATATYPE and DP_MIX fields independently
  ati-vga: Fix DST_PITCH and SRC_PITCH reads
  ati-vga: Add scissor clipping register support
  ati-vga: Implement foreground and background color register writes
  ati-vga: Latch src and dst pitch and offset on master_cntl default
  ati-vga: Implement scissor rectangle clipping for 2D operations
  ati-vga: Create 2d_blt destination setup helper
  ati-vga: Implement HOST_DATA register writes
  ati-vga: Implement HOST_DATA flush to VRAM

 hw/display/ati.c      | 162 ++++++++++++++++--
 hw/display/ati_2d.c   | 371 +++++++++++++++++++++++++++++++-----------
 hw/display/ati_dbg.c  |   9 +
 hw/display/ati_int.h  |  31 +++-
 hw/display/ati_regs.h |  44 ++++-
 5 files changed, 500 insertions(+), 117 deletions(-)

-- 
2.51.2