mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-06 15:30:20 +01:00
intel: Remove the extra reference while validating the reloc tree
Buffers on the relocation tree are guarded by the reference to the batch object and so do not need an extra reference whilst constructing the list of execution buffer objects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
8ffd2e142e
commit
9c8ad05e8b
1 changed files with 0 additions and 16 deletions
|
|
@ -187,7 +187,6 @@ static int
|
|||
drm_intel_gem_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
|
||||
uint32_t stride);
|
||||
|
||||
static void drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo);
|
||||
static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo,
|
||||
time_t time);
|
||||
|
||||
|
|
@ -357,7 +356,6 @@ drm_intel_add_validate_buffer(drm_intel_bo *bo)
|
|||
bufmgr_gem->exec_objects[index].alignment = 0;
|
||||
bufmgr_gem->exec_objects[index].offset = 0;
|
||||
bufmgr_gem->exec_bos[index] = bo;
|
||||
drm_intel_gem_bo_reference(bo);
|
||||
bufmgr_gem->exec_count++;
|
||||
}
|
||||
|
||||
|
|
@ -793,19 +791,6 @@ drm_intel_gem_bo_unreference_final(drm_intel_bo *bo, time_t time)
|
|||
}
|
||||
}
|
||||
|
||||
static void drm_intel_gem_bo_unreference_locked(drm_intel_bo *bo)
|
||||
{
|
||||
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
|
||||
|
||||
assert(atomic_read(&bo_gem->refcount) > 0);
|
||||
if (atomic_dec_and_test(&bo_gem->refcount)) {
|
||||
struct timespec time;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
drm_intel_gem_bo_unreference_final(bo, time.tv_sec);
|
||||
}
|
||||
}
|
||||
|
||||
static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo,
|
||||
time_t time)
|
||||
{
|
||||
|
|
@ -1327,7 +1312,6 @@ drm_intel_gem_bo_exec(drm_intel_bo *bo, int used,
|
|||
|
||||
/* Disconnect the buffer from the validate list */
|
||||
bo_gem->validate_index = -1;
|
||||
drm_intel_gem_bo_unreference_locked(bo);
|
||||
bufmgr_gem->exec_bos[i] = NULL;
|
||||
}
|
||||
bufmgr_gem->exec_count = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue