[Mesa-dev] [PATCH 1/2] winsys/amdgpu: add one likely() call in amdgpu_cs_flush()

Marek Olšák maraeo at gmail.com
Mon Jan 30 12:08:12 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Jan 27, 2017 at 2:35 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
> index 0bc4ce941b..789a5dbafa 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
> @@ -1142,9 +1142,9 @@ static int amdgpu_cs_flush(struct radeon_winsys_cs *rcs,
>     }
>
>     /* If the CS is not empty or overflowed.... */
> -   if (radeon_emitted(&cs->main.base, 0) &&
> +   if (likely(radeon_emitted(&cs->main.base, 0) &&
>         cs->main.base.current.cdw <= cs->main.base.current.max_dw &&
> -       !debug_get_option_noop()) {
> +       !debug_get_option_noop())) {
>        struct amdgpu_cs_context *cur = cs->csc;
>        unsigned i, num_buffers;
>
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list