Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dde8fb55 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()

parent e9af3c60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ int bochs_dumb_create(struct drm_file *file, struct drm_device *dev,
int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
			   uint32_t handle, uint64_t *offset);

int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr);
int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag);
int bochs_bo_unpin(struct bochs_bo *bo);

/* bochs_kms.c */
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
	if (ret)
		return ret;

	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL);
	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM);
	if (ret) {
		DRM_ERROR("failed to pin fbcon\n");
		ttm_bo_unreserve(&bo->bo);
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ static int bochs_plane_prepare_fb(struct drm_plane *plane,
	ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
	if (ret)
		return ret;
	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL);
	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM);
	ttm_bo_unreserve(&bo->bo);
	return ret;
}
+1 −10
Original line number Diff line number Diff line
@@ -210,20 +210,13 @@ static void bochs_ttm_placement(struct bochs_bo *bo, int domain)
	bo->placement.num_busy_placement = c;
}

static inline u64 bochs_bo_gpu_offset(struct bochs_bo *bo)
{
	return bo->bo.offset;
}

int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr)
int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag)
{
	struct ttm_operation_ctx ctx = { false, false };
	int i, ret;

	if (bo->pin_count) {
		bo->pin_count++;
		if (gpu_addr)
			*gpu_addr = bochs_bo_gpu_offset(bo);
		return 0;
	}

@@ -235,8 +228,6 @@ int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr)
		return ret;

	bo->pin_count = 1;
	if (gpu_addr)
		*gpu_addr = bochs_bo_gpu_offset(bo);
	return 0;
}