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-9: Refactor of ati_2d_blt
* Patch 10: Scissor clipping implementation
* Patches 11-12: 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 v4:
- Refactored ati_2d_blt to accept src and dst state
- Implemented host_data blits on top of the refactored ati_2d_blt
(suggested by Zoltan)
- Dropped separate field storage for DP_DATATYPE/DP_MIX (per Zoltan)
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 Zoltan)
- Simplified register field constants and increment logic (per Zoltan)
- 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 Zoltan'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 (12):
ati-vga: Fix DST_PITCH and SRC_PITCH reads
ati-vga: Read aliased values from DP_GUI_MASTER_CNTL
ati-vga: Latch src and dst pitch and offset on master_cntl default
ati-vga: Implement foreground and background color register writes
ati-vga: Add scissor clipping register support
ati-vga: Create setup_2d_blt_dst helper
ati-vga: Create and use ATIBltSrc struct
ati-vga: Consolidate set dirty and dst update
ati-vga: Add internal ati_2d_do_blt accepting src and dst
ati-vga: Implement scissor rectangle clipping for 2D operations
ati-vga: Implement HOST_DATA register writes
ati-vga: Implement HOST_DATA flush to VRAM
hw/display/ati.c | 138 +++++++++++++++-
hw/display/ati_2d.c | 369 +++++++++++++++++++++++++++++-------------
hw/display/ati_dbg.c | 9 ++
hw/display/ati_int.h | 19 +++
hw/display/ati_regs.h | 20 +++
5 files changed, 435 insertions(+), 120 deletions(-)
--
2.51.2