ati-vga: Fix pitch and offset registers mask
Remove the Radeon specific masks for offset and pitch registers. While the documentation is not clear about it I believe it is a copy&paste error from the combined DST_PITCH_OFFSET register that has less bits so more constrained than the individual registers which should not have this mask. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-ID: <20260404111318.8334E596A22@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
BALATON Zoltan committed
Apr 4, 2026 at 13:13 UTC
1c3bc5ea569850739c1f963d58defeb94c8f76ce
1 file changed
+2
-14
hw/display/ati.c
+2
-14
@@ -820,18 +820,12 @@ static void ati_mm_write(void *opaque, hwaddr addr,
820
ati_cursor_define(s);
821
break;
822
case DST_OFFSET:
823
- if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
823
s->regs.dst_offset = data & 0xfffffff0;
825
- } else {
826
- s->regs.dst_offset = data & 0xfffffc00;
827
- }
824
break;
825
case DST_PITCH:
830
- if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
826
s->regs.dst_pitch = data & 0x3fff;
827
+ if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
828
s->regs.dst_tile = (data >> 16) & 1;
833
- } else {
834
- s->regs.dst_pitch = data & 0x3ff0;
829
}
830
break;
831
case DST_TILE:
@@ -941,18 +935,12 @@ static void ati_mm_write(void *opaque, hwaddr addr,
935
s->regs.dst_height = (data >> 16) & 0x3fff;
936
break;
937
case SRC_OFFSET:
944
- if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
938
s->regs.src_offset = data & 0xfffffff0;
946
- } else {
947
- s->regs.src_offset = data & 0xfffffc00;
948
- }
939
break;
940
case SRC_PITCH:
951
- if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
941
s->regs.src_pitch = data & 0x3fff;
942
+ if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
943
s->regs.src_tile = (data >> 16) & 1;
954
- } else {
955
- s->regs.src_pitch = data & 0x3ff0;
944
}
945
break;
946
case DP_BRUSH_BKGD_CLR: