[PATCH 1/2] Check for empty vline ranges after clamping.

Alex Deucher alexdeucher at gmail.com
Wed Feb 1 06:24:17 PST 2012


2012/2/1 Michel Dänzer <michel at daenzer.net>:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> The clamping could turn a previously non-empty range into an empty one.
>
> Also, start == stop means the range is empty.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

For the series:

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/evergreen_accel.c    |    5 +----
>  src/r6xx_accel.c         |    5 +----
>  src/radeon_commonfuncs.c |    5 +----
>  3 files changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/src/evergreen_accel.c b/src/evergreen_accel.c
> index 83320c8..7c6b777 100644
> --- a/src/evergreen_accel.c
> +++ b/src/evergreen_accel.c
> @@ -284,9 +284,6 @@ void evergreen_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix,
>
>     drmmode_crtc = crtc->driver_private;
>
> -    if (stop < start)
> -        return;
> -
>     if (!crtc->enabled)
>         return;
>
> @@ -309,7 +306,7 @@ void evergreen_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix,
>     start = max(start, 0);
>     stop = min(stop, crtc->mode.VDisplay);
>
> -    if (start > crtc->mode.VDisplay)
> +    if (start >= stop)
>         return;
>
>     /* on r5xx+ vline starts at viewport_y */
> diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
> index 752165b..94678a1 100644
> --- a/src/r6xx_accel.c
> +++ b/src/r6xx_accel.c
> @@ -345,9 +345,6 @@ r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, drmBufPtr ib, PixmapPtr pPix,
>     if (!crtc)
>         return;
>
> -    if (stop < start)
> -        return;
> -
>     if (!crtc->enabled)
>         return;
>
> @@ -370,7 +367,7 @@ r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, drmBufPtr ib, PixmapPtr pPix,
>     start = max(start, 0);
>     stop = min(stop, crtc->mode.VDisplay);
>
> -    if (start > crtc->mode.VDisplay)
> +    if (start >= stop)
>         return;
>
>     /* on r5xx+ vline starts at viewport_y */
> diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
> index 7281949..e2b7171 100644
> --- a/src/radeon_commonfuncs.c
> +++ b/src/radeon_commonfuncs.c
> @@ -839,9 +839,6 @@ void FUNC_NAME(RADEONWaitForVLine)(ScrnInfoPtr pScrn, PixmapPtr pPix,
>     if (!crtc)
>        return;
>
> -    if (stop < start)
> -       return;
> -
>     if (!crtc->enabled)
>        return;
>
> @@ -864,7 +861,7 @@ void FUNC_NAME(RADEONWaitForVLine)(ScrnInfoPtr pScrn, PixmapPtr pPix,
>     start = max(start, 0);
>     stop = min(stop, crtc->mode.VDisplay);
>
> -    if (start > crtc->mode.VDisplay)
> +    if (start >= stop)
>        return;
>
>     if (IS_AVIVO_VARIANT) {
> --
> 1.7.8.3
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list