]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: refactor register check loop
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 23 Aug 2015 00:57:37 +0000 (03:57 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Oct 2015 20:08:29 +0000 (16:08 -0400)
commit6dc5d1b18a881a9f59c01a11b8d5640e8c829ca9
tree65848310ebfede783e44a96da8b210602c5da084
parentc502bd7fee64242f1c1816c7920f2ceae40450f2
drm/radeon: refactor register check loop

After this patch the register check loop does the same thing as before,
except that now gcc does better job optimizing it: it now sees that
end_reg was already checked against PACKET3_SET_CONTEXT_REG_END and can
optimize REG_SAFE_BM_SIZE comparison out of evergreen_is_safe_reg()
as (PACKET3_SET_CONTEXT_REG_END >> 7) < REG_SAFE_BM_SIZE.

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