Skip to content

Commit 2bdb738

Browse files
Sebastian Andrzej Siewiorthomashvmw
authored andcommitted
drm/vmwgfx: Remove a few unused functions
I noticed that there is a prototype for vmw_fifo_ping_host_locked() but no function. Then I looked further and noticed more functions which are not used anymore or functions protoypes which remained after the function was removed. Remove unused function (prototypes). Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]>
1 parent 44e5f93 commit 2bdb738

File tree

3 files changed

+0
-140
lines changed

3 files changed

+0
-140
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -479,19 +479,6 @@ struct vmw_private {
479479
bool assume_16bpp;
480480
bool has_sm4_1;
481481

482-
/*
483-
* VGA registers.
484-
*/
485-
486-
struct vmw_vga_topology_state vga_save[VMWGFX_MAX_DISPLAYS];
487-
uint32_t vga_width;
488-
uint32_t vga_height;
489-
uint32_t vga_bpp;
490-
uint32_t vga_bpl;
491-
uint32_t vga_pitchlock;
492-
493-
uint32_t num_displays;
494-
495482
/*
496483
* Framebuffer info.
497484
*/
@@ -900,7 +887,6 @@ extern void vmw_fifo_commit(struct vmw_private *dev_priv, uint32_t bytes);
900887
extern void vmw_fifo_commit_flush(struct vmw_private *dev_priv, uint32_t bytes);
901888
extern int vmw_fifo_send_fence(struct vmw_private *dev_priv,
902889
uint32_t *seqno);
903-
extern void vmw_fifo_ping_host_locked(struct vmw_private *, uint32_t reason);
904890
extern void vmw_fifo_ping_host(struct vmw_private *dev_priv, uint32_t reason);
905891
extern bool vmw_fifo_have_3d(struct vmw_private *dev_priv);
906892
extern bool vmw_fifo_have_pitchlock(struct vmw_private *dev_priv);
@@ -947,7 +933,6 @@ extern struct ttm_placement vmw_mob_placement;
947933
extern struct ttm_placement vmw_mob_ne_placement;
948934
extern struct ttm_placement vmw_nonfixed_placement;
949935
extern struct ttm_bo_driver vmw_bo_driver;
950-
extern int vmw_dma_quiescent(struct drm_device *dev);
951936
extern int vmw_bo_map_dma(struct ttm_buffer_object *bo);
952937
extern void vmw_bo_unmap_dma(struct ttm_buffer_object *bo);
953938
extern const struct vmw_sg_table *
@@ -1085,8 +1070,6 @@ int vmw_fb_on(struct vmw_private *vmw_priv);
10851070

10861071
int vmw_kms_init(struct vmw_private *dev_priv);
10871072
int vmw_kms_close(struct vmw_private *dev_priv);
1088-
int vmw_kms_save_vga(struct vmw_private *vmw_priv);
1089-
int vmw_kms_restore_vga(struct vmw_private *vmw_priv);
10901073
int vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data,
10911074
struct drm_file *file_priv);
10921075
void vmw_kms_cursor_post_execbuf(struct vmw_private *dev_priv);
@@ -1139,7 +1122,6 @@ int vmw_overlay_init(struct vmw_private *dev_priv);
11391122
int vmw_overlay_close(struct vmw_private *dev_priv);
11401123
int vmw_overlay_ioctl(struct drm_device *dev, void *data,
11411124
struct drm_file *file_priv);
1142-
int vmw_overlay_stop_all(struct vmw_private *dev_priv);
11431125
int vmw_overlay_resume_all(struct vmw_private *dev_priv);
11441126
int vmw_overlay_pause_all(struct vmw_private *dev_priv);
11451127
int vmw_overlay_claim(struct vmw_private *dev_priv, uint32_t *out);
@@ -1186,10 +1168,6 @@ extern void vmw_otables_takedown(struct vmw_private *dev_priv);
11861168

11871169
extern const struct vmw_user_resource_conv *user_context_converter;
11881170

1189-
extern int vmw_context_check(struct vmw_private *dev_priv,
1190-
struct ttm_object_file *tfile,
1191-
int id,
1192-
struct vmw_resource **p_res);
11931171
extern int vmw_context_define_ioctl(struct drm_device *dev, void *data,
11941172
struct drm_file *file_priv);
11951173
extern int vmw_extended_context_define_ioctl(struct drm_device *dev, void *data,
@@ -1219,7 +1197,6 @@ vmw_context_get_dx_query_mob(struct vmw_resource *ctx_res);
12191197

12201198
extern const struct vmw_user_resource_conv *user_surface_converter;
12211199

1222-
extern void vmw_surface_res_free(struct vmw_resource *res);
12231200
extern int vmw_surface_destroy_ioctl(struct drm_device *dev, void *data,
12241201
struct drm_file *file_priv);
12251202
extern int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
@@ -1230,11 +1207,6 @@ extern int vmw_gb_surface_define_ioctl(struct drm_device *dev, void *data,
12301207
struct drm_file *file_priv);
12311208
extern int vmw_gb_surface_reference_ioctl(struct drm_device *dev, void *data,
12321209
struct drm_file *file_priv);
1233-
extern int vmw_surface_check(struct vmw_private *dev_priv,
1234-
struct ttm_object_file *tfile,
1235-
uint32_t handle, int *id);
1236-
extern int vmw_surface_validate(struct vmw_private *dev_priv,
1237-
struct vmw_surface *srf);
12381210
int vmw_surface_gb_priv_define(struct drm_device *dev,
12391211
uint32_t user_accounting_size,
12401212
SVGA3dSurfaceAllFlags svga3d_flags,

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,87 +1897,6 @@ int vmw_kms_write_svga(struct vmw_private *vmw_priv,
18971897
return 0;
18981898
}
18991899

1900-
int vmw_kms_save_vga(struct vmw_private *vmw_priv)
1901-
{
1902-
struct vmw_vga_topology_state *save;
1903-
uint32_t i;
1904-
1905-
vmw_priv->vga_width = vmw_read(vmw_priv, SVGA_REG_WIDTH);
1906-
vmw_priv->vga_height = vmw_read(vmw_priv, SVGA_REG_HEIGHT);
1907-
vmw_priv->vga_bpp = vmw_read(vmw_priv, SVGA_REG_BITS_PER_PIXEL);
1908-
if (vmw_priv->capabilities & SVGA_CAP_PITCHLOCK)
1909-
vmw_priv->vga_pitchlock =
1910-
vmw_read(vmw_priv, SVGA_REG_PITCHLOCK);
1911-
else if (vmw_fifo_have_pitchlock(vmw_priv))
1912-
vmw_priv->vga_pitchlock = vmw_mmio_read(vmw_priv->mmio_virt +
1913-
SVGA_FIFO_PITCHLOCK);
1914-
1915-
if (!(vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY))
1916-
return 0;
1917-
1918-
vmw_priv->num_displays = vmw_read(vmw_priv,
1919-
SVGA_REG_NUM_GUEST_DISPLAYS);
1920-
1921-
if (vmw_priv->num_displays == 0)
1922-
vmw_priv->num_displays = 1;
1923-
1924-
for (i = 0; i < vmw_priv->num_displays; ++i) {
1925-
save = &vmw_priv->vga_save[i];
1926-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, i);
1927-
save->primary = vmw_read(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY);
1928-
save->pos_x = vmw_read(vmw_priv, SVGA_REG_DISPLAY_POSITION_X);
1929-
save->pos_y = vmw_read(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y);
1930-
save->width = vmw_read(vmw_priv, SVGA_REG_DISPLAY_WIDTH);
1931-
save->height = vmw_read(vmw_priv, SVGA_REG_DISPLAY_HEIGHT);
1932-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
1933-
if (i == 0 && vmw_priv->num_displays == 1 &&
1934-
save->width == 0 && save->height == 0) {
1935-
1936-
/*
1937-
* It should be fairly safe to assume that these
1938-
* values are uninitialized.
1939-
*/
1940-
1941-
save->width = vmw_priv->vga_width - save->pos_x;
1942-
save->height = vmw_priv->vga_height - save->pos_y;
1943-
}
1944-
}
1945-
1946-
return 0;
1947-
}
1948-
1949-
int vmw_kms_restore_vga(struct vmw_private *vmw_priv)
1950-
{
1951-
struct vmw_vga_topology_state *save;
1952-
uint32_t i;
1953-
1954-
vmw_write(vmw_priv, SVGA_REG_WIDTH, vmw_priv->vga_width);
1955-
vmw_write(vmw_priv, SVGA_REG_HEIGHT, vmw_priv->vga_height);
1956-
vmw_write(vmw_priv, SVGA_REG_BITS_PER_PIXEL, vmw_priv->vga_bpp);
1957-
if (vmw_priv->capabilities & SVGA_CAP_PITCHLOCK)
1958-
vmw_write(vmw_priv, SVGA_REG_PITCHLOCK,
1959-
vmw_priv->vga_pitchlock);
1960-
else if (vmw_fifo_have_pitchlock(vmw_priv))
1961-
vmw_mmio_write(vmw_priv->vga_pitchlock,
1962-
vmw_priv->mmio_virt + SVGA_FIFO_PITCHLOCK);
1963-
1964-
if (!(vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY))
1965-
return 0;
1966-
1967-
for (i = 0; i < vmw_priv->num_displays; ++i) {
1968-
save = &vmw_priv->vga_save[i];
1969-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, i);
1970-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, save->primary);
1971-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, save->pos_x);
1972-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, save->pos_y);
1973-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, save->width);
1974-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, save->height);
1975-
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
1976-
}
1977-
1978-
return 0;
1979-
}
1980-
19811900
bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
19821901
uint32_t pitch,
19831902
uint32_t height)

drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -353,37 +353,6 @@ static int vmw_overlay_update_stream(struct vmw_private *dev_priv,
353353
return 0;
354354
}
355355

356-
/**
357-
* Stop all streams.
358-
*
359-
* Used by the fb code when starting.
360-
*
361-
* Takes the overlay lock.
362-
*/
363-
int vmw_overlay_stop_all(struct vmw_private *dev_priv)
364-
{
365-
struct vmw_overlay *overlay = dev_priv->overlay_priv;
366-
int i, ret;
367-
368-
if (!overlay)
369-
return 0;
370-
371-
mutex_lock(&overlay->mutex);
372-
373-
for (i = 0; i < VMW_MAX_NUM_STREAMS; i++) {
374-
struct vmw_stream *stream = &overlay->stream[i];
375-
if (!stream->buf)
376-
continue;
377-
378-
ret = vmw_overlay_stop(dev_priv, i, false, false);
379-
WARN_ON(ret != 0);
380-
}
381-
382-
mutex_unlock(&overlay->mutex);
383-
384-
return 0;
385-
}
386-
387356
/**
388357
* Try to resume all paused streams.
389358
*

0 commit comments

Comments
 (0)