[PATCH v6 07/20] ati-vga: Remove dst_x/y updates after blit

Chad Jablonski posted 20 patches 1 week, 3 days ago
There is a newer version of this series
[PATCH v6 07/20] ati-vga: Remove dst_x/y updates after blit
Posted by Chad Jablonski 1 week, 3 days ago
The Mobility M6 register reference (DST_HEIGHT_WIDTH) states that dst_y is
updated after a blit but this appears to not be the case.

Hardware testing revealed that both the R128 and R100 do not update
dst_x or dst_y after a blit, regardless of the source. This removes
the update.

Signed-off-by: Chad Jablonski <chad@jablonski.xyz>
---
 hw/display/ati_2d.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
index a8c4c534b9..cfc7bf9789 100644
--- a/hw/display/ati_2d.c
+++ b/hw/display/ati_2d.c
@@ -174,10 +174,6 @@ void ati_2d_blt(ATIVGAState *s)
                                     dst_y * surface_stride(ds),
                                     s->regs.dst_height * surface_stride(ds));
         }
-        s->regs.dst_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ?
-                         dst_x + s->regs.dst_width : dst_x);
-        s->regs.dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ?
-                         dst_y + s->regs.dst_height : dst_y);
         break;
     }
     case ROP3_PATCOPY:
@@ -228,8 +224,6 @@ void ati_2d_blt(ATIVGAState *s)
                                     dst_y * surface_stride(ds),
                                     s->regs.dst_height * surface_stride(ds));
         }
-        s->regs.dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ?
-                         dst_y + s->regs.dst_height : dst_y);
         break;
     }
     default:
-- 
2.52.0
Re: [PATCH v6 07/20] ati-vga: Remove dst_x/y updates after blit
Posted by BALATON Zoltan 1 week, 2 days ago
On Fri, 30 Jan 2026, Chad Jablonski wrote:
> The Mobility M6 register reference (DST_HEIGHT_WIDTH) states that dst_y is
> updated after a blit but this appears to not be the case.
>
> Hardware testing revealed that both the R128 and R100 do not update
> dst_x or dst_y after a blit, regardless of the source. This removes
> the update.
>
> Signed-off-by: Chad Jablonski <chad@jablonski.xyz>

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

> ---
> hw/display/ati_2d.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
> index a8c4c534b9..cfc7bf9789 100644
> --- a/hw/display/ati_2d.c
> +++ b/hw/display/ati_2d.c
> @@ -174,10 +174,6 @@ void ati_2d_blt(ATIVGAState *s)
>                                     dst_y * surface_stride(ds),
>                                     s->regs.dst_height * surface_stride(ds));
>         }
> -        s->regs.dst_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ?
> -                         dst_x + s->regs.dst_width : dst_x);
> -        s->regs.dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ?
> -                         dst_y + s->regs.dst_height : dst_y);
>         break;
>     }
>     case ROP3_PATCOPY:
> @@ -228,8 +224,6 @@ void ati_2d_blt(ATIVGAState *s)
>                                     dst_y * surface_stride(ds),
>                                     s->regs.dst_height * surface_stride(ds));
>         }
> -        s->regs.dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ?
> -                         dst_y + s->regs.dst_height : dst_y);
>         break;
>     }
>     default:
>