drm/radeon: split evergreen_cs_check_reg
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 23 Aug 2015 00:57:36 +0000 (03:57 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Oct 2015 20:08:27 +0000 (16:08 -0400)
commite5b69da6badca8286a67c1d0d1c6634e65c7e669
treea589f862091c7c84941aff0f1ea1cef337577eef
parent4a985353d461951e4ed51abc281c09a780d30058
drm/radeon: split evergreen_cs_check_reg

evergreen_cs_check_reg() is a large function and gcc doesn't want to
inline it. It has a quick check for reg_safe_bm[] to see if register
needs special handling, which often results in early exit. However
because the function is large, it has a long prologue/epilogue to
save/restore all the callee-save registers which according to perf is
taking significant amount of time. To avoid this, we can reuse
evergreen_is_safe_reg() to do the early check directly in register loop.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/evergreen_cs.c