Skip to content

Commit

Permalink
drm/ast: Simplify function ast_bo_unpin()
Browse files Browse the repository at this point in the history
Just a code refactoring, no functional change.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Egbert Eich authored and Dave Airlie committed Aug 2, 2017
1 parent e6742e1 commit 587b9b1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/gpu/drm/ast/ast_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr)

int ast_bo_unpin(struct ast_bo *bo)
{
int i, ret;
int i;
if (!bo->pin_count) {
DRM_ERROR("unpin bad %p\n", bo);
return 0;
Expand All @@ -387,11 +387,7 @@ int ast_bo_unpin(struct ast_bo *bo)

for (i = 0; i < bo->placement.num_placement ; i++)
bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
if (ret)
return ret;

return 0;
return ttm_bo_validate(&bo->bo, &bo->placement, false, false);
}

int ast_bo_push_sysram(struct ast_bo *bo)
Expand Down

0 comments on commit 587b9b1

Please sign in to comment.