[PATCH v2 4/7] ati-vga: Fix DP_GUI_MASTER_CNTL register mask

Chad Jablonski posted 7 patches 3 months, 1 week ago
There is a newer version of this series
[PATCH v2 4/7] ati-vga: Fix DP_GUI_MASTER_CNTL register mask
Posted by Chad Jablonski 3 months, 1 week ago
Change the register mask from 0xf800000f to 0xff00000f to preserve bits
24-26. This is the GMC_SRC_SOURCE field which is needed to determine
the type of source for the blit operation.

Signed-off-by: Chad Jablonski <chad@jablonski.xyz>
---
 hw/display/ati.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/ati.c b/hw/display/ati.c
index bf7a037e64..4ff17209c4 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -867,7 +867,7 @@ static void ati_mm_write(void *opaque, hwaddr addr,
         ati_2d_blt(s);
         break;
     case DP_GUI_MASTER_CNTL:
-        s->regs.dp_gui_master_cntl = data & 0xf800000f;
+        s->regs.dp_gui_master_cntl = data & 0xff00000f;
         s->regs.dp_datatype = (data & 0x0f00) >> 8 | (data & 0x30f0) << 4 |
                               (data & 0x4000) << 16;
         s->regs.dp_mix = (data & GMC_ROP3_MASK) | (data & 0x7000000) >> 16;
-- 
2.51.0
Re: [PATCH v2 4/7] ati-vga: Fix DP_GUI_MASTER_CNTL register mask
Posted by BALATON Zoltan 3 months, 1 week ago
On Sun, 2 Nov 2025, Chad Jablonski wrote:
> Change the register mask from 0xf800000f to 0xff00000f to preserve bits
> 24-26. This is the GMC_SRC_SOURCE field which is needed to determine
> the type of source for the blit operation.
>
> Signed-off-by: Chad Jablonski <chad@jablonski.xyz>

Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>

> ---
> hw/display/ati.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/ati.c b/hw/display/ati.c
> index bf7a037e64..4ff17209c4 100644
> --- a/hw/display/ati.c
> +++ b/hw/display/ati.c
> @@ -867,7 +867,7 @@ static void ati_mm_write(void *opaque, hwaddr addr,
>         ati_2d_blt(s);
>         break;
>     case DP_GUI_MASTER_CNTL:
> -        s->regs.dp_gui_master_cntl = data & 0xf800000f;
> +        s->regs.dp_gui_master_cntl = data & 0xff00000f;
>         s->regs.dp_datatype = (data & 0x0f00) >> 8 | (data & 0x30f0) << 4 |
>                               (data & 0x4000) << 16;
>         s->regs.dp_mix = (data & GMC_ROP3_MASK) | (data & 0x7000000) >> 16;
>