winsys/amdgpu: add one likely() call in amdgpu_cs_flush()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 27 Jan 2017 13:35:22 +0000 (14:35 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 30 Jan 2017 12:44:19 +0000 (13:44 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c

index 0bc4ce941b0f8dc18f2fa06a9c6c307325359bb4..789a5dbafa3a9be9f29c706f050bd07170ab4cac 100644 (file)
@@ -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;