diff options
author | Christian König <christian.koenig@amd.com> | 2016-10-05 08:29:38 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-25 14:38:36 -0400 |
commit | e12f3d7a23c99617f72305a805ed827567a43a9c (patch) | |
tree | 826d4091007045c5dc405f4ca0138a965761a34d /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |
parent | 7bc6be825a2efb00cf8a194e1d0560c92d5a2f6c (diff) |
drm/amdgpu: move IB and frame size directly into the engine description
I should have suggested that on the initial patchset. This saves us a
few CPU cycles during CS and a bunch of loc.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index 2f935888c64b..767843c2b1d7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |||
@@ -98,6 +98,9 @@ struct amdgpu_ring_funcs { | |||
98 | void (*set_wptr)(struct amdgpu_ring *ring); | 98 | void (*set_wptr)(struct amdgpu_ring *ring); |
99 | /* validating and patching of IBs */ | 99 | /* validating and patching of IBs */ |
100 | int (*parse_cs)(struct amdgpu_cs_parser *p, uint32_t ib_idx); | 100 | int (*parse_cs)(struct amdgpu_cs_parser *p, uint32_t ib_idx); |
101 | /* constants to calculate how many DW are needed for an emit */ | ||
102 | unsigned emit_frame_size; | ||
103 | unsigned emit_ib_size; | ||
101 | /* command emit functions */ | 104 | /* command emit functions */ |
102 | void (*emit_ib)(struct amdgpu_ring *ring, | 105 | void (*emit_ib)(struct amdgpu_ring *ring, |
103 | struct amdgpu_ib *ib, | 106 | struct amdgpu_ib *ib, |
@@ -127,8 +130,6 @@ struct amdgpu_ring_funcs { | |||
127 | void (*end_use)(struct amdgpu_ring *ring); | 130 | void (*end_use)(struct amdgpu_ring *ring); |
128 | void (*emit_switch_buffer) (struct amdgpu_ring *ring); | 131 | void (*emit_switch_buffer) (struct amdgpu_ring *ring); |
129 | void (*emit_cntxcntl) (struct amdgpu_ring *ring, uint32_t flags); | 132 | void (*emit_cntxcntl) (struct amdgpu_ring *ring, uint32_t flags); |
130 | unsigned (*get_emit_ib_size) (struct amdgpu_ring *ring); | ||
131 | unsigned (*get_dma_frame_size) (struct amdgpu_ring *ring); | ||
132 | }; | 133 | }; |
133 | 134 | ||
134 | struct amdgpu_ring { | 135 | struct amdgpu_ring { |