[Mesa-dev] [PATCH] winsys/radeon: remove superfluous distinction of cases

Alex Deucher alexdeucher at gmail.com
Wed Dec 18 10:26:54 PST 2013


On Wed, Dec 18, 2013 at 1:11 PM, Niels Ole Salscheider
<niels_ole at salscheider-online.de> wrote:
> Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>

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

> ---
>  src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 20 +++++---------------
>  1 file changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
> index acb12b2..d8ad297 100644
> --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
> @@ -482,22 +482,12 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags, ui
>             /* pad DMA ring to 8 DWs to meet CP fetch alignment requirements
>              * r6xx, requires at least 4 dw alignment to avoid a hw bug.
>              */
> -            if (flags & RADEON_FLUSH_COMPUTE) {
> -                   if (cs->ws->info.chip_class <= SI) {
> -                           while (rcs->cdw & 7)
> -                                   OUT_CS(&cs->base, 0x80000000); /* type2 nop packet */
> -                   } else {
> -                           while (rcs->cdw & 7)
> -                                   OUT_CS(&cs->base, 0xffff1000); /* type3 nop packet */
> -                   }
> +           if (cs->ws->info.chip_class <= SI) {
> +                   while (rcs->cdw & 7)
> +                           OUT_CS(&cs->base, 0x80000000); /* type2 nop packet */
>             } else {
> -                   if (cs->ws->info.chip_class <= SI) {
> -                           while (rcs->cdw & 7)
> -                                   OUT_CS(&cs->base, 0x80000000); /* type2 nop packet */
> -                   } else {
> -                           while (rcs->cdw & 7)
> -                                   OUT_CS(&cs->base, 0xffff1000); /* type3 nop packet */
> -                   }
> +                   while (rcs->cdw & 7)
> +                           OUT_CS(&cs->base, 0xffff1000); /* type3 nop packet */
>             }
>             break;
>      case RING_UVD:
> --
> 1.8.5.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list