提交 6d01f1f5 编写于 作者: D Dave Airlie

drm/qxl: make lots of things static.

/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h:414:9: sparse: preprocessor token offsetof redefined
include/linux/stddef.h:17:9: this was the original definition
>> drivers/gpu/drm/qxl/qxl_drv.c:49:5: sparse: symbol 'qxl_modeset' was not declared. Should it be static?

Reported-by: kbuild test robot.
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 dea14dfa
...@@ -144,7 +144,7 @@ int qxl_ring_push(struct qxl_ring *ring, ...@@ -144,7 +144,7 @@ int qxl_ring_push(struct qxl_ring *ring,
return 0; return 0;
} }
bool qxl_ring_pop(struct qxl_ring *ring, static bool qxl_ring_pop(struct qxl_ring *ring,
void *element) void *element)
{ {
volatile struct qxl_ring_header *header = &(ring->ring->header); volatile struct qxl_ring_header *header = &(ring->ring->header);
...@@ -169,23 +169,6 @@ bool qxl_ring_pop(struct qxl_ring *ring, ...@@ -169,23 +169,6 @@ bool qxl_ring_pop(struct qxl_ring *ring,
return true; return true;
} }
void qxl_ring_wait_idle(struct qxl_ring *ring)
{
struct qxl_ring_header *header = &(ring->ring->header);
unsigned long flags;
spin_lock_irqsave(&ring->lock, flags);
if (ring->ring->header.cons < ring->ring->header.prod) {
header->notify_on_cons = header->prod;
mb();
spin_unlock_irqrestore(&ring->lock, flags);
wait_event_interruptible(*ring->push_event,
qxl_check_idle(ring));
spin_lock_irqsave(&ring->lock, flags);
}
spin_unlock_irqrestore(&ring->lock, flags);
}
int int
qxl_push_command_ring_release(struct qxl_device *qdev, struct qxl_release *release, qxl_push_command_ring_release(struct qxl_device *qdev, struct qxl_release *release,
uint32_t type, bool interruptible) uint32_t type, bool interruptible)
...@@ -609,7 +592,7 @@ int qxl_update_surface(struct qxl_device *qdev, struct qxl_bo *surf) ...@@ -609,7 +592,7 @@ int qxl_update_surface(struct qxl_device *qdev, struct qxl_bo *surf)
return ret; return ret;
} }
void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area) static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
{ {
/* no need to update area if we are just freeing the surface normally */ /* no need to update area if we are just freeing the surface normally */
if (do_update_area) if (do_update_area)
......
...@@ -413,7 +413,7 @@ static void qxl_user_framebuffer_destroy(struct drm_framebuffer *fb) ...@@ -413,7 +413,7 @@ static void qxl_user_framebuffer_destroy(struct drm_framebuffer *fb)
kfree(qxl_fb); kfree(qxl_fb);
} }
int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb, static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
struct drm_file *file_priv, struct drm_file *file_priv,
unsigned flags, unsigned color, unsigned flags, unsigned color,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
...@@ -619,7 +619,7 @@ static void qxl_crtc_commit(struct drm_crtc *crtc) ...@@ -619,7 +619,7 @@ static void qxl_crtc_commit(struct drm_crtc *crtc)
DRM_DEBUG("\n"); DRM_DEBUG("\n");
} }
void qxl_crtc_load_lut(struct drm_crtc *crtc) static void qxl_crtc_load_lut(struct drm_crtc *crtc)
{ {
DRM_DEBUG("\n"); DRM_DEBUG("\n");
} }
...@@ -633,7 +633,7 @@ static const struct drm_crtc_helper_funcs qxl_crtc_helper_funcs = { ...@@ -633,7 +633,7 @@ static const struct drm_crtc_helper_funcs qxl_crtc_helper_funcs = {
.load_lut = qxl_crtc_load_lut, .load_lut = qxl_crtc_load_lut,
}; };
int qdev_crtc_init(struct drm_device *dev, int num_crtc) static int qdev_crtc_init(struct drm_device *dev, int num_crtc)
{ {
struct qxl_crtc *qxl_crtc; struct qxl_crtc *qxl_crtc;
...@@ -764,7 +764,7 @@ static int qxl_conn_mode_valid(struct drm_connector *connector, ...@@ -764,7 +764,7 @@ static int qxl_conn_mode_valid(struct drm_connector *connector,
return MODE_OK; return MODE_OK;
} }
struct drm_encoder *qxl_best_encoder(struct drm_connector *connector) static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
{ {
struct qxl_output *qxl_output = struct qxl_output *qxl_output =
drm_connector_to_qxl_output(connector); drm_connector_to_qxl_output(connector);
...@@ -855,7 +855,7 @@ static const struct drm_encoder_funcs qxl_enc_funcs = { ...@@ -855,7 +855,7 @@ static const struct drm_encoder_funcs qxl_enc_funcs = {
.destroy = qxl_enc_destroy, .destroy = qxl_enc_destroy,
}; };
int qdev_output_init(struct drm_device *dev, int num_output) static int qdev_output_init(struct drm_device *dev, int num_output)
{ {
struct qxl_output *qxl_output; struct qxl_output *qxl_output;
struct drm_connector *connector; struct drm_connector *connector;
......
...@@ -46,7 +46,7 @@ static DEFINE_PCI_DEVICE_TABLE(pciidlist) = { ...@@ -46,7 +46,7 @@ static DEFINE_PCI_DEVICE_TABLE(pciidlist) = {
}; };
MODULE_DEVICE_TABLE(pci, pciidlist); MODULE_DEVICE_TABLE(pci, pciidlist);
int qxl_modeset = -1; static int qxl_modeset = -1;
MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
module_param_named(modeset, qxl_modeset, int, 0400); module_param_named(modeset, qxl_modeset, int, 0400);
......
...@@ -159,7 +159,7 @@ static void qxl_deferred_io(struct fb_info *info, ...@@ -159,7 +159,7 @@ static void qxl_deferred_io(struct fb_info *info,
}; };
struct fb_deferred_io qxl_defio = { static struct fb_deferred_io qxl_defio = {
.delay = QXL_DIRTY_DELAY, .delay = QXL_DIRTY_DELAY,
.deferred_io = qxl_deferred_io, .deferred_io = qxl_deferred_io,
}; };
......
...@@ -127,35 +127,6 @@ void qxl_gem_object_unpin(struct drm_gem_object *obj) ...@@ -127,35 +127,6 @@ void qxl_gem_object_unpin(struct drm_gem_object *obj)
} }
} }
int qxl_gem_set_domain(struct drm_gem_object *gobj,
uint32_t rdomain, uint32_t wdomain)
{
struct qxl_bo *qobj;
uint32_t domain;
int r;
/* FIXME: reeimplement */
qobj = gobj->driver_private;
/* work out where to validate the buffer to */
domain = wdomain;
if (!domain)
domain = rdomain;
if (!domain) {
/* Do nothings */
pr_warn("Set domain withou domain !\n");
return 0;
}
if (domain == QXL_GEM_DOMAIN_CPU) {
/* Asking for cpu access wait for object idle */
r = qxl_bo_wait(qobj, NULL, false);
if (r) {
pr_err("Failed to wait for object !\n");
return r;
}
}
return 0;
}
int qxl_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv) int qxl_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv)
{ {
return 0; return 0;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* TODO: allocating a new gem(in qxl_bo) for each request. * TODO: allocating a new gem(in qxl_bo) for each request.
* This is wasteful since bo's are page aligned. * This is wasteful since bo's are page aligned.
*/ */
int qxl_alloc_ioctl(struct drm_device *dev, void *data, static int qxl_alloc_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv) struct drm_file *file_priv)
{ {
struct qxl_device *qdev = dev->dev_private; struct qxl_device *qdev = dev->dev_private;
...@@ -58,7 +58,7 @@ int qxl_alloc_ioctl(struct drm_device *dev, void *data, ...@@ -58,7 +58,7 @@ int qxl_alloc_ioctl(struct drm_device *dev, void *data,
return 0; return 0;
} }
int qxl_map_ioctl(struct drm_device *dev, void *data, static int qxl_map_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv) struct drm_file *file_priv)
{ {
struct qxl_device *qdev = dev->dev_private; struct qxl_device *qdev = dev->dev_private;
...@@ -101,7 +101,7 @@ apply_surf_reloc(struct qxl_device *qdev, struct qxl_bo *dst, uint64_t dst_off, ...@@ -101,7 +101,7 @@ apply_surf_reloc(struct qxl_device *qdev, struct qxl_bo *dst, uint64_t dst_off,
} }
/* return holding the reference to this object */ /* return holding the reference to this object */
struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev, static struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
struct drm_file *file_priv, uint64_t handle, struct drm_file *file_priv, uint64_t handle,
struct qxl_reloc_list *reloc_list) struct qxl_reloc_list *reloc_list)
{ {
...@@ -129,7 +129,7 @@ struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev, ...@@ -129,7 +129,7 @@ struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
* However, the command as passed from user space must *not* contain the initial * However, the command as passed from user space must *not* contain the initial
* QXLReleaseInfo struct (first XXX bytes) * QXLReleaseInfo struct (first XXX bytes)
*/ */
int qxl_execbuffer_ioctl(struct drm_device *dev, void *data, static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv) struct drm_file *file_priv)
{ {
struct qxl_device *qdev = dev->dev_private; struct qxl_device *qdev = dev->dev_private;
...@@ -266,7 +266,7 @@ int qxl_execbuffer_ioctl(struct drm_device *dev, void *data, ...@@ -266,7 +266,7 @@ int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
return 0; return 0;
} }
int qxl_update_area_ioctl(struct drm_device *dev, void *data, static int qxl_update_area_ioctl(struct drm_device *dev, void *data,
struct drm_file *file) struct drm_file *file)
{ {
struct qxl_device *qdev = dev->dev_private; struct qxl_device *qdev = dev->dev_private;
......
...@@ -230,7 +230,7 @@ int qxl_device_init(struct qxl_device *qdev, ...@@ -230,7 +230,7 @@ int qxl_device_init(struct qxl_device *qdev,
return 0; return 0;
} }
void qxl_device_fini(struct qxl_device *qdev) static void qxl_device_fini(struct qxl_device *qdev)
{ {
if (qdev->current_release_bo[0]) if (qdev->current_release_bo[0])
qxl_bo_unref(&qdev->current_release_bo[0]); qxl_bo_unref(&qdev->current_release_bo[0]);
......
...@@ -117,7 +117,7 @@ qxl_release_add_res(struct qxl_device *qdev, struct qxl_release *release, ...@@ -117,7 +117,7 @@ qxl_release_add_res(struct qxl_device *qdev, struct qxl_release *release,
release->bos[release->bo_count++] = qxl_bo_ref(bo); release->bos[release->bo_count++] = qxl_bo_ref(bo);
} }
int qxl_release_bo_alloc(struct qxl_device *qdev, static int qxl_release_bo_alloc(struct qxl_device *qdev,
struct qxl_bo **bo) struct qxl_bo **bo)
{ {
int ret; int ret;
......
...@@ -315,7 +315,7 @@ static void qxl_ttm_tt_unpopulate(struct ttm_tt *ttm) ...@@ -315,7 +315,7 @@ static void qxl_ttm_tt_unpopulate(struct ttm_tt *ttm)
ttm_pool_unpopulate(ttm); ttm_pool_unpopulate(ttm);
} }
struct ttm_tt *qxl_ttm_tt_create(struct ttm_bo_device *bdev, static struct ttm_tt *qxl_ttm_tt_create(struct ttm_bo_device *bdev,
unsigned long size, uint32_t page_flags, unsigned long size, uint32_t page_flags,
struct page *dummy_read_page) struct page *dummy_read_page)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册