Commit 0716e348 authored by Ian Forbes's avatar Ian Forbes Committed by Zack Rusin
Browse files

drm/vmwgfx: Remove unused code



Remove unused structs, members, and file. Many of these are written but
never read.

Signed-off-by: default avatarIan Forbes <ian.forbes@broadcom.com>
Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240214210440.26167-1-ian.forbes@broadcom.com
parent d1806492
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -87,14 +87,11 @@ struct ttm_object_file {
 *
 * @object_lock: lock that protects idr.
 *
 * @object_count: Per device object count.
 *
 * This is the per-device data structure needed for ttm object management.
 */

struct ttm_object_device {
	spinlock_t object_lock;
	atomic_t object_count;
	struct dma_buf_ops ops;
	void (*dmabuf_release)(struct dma_buf *dma_buf);
	struct idr idr;
@@ -431,7 +428,6 @@ ttm_object_device_init(const struct dma_buf_ops *ops)
		return NULL;

	spin_lock_init(&tdev->object_lock);
	atomic_set(&tdev->object_count, 0);

	/*
	 * Our base is at VMWGFX_NUM_MOB + 1 because we want to create
+0 −27
Original line number Diff line number Diff line
@@ -117,25 +117,8 @@ struct vmwgfx_hash_item {
	unsigned long key;
};


/**
 * struct vmw_validate_buffer - Carries validation info about buffers.
 *
 * @base: Validation info for TTM.
 * @hash: Hash entry for quick lookup of the TTM buffer object.
 *
 * This structure contains also driver private validation info
 * on top of the info needed by TTM.
 */
struct vmw_validate_buffer {
	struct ttm_validate_buffer base;
	struct vmwgfx_hash_item hash;
	bool validate_as_mob;
};

struct vmw_res_func;


/**
 * struct vmw-resource - base class for hardware resources
 *
@@ -445,15 +428,6 @@ struct vmw_sw_context{
struct vmw_legacy_display;
struct vmw_overlay;

struct vmw_vga_topology_state {
	uint32_t width;
	uint32_t height;
	uint32_t primary;
	uint32_t pos_x;
	uint32_t pos_y;
};


/*
 * struct vmw_otable - Guest Memory OBject table metadata
 *
@@ -501,7 +475,6 @@ struct vmw_private {
	struct drm_device drm;
	struct ttm_device bdev;

	struct drm_vma_offset_manager vma_manager;
	u32 pci_id;
	resource_size_t io_start;
	resource_size_t vram_start;
+0 −12
Original line number Diff line number Diff line
@@ -775,7 +775,6 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
	hotspot_y = du->hotspot_y + new_state->hotspot_y;

	du->cursor_surface = vps->surf;
	du->cursor_bo = vps->bo;

	if (!vps->surf && !vps->bo) {
		vmw_cursor_update_position(dev_priv, false, 0, 0);
@@ -858,15 +857,6 @@ int vmw_du_primary_plane_atomic_check(struct drm_plane *plane,
						  DRM_PLANE_NO_SCALING,
						  DRM_PLANE_NO_SCALING,
						  false, true);

	if (!ret && new_fb) {
		struct drm_crtc *crtc = new_state->crtc;
		struct vmw_display_unit *du = vmw_crtc_to_du(crtc);

		vmw_connector_state_to_vcs(du->connector.state);
	}


	return ret;
}

@@ -1361,7 +1351,6 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,

	drm_helper_mode_fill_fb_struct(dev, &vfbs->base.base, mode_cmd);
	vfbs->surface = vmw_surface_reference(surface);
	vfbs->base.user_handle = mode_cmd->handles[0];
	vfbs->is_bo_proxy = is_bo_proxy;

	*out = &vfbs->base;
@@ -1529,7 +1518,6 @@ static int vmw_kms_new_framebuffer_bo(struct vmw_private *dev_priv,
	drm_helper_mode_fill_fb_struct(dev, &vfbd->base.base, mode_cmd);
	vfbd->base.bo = true;
	vfbd->buffer = vmw_bo_reference(bo);
	vfbd->base.user_handle = mode_cmd->handles[0];
	*out = &vfbd->base;

	ret = drm_framebuffer_init(dev, &vfbd->base.base,
+0 −16
Original line number Diff line number Diff line
@@ -217,21 +217,11 @@ struct vmw_kms_dirty {
struct vmw_framebuffer {
	struct drm_framebuffer base;
	bool bo;
	uint32_t user_handle;
};

/*
 * Clip rectangle
 */
struct vmw_clip_rect {
	int x1, x2, y1, y2;
};

struct vmw_framebuffer_surface {
	struct vmw_framebuffer base;
	struct vmw_surface *surface;
	struct vmw_bo *buffer;
	struct list_head head;
	bool is_bo_proxy;  /* true if this is proxy surface for DMA buf */
};

@@ -359,7 +349,6 @@ struct vmw_display_unit {
	struct vmw_cursor_plane cursor;

	struct vmw_surface *cursor_surface;
	struct vmw_bo *cursor_bo;
	size_t cursor_age;

	int cursor_x;
@@ -389,11 +378,6 @@ struct vmw_display_unit {
	int set_gui_y;
};

struct vmw_validation_ctx {
	struct vmw_resource *res;
	struct vmw_bo *buf;
};

#define vmw_crtc_to_du(x) \
	container_of(x, struct vmw_display_unit, crtc)
#define vmw_connector_to_du(x) \
+0 −3
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ struct vmw_kms_sou_define_gmrfb {
struct vmw_screen_object_unit {
	struct vmw_display_unit base;

	unsigned long buffer_size; /**< Size of allocated buffer */
	struct vmw_bo *buffer; /**< Backing store buffer */

	bool defined;
@@ -240,7 +239,6 @@ static void vmw_sou_crtc_mode_set_nofb(struct drm_crtc *crtc)
		int x, y;

		sou->buffer = vps->bo;
		sou->buffer_size = vps->bo_size;

		conn_state = sou->base.connector.state;
		vmw_conn_state = vmw_connector_state_to_vcs(conn_state);
@@ -255,7 +253,6 @@ static void vmw_sou_crtc_mode_set_nofb(struct drm_crtc *crtc)

	} else {
		sou->buffer = NULL;
		sou->buffer_size = 0;
	}
}

Loading