winsys/amdgpu: remove ib_type variable from struct amdgpu_ib
preamble ib is created using amdgpu_cs_setup_preemption() function. only IB_MAIN memory is allocated from struct amdgpu_ib. Hence remove ib_type variable from struct amdgpu_ib. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26612>
This commit is contained in:
committed by
Marge Bot
parent
0f117efe39
commit
4d6089bfd1
@@ -918,7 +918,7 @@ static bool amdgpu_get_new_ib(struct amdgpu_winsys *ws,
|
||||
* and there is less waiting for buffers and fences. Proof:
|
||||
* http://www.phoronix.com/scan.php?page=article&item=mesa-111-si&num=1
|
||||
*/
|
||||
struct drm_amdgpu_cs_chunk_ib *info = &cs->csc->ib[ib->ib_type];
|
||||
struct drm_amdgpu_cs_chunk_ib *info = &cs->csc->ib[IB_MAIN];
|
||||
/* This is the minimum size of a contiguous IB. */
|
||||
unsigned ib_size = 4 * 1024 * 4;
|
||||
|
||||
@@ -959,8 +959,7 @@ static bool amdgpu_get_new_ib(struct amdgpu_winsys *ws,
|
||||
|
||||
rcs->current.buf = (uint32_t*)(ib->ib_mapped + ib->used_ib_space);
|
||||
|
||||
if (ib->ib_type == IB_MAIN)
|
||||
cs->csc->ib_main_addr = rcs->current.buf;
|
||||
cs->csc->ib_main_addr = rcs->current.buf;
|
||||
|
||||
ib_size = ib->big_ib_buffer->size - ib->used_ib_space;
|
||||
rcs->current.max_dw = ib_size / 4 - amdgpu_cs_epilog_dws(cs);
|
||||
@@ -1130,8 +1129,6 @@ amdgpu_cs_create(struct radeon_cmdbuf *rcs,
|
||||
fence_info.offset = cs->ip_type * 4;
|
||||
amdgpu_cs_chunk_fence_info_to_data(&fence_info, (void*)&cs->fence_chunk);
|
||||
|
||||
cs->main.ib_type = IB_MAIN;
|
||||
|
||||
if (!amdgpu_init_cs_context(ctx->ws, &cs->csc1, ip_type)) {
|
||||
FREE(cs);
|
||||
return false;
|
||||
|
||||
@@ -63,7 +63,6 @@ struct amdgpu_ib {
|
||||
unsigned max_ib_size_dw;
|
||||
uint32_t *ptr_ib_size;
|
||||
bool ptr_ib_size_inside_ib;
|
||||
enum ib_type ib_type;
|
||||
};
|
||||
|
||||
struct amdgpu_fence_list {
|
||||
@@ -212,7 +211,7 @@ static inline struct amdgpu_cs *
|
||||
amdgpu_cs(struct radeon_cmdbuf *rcs)
|
||||
{
|
||||
struct amdgpu_cs *cs = (struct amdgpu_cs*)rcs->priv;
|
||||
assert(!cs || cs->main.ib_type == IB_MAIN);
|
||||
assert(cs);
|
||||
return cs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user