[PATCH 85/85] drivers: gpu: Mark functions as static in vmwgfx_fence.c
Mark functions as static because they are not used outside the file drm/vmwgfx/vmwgfx_fence.c. This eliminates the following warnings in drm/vmwgfx/vmwgfx_fence.c: drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:274:6: warning: no previous prototype for ?vmw_fences_perform_actions? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:900:6: warning: no previous prototype for ?vmw_fence_obj_add_action? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:996:5: warning: no previous prototype for ?vmw_event_fence_action_create? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c index c62d20e..79c060d 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c @@ -271,7 +271,7 @@ void vmw_fence_obj_unreference(struct vmw_fence_obj **fence_p) spin_unlock_irq(>lock); } -void vmw_fences_perform_actions(struct vmw_fence_manager *fman, +static void vmw_fences_perform_actions(struct vmw_fence_manager *fman, struct list_head *list) { struct vmw_fence_action *action, *next_action; @@ -897,7 +897,7 @@ static void vmw_event_fence_action_cleanup(struct vmw_fence_action *action) * Note that the action callbacks may be executed before this function * returns. */ -void vmw_fence_obj_add_action(struct vmw_fence_obj *fence, +static void vmw_fence_obj_add_action(struct vmw_fence_obj *fence, struct vmw_fence_action *action) { struct vmw_fence_manager *fman = fence->fman; @@ -993,7 +993,7 @@ struct vmw_event_fence_pending { struct drm_vmw_event_fence event; }; -int vmw_event_fence_action_create(struct drm_file *file_priv, +static int vmw_event_fence_action_create(struct drm_file *file_priv, struct vmw_fence_obj *fence, uint32_t flags, uint64_t user_data, -- 1.7.9.5
[PATCH 84/85] drivers: gpu: Mark functions as static in vmwgfx_buffer.c
Mark functions as static because they are not used outside the file drm/vmwgfx/vmwgfx_buffer.c. This eliminates the following warnings in drm/vmwgfx/vmwgfx_buffer.c: drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:520:16: warning: no previous prototype for ?vmw_ttm_tt_create? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:549:5: warning: no previous prototype for ?vmw_invalidate_caches? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:554:5: warning: no previous prototype for ?vmw_init_mem_type? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:592:6: warning: no previous prototype for ?vmw_evict_flags? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c index 0489c61..2d61a2d 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c @@ -517,7 +517,7 @@ static struct ttm_backend_func vmw_ttm_func = { .destroy = vmw_ttm_destroy, }; -struct ttm_tt *vmw_ttm_tt_create(struct ttm_bo_device *bdev, +static struct ttm_tt *vmw_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, uint32_t page_flags, struct page *dummy_read_page) { @@ -546,12 +546,12 @@ out_no_init: return NULL; } -int vmw_invalidate_caches(struct ttm_bo_device *bdev, uint32_t flags) +static int vmw_invalidate_caches(struct ttm_bo_device *bdev, uint32_t flags) { return 0; } -int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, +static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, struct ttm_mem_type_manager *man) { switch (type) { @@ -589,7 +589,7 @@ int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, return 0; } -void vmw_evict_flags(struct ttm_buffer_object *bo, +static void vmw_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *placement) { *placement = vmw_sys_placement; -- 1.7.9.5
[PATCH 83/85] drivers: gpu: Mark functions as static and remove unused function in vmwgfx_resource.c
Mark functions as static because they are not used outside the file drm/vmwgfx/vmwgfx_resource.c. Also, remove unused function vmw_user_dmabuf_reference() from drm/vmwgfx/vmwgfx_resource.c. This eliminates the following warnings in drm/vmwgfx/vmwgfx_resource.c: drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:252:22: warning: no previous prototype for ?vmw_resource_lookup? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:456:5: warning: no previous prototype for ?vmw_user_dmabuf_alloc? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:593:5: warning: no previous prototype for ?vmw_user_dmabuf_reference? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:1145:5: warning: no previous prototype for ?vmw_resource_do_evict? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c index 9b5ea2a..5fefc65 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c @@ -249,7 +249,7 @@ void vmw_resource_activate(struct vmw_resource *res, write_unlock(_priv->resource_lock); } -struct vmw_resource *vmw_resource_lookup(struct vmw_private *dev_priv, +static struct vmw_resource *vmw_resource_lookup(struct vmw_private *dev_priv, struct idr *idr, int id) { struct vmw_resource *res; @@ -453,7 +453,7 @@ static void vmw_user_dmabuf_release(struct ttm_base_object **p_base) * @p_dma_buf: Pointer to where the refcounted struct vmw_dma_buffer pointer * should be assigned. */ -int vmw_user_dmabuf_alloc(struct vmw_private *dev_priv, +static int vmw_user_dmabuf_alloc(struct vmw_private *dev_priv, struct ttm_object_file *tfile, uint32_t size, bool shareable, @@ -590,19 +590,6 @@ int vmw_user_dmabuf_lookup(struct ttm_object_file *tfile, return 0; } -int vmw_user_dmabuf_reference(struct ttm_object_file *tfile, - struct vmw_dma_buffer *dma_buf) -{ - struct vmw_user_dma_buffer *user_bo; - - if (dma_buf->base.destroy != vmw_user_dmabuf_destroy) - return -EINVAL; - - user_bo = container_of(dma_buf, struct vmw_user_dma_buffer, dma); - return ttm_ref_object_add(tfile, _bo->prime.base, - TTM_REF_USAGE, NULL); -} - /* * Stream management */ @@ -1142,7 +1129,7 @@ vmw_resource_backoff_reservation(struct ttm_validate_buffer *val_buf) * @res:The resource to evict. * @interruptible: Whether to wait interruptible. */ -int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible) +static int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible) { struct ttm_validate_buffer val_buf; const struct vmw_res_func *func = res->func; -- 1.7.9.5
[PATCH 82/85] drivers: gpu: Mark functions as static in vmwgfx_kms.c
Mark functions as static because they are not used outside the file drm/vmwgfx/vmwgfx_kms.c. This eliminates the following warnings in drm/vmwgfx/vmwgfx_kms.c: drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:43:6: warning: no previous prototype for ?vmw_clip_cliprects? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:426:6: warning: no previous prototype for ?vmw_framebuffer_surface_destroy? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:592:5: warning: no previous prototype for ?vmw_framebuffer_surface_dirty? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:757:6: warning: no previous prototype for ?vmw_framebuffer_dmabuf_destroy? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:943:5: warning: no previous prototype for ?vmw_framebuffer_dmabuf_dirty? [-Wmissing-prototypes] drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1666:5: warning: no previous prototype for ?vmw_du_update_layout? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 03f1c20..6af4816 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -40,7 +40,7 @@ struct vmw_clip_rect { * Clip @num_rects number of @rects against @clip storing the * results in @out_rects and the number of passed rects in @out_num. */ -void vmw_clip_cliprects(struct drm_clip_rect *rects, +static void vmw_clip_cliprects(struct drm_clip_rect *rects, int num_rects, struct vmw_clip_rect clip, SVGASignedRect *out_rects, @@ -423,7 +423,7 @@ struct vmw_framebuffer_surface { struct drm_master *master; }; -void vmw_framebuffer_surface_destroy(struct drm_framebuffer *framebuffer) +static void vmw_framebuffer_surface_destroy(struct drm_framebuffer *framebuffer) { struct vmw_framebuffer_surface *vfbs = vmw_framebuffer_to_vfbs(framebuffer); @@ -589,7 +589,7 @@ out_free_tmp: return ret; } -int vmw_framebuffer_surface_dirty(struct drm_framebuffer *framebuffer, +static int vmw_framebuffer_surface_dirty(struct drm_framebuffer *framebuffer, struct drm_file *file_priv, unsigned flags, unsigned color, struct drm_clip_rect *clips, @@ -754,7 +754,7 @@ struct vmw_framebuffer_dmabuf { struct vmw_dma_buffer *buffer; }; -void vmw_framebuffer_dmabuf_destroy(struct drm_framebuffer *framebuffer) +static void vmw_framebuffer_dmabuf_destroy(struct drm_framebuffer *framebuffer) { struct vmw_framebuffer_dmabuf *vfbd = vmw_framebuffer_to_vfbd(framebuffer); @@ -940,7 +940,7 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv, return ret; } -int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer, +static int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer, struct drm_file *file_priv, unsigned flags, unsigned color, struct drm_clip_rect *clips, @@ -1663,7 +1663,7 @@ void vmw_disable_vblank(struct drm_device *dev, int crtc) * Small shared kms functions. */ -int vmw_du_update_layout(struct vmw_private *dev_priv, unsigned num, +static int vmw_du_update_layout(struct vmw_private *dev_priv, unsigned num, struct drm_vmw_rect *rects) { struct drm_device *dev = dev_priv->dev; -- 1.7.9.5
[PATCH 81/85] drivers: gpu: Mark function as static in via_drv.c
Mark function as static because it is not used outside the file drm/via/via_drv.c. This eliminates the following warning in drm/via/via_drv.c: drivers/gpu/drm/via/via_drv.c:49:6: warning: no previous prototype for ?via_driver_postclose? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/via/via_drv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c index 92684a9..50abc2a 100644 --- a/drivers/gpu/drm/via/via_drv.c +++ b/drivers/gpu/drm/via/via_drv.c @@ -46,7 +46,7 @@ static int via_driver_open(struct drm_device *dev, struct drm_file *file) return 0; } -void via_driver_postclose(struct drm_device *dev, struct drm_file *file) +static void via_driver_postclose(struct drm_device *dev, struct drm_file *file) { struct via_file_private *file_priv = file->driver_priv; -- 1.7.9.5
[PATCH 80/85] drivers: gpu: Remove unused function in ttm_lock.c
Remove unused function ttm_write_lock_downgrade() from drm/ttm/ttm_lock.c. This eliminates the following warning in drm/ttm/ttm_lock.c: drivers/gpu/drm/ttm/ttm_lock.c:189:6: warning: no previous prototype for ?ttm_write_lock_downgrade? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/ttm/ttm_lock.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_lock.c b/drivers/gpu/drm/ttm/ttm_lock.c index 3daa9a3..6a95454 100644 --- a/drivers/gpu/drm/ttm/ttm_lock.c +++ b/drivers/gpu/drm/ttm/ttm_lock.c @@ -186,14 +186,6 @@ int ttm_write_lock(struct ttm_lock *lock, bool interruptible) } EXPORT_SYMBOL(ttm_write_lock); -void ttm_write_lock_downgrade(struct ttm_lock *lock) -{ - spin_lock(>lock); - lock->rw = 1; - wake_up_all(>queue); - spin_unlock(>lock); -} - static int __ttm_vt_unlock(struct ttm_lock *lock) { int ret = 0; -- 1.7.9.5
[PATCH 79/85] drivers: gpu: Mark function as static in ttm_bo_util.c
Mark functions as static because they are not used outside the file drm/ttm/ttm_bo_util.c. This eliminates the following warnings in drm/ttm/ttm_bo_util.c: drivers/gpu/drm/ttm/ttm_bo_util.c:190:5: warning: no previous prototype for ?ttm_mem_reg_ioremap? [-Wmissing-prototypes] drivers/gpu/drm/ttm/ttm_bo_util.c:222:6: warning: no previous prototype for ?ttm_mem_reg_iounmap? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/ttm/ttm_bo_util.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 15b86a9..9bee27c 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -187,7 +187,7 @@ void ttm_mem_io_free_vm(struct ttm_buffer_object *bo) } } -int ttm_mem_reg_ioremap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem, +static int ttm_mem_reg_ioremap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem, void **virtual) { struct ttm_mem_type_manager *man = >man[mem->mem_type]; @@ -219,7 +219,7 @@ int ttm_mem_reg_ioremap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem, return 0; } -void ttm_mem_reg_iounmap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem, +static void ttm_mem_reg_iounmap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem, void *virtual) { struct ttm_mem_type_manager *man; -- 1.7.9.5
[PATCH 78/85] drivers: gpu: Mark function as static in ttm_bo.c
Mark function as static because it is not used outside file drm/ttm/ttm_bo.c. This eliminates the following warning in drm/ttm/ttm_bo.c: drivers/gpu/drm/ttm/ttm_bo.c:960:5: warning: no previous prototype for ?ttm_bo_move_buffer? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/ttm/ttm_bo.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 07e02c4..a066513 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -957,7 +957,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, } EXPORT_SYMBOL(ttm_bo_mem_space); -int ttm_bo_move_buffer(struct ttm_buffer_object *bo, +static int ttm_bo_move_buffer(struct ttm_buffer_object *bo, struct ttm_placement *placement, bool interruptible, bool no_wait_gpu) -- 1.7.9.5
[PATCH 77/85] drivers: gpu: Mark function as static in sis_drv.c
Mark function as static because it is not used outside the file drm/sis/sis_drv.c. This eliminates the following warning in drm/sis/sis_drv.c: drivers/gpu/drm/sis/sis_drv.c:97:6: warning: no previous prototype for ?sis_driver_postclose? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/sis/sis_drv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index 4383b74..756f787 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c @@ -94,7 +94,7 @@ static int sis_driver_open(struct drm_device *dev, struct drm_file *file) return 0; } -void sis_driver_postclose(struct drm_device *dev, struct drm_file *file) +static void sis_driver_postclose(struct drm_device *dev, struct drm_file *file) { struct sis_file_private *file_priv = file->driver_priv; -- 1.7.9.5
[PATCH 76/85] drivers: gpu: Move prototype declaration to header file radeon_drv.h from radeon_drv.c
Move prototype declaration of function radeon_kms_compat_ioctl() to header file drm/radeon/radeon_drv.h because it is used by more than one file. This eliminates the following warning in drivers/gpu/drm/radeon/radeon_ioc32.c:413:6: warning: no previous prototype for ?radeon_kms_compat_ioctl? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_drv.c |2 -- drivers/gpu/drm/radeon/radeon_drv.h |3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 9f5ff28..7868d4e 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -127,8 +127,6 @@ int radeon_gem_prime_pin(struct drm_gem_object *obj); void radeon_gem_prime_unpin(struct drm_gem_object *obj); void *radeon_gem_prime_vmap(struct drm_gem_object *obj); void radeon_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); -extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, - unsigned long arg); #if defined(CONFIG_DEBUG_FS) int radeon_debugfs_init(struct drm_minor *minor); diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 00e0d44..7e1f2215 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h @@ -425,7 +425,8 @@ extern int radeon_driver_open(struct drm_device *dev, struct drm_file *file_priv); extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); - +extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, + unsigned long arg); extern int radeon_master_create(struct drm_device *dev, struct drm_master *master); extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *master); extern void radeon_cp_dispatch_flip(struct drm_device *dev, struct drm_master *master); -- 1.7.9.5
[PATCH 75/85] drivers: gpu: Move prototype declaration to header file radeon_asic.h from cik.c
Move prototype declaration of functions cik_sdma_resume(), cik_sdma_enable() and cik_sdma_fini() to header file drm/radeon/radeon_asic.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/cik_sdma.c: drivers/gpu/drm/radeon/cik_sdma.c:194:6: warning: no previous prototype for ?cik_sdma_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik_sdma.c:360:5: warning: no previous prototype for ?cik_sdma_resume? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik_sdma.c:396:6: warning: no previous prototype for ?cik_sdma_fini? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/cik.c |3 --- drivers/gpu/drm/radeon/radeon_asic.h |3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 76902ca..fd9029c 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -62,9 +62,6 @@ MODULE_FIRMWARE("radeon/KABINI_mec.bin"); MODULE_FIRMWARE("radeon/KABINI_rlc.bin"); MODULE_FIRMWARE("radeon/KABINI_sdma.bin"); -extern int cik_sdma_resume(struct radeon_device *rdev); -extern void cik_sdma_enable(struct radeon_device *rdev, bool enable); -extern void cik_sdma_fini(struct radeon_device *rdev); static void cik_rlc_stop(struct radeon_device *rdev); static void cik_pcie_gen3_enable(struct radeon_device *rdev); static void cik_program_aspm(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 1d631cd..7091d09 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h @@ -712,6 +712,9 @@ void dce8_bandwidth_update(struct radeon_device *rdev); /* * cik */ +int cik_sdma_resume(struct radeon_device *rdev); +void cik_sdma_enable(struct radeon_device *rdev, bool enable); +void cik_sdma_fini(struct radeon_device *rdev); u32 cik_gpu_check_soft_reset(struct radeon_device *rdev); void cik_enter_rlc_safe_mode(struct radeon_device *rdev); void cik_exit_rlc_safe_mode(struct radeon_device *rdev); -- 1.7.9.5
[PATCH 74/85] drivers: gpu: Move prototype declarations to header file radeon.h from evergreen_hdmi.c
Move prototype declarations of function dce6_afmt_write_speaker_allocation(), dce6_afmt_write_sad_regs(), dce6_afmt_select_pin() and dce6_afmt_write_latency_fields() to header file drm/radeon/radeon.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/dce6_afmt.c: drivers/gpu/drm/radeon/dce6_afmt.c:91:6: warning: no previous prototype for ?dce6_afmt_select_pin? [-Wmissing-prototypes] drivers/gpu/drm/radeon/dce6_afmt.c:107:6: warning: no previous prototype for ?dce6_afmt_write_latency_fields? [-Wmissing-prototypes] drivers/gpu/drm/radeon/dce6_afmt.c:150:6: warning: no previous prototype for ?dce6_afmt_write_speaker_allocation? [-Wmissing-prototypes] drivers/gpu/drm/radeon/dce6_afmt.c:196:6: warning: no previous prototype for ?dce6_afmt_write_sad_regs? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/evergreen_hdmi.c |6 -- drivers/gpu/drm/radeon/radeon.h |5 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index aa695c4..af896ac 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -32,12 +32,6 @@ #include "evergreend.h" #include "atom.h" -extern void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder); -extern void dce6_afmt_write_sad_regs(struct drm_encoder *encoder); -extern void dce6_afmt_select_pin(struct drm_encoder *encoder); -extern void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, - struct drm_display_mode *mode); - /* * update the N and CTS parameters for a given pixel clock rate */ diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 8e0b9dd..b0687fa 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -2741,6 +2741,11 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev, void r600_audio_update_hdmi(struct work_struct *work); struct r600_audio_pin *r600_audio_get_pin(struct radeon_device *rdev); struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev); +void dce6_afmt_select_pin(struct drm_encoder *encoder); +void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder); +void dce6_afmt_write_sad_regs(struct drm_encoder *encoder); +void dce6_afmt_write_latency_fields(struct drm_encoder *encoder, + struct drm_display_mode *mode); /* * R600 vram scratch functions -- 1.7.9.5
[PATCH 73/85] drivers: gpu: Include appropriate header file in dce6_afmt.c
Include header file drm/radeon/radeon_asic.h in drm/radeon/dce6_afmt.c because it uses function declared in the header file. This eliminates the folllowing warning in drm/radeon/dce6_afmt.c: drivers/gpu/drm/radeon/dce6_afmt.c:301:5: warning: no previous prototype for ?dce6_audio_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/dce6_afmt.c:330:6: warning: no previous prototype for ?dce6_audio_fini? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/dce6_afmt.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c index de86493..2229258 100644 --- a/drivers/gpu/drm/radeon/dce6_afmt.c +++ b/drivers/gpu/drm/radeon/dce6_afmt.c @@ -23,6 +23,7 @@ #include #include #include "radeon.h" +#include "radeon_asic.h" #include "sid.h" static u32 dce6_endpoint_rreg(struct radeon_device *rdev, -- 1.7.9.5
[PATCH 72/85] drivers: gpu: Mark functions as static and remove unused function in ci_dpm.c
Mark functions as static because they are not used outside this file and remove unused function ci_dpm_power_control_set_level() and ci_dpm_reset_asic() from file drm/radeon/ci_dpm.c. This eliminates the following warnings in drm/radeon/ci_dpm.c: drivers/gpu/drm/radeon/ci_dpm.c:4506:6: warning: no previous prototype for ?ci_update_current_ps? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_dpm.c:4517:6: warning: no previous prototype for ?ci_update_requested_ps? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_dpm.c:4817:5: warning: no previous prototype for ?ci_dpm_power_control_set_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_dpm.c:4822:6: warning: no previous prototype for ?ci_dpm_reset_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_dpm.c:5026:5: warning: no previous prototype for ?ci_get_vbios_boot_values? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ci_dpm.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 7b3c412..23d26f2 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -4496,7 +4496,7 @@ static void ci_get_memory_type(struct radeon_device *rdev) } -void ci_update_current_ps(struct radeon_device *rdev, +static void ci_update_current_ps(struct radeon_device *rdev, struct radeon_ps *rps) { struct ci_ps *new_ps = ci_get_ps(rps); @@ -4507,7 +4507,7 @@ void ci_update_current_ps(struct radeon_device *rdev, pi->current_rps.ps_priv = >current_ps; } -void ci_update_requested_ps(struct radeon_device *rdev, +static void ci_update_requested_ps(struct radeon_device *rdev, struct radeon_ps *rps) { struct ci_ps *new_ps = ci_get_ps(rps); @@ -4807,16 +4807,6 @@ int ci_dpm_set_power_state(struct radeon_device *rdev) return 0; } -int ci_dpm_power_control_set_level(struct radeon_device *rdev) -{ - return ci_power_control_set_level(rdev); -} - -void ci_dpm_reset_asic(struct radeon_device *rdev) -{ - ci_set_boot_state(rdev); -} - void ci_dpm_display_configuration_changed(struct radeon_device *rdev) { ci_program_display_gap(rdev); @@ -5016,7 +5006,7 @@ static int ci_parse_power_table(struct radeon_device *rdev) return 0; } -int ci_get_vbios_boot_values(struct radeon_device *rdev, +static int ci_get_vbios_boot_values(struct radeon_device *rdev, struct ci_vbios_boot_state *boot_state) { struct radeon_mode_info *mode_info = >mode_info; -- 1.7.9.5
[PATCH 71/85] drivers: gpu: Include appropriate header file in ci_smc.c
Include header file drm/radeon/ci_dpm.h in drm/radeon/ci_smc.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/ci_smc.c: drivers/gpu/drm/radeon/ci_smc.c:46:5: warning: no previous prototype for ?ci_copy_bytes_to_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:113:6: warning: no previous prototype for ?ci_start_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:121:6: warning: no previous prototype for ?ci_reset_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:129:5: warning: no previous prototype for ?ci_program_jump_on_start? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:136:6: warning: no previous prototype for ?ci_stop_smc_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:145:6: warning: no previous prototype for ?ci_start_smc_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:154:6: warning: no previous prototype for ?ci_is_smc_running? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:165:14: warning: no previous prototype for ?ci_send_msg_to_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:186:14: warning: no previous prototype for ?ci_wait_for_smc_inactive? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:204:5: warning: no previous prototype for ?ci_load_smc_ucode? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:251:5: warning: no previous prototype for ?ci_read_smc_sram_dword? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ci_smc.c:266:5: warning: no previous prototype for ?ci_write_smc_sram_dword? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ci_smc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/ci_smc.c b/drivers/gpu/drm/radeon/ci_smc.c index 9c745dd..8debc9d 100644 --- a/drivers/gpu/drm/radeon/ci_smc.c +++ b/drivers/gpu/drm/radeon/ci_smc.c @@ -28,6 +28,7 @@ #include "cikd.h" #include "ppsmc.h" #include "radeon_ucode.h" +#include "ci_dpm.h" static int ci_set_smc_sram_address(struct radeon_device *rdev, u32 smc_address, u32 limit) -- 1.7.9.5
[PATCH 70/85] drivers: gpu: Remove unused function in kv_dpm.c
Remove unused function kv_dpm_reset_asic() from drm/radeon/kv_dpm.c. This eliminates the following warnings in drm/radeon/kv_dpm.c: drivers/gpu/drm/radeon/kv_dpm.c:1875:6: warning: no previous prototype for ?kv_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/kv_dpm.c | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c index 7e58dfb..8c0cb67 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c @@ -1867,27 +1867,6 @@ void kv_dpm_setup_asic(struct radeon_device *rdev) kv_init_sclk_t(rdev); } -void kv_dpm_reset_asic(struct radeon_device *rdev) -{ - struct kv_power_info *pi = kv_get_pi(rdev); - - if (rdev->family == CHIP_KABINI) { - kv_force_lowest_valid(rdev); - kv_init_graphics_levels(rdev); - kv_program_bootup_state(rdev); - kv_upload_dpm_settings(rdev); - kv_force_lowest_valid(rdev); - kv_unforce_levels(rdev); - } else { - kv_init_graphics_levels(rdev); - kv_program_bootup_state(rdev); - kv_freeze_sclk_dpm(rdev, true); - kv_upload_dpm_settings(rdev); - kv_freeze_sclk_dpm(rdev, false); - kv_set_enabled_level(rdev, pi->graphics_boot_level); - } -} - //XXX use sumo_dpm_display_configuration_changed static void kv_construct_max_power_limits_table(struct radeon_device *rdev, -- 1.7.9.5
[PATCH 69/85] drivers: gpu: Move prototype declarations to header file si_dpm.h
Move prototype declarations of functions si_get_ddr3_mclk_frequency_ratio(), si_get_mclk_frequency_ratio() and si_trim_voltage_table_to_fit_state_table() to header file drm/radeon/si_dpm.h because they are used by more than one file. This eliminates the following warnings from drm/radeon/si_dpm.c: drivers/gpu/drm/radeon/si_dpm.c:3698:4: warning: no previous prototype for ?si_get_ddr3_mclk_frequency_ratio? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_dpm.c:3711:4: warning: no previous prototype for ?si_get_mclk_frequency_ratio? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_dpm.c:3793:6: warning: no previous prototype for ?si_trim_voltage_table_to_fit_state_table? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ci_dpm.c |6 +- drivers/gpu/drm/radeon/si_dpm.h |7 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 899c843..7b3c412 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -27,6 +27,7 @@ #include "cikd.h" #include "r600_dpm.h" #include "ci_dpm.h" +#include "si_dpm.h" #include "atom.h" #include @@ -165,11 +166,6 @@ extern void btc_get_max_clock_from_voltage_dependency_table(struct radeon_clock_ u32 *max_clock); extern int ni_copy_and_switch_arb_sets(struct radeon_device *rdev, u32 arb_freq_src, u32 arb_freq_dest); -extern u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock); -extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode); -extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, -u32 max_voltage_steps, -struct atom_voltage_table *voltage_table); static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev, struct atom_voltage_table_entry *voltage_table, diff --git a/drivers/gpu/drm/radeon/si_dpm.h b/drivers/gpu/drm/radeon/si_dpm.h index 4ce5032..7c65e55 100644 --- a/drivers/gpu/drm/radeon/si_dpm.h +++ b/drivers/gpu/drm/radeon/si_dpm.h @@ -194,6 +194,13 @@ struct si_power_info { PP_SIslands_PAPMParameters papm_parm; }; +u8 si_get_ddr3_mclk_frequency_ratio(u32 memory_clock); +u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode); +void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, + u32 max_voltage_steps, + struct atom_voltage_table *voltage_table); + + #define SISLANDS_INITIAL_STATE_ARB_INDEX0 #define SISLANDS_ACPI_STATE_ARB_INDEX 1 #define SISLANDS_ULV_STATE_ARB_INDEX2 -- 1.7.9.5
[PATCH 68/85] drivers: gpu: Remove unused function in si_dpm.c
Remove unused function si_dpm_reset_asic() from drm/radeon/si_dpm.c. This elimiantes the following warnings in drm/radeon/si_dpm.c: drivers/gpu/drm/radeon/si_dpm.c:6126:6: warning: no previous prototype for ?si_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/si_dpm.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 8ce849e..aec98ff 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -6115,14 +6115,6 @@ void si_dpm_post_set_power_state(struct radeon_device *rdev) ni_update_current_ps(rdev, new_ps); } - -void si_dpm_reset_asic(struct radeon_device *rdev) -{ - si_restrict_performance_levels_before_switch(rdev); - si_disable_ulv(rdev); - si_set_boot_state(rdev); -} - void si_dpm_display_configuration_changed(struct radeon_device *rdev) { si_program_display_gap(rdev); -- 1.7.9.5
[PATCH 67/85] drivers: gpu: Include appropriate header file in si_smc.c and remove prototype declaration from header file sislands_smc.h
Include header file gpu/drm/radeon/sislands_smc.h in drm/radeon/si_smc.c because it uses function declared in the header file. Remove prototype declaration of function si_set_smc_sram_address() from drm/radeon/sislands_smc.h because the function is used only in one file where it is declared static already. This eliminates the following warnings in drm/radeon/si_smc.c: drivers/gpu/drm/radeon/si_smc.c:46:5: warning: no previous prototype for ?si_copy_bytes_to_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:112:6: warning: no previous prototype for ?si_start_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:121:6: warning: no previous prototype for ?si_reset_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:135:5: warning: no previous prototype for ?si_program_jump_on_start? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:142:6: warning: no previous prototype for ?si_stop_smc_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:151:6: warning: no previous prototype for ?si_start_smc_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:160:6: warning: no previous prototype for ?si_is_smc_running? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:171:14: warning: no previous prototype for ?si_send_msg_to_smc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:192:14: warning: no previous prototype for ?si_wait_for_smc_inactive? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:210:5: warning: no previous prototype for ?si_load_smc_ucode? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:269:5: warning: no previous prototype for ?si_read_smc_sram_dword? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si_smc.c:284:5: warning: no previous prototype for ?si_write_smc_sram_dword? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/si_smc.c |1 + drivers/gpu/drm/radeon/sislands_smc.h |2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/si_smc.c b/drivers/gpu/drm/radeon/si_smc.c index d422a1c..e80efcf 100644 --- a/drivers/gpu/drm/radeon/si_smc.c +++ b/drivers/gpu/drm/radeon/si_smc.c @@ -28,6 +28,7 @@ #include "sid.h" #include "ppsmc.h" #include "radeon_ucode.h" +#include "sislands_smc.h" static int si_set_smc_sram_address(struct radeon_device *rdev, u32 smc_address, u32 limit) diff --git a/drivers/gpu/drm/radeon/sislands_smc.h b/drivers/gpu/drm/radeon/sislands_smc.h index 5578e98..10e945a 100644 --- a/drivers/gpu/drm/radeon/sislands_smc.h +++ b/drivers/gpu/drm/radeon/sislands_smc.h @@ -374,8 +374,6 @@ typedef struct Smc_SIslands_DTE_Configuration Smc_SIslands_DTE_Configuration; #pragma pack(pop) -int si_set_smc_sram_address(struct radeon_device *rdev, - u32 smc_address, u32 limit); int si_copy_bytes_to_smc(struct radeon_device *rdev, u32 smc_start_address, const u8 *src, u32 byte_count, u32 limit); -- 1.7.9.5
[PATCH 66/85] drivers: gpu: Move prototype declarations to header file ni_dpm.h
Move prototype declarations of functions ni_get_pi() and ni_get_ps() to header file drm/radeon/ni_dpm.h because it is used by more than one file. This eliminates the following warnings in drm/radeon/ni_dpm.c: drivers/gpu/drm/radeon/ni_dpm.c:723:23: warning: no previous prototype for ?ni_get_pi? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:730:15: warning: no previous prototype for ?ni_get_ps? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ni_dpm.h |2 ++ drivers/gpu/drm/radeon/si_dpm.c |3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni_dpm.h b/drivers/gpu/drm/radeon/ni_dpm.h index 6bbee91..876aaf2 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.h +++ b/drivers/gpu/drm/radeon/ni_dpm.h @@ -231,6 +231,8 @@ struct ni_power_info { #define NISLANDS_DPM2_SQ_RAMP_STI_SIZE 0x1E #define NISLANDS_DPM2_SQ_RAMP_LTI_RATIO 0xF +struct ni_power_info *ni_get_pi(struct radeon_device *rdev); +struct ni_ps *ni_get_ps(struct radeon_ps *rps); int ni_copy_and_switch_arb_sets(struct radeon_device *rdev, u32 arb_freq_src, u32 arb_freq_dest); void ni_update_current_ps(struct radeon_device *rdev, diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 8732005..8ce849e 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -1734,9 +1734,6 @@ static const struct si_powertune_data powertune_data_hainan = true }; -struct ni_power_info *ni_get_pi(struct radeon_device *rdev); -struct ni_ps *ni_get_ps(struct radeon_ps *rps); - static int si_populate_voltage_value(struct radeon_device *rdev, const struct atom_voltage_table *table, u16 value, SISLANDS_SMC_VOLTAGE_VALUE *voltage); -- 1.7.9.5
[PATCH 65/85] drivers: gpu: Include appropriate header file in ni_dpm.c
Include header file drm/radeon/radeon_asic.h in drm/radeon/ni_dpm.c because it uses function declared in the header file. This elimiantes the following warnings in drm/radeon/ni_dpm.c: drivers/gpu/drm/radeon/ni_dpm.c:1073:5: warning: no previous prototype for ?ni_dpm_force_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:3565:6: warning: no previous prototype for ?ni_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:3602:5: warning: no previous prototype for ?ni_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:3735:6: warning: no previous prototype for ?ni_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:3797:5: warning: no previous prototype for ?ni_dpm_pre_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:3810:5: warning: no previous prototype for ?ni_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:3889:6: warning: no previous prototype for ?ni_dpm_post_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:4079:5: warning: no previous prototype for ?ni_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:4296:6: warning: no previous prototype for ?ni_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:4309:6: warning: no previous prototype for ?ni_dpm_print_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:4331:6: warning: no previous prototype for ?ni_dpm_debugfs_print_current_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:4351:5: warning: no previous prototype for ?ni_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni_dpm.c:4362:5: warning: no previous prototype for ?ni_dpm_get_mclk? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ni_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c index 97aa32f..63ad349 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -23,6 +23,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "nid.h" #include "r600_dpm.h" #include "ni_dpm.h" -- 1.7.9.5
[PATCH 64/85] drivers: gpu: Remove unused function in ni_dpm.c
Remove unused function ni_dpm_reset_asic() from drm/radeon/ni_dpm.c. This eliminates the following warnings in drm/radeon/ni_dpm.c: drivers/gpu/drm/radeon/ni_dpm.c:3897:6: warning: no previous prototype for ?ni_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ni_dpm.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c index 33a1e21..97aa32f 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -3891,12 +3891,6 @@ void ni_dpm_post_set_power_state(struct radeon_device *rdev) ni_update_current_ps(rdev, new_ps); } -void ni_dpm_reset_asic(struct radeon_device *rdev) -{ - ni_restrict_performance_levels_before_switch(rdev); - rv770_set_boot_state(rdev); -} - union power_info { struct _ATOM_POWERPLAY_INFO info; struct _ATOM_POWERPLAY_INFO_V2 info_2; -- 1.7.9.5
[PATCH 63/85] drivers: gpu: Include appropriate header file in trinity_dpm.c
Include header file drm/radeon/radeon_asic.h in drm/radeon/trinity_dpm.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/trinity_dpm.c: drivers/gpu/drm/radeon/trinity_dpm.c:1071:6: warning: no previous prototype for ?trinity_dpm_enable_bapm? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1082:5: warning: no previous prototype for ?trinity_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1124:6: warning: no previous prototype for ?trinity_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1174:5: warning: no previous prototype for ?trinity_dpm_force_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1205:5: warning: no previous prototype for ?trinity_dpm_pre_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1220:5: warning: no previous prototype for ?trinity_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1245:6: warning: no previous prototype for ?trinity_dpm_post_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1253:6: warning: no previous prototype for ?trinity_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1572:6: warning: no previous prototype for ?trinity_dpm_display_configuration_changed? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1858:5: warning: no previous prototype for ?trinity_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1899:6: warning: no previous prototype for ?trinity_dpm_print_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1917:6: warning: no previous prototype for ?trinity_dpm_debugfs_print_current_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1938:6: warning: no previous prototype for ?trinity_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1951:5: warning: no previous prototype for ?trinity_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1962:5: warning: no previous prototype for ?trinity_dpm_get_mclk? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/trinity_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index 83778b6..2aacc13 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c @@ -23,6 +23,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "trinityd.h" #include "r600_dpm.h" #include "trinity_dpm.h" -- 1.7.9.5
[PATCH 62/85] drivers: gpu: Mark functions as static and remove unused function in trinity_dpm.c
Mark function trinity_get_ps() and trinity_get_pi() as static because they are not used outside this file and remove unused function trinity_dpm_reset_asic() from file drm/radeon/trinity_dpm.c. Also remove prototype declarations of functions trinity_get_ps() and trinity_get_pi() from drm/radeon/trinity_smc.c because they are not used in this file. This eliminates the following warnings in drm/radeon/trinity_dpm.c: drivers/gpu/drm/radeon/trinity_dpm.c:345:20: warning: no previous prototype for ?trinity_get_ps? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:352:28: warning: no previous prototype for ?trinity_get_pi? [-Wmissing-prototypes] drivers/gpu/drm/radeon/trinity_dpm.c:1262:6: warning: no previous prototype for ?trinity_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/trinity_dpm.c | 20 ++-- drivers/gpu/drm/radeon/trinity_smc.c |3 --- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index d700698..83778b6 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c @@ -342,14 +342,14 @@ static void trinity_apply_state_adjust_rules(struct radeon_device *rdev, struct radeon_ps *new_rps, struct radeon_ps *old_rps); -struct trinity_ps *trinity_get_ps(struct radeon_ps *rps) +static struct trinity_ps *trinity_get_ps(struct radeon_ps *rps) { struct trinity_ps *ps = rps->ps_priv; return ps; } -struct trinity_power_info *trinity_get_pi(struct radeon_device *rdev) +static struct trinity_power_info *trinity_get_pi(struct radeon_device *rdev) { struct trinity_power_info *pi = rdev->pm.dpm.priv; @@ -1259,22 +1259,6 @@ void trinity_dpm_setup_asic(struct radeon_device *rdev) trinity_release_mutex(rdev); } -void trinity_dpm_reset_asic(struct radeon_device *rdev) -{ - struct trinity_power_info *pi = trinity_get_pi(rdev); - - trinity_acquire_mutex(rdev); - if (pi->enable_dpm) { - trinity_enable_power_level_0(rdev); - trinity_force_level_0(rdev); - trinity_wait_for_level_0(rdev); - trinity_program_bootup_state(rdev); - trinity_force_level_0(rdev); - trinity_unforce_levels(rdev); - } - trinity_release_mutex(rdev); -} - static u16 trinity_convert_voltage_index_to_value(struct radeon_device *rdev, u32 vid_2bit) { diff --git a/drivers/gpu/drm/radeon/trinity_smc.c b/drivers/gpu/drm/radeon/trinity_smc.c index 9672bcb..99dd045 100644 --- a/drivers/gpu/drm/radeon/trinity_smc.c +++ b/drivers/gpu/drm/radeon/trinity_smc.c @@ -27,9 +27,6 @@ #include "trinity_dpm.h" #include "ppsmc.h" -struct trinity_ps *trinity_get_ps(struct radeon_ps *rps); -struct trinity_power_info *trinity_get_pi(struct radeon_device *rdev); - static int trinity_notify_message_to_smu(struct radeon_device *rdev, u32 id) { int i; -- 1.7.9.5
[PATCH 61/85] drivers: gpu: Move prototype declaration to header file sumo_dpm.h
Move prototype declaration of function sumo_get_pi() to header file drm/radeon/sumo_dpm.h because it is used by more than one file. This eliminates the following warning in drm/radeon/sumo_dpm.c: drivers/gpu/drm/radeon/sumo_dpm.c:81:25: warning: no previous prototype for ?sumo_get_pi? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/sumo_dpm.h |2 ++ drivers/gpu/drm/radeon/sumo_smc.c |2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/sumo_dpm.h b/drivers/gpu/drm/radeon/sumo_dpm.h index db1ea32..ad8640a 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.h +++ b/drivers/gpu/drm/radeon/sumo_dpm.h @@ -188,6 +188,8 @@ struct sumo_power_info { #define SUMO_GFXPOWERGATINGT_DFLT 100 /* sumo_dpm.c */ +struct sumo_power_info *sumo_get_pi(struct radeon_device *rdev); + void sumo_gfx_clockgating_initialize(struct radeon_device *rdev); void sumo_program_vc(struct radeon_device *rdev, u32 vrc); void sumo_clear_vc(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/sumo_smc.c b/drivers/gpu/drm/radeon/sumo_smc.c index fb081d2..05ed103 100644 --- a/drivers/gpu/drm/radeon/sumo_smc.c +++ b/drivers/gpu/drm/radeon/sumo_smc.c @@ -31,8 +31,6 @@ #define SUMO_SMU_SERVICE_ROUTINE_ALTVDDNB_NOTIFY 27 #define SUMO_SMU_SERVICE_ROUTINE_GFX_SRV_ID_20 20 -struct sumo_power_info *sumo_get_pi(struct radeon_device *rdev); - static void sumo_send_msg_to_smu(struct radeon_device *rdev, u32 id) { u32 gfx_int_req; -- 1.7.9.5
[PATCH 60/85] drivers: gpu: Include appropriate header file in sumo_dpm.c
Include header file drm/radeon/radeon_asic.h because it uses the function declared in the header file. This eliminates the following warnings in drm/radeon/sumo_dpm.c: drivers/gpu/drm/radeon/sumo_dpm.c:1202:5: warning: no previous prototype for ?sumo_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1250:6: warning: no previous prototype for ?sumo_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1273:5: warning: no previous prototype for ?sumo_dpm_pre_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1289:5: warning: no previous prototype for ?sumo_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1325:6: warning: no previous prototype for ?sumo_dpm_post_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1345:6: warning: no previous prototype for ?sumo_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1357:6: warning: no previous prototype for ?sumo_dpm_display_configuration_changed? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1731:5: warning: no previous prototype for ?sumo_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1781:6: warning: no previous prototype for ?sumo_dpm_print_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1799:6: warning: no previous prototype for ?sumo_dpm_debugfs_print_current_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1827:6: warning: no previous prototype for ?sumo_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1840:5: warning: no previous prototype for ?sumo_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1851:5: warning: no previous prototype for ?sumo_dpm_get_mclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1858:5: warning: no previous prototype for ?sumo_dpm_force_performance_level? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/sumo_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c index eb2e8e6..09cd0cf 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.c +++ b/drivers/gpu/drm/radeon/sumo_dpm.c @@ -23,6 +23,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "sumod.h" #include "r600_dpm.h" #include "cypress_dpm.h" -- 1.7.9.5
[PATCH 59/85] drivers: gpu: Mark function as static and remove unused function in sumo_dpm.c
Mark function sumo_get_ps() as static and remove unused function sumo_dpm_reset_asic() from file drm/radeon/sumo_dpm.c. This eliminates the following warnings in drm/radeon/sumo_dpm.c: drivers/gpu/drm/radeon/sumo_dpm.c:74:17: warning: no previous prototype for ?sumo_get_ps? [-Wmissing-prototypes] drivers/gpu/drm/radeon/sumo_dpm.c:1333:6: warning: no previous prototype for ?sumo_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/sumo_dpm.c | 14 +- drivers/gpu/drm/radeon/sumo_smc.c |1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c index 96ea6db8..eb2e8e6 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.c +++ b/drivers/gpu/drm/radeon/sumo_dpm.c @@ -71,7 +71,7 @@ static const u32 sumo_dtc[SUMO_PM_NUMBER_OF_TC] = SUMO_DTC_DFLT_14, }; -struct sumo_ps *sumo_get_ps(struct radeon_ps *rps) +static struct sumo_ps *sumo_get_ps(struct radeon_ps *rps) { struct sumo_ps *ps = rps->ps_priv; @@ -1330,18 +1330,6 @@ void sumo_dpm_post_set_power_state(struct radeon_device *rdev) sumo_update_current_ps(rdev, new_ps); } -void sumo_dpm_reset_asic(struct radeon_device *rdev) -{ - sumo_program_bootup_state(rdev); - sumo_enable_power_level_0(rdev); - sumo_set_forced_level_0(rdev); - sumo_set_forced_mode_enabled(rdev); - sumo_wait_for_level_0(rdev); - sumo_set_forced_mode_disabled(rdev); - sumo_set_forced_mode_enabled(rdev); - sumo_set_forced_mode_disabled(rdev); -} - void sumo_dpm_setup_asic(struct radeon_device *rdev) { struct sumo_power_info *pi = sumo_get_pi(rdev); diff --git a/drivers/gpu/drm/radeon/sumo_smc.c b/drivers/gpu/drm/radeon/sumo_smc.c index 18abba5..fb081d2 100644 --- a/drivers/gpu/drm/radeon/sumo_smc.c +++ b/drivers/gpu/drm/radeon/sumo_smc.c @@ -31,7 +31,6 @@ #define SUMO_SMU_SERVICE_ROUTINE_ALTVDDNB_NOTIFY 27 #define SUMO_SMU_SERVICE_ROUTINE_GFX_SRV_ID_20 20 -struct sumo_ps *sumo_get_ps(struct radeon_ps *rps); struct sumo_power_info *sumo_get_pi(struct radeon_device *rdev); static void sumo_send_msg_to_smu(struct radeon_device *rdev, u32 id) -- 1.7.9.5
[PATCH 58/85] drivers: gpu: Remove unused function in btc_dpm.c
Remove unused function btc_dpm_reset_asic() from drm/radeon/btc_dpm.c. This eliminates the following warnings in drm/radeon/btc_dpm.c: drivers/gpu/drm/radeon/btc_dpm.c:2311:6: warning: no previous prototype for ?btc_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/btc_dpm.c |8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c index 9b309ab9..7afd781 100644 --- a/drivers/gpu/drm/radeon/btc_dpm.c +++ b/drivers/gpu/drm/radeon/btc_dpm.c @@ -2305,14 +2305,6 @@ static void btc_update_requested_ps(struct radeon_device *rdev, eg_pi->requested_rps.ps_priv = _pi->requested_ps; } -void btc_dpm_reset_asic(struct radeon_device *rdev) -{ - rv770_restrict_performance_levels_before_switch(rdev); - btc_disable_ulv(rdev); - btc_set_boot_state_timing(rdev); - rv770_set_boot_state(rdev); -} - int btc_dpm_pre_set_power_state(struct radeon_device *rdev) { struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev); -- 1.7.9.5
[PATCH 57/85] drivers: gpu: Include appropriate header file in btc_dpm.c
Include header file drm/radeon/radeon_asic.h in drm/radeon/btc_dpm.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/btc_dpm.c: drivers/gpu/drm/radeon/btc_dpm.c:2079:6: warning: no previous prototype for ?btc_dpm_vblank_too_short? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2319:5: warning: no previous prototype for ?btc_dpm_pre_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2332:5: warning: no previous prototype for ?btc_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2397:6: warning: no previous prototype for ?btc_dpm_post_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2405:5: warning: no previous prototype for ?btc_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2537:6: warning: no previous prototype for ?btc_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2576:6: warning: no previous prototype for ?btc_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2592:5: warning: no previous prototype for ?btc_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2756:6: warning: no previous prototype for ?btc_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2769:5: warning: no previous prototype for ?btc_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/btc_dpm.c:2780:5: warning: no previous prototype for ?btc_dpm_get_mclk? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/btc_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c index 4261c3f..9b309ab9 100644 --- a/drivers/gpu/drm/radeon/btc_dpm.c +++ b/drivers/gpu/drm/radeon/btc_dpm.c @@ -24,6 +24,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "btcd.h" #include "r600_dpm.h" #include "cypress_dpm.h" -- 1.7.9.5
[PATCH 56/85] drivers: gpu: Remove unused function in cypress_dpm.c
Remove unused function cypress_dpm_reset_asic() from drm/radeon/cypress_dpm.c. This eliminates the following warnings in drm/radeon/cypress_dpm.c: drivers/gpu/drm/radeon/cypress_dpm.c:2022:6: warning: no previous prototype for ?cypress_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/cypress_dpm.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c index 8b9e033..7db6e87 100644 --- a/drivers/gpu/drm/radeon/cypress_dpm.c +++ b/drivers/gpu/drm/radeon/cypress_dpm.c @@ -2016,12 +2016,6 @@ int cypress_dpm_set_power_state(struct radeon_device *rdev) return 0; } -void cypress_dpm_reset_asic(struct radeon_device *rdev) -{ - rv770_restrict_performance_levels_before_switch(rdev); - rv770_set_boot_state(rdev); -} - void cypress_dpm_display_configuration_changed(struct radeon_device *rdev) { cypress_program_display_gap(rdev); -- 1.7.9.5
[PATCH 55/85] drivers: gpu: Include appropriate header file in cypress_dpm.c
Include header file drm/radeon/radeon_asic.h in drm/radeon/cypress_dpm.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/cypress_dpm.c: drivers/gpu/drm/radeon/cypress_dpm.c:1782:6: warning: no previous prototype for ?cypress_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:1802:5: warning: no previous prototype for ?cypress_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:1928:6: warning: no previous prototype for ?cypress_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:1968:5: warning: no previous prototype for ?cypress_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:2028:6: warning: no previous prototype for ?cypress_dpm_display_configuration_changed? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:2033:5: warning: no previous prototype for ?cypress_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:2150:6: warning: no previous prototype for ?cypress_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cypress_dpm.c:2161:6: warning: no previous prototype for ?cypress_dpm_vblank_too_short? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/cypress_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c index 75dc1d8..8b9e033 100644 --- a/drivers/gpu/drm/radeon/cypress_dpm.c +++ b/drivers/gpu/drm/radeon/cypress_dpm.c @@ -24,6 +24,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "evergreend.h" #include "r600_dpm.h" #include "cypress_dpm.h" -- 1.7.9.5
[PATCH 54/85] drivers: gpu: Move prototype declarations to header file rv770_dpm.h
Move prototype declarations of functions rv770_get_ps(), rv770_get_pi() and evergreen_get_pi() to header file drm/radeon/rv770_dpm.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/rv770_dpm.c: drivers/gpu/drm/radeon/rv770_dpm.c:47:18: warning: no previous prototype for ?rv770_get_ps? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:54:26: warning: no previous prototype for ?rv770_get_pi? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:61:30: warning: no previous prototype for ?evergreen_get_pi? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/btc_dpm.c |4 drivers/gpu/drm/radeon/cypress_dpm.c |4 drivers/gpu/drm/radeon/ni_dpm.c |3 --- drivers/gpu/drm/radeon/rv730_dpm.c |3 --- drivers/gpu/drm/radeon/rv740_dpm.c |2 -- drivers/gpu/drm/radeon/rv770_dpm.h |4 drivers/gpu/drm/radeon/si_dpm.c |2 -- 7 files changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c index 9b6950d..4261c3f 100644 --- a/drivers/gpu/drm/radeon/btc_dpm.c +++ b/drivers/gpu/drm/radeon/btc_dpm.c @@ -45,10 +45,6 @@ #ifndef BTC_MGCG_SEQUENCE #define BTC_MGCG_SEQUENCE 300 -struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps); -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev); -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev); - //* BARTS **// static const u32 barts_cgcg_cgls_default[] = diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c index 920e1e4..75dc1d8 100644 --- a/drivers/gpu/drm/radeon/cypress_dpm.c +++ b/drivers/gpu/drm/radeon/cypress_dpm.c @@ -41,10 +41,6 @@ #define MC_CG_SEQ_YCLK_SUSPEND 0x04 #define MC_CG_SEQ_YCLK_RESUME 0x0a -struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps); -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev); -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev); - static void cypress_enable_bif_dynamic_pcie_gen2(struct radeon_device *rdev, bool enable) { diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c index 49c4d48..33a1e21 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -717,9 +717,6 @@ static const u32 cayman_sysls_enable[] = }; #define CAYMAN_SYSLS_ENABLE_LENGTH sizeof(cayman_sysls_enable) / (3 * sizeof(u32)) -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev); -struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev); - struct ni_power_info *ni_get_pi(struct radeon_device *rdev) { struct ni_power_info *pi = rdev->pm.dpm.priv; diff --git a/drivers/gpu/drm/radeon/rv730_dpm.c b/drivers/gpu/drm/radeon/rv730_dpm.c index 3f5e1cf..f07b87d 100644 --- a/drivers/gpu/drm/radeon/rv730_dpm.c +++ b/drivers/gpu/drm/radeon/rv730_dpm.c @@ -34,9 +34,6 @@ #define MC_CG_ARB_FREQ_F2 0x0c #define MC_CG_ARB_FREQ_F3 0x0d -struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps); -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev); - int rv730_populate_sclk_value(struct radeon_device *rdev, u32 engine_clock, RV770_SMC_SCLK_VALUE *sclk) diff --git a/drivers/gpu/drm/radeon/rv740_dpm.c b/drivers/gpu/drm/radeon/rv740_dpm.c index c4c8da5..ca714f8 100644 --- a/drivers/gpu/drm/radeon/rv740_dpm.c +++ b/drivers/gpu/drm/radeon/rv740_dpm.c @@ -29,8 +29,6 @@ #include "rv770_dpm.h" #include "atom.h" -struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev); - u32 rv740_get_decoded_reference_divider(u32 encoded_ref) { u32 ref = 0; diff --git a/drivers/gpu/drm/radeon/rv770_dpm.h b/drivers/gpu/drm/radeon/rv770_dpm.h index 9244eff..2d74927 100644 --- a/drivers/gpu/drm/radeon/rv770_dpm.h +++ b/drivers/gpu/drm/radeon/rv770_dpm.h @@ -213,6 +213,10 @@ u32 rv740_get_dll_speed(bool is_gddr5, u32 memory_clock); u32 rv740_get_decoded_reference_divider(u32 encoded_ref); /* rv770 */ +struct rv7xx_ps *rv770_get_ps(struct radeon_ps *rps); +struct rv7xx_power_info *rv770_get_pi(struct radeon_device *rdev); +struct evergreen_power_info *evergreen_get_pi(struct radeon_device *rdev); + u32 rv770_map_clkf_to_ibias(struct radeon_device *rdev, u32 clkf); int rv770_populate_vddc_value(struct radeon_device *rdev, u16 vddc, RV770_SMC_VOLTAGE_VALUE *voltage); diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index a3a5866..8732005 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -1734,8 +1734,6 @@ static const struct si_powertune_data powertune_data_hainan = true }; -struct rv7xx_power_info *rv770_get_pi(struct radeon
[PATCH 53/85] drivers: gpu: Remove unused function in rv770_dpm.c
Remove unused function rv770_dpm_reset_asic() from file drm/radeon/rv770_dpm.c. This eliminates the following warning in drm/radeon/rv770_dpm.c: drivers/gpu/drm/radeon/rv770_dpm.c:2070:6: warning: no previous prototype for ?rv770_dpm_reset_asic? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/rv770_dpm.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c index cd22549..9c4cf11 100644 --- a/drivers/gpu/drm/radeon/rv770_dpm.c +++ b/drivers/gpu/drm/radeon/rv770_dpm.c @@ -2068,19 +2068,6 @@ int rv770_dpm_set_power_state(struct radeon_device *rdev) return 0; } -void rv770_dpm_reset_asic(struct radeon_device *rdev) -{ - struct rv7xx_power_info *pi = rv770_get_pi(rdev); - struct radeon_ps *boot_ps = rdev->pm.dpm.boot_ps; - - rv770_restrict_performance_levels_before_switch(rdev); - if (pi->dcodt) - rv770_program_dcodt_before_state_switch(rdev, boot_ps, boot_ps); - rv770_set_boot_state(rdev); - if (pi->dcodt) - rv770_program_dcodt_after_state_switch(rdev, boot_ps, boot_ps); -} - void rv770_dpm_setup_asic(struct radeon_device *rdev) { struct rv7xx_power_info *pi = rv770_get_pi(rdev); -- 1.7.9.5
[PATCH 52/85] drivers: gpu: Include appropriate header file in rv770_dpm.c
Include header file gpu/drm/radeon/radeon_asic.h in drm/radeon/rv770_dpm.c because it uses functions declared in the header file. This eliminates the following warning in drm/radeon/rv770_dpm.c: drivers/gpu/drm/radeon/rv770_dpm.c:47:18: warning: no previous prototype for ?rv770_get_ps? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:54:26: warning: no previous prototype for ?rv770_get_pi? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:61:30: warning: no previous prototype for ?evergreen_get_pi? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:1891:5: warning: no previous prototype for ?rv770_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:1989:6: warning: no previous prototype for ?rv770_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2027:5: warning: no previous prototype for ?rv770_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2083:6: warning: no previous prototype for ?rv770_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2106:6: warning: no previous prototype for ?rv770_dpm_display_configuration_changed? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2337:5: warning: no previous prototype for ?rv770_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2422:6: warning: no previous prototype for ?rv770_dpm_print_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2455:6: warning: no previous prototype for ?rv770_dpm_debugfs_print_current_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2485:6: warning: no previous prototype for ?rv770_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2496:5: warning: no previous prototype for ?rv770_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2506:5: warning: no previous prototype for ?rv770_dpm_get_mclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv770_dpm.c:2516:6: warning: no previous prototype for ?rv770_dpm_vblank_too_short? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/rv770_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c index 913b025..cd22549 100644 --- a/drivers/gpu/drm/radeon/rv770_dpm.c +++ b/drivers/gpu/drm/radeon/rv770_dpm.c @@ -24,6 +24,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "rv770d.h" #include "r600_dpm.h" #include "rv770_dpm.h" -- 1.7.9.5
[PATCH 51/85] drivers: gpu: Include appropriate header file in rv6xx_dpm.c
Include appropriate header file drm/radeon/radeon_asic.h in drm/radeon/rv6xx_dpm.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/rv6xx_dpm.c: drivers/gpu/drm/radeon/rv6xx_dpm.c:1545:5: warning: no previous prototype for ?rv6xx_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:1622:6: warning: no previous prototype for ?rv6xx_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:1666:5: warning: no previous prototype for ?rv6xx_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:1764:6: warning: no previous prototype for ?rv6xx_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:1778:6: warning: no previous prototype for ?rv6xx_dpm_display_configuration_changed? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:1944:5: warning: no previous prototype for ?rv6xx_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:2015:6: warning: no previous prototype for ?rv6xx_dpm_print_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:2036:6: warning: no previous prototype for ?rv6xx_dpm_debugfs_print_current_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:2061:6: warning: no previous prototype for ?rv6xx_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:2072:5: warning: no previous prototype for ?rv6xx_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:2082:5: warning: no previous prototype for ?rv6xx_dpm_get_mclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rv6xx_dpm.c:2092:5: warning: no previous prototype for ?rv6xx_dpm_force_performance_level? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/rv6xx_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/rv6xx_dpm.c b/drivers/gpu/drm/radeon/rv6xx_dpm.c index 26633a0..a4e2a80 100644 --- a/drivers/gpu/drm/radeon/rv6xx_dpm.c +++ b/drivers/gpu/drm/radeon/rv6xx_dpm.c @@ -24,6 +24,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "rv6xxd.h" #include "r600_dpm.h" #include "rv6xx_dpm.h" -- 1.7.9.5
[PATCH 50/85] drivers: gpu: Include appropriate header file in rs780_dpm.c
Include appropriate header file drm/radeon/radeon_asic.h in drm/radeon/rs780_dpm.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/rs780_dpm.c: drivers/gpu/drm/radeon/rs780_dpm.c:596:5: warning: no previous prototype for ?rs780_dpm_enable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:637:6: warning: no previous prototype for ?rs780_dpm_disable? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:656:5: warning: no previous prototype for ?rs780_dpm_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:687:6: warning: no previous prototype for ?rs780_dpm_setup_asic? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:692:6: warning: no previous prototype for ?rs780_dpm_display_configuration_changed? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:856:5: warning: no previous prototype for ?rs780_dpm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:943:6: warning: no previous prototype for ?rs780_dpm_print_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:958:6: warning: no previous prototype for ?rs780_dpm_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:969:5: warning: no previous prototype for ?rs780_dpm_get_sclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:979:5: warning: no previous prototype for ?rs780_dpm_get_mclk? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:986:6: warning: no previous prototype for ?rs780_dpm_debugfs_print_current_performance_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/rs780_dpm.c:1010:5: warning: no previous prototype for ?rs780_dpm_force_performance_level? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/rs780_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/rs780_dpm.c b/drivers/gpu/drm/radeon/rs780_dpm.c index 6af8505..dd264f5 100644 --- a/drivers/gpu/drm/radeon/rs780_dpm.c +++ b/drivers/gpu/drm/radeon/rs780_dpm.c @@ -24,6 +24,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "rs780d.h" #include "r600_dpm.h" #include "rs780_dpm.h" -- 1.7.9.5
[PATCH 49/85] drivers: gpu: Include appropriate header file in r600_dpm.c
Include appropriate header file drm/radeon/radeon_asic.h in drm/radeon/r600_dpm.c because it uses functions declared in the header file. This eliminates the following warnings in drm/radeon/r600_dpm.c: drivers/gpu/drm/radeon/r600_dpm.c:707:5: warning: no previous prototype for ?r600_dpm_pre_set_power_state? [-Wmissing-prototypes] drivers/gpu/drm/radeon/r600_dpm.c:712:6: warning: no previous prototype for ?r600_dpm_post_set_power_state? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/r600_dpm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/r600_dpm.c b/drivers/gpu/drm/radeon/r600_dpm.c index 5513d8f..405b9e9 100644 --- a/drivers/gpu/drm/radeon/r600_dpm.c +++ b/drivers/gpu/drm/radeon/r600_dpm.c @@ -24,6 +24,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "r600d.h" #include "r600_dpm.h" #include "atom.h" -- 1.7.9.5
[PATCH 48/85] drivers: gpu: Move prototype declaration to header file radeon_asic.h from ci_dpm.c, cik_sdma.c, evergreen.c and kv_dpm.c
Move prototype declaration of functions cik_gpu_check_soft_reset(), cik_enter_rlc_safe_mode(), cik_exit_rlc_safe_mode(), cik_update_cg(), cik_init_cp_pg_table(), cik_get_csb_size() and cik_get_csb_buffer() to header file drm/radeon/radeon_asic.h because they are used by more than one file. Also include the header file in drm/radeon/ci_dpm.c because it uses functions declared in the file. This eliminates the following warning in drivers/gpu/drm/radeon/cik.c:4648:5: warning: no previous prototype for ?cik_gpu_check_soft_reset? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:5481:6: warning: no previous prototype for ?cik_enter_rlc_safe_mode? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:5502:6: warning: no previous prototype for ?cik_exit_rlc_safe_mode? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:5900:6: warning: no previous prototype for ?cik_update_cg? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6028:6: warning: no previous prototype for ?cik_init_cp_pg_table? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6239:5: warning: no previous prototype for ?cik_get_csb_size? [-Wmissing-prototypes] drivers/gpu/drm/radeon/cik.c:6271:6: warning: no previous prototype for ?cik_get_csb_buffer? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/ci_dpm.c |5 + drivers/gpu/drm/radeon/cik_sdma.c|2 -- drivers/gpu/drm/radeon/evergreen.c |4 drivers/gpu/drm/radeon/kv_dpm.c |5 - drivers/gpu/drm/radeon/radeon_asic.h |8 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 1ed4799..899c843 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -23,6 +23,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "cikd.h" #include "r600_dpm.h" #include "ci_dpm.h" @@ -169,10 +170,6 @@ extern u8 si_get_mclk_frequency_ratio(u32 memory_clock, bool strobe_mode); extern void si_trim_voltage_table_to_fit_state_table(struct radeon_device *rdev, u32 max_voltage_steps, struct atom_voltage_table *voltage_table); -extern void cik_enter_rlc_safe_mode(struct radeon_device *rdev); -extern void cik_exit_rlc_safe_mode(struct radeon_device *rdev); -extern void cik_update_cg(struct radeon_device *rdev, - u32 block, bool enable); static int ci_get_std_voltage_value_sidd(struct radeon_device *rdev, struct atom_voltage_table_entry *voltage_table, diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c index 0300727..2fc7ede 100644 --- a/drivers/gpu/drm/radeon/cik_sdma.c +++ b/drivers/gpu/drm/radeon/cik_sdma.c @@ -32,8 +32,6 @@ #define CIK_SDMA_UCODE_SIZE 1050 #define CIK_SDMA_UCODE_VERSION 64 -u32 cik_gpu_check_soft_reset(struct radeon_device *rdev); - /* * sDMA - System DMA * Starting with CIK, the GPU has new asynchronous diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 534a2fa..3b68229 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -136,10 +136,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev); void evergreen_fini(struct radeon_device *rdev); void evergreen_pcie_gen2_enable(struct radeon_device *rdev); void evergreen_program_aspm(struct radeon_device *rdev); -void cik_init_cp_pg_table(struct radeon_device *rdev); - -extern u32 cik_get_csb_size(struct radeon_device *rdev); -extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer); static const u32 evergreen_golden_registers[] = { diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c index b419055..7e58dfb 100644 --- a/drivers/gpu/drm/radeon/kv_dpm.c +++ b/drivers/gpu/drm/radeon/kv_dpm.c @@ -56,11 +56,6 @@ static void kv_dpm_powergate_vce(struct radeon_device *rdev, bool gate); static void kv_dpm_powergate_samu(struct radeon_device *rdev, bool gate); static void kv_dpm_powergate_acp(struct radeon_device *rdev, bool gate); -extern void cik_enter_rlc_safe_mode(struct radeon_device *rdev); -extern void cik_exit_rlc_safe_mode(struct radeon_device *rdev); -extern void cik_update_cg(struct radeon_device *rdev, - u32 block, bool enable); - static const struct kv_lcac_config_values sx_local_cac_cfg_kv[] = { { 0, 4,1}, diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 51ec129c..1d631cd 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h @@ -712,6 +712,14 @@ void dce8_bandwidth_update(struct radeon_device *rdev); /* * cik */ +u32
[PATCH 47/85] drivers: gpu: Move prototype declarations to appropriate header file radeon_asic.h
Move prototype declarations of functions si_vram_gtt_location(), si_rlc_reset(), si_init_uvd_internal_cg(), si_get_csb_size(), si_get_csb_buffer(), si_gpu_check_soft_reset() and si_update_cg() to header file drm/radeon/radeon_asic.h because they are used by more than one file. Also, include the header file in drm/radeon/si_dpm.c because it uses the functions declared in the header file. This eliminates the following warnings in drm/radeon/si.c: drivers/gpu/drm/radeon/si.c:3510:5: warning: no previous prototype for ?si_gpu_check_soft_reset? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si.c:3818:6: warning: no previous prototype for ?si_vram_gtt_location? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si.c:4786:6: warning: no previous prototype for ?si_init_uvd_internal_cg? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si.c:5211:6: warning: no previous prototype for ?si_update_cg? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si.c:5277:5: warning: no previous prototype for ?si_get_csb_size? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si.c:5309:6: warning: no previous prototype for ?si_get_csb_buffer? [-Wmissing-prototypes] drivers/gpu/drm/radeon/si.c:5398:6: warning: no previous prototype for ?si_rlc_reset? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/cik.c |3 --- drivers/gpu/drm/radeon/evergreen.c |2 -- drivers/gpu/drm/radeon/radeon_asic.h |8 drivers/gpu/drm/radeon/si_dma.c |2 -- drivers/gpu/drm/radeon/si_dpm.c |4 +--- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index bc21542..76902ca 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -62,9 +62,6 @@ MODULE_FIRMWARE("radeon/KABINI_mec.bin"); MODULE_FIRMWARE("radeon/KABINI_rlc.bin"); MODULE_FIRMWARE("radeon/KABINI_sdma.bin"); -extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); -extern void si_rlc_reset(struct radeon_device *rdev); -extern void si_init_uvd_internal_cg(struct radeon_device *rdev); extern int cik_sdma_resume(struct radeon_device *rdev); extern void cik_sdma_enable(struct radeon_device *rdev, bool enable); extern void cik_sdma_fini(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index f4806ed..534a2fa 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -138,8 +138,6 @@ void evergreen_pcie_gen2_enable(struct radeon_device *rdev); void evergreen_program_aspm(struct radeon_device *rdev); void cik_init_cp_pg_table(struct radeon_device *rdev); -extern u32 si_get_csb_size(struct radeon_device *rdev); -extern void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer); extern u32 cik_get_csb_size(struct radeon_device *rdev); extern void cik_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer); diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 732fb6c..51ec129c 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h @@ -697,6 +697,14 @@ void si_dpm_debugfs_print_current_performance_level(struct radeon_device *rdev, struct seq_file *m); int si_dpm_force_performance_level(struct radeon_device *rdev, enum radeon_dpm_forced_level level); +u32 si_gpu_check_soft_reset(struct radeon_device *rdev); +void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); +void si_rlc_reset(struct radeon_device *rdev); +void si_init_uvd_internal_cg(struct radeon_device *rdev); +void si_update_cg(struct radeon_device *rdev, + u32 block, bool enable); +u32 si_get_csb_size(struct radeon_device *rdev); +void si_get_csb_buffer(struct radeon_device *rdev, volatile u32 *buffer); /* DCE8 - CIK */ void dce8_bandwidth_update(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/si_dma.c b/drivers/gpu/drm/radeon/si_dma.c index 59be2cf..cc15f59 100644 --- a/drivers/gpu/drm/radeon/si_dma.c +++ b/drivers/gpu/drm/radeon/si_dma.c @@ -27,8 +27,6 @@ #include "radeon_trace.h" #include "sid.h" -u32 si_gpu_check_soft_reset(struct radeon_device *rdev); - /** * si_dma_is_lockup - Check if the DMA engine is locked up * diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 0b00c79..a3a5866 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -23,6 +23,7 @@ #include "drmP.h" #include "radeon.h" +#include "radeon_asic.h" #include "sid.h" #include "r600_dpm.h" #include "si_dpm.h" @@ -1753,9 +1754,6 @@ static int si_calculate_sclk_params(struct radeon_device *rdev,
[PATCH 46/85] drivers: gpu: Move prototype declarations to header file radeon_mode.h from radeon_i2c.c
Move prototype declaration of functions radeon_atom_hw_i2c_xfer() and radeon_atom_hw_i2c_func() to header file drm/radeon/radeon_mode.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/atombios_i2c.c: drivers/gpu/drm/radeon/atombios_i2c.c:96:5: warning: no previous prototype for ?radeon_atom_hw_i2c_xfer? [-Wmissing-prototypes] drivers/gpu/drm/radeon/atombios_i2c.c:146:5: warning: no previous prototype for ?radeon_atom_hw_i2c_func? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_i2c.c |4 drivers/gpu/drm/radeon/radeon_mode.h |4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index fc60b74..fd07db8 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -31,10 +31,6 @@ #include "radeon.h" #include "atom.h" -extern int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg *msgs, int num); -extern u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap); - /** * radeon_ddc_probe * diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 8f2f4a3..129f069 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -628,6 +628,10 @@ struct atom_voltage_table struct atom_voltage_table_entry entries[MAX_VOLTAGE_ENTRIES]; }; +int radeon_atom_hw_i2c_xfer(struct i2c_adapter *i2c_adap, + struct i2c_msg *msgs, int num); +u32 radeon_atom_hw_i2c_func(struct i2c_adapter *adap); + void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder, struct drm_connector *drm_connector); -- 1.7.9.5
[PATCH 45/85] drivers: gpu: Include appropriate header file in atombios_encoders.c
Include appropriate header file drm/radeon/radeon_asic.h in drm/radeon/atombios_encoders.c because it uses function declared in the header file. This eliminates the following warnings in drm/radeon/atombios_encoders.c: drivers/gpu/drm/radeon/atombios_encoders.c:74:1: warning: no previous prototype for ?atombios_get_backlight_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/atombios_encoders.c:86:1: warning: no previous prototype for ?atombios_set_backlight_level? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/atombios_encoders.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 641298d..595d573 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -27,6 +27,7 @@ #include #include #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" #include "atombios.h" #include -- 1.7.9.5
[PATCH 44/85] drivers: gpu: Move prototype declaration to header file radeon_mode.h from radeon_atombios.c and radeon_encoders.c
Move prototype declarations of function radeon_add_atom_encoder() and radeon_atom_backlight_init() to header file drm/radeon/radeon_mode.h because they are used by more than one file. This eliminates the following warning in drm/radeon/atombios_encoders.c: drivers/gpu/drm/radeon/atombios_encoders.c:177:6: warning: no previous prototype for ?radeon_atom_backlight_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/atombios_encoders.c:2600:1: warning: no previous prototype for ?radeon_add_atom_encoder? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_atombios.c |4 drivers/gpu/drm/radeon/radeon_encoders.c |4 drivers/gpu/drm/radeon/radeon_mode.h |7 +++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index a876fae..19a7350 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -32,10 +32,6 @@ #include "radeon_asic.h" #include "atom-bits.h" -extern void -radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum, - uint32_t supported_device, u16 caps); - /* from radeon_legacy_encoder.c */ extern void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index bd4959c..a88ba7a 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c @@ -32,10 +32,6 @@ extern void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, struct drm_connector *drm_connector); -extern void -radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder, - struct drm_connector *drm_connector); - static uint32_t radeon_encoder_clones(struct drm_encoder *encoder) { diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index b5f4e52..8f2f4a3 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -628,6 +628,13 @@ struct atom_voltage_table struct atom_voltage_table_entry entries[MAX_VOLTAGE_ENTRIES]; }; +void +radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder, + struct drm_connector *drm_connector); + +void +radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum, + uint32_t supported_device, u16 caps); void radeon_add_atom_connector(struct drm_device *dev, -- 1.7.9.5
[PATCH 43/85] drivers: gpu: Move prototype declarations to header file radeon_asic.h from evergreen.c and ni_dma.c
Move prototype declarations of function cayman_cp_int_cntl_setup(), cayman_vm_decode_fault() and cayman_gpu_check_soft_reset() to header file drm/radeon/radeon_asic.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/ni.c: drivers/gpu/drm/radeon/ni.c:1304:6: warning: no previous prototype for ?cayman_cp_int_cntl_setup? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni.c:1599:5: warning: no previous prototype for ?cayman_gpu_check_soft_reset? [-Wmissing-prototypes] drivers/gpu/drm/radeon/ni.c:2246:6: warning: no previous prototype for ?cayman_vm_decode_fault? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/evergreen.c |4 drivers/gpu/drm/radeon/ni_dma.c |2 -- drivers/gpu/drm/radeon/radeon_asic.h |5 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 9702e55..f4806ed 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -136,10 +136,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev); void evergreen_fini(struct radeon_device *rdev); void evergreen_pcie_gen2_enable(struct radeon_device *rdev); void evergreen_program_aspm(struct radeon_device *rdev); -extern void cayman_cp_int_cntl_setup(struct radeon_device *rdev, -int ring, u32 cp_int_cntl); -extern void cayman_vm_decode_fault(struct radeon_device *rdev, - u32 status, u32 addr); void cik_init_cp_pg_table(struct radeon_device *rdev); extern u32 si_get_csb_size(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/ni_dma.c b/drivers/gpu/drm/radeon/ni_dma.c index bdeb65e..2897cf1 100644 --- a/drivers/gpu/drm/radeon/ni_dma.c +++ b/drivers/gpu/drm/radeon/ni_dma.c @@ -27,8 +27,6 @@ #include "radeon_trace.h" #include "nid.h" -u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev); - /* * DMA * Starting with R600, the GPU has an asynchronous diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 5e1f169..732fb6c 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h @@ -577,6 +577,11 @@ int evergreen_rlc_resume(struct radeon_device *rdev); /* * cayman */ +void cayman_cp_int_cntl_setup(struct radeon_device *rdev, + int ring, u32 cp_int_cntl); +void cayman_vm_decode_fault(struct radeon_device *rdev, + u32 status, u32 addr); +u32 cayman_gpu_check_soft_reset(struct radeon_device *rdev); void cayman_fence_ring_emit(struct radeon_device *rdev, struct radeon_fence *fence); void cayman_pcie_gart_tlb_flush(struct radeon_device *rdev); -- 1.7.9.5
[PATCH 42/85] drivers: gpu: Move prototype declarations to header file radeon_asic.h
Move prototype declaration of functions evergreen_mc_stop(), evergreen_mc_resume(), evergreen_is_display_hung(), sumo_rlc_fini(), sumo_rlc_init(), evergreen_fix_pci_max_read_req_size(), evergreen_get_number_of_dram_channels(), evergreen_mc_program(), evergreen_mc_init(), evergreen_gpu_check_soft_reset(), evergreen_rlc_resume() and evergreen_irq_suspend() to header file drm/radeon/radeon_asic.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/evergreen.c: drivers/gpu/drm/radeon/evergreen.c:1175:6: warning: no previous prototype for ?evergreen_fix_pci_max_read_req_size? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:1950:5: warning: no previous prototype for ?evergreen_get_number_of_dram_channels? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:2548:6: warning: no previous prototype for ?evergreen_mc_stop? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:2634:6: warning: no previous prototype for ?evergreen_mc_resume? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:2722:6: warning: no previous prototype for ?evergreen_mc_program? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:3571:5: warning: no previous prototype for ?evergreen_mc_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:3630:6: warning: no previous prototype for ?evergreen_print_gpu_status_regs? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:3658:6: warning: no previous prototype for ?evergreen_is_display_hung? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:3687:5: warning: no previous prototype for ?evergreen_gpu_check_soft_reset? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:3919:6: warning: no previous prototype for ?sumo_rlc_fini? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:3962:5: warning: no previous prototype for ?sumo_rlc_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:4186:5: warning: no previous prototype for ?evergreen_rlc_resume? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen.c:4685:6: warning: no previous prototype for ?evergreen_irq_suspend? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/cik.c |5 - drivers/gpu/drm/radeon/evergreen_dma.c |2 -- drivers/gpu/drm/radeon/ni.c| 10 -- drivers/gpu/drm/radeon/r600.c |1 - drivers/gpu/drm/radeon/radeon_asic.h | 13 + drivers/gpu/drm/radeon/si.c|8 6 files changed, 13 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index fb5943c..bc21542 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -62,11 +62,6 @@ MODULE_FIRMWARE("radeon/KABINI_mec.bin"); MODULE_FIRMWARE("radeon/KABINI_rlc.bin"); MODULE_FIRMWARE("radeon/KABINI_sdma.bin"); -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern bool evergreen_is_display_hung(struct radeon_device *rdev); -extern void sumo_rlc_fini(struct radeon_device *rdev); -extern int sumo_rlc_init(struct radeon_device *rdev); extern void si_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc); extern void si_rlc_reset(struct radeon_device *rdev); extern void si_init_uvd_internal_cg(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/evergreen_dma.c b/drivers/gpu/drm/radeon/evergreen_dma.c index a37b544..b4230bf 100644 --- a/drivers/gpu/drm/radeon/evergreen_dma.c +++ b/drivers/gpu/drm/radeon/evergreen_dma.c @@ -26,8 +26,6 @@ #include "radeon_asic.h" #include "evergreend.h" -u32 evergreen_gpu_check_soft_reset(struct radeon_device *rdev); - /** * evergreen_dma_fence_ring_emit - emit a fence on the DMA ring * diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 11aab2a..2817382 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -161,19 +161,9 @@ static const u32 tn_rlc_save_restore_register_list[] = 0x802c, }; -extern bool evergreen_is_display_hung(struct radeon_device *rdev); -extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev); -extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); -extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); extern int evergreen_mc_wait_for_idle(struct radeon_device *rdev); -extern void evergreen_mc_program(struct radeon_device *rdev); -extern void evergreen_irq_suspend(struct radeon_device *rdev); -extern int evergreen_mc_init(struct radeon_device *rdev); -extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev); extern void evergreen_pcie_gen2_enable(struct radeon_device *rdev); extern void
[PATCH 41/85] drivers: gpu: Include appropriate header file in evergreen_cs.c
Include header file drm/radeon/radeon_asic.h in drm/radeon/evergreen_cs.c because it uses function declared in the header file. This eliminates the following warning in drm/radeon/evergreen_cs.c: drivers/gpu/drm/radeon/evergreen_cs.c:2561:5: warning: no previous prototype for ?evergreen_cs_parse? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_cs.c:2682:5: warning: no previous prototype for ?evergreen_dma_cs_parse? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_cs.c:3378:5: warning: no previous prototype for ?evergreen_ib_parse? [-Wmissing-prototypes] drivers/gpu/drm/radeon/evergreen_cs.c:3423:5: warning: no previous prototype for ?evergreen_dma_ib_parse? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/evergreen_cs.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index eb8ac31..cfecc24 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c @@ -30,6 +30,7 @@ #include "evergreend.h" #include "evergreen_reg_safe.h" #include "cayman_reg_safe.h" +#include "radeon_asic.h" #define MAX(a,b) (((a)>(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) -- 1.7.9.5
[PATCH 40/85] drivers: gpu: Mark function as static in r600_hdmi.c
Mark function r600_audio_set_dto() as static in drm/radeon/r600_hdmi.c because it is not used outside this file. This eliminates the following warning in drm/radeon/r600_hdmi.c: drivers/gpu/drm/radeon/r600_hdmi.c:253:6: warning: no previous prototype for ?r600_audio_set_dto? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/r600_hdmi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index b7d3ecb..3016fc1 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c @@ -250,7 +250,7 @@ static void r600_hdmi_audio_workaround(struct drm_encoder *encoder) value, ~HDMI0_AUDIO_TEST_EN); } -void r600_audio_set_dto(struct drm_encoder *encoder, u32 clock) +static void r600_audio_set_dto(struct drm_encoder *encoder, u32 clock) { struct drm_device *dev = encoder->dev; struct radeon_device *rdev = dev->dev_private; -- 1.7.9.5
[PATCH 39/85] drivers: gpu: Move prototype declaration to header file radeon_mode.h from atombios_i2c.c
Move prototype declaration of function radeon_atom_copy_swap() to header file drm/radeon/radeon_mode.h because it is used by more than one file. This eliminates the following warnings in drm/radeon/atombios_dp.c: drivers/gpu/drm/radeon/atombios_dp.c:53:6: warning: no previous prototype for ?radeon_atom_copy_swap? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/atombios_i2c.c |2 -- drivers/gpu/drm/radeon/radeon_mode.h |1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c index f685035dbe..b5162c3 100644 --- a/drivers/gpu/drm/radeon/atombios_i2c.c +++ b/drivers/gpu/drm/radeon/atombios_i2c.c @@ -27,8 +27,6 @@ #include "radeon.h" #include "atom.h" -extern void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le); - #define TARGET_HW_I2C_CLOCK 50 /* these are a limitation of ProcessI2cChannelTransaction not the hw */ diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index d1f7a0e..b5f4e52 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -694,6 +694,7 @@ extern void radeon_atom_ext_encoder_setup_ddc(struct drm_encoder *encoder); extern struct drm_encoder *radeon_get_external_encoder(struct drm_encoder *encoder); extern int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, u8 write_byte, u8 *read_byte); +void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le); extern void radeon_i2c_init(struct radeon_device *rdev); extern void radeon_i2c_fini(struct radeon_device *rdev); -- 1.7.9.5
[PATCH 38/85] drivers: gpu: Move prototype declaration to header file radeon.h from radeon_acpi.c
Move prototype declarations of functions radeon_pm_acpi_event_handler() to header file drm/radeon/radeon.h because it is used by more than one file. This eliminates the following warning in drm/radeon/radeon_pm.c: drivers/gpu/drm/radeon/radeon_pm.c:68:6: warning: no previous prototype for ?radeon_pm_acpi_event_handler? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon.h |1 + drivers/gpu/drm/radeon/radeon_acpi.c |2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 28414f2..8e0b9dd 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -104,6 +104,7 @@ u32 r600_gpu_check_soft_reset(struct radeon_device *rdev); void r600_ih_ring_fini(struct radeon_device *rdev); int r600_ih_ring_alloc(struct radeon_device *rdev); +void radeon_pm_acpi_event_handler(struct radeon_device *rdev); /* * Copy from radeon_drv.h so we don't have to include both and have conflicting diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index 98a9074..d3018cb 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c @@ -39,8 +39,6 @@ #define ACPI_AC_CLASS "ac_adapter" -extern void radeon_pm_acpi_event_handler(struct radeon_device *rdev); - struct atif_verify_interface { u16 size; /* structure size in bytes (includes size field) */ u16 version;/* version */ -- 1.7.9.5
[PATCH 37/85] drivers: gpu: Include appropriate header file in r600_cs.c
Include appropriate header file gpu/drm/radeon/radeon_asic.h in drm/radeon/r600_cs.c because it uses the function declared in the header file. This eliminates the following warning in drm/radeon/r600_cs.c: drivers/gpu/drm/radeon/r600_cs.c:2251:5: warning: no previous prototype for ?r600_cs_parse? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/r600_cs.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 5dceea6..3b3be00 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c @@ -30,6 +30,7 @@ #include "radeon.h" #include "r600d.h" #include "r600_reg_safe.h" +#include "radeon_asic.h" static int r600_nomm; extern void r600_cs_legacy_get_tiling_conf(struct drm_device *dev, u32 *npipes, u32 *nbanks, u32 *group_size); -- 1.7.9.5
[PATCH 36/85] drivers: gpu: Move prototype declarations to header file radeon_mode.h from radeon_atombios.c and radeon_combios.c
Move prototype declarations of functions radeon_get_encoder_enum() and radeon_link_encoder_connector() to header file drm/radeon/radeon_mode.h because they are used by more than one file. This eliminates the following warnings in drm/radeon/radeon_encoders.c: drivers/gpu/drm/radeon/radeon_encoders.c:86:1: warning: no previous prototype for ?radeon_get_encoder_enum? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_encoders.c:162:1: warning: no previous prototype for ?radeon_link_encoder_connector? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_atombios.c |5 - drivers/gpu/drm/radeon/radeon_combios.c |6 -- drivers/gpu/drm/radeon/radeon_mode.h |4 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 392ea6e..a876fae 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -32,11 +32,6 @@ #include "radeon_asic.h" #include "atom-bits.h" -/* from radeon_encoder.c */ -extern uint32_t -radeon_get_encoder_enum(struct drm_device *dev, uint32_t supported_device, - uint8_t dac); -extern void radeon_link_encoder_connector(struct drm_device *dev); extern void radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device, u16 caps); diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index e4c1b8d..6651177 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -37,12 +37,6 @@ #include #endif /* CONFIG_PPC_PMAC */ -/* from radeon_encoder.c */ -extern uint32_t -radeon_get_encoder_enum(struct drm_device *dev, uint32_t supported_device, - uint8_t dac); -extern void radeon_link_encoder_connector(struct drm_device *dev); - /* from radeon_legacy_encoder.c */ extern void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index e841fde..d1f7a0e 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -647,6 +647,10 @@ radeon_add_legacy_connector(struct drm_device *dev, struct radeon_i2c_bus_rec *i2c_bus, uint16_t connector_object_id, struct radeon_hpd *hpd); +uint32_t +radeon_get_encoder_enum(struct drm_device *dev, uint32_t supported_device, + uint8_t dac); +void radeon_link_encoder_connector(struct drm_device *dev); extern enum radeon_tv_std radeon_combios_get_tv_info(struct radeon_device *rdev); -- 1.7.9.5
[PATCH 35/85] drivers: gpu: Move prototype declaration to header file radeon_mode.h
Move prototype declaration of functions radeon_add_atom_connector() and radeon_add_legacy_connector() to header file drm/radeon/radeon_mode.h because they are used by more than one file. This eliminates the following warning in drm/radeon/radeon_connectors.c: drivers/gpu/drm/radeon/radeon_connectors.c:1588:1: warning: no previous prototype for ?radeon_add_atom_connector? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_connectors.c:2020:1: warning: no previous prototype for ?radeon_add_legacy_connector? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_atombios.c | 12 drivers/gpu/drm/radeon/radeon_combios.c | 10 -- drivers/gpu/drm/radeon/radeon_mode.h | 21 - 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index b3bf270..392ea6e 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -41,18 +41,6 @@ extern void radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_enum, uint32_t supported_device, u16 caps); -/* from radeon_connector.c */ -extern void -radeon_add_atom_connector(struct drm_device *dev, - uint32_t connector_id, - uint32_t supported_device, - int connector_type, - struct radeon_i2c_bus_rec *i2c_bus, - uint32_t igp_lane_info, - uint16_t connector_object_id, - struct radeon_hpd *hpd, - struct radeon_router *router); - /* from radeon_legacy_encoder.c */ extern void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 68ce360..e4c1b8d 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -43,16 +43,6 @@ radeon_get_encoder_enum(struct drm_device *dev, uint32_t supported_device, uint8_t dac); extern void radeon_link_encoder_connector(struct drm_device *dev); -/* from radeon_connector.c */ -extern void -radeon_add_legacy_connector(struct drm_device *dev, - uint32_t connector_id, - uint32_t supported_device, - int connector_type, - struct radeon_i2c_bus_rec *i2c_bus, - uint16_t connector_object_id, - struct radeon_hpd *hpd); - /* from radeon_legacy_encoder.c */ extern void radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_enum, diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index b2b556b..e841fde 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -50,7 +50,6 @@ void radeon_combios_connected_scratch_regs(struct drm_connector *connector, struct drm_encoder *encoder, bool connected); - enum radeon_rmx_type { RMX_OFF, RMX_FULL, @@ -629,6 +628,26 @@ struct atom_voltage_table struct atom_voltage_table_entry entries[MAX_VOLTAGE_ENTRIES]; }; + +void +radeon_add_atom_connector(struct drm_device *dev, + uint32_t connector_id, + uint32_t supported_device, + int connector_type, + struct radeon_i2c_bus_rec *i2c_bus, + uint32_t igp_lane_info, + uint16_t connector_object_id, + struct radeon_hpd *hpd, + struct radeon_router *router); +void +radeon_add_legacy_connector(struct drm_device *dev, + uint32_t connector_id, + uint32_t supported_device, + int connector_type, + struct radeon_i2c_bus_rec *i2c_bus, + uint16_t connector_object_id, + struct radeon_hpd *hpd); + extern enum radeon_tv_std radeon_combios_get_tv_info(struct radeon_device *rdev); extern enum radeon_tv_std -- 1.7.9.5
[PATCH 34/85] drivers: gpu: Move prototype declaration to appropriate header file radeon_mode.h
Move prototype declaration of function radeon_combios_connected_scratch_regs() to header file drm/radeon/radeon_mode.h from drm/radeon/radeon_connectors.c because it is used by more than one file. This eliminates the following warning in drm/radeon/radeon_combios.c: drivers/gpu/drm/radeon/radeon_combios.c:3449:1: warning: no previous prototype for ?radeon_combios_connected_scratch_regs? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_connectors.c |5 - drivers/gpu/drm/radeon/radeon_mode.h |5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 9070487..c12eca0 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -34,11 +34,6 @@ #include -extern void -radeon_combios_connected_scratch_regs(struct drm_connector *connector, - struct drm_encoder *encoder, - bool connected); - void radeon_connector_hotplug(struct drm_connector *connector) { struct drm_device *dev = connector->dev; diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 3f0dd66..b2b556b 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -46,6 +46,11 @@ struct radeon_device; #define to_radeon_encoder(x) container_of(x, struct radeon_encoder, base) #define to_radeon_framebuffer(x) container_of(x, struct radeon_framebuffer, base) +void +radeon_combios_connected_scratch_regs(struct drm_connector *connector, + struct drm_encoder *encoder, + bool connected); + enum radeon_rmx_type { RMX_OFF, RMX_FULL, -- 1.7.9.5
[PATCH 33/85] drivers: gpu: Include appropriate header file in radeon_atombios.c
Include appropriate header file drm/radeon/radeon_asic.h in drm/radeon/radeon_atombios.c because it uses the functions whose prototype declarations is present in the header file. This eliminates the following warnings in drm/radeon/radeon_atombios.c: drivers/gpu/drm/radeon/radeon_atombios.c:2949:10: warning: no previous prototype for ?radeon_atom_get_engine_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_atombios.c:2958:10: warning: no previous prototype for ?radeon_atom_get_memory_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_atombios.c:2967:6: warning: no previous prototype for ?radeon_atom_set_engine_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_atombios.c:2978:6: warning: no previous prototype for ?radeon_atom_set_memory_clock? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_atombios.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 39f1fd6..b3bf270 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -29,6 +29,7 @@ #include "atom.h" #include "atombios.h" +#include "radeon_asic.h" #include "atom-bits.h" /* from radeon_encoder.c */ -- 1.7.9.5
[PATCH 32/85] drivers: gpu: Move prototype declarations to header file atombios.h
Move prototype declarations of functions radeon_atom_get_tv_timings() and radeon_atombios_connected_scratch_regs() to header file drm/radeon/atombios.h because they are used by more than one file. Include the header file in atombios_encoders.c, radeon_atombios.c and radeon_connectors.c because they use the function whose prototype declarations are present in it. This eliminates the following warnings in drm/radeon/radeon_atombios.c: drivers/gpu/drm/radeon/radeon_atombios.c:1766:6: warning: no previous prototype for ?radeon_atom_get_tv_timings? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_atombios.c:4012:1: warning: no previous prototype for ?radeon_atombios_connected_scratch_regs? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/atombios.h |8 drivers/gpu/drm/radeon/atombios_encoders.c |6 +- drivers/gpu/drm/radeon/radeon_atombios.c |1 + drivers/gpu/drm/radeon/radeon_connectors.c |5 + 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index 92be50c..72a3aa7c 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h @@ -193,6 +193,14 @@ #defineOFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER 0x002f #defineOFFSET_TO_GET_ATOMBIOS_STRINGS_START0x006e +bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, + struct drm_display_mode *mode); +void +radeon_atombios_connected_scratch_regs(struct drm_connector *connector, + struct drm_encoder *encoder, + bool connected); + + /* Common header for all ROM Data tables. Every table pointed _ATOM_MASTER_DATA_TABLE has this common header. And the pointer actually points to this header. */ diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index a42d615..641298d 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -28,6 +28,7 @@ #include #include "radeon.h" #include "atom.h" +#include "atombios.h" #include extern int atom_debug; @@ -283,11 +284,6 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *encoder) #endif -/* evil but including atombios.h is much worse */ -bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, - struct drm_display_mode *mode); - - static inline bool radeon_encoder_is_digital(struct drm_encoder *encoder) { struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 5c39bf7..39f1fd6 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -28,6 +28,7 @@ #include "radeon.h" #include "atom.h" +#include "atombios.h" #include "atom-bits.h" /* from radeon_encoder.c */ diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 20a768a..9070487 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -30,6 +30,7 @@ #include #include "radeon.h" #include "atom.h" +#include "atombios.h" #include @@ -37,10 +38,6 @@ extern void radeon_combios_connected_scratch_regs(struct drm_connector *connector, struct drm_encoder *encoder, bool connected); -extern void -radeon_atombios_connected_scratch_regs(struct drm_connector *connector, - struct drm_encoder *encoder, - bool connected); void radeon_connector_hotplug(struct drm_connector *connector) { -- 1.7.9.5
[PATCH 31/85] drivers: gpu: Add static keyword to the definition of KMS_INVALID_IOCTL in radeon_kms.c
Add static keyword to the definition of KMS_INVALID_IOCTL(name) in radeon_kms.c because the functions passed to it as arguments are not used anywhere else. This eliminates the following warnings in drm/radeon/radeon_kms.c: drivers/gpu/drm/radeon/radeon_kms.c:719:1: warning: no previous prototype for ?radeon_cp_init_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:720:1: warning: no previous prototype for ?radeon_cp_start_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:721:1: warning: no previous prototype for ?radeon_cp_stop_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:722:1: warning: no previous prototype for ?radeon_cp_reset_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:723:1: warning: no previous prototype for ?radeon_cp_idle_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:724:1: warning: no previous prototype for ?radeon_cp_resume_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:725:1: warning: no previous prototype for ?radeon_engine_reset_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:726:1: warning: no previous prototype for ?radeon_fullscreen_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:727:1: warning: no previous prototype for ?radeon_cp_swap_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:728:1: warning: no previous rototype for ?radeon_cp_clear_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:729:1: warning: no previous prototype for ?radeon_cp_vertex_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:730:1: warning: no previous rototype for ?radeon_cp_indices_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:731:1: warning: no previous prototype for ?radeon_cp_texture_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:732:1: warning: no previous prototype for ?radeon_cp_stipple_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:733:1: warning: no previous prototype for ?radeon_cp_indirect_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:734:1: warning: no previous prototype for ?radeon_cp_vertex2_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:735:1: warning: no previous prototype for ?radeon_cp_cmdbuf_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:736:1: warning: no previous prototype for ?radeon_cp_getparam_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:737:1: warning: no previous prototype for ?radeon_cp_flip_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:738:1: warning: no previous prototype for ?radeon_mem_alloc_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:739:1: warning: no previous prototype for ?radeon_mem_free_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:740:1: warning: no previous rototype for ?radeon_mem_init_heap_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:741:1: warning: no previous rototype for ?radeon_irq_emit_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:742:1: warning: no previous prototype for ?radeon_irq_wait_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:743:1: warning: no previous rototype for ?radeon_cp_setparam_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:744:1: warning: no previous prototype for ?radeon_surface_alloc_kms? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_kms.c:745:1: warning: no previous prototype for ?radeon_surface_free_kms? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_kms.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 03cbb6b..4797b41 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -707,7 +707,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc, } #define KMS_INVALID_IOCTL(name) \ -int name(struct drm_device *dev, void *data, struct drm_file *file_priv)\ +static int name(struct drm_device *dev, void *data, struct drm_file\ + *file_priv) \ { \ DRM_ERROR("invalid ioctl with kms %s\n", __func__); \ return -EINVAL; \ -- 1.7.9.5
[PATCH 30/85] drivers: gpu: Move prototype declarations to appropriate header file radeon.h
Move prototype declaration to the header file drm/radeon/radeon.h from files drm/radeon/cik.c, drm/radeon/r600_dma.c and drm/radeon/si.c because they are used by more than one file. This eliminates the following warnings in drm/radeon/r600.c: drivers/gpu/drm/radeon/r600.c:1442:5: warning: no previous prototype for ?r600_gpu_check_soft_reset? [-Wmissing-prototypes] drivers/gpu/drm/radeon/r600.c:3133:5: warning: no previous prototype for ?r600_ih_ring_alloc? [-Wmissing-prototypes] drivers/gpu/drm/radeon/r600.c:3169:6: warning: no previous prototype for ?r600_ih_ring_fini? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/cik.c |2 -- drivers/gpu/drm/radeon/r600_dma.c |2 -- drivers/gpu/drm/radeon/radeon.h |5 + drivers/gpu/drm/radeon/si.c |2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index b43a3a3..fb5943c 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -62,8 +62,6 @@ MODULE_FIRMWARE("radeon/KABINI_mec.bin"); MODULE_FIRMWARE("radeon/KABINI_rlc.bin"); MODULE_FIRMWARE("radeon/KABINI_sdma.bin"); -extern int r600_ih_ring_alloc(struct radeon_device *rdev); -extern void r600_ih_ring_fini(struct radeon_device *rdev); extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); extern bool evergreen_is_display_hung(struct radeon_device *rdev); diff --git a/drivers/gpu/drm/radeon/r600_dma.c b/drivers/gpu/drm/radeon/r600_dma.c index 7844d15..3e4b6d2 100644 --- a/drivers/gpu/drm/radeon/r600_dma.c +++ b/drivers/gpu/drm/radeon/r600_dma.c @@ -26,8 +26,6 @@ #include "radeon_asic.h" #include "r600d.h" -u32 r600_gpu_check_soft_reset(struct radeon_device *rdev); - /* * DMA * Starting with R600, the GPU has an asynchronous diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index e874392..28414f2 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -100,6 +100,11 @@ extern int radeon_dpm; extern int radeon_aspm; extern int radeon_runtime_pm; +u32 r600_gpu_check_soft_reset(struct radeon_device *rdev); + +void r600_ih_ring_fini(struct radeon_device *rdev); +int r600_ih_ring_alloc(struct radeon_device *rdev); + /* * Copy from radeon_drv.h so we don't have to include both and have conflicting * symbol; diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index a36736d..762c5f6 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c @@ -70,8 +70,6 @@ static void si_pcie_gen3_enable(struct radeon_device *rdev); static void si_program_aspm(struct radeon_device *rdev); extern void sumo_rlc_fini(struct radeon_device *rdev); extern int sumo_rlc_init(struct radeon_device *rdev); -extern int r600_ih_ring_alloc(struct radeon_device *rdev); -extern void r600_ih_ring_fini(struct radeon_device *rdev); extern void evergreen_fix_pci_max_read_req_size(struct radeon_device *rdev); extern void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save); extern void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save); -- 1.7.9.5
[PATCH 29/85] drivers: gpu: Include appropriate header file in radeon_ring.c
Include appropriate header file drivers/gpu/drm/radeon/radeon_asic.h to file drm/radeon/radeon_ring.c because functions radeon_ring_generic_set_wptr(), radeon_ring_generic_get_rptr() and radeon_ring_generic_get_wptr() have their prototype declarations in the header file. This eliminates the following warnings in drm/radeon/radeon_ring.c: drivers/gpu/drm/radeon/radeon_ring.c:335:5: warning: no previous prototype for ?radeon_ring_generic_get_rptr? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_ring.c:348:5: warning: no previous prototype for ?radeon_ring_generic_get_wptr? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_ring.c:358:6: warning: no previous prototype for ?radeon_ring_generic_set_wptr? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_ring.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 9214403..90bc2b1 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -33,6 +33,7 @@ #include "radeon_reg.h" #include "radeon.h" #include "atom.h" +#include "radeon_asic.h" /* * IB -- 1.7.9.5
[PATCH 28/85] drivers: gpu: Mark function as static in radeon_gem.c
Mark function radeon_gem_set_domain() as static in drm/radeon/radeon_gem.c because it is not used outside this file. This eliminates the following warning in drm/radeon/radeon_gem.c: drivers/gpu/drm/radeon/radeon_gem.c:89:5: warning: no previous prototype for ?radeon_gem_set_domain? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_gem.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 805c5e5..b96c819 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -86,7 +86,7 @@ retry: return 0; } -int radeon_gem_set_domain(struct drm_gem_object *gobj, +static int radeon_gem_set_domain(struct drm_gem_object *gobj, uint32_t rdomain, uint32_t wdomain) { struct radeon_bo *robj; -- 1.7.9.5
[PATCH 27/85] drivers: gpu: Include appropriate header file in radeon_clocks.c
Include appropriate header file drivers/gpu/drm/radeon/radeon_asic.h in file drm/radeon/radeon_clocks.c because functions radeon_legacy_get_engine_clock(), radeon_legacy_get_memory_clock() and radeon_legacy_set_engine_clock() have their prototype declarations in the header file. This eliminates the following warnings in drm/radeon/radeon_clocks.c: drivers/gpu/drm/radeon/radeon_clocks.c:35:10: warning: no previous prototype for ?radeon_legacy_get_engine_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_clocks.c:65:10: warning: no previous prototype for ?radeon_legacy_get_memory_clock? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_clocks.c:385:6: warning: no previous prototype for ?radeon_legacy_set_engine_clock? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_clocks.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/radeon_clocks.c b/drivers/gpu/drm/radeon/radeon_clocks.c index 38e396d..08f615f 100644 --- a/drivers/gpu/drm/radeon/radeon_clocks.c +++ b/drivers/gpu/drm/radeon/radeon_clocks.c @@ -30,6 +30,7 @@ #include "radeon_reg.h" #include "radeon.h" #include "atom.h" +#include "radeon_asic.h" /* 10 khz */ uint32_t radeon_legacy_get_engine_clock(struct radeon_device *rdev) -- 1.7.9.5
[PATCH 26/85] drivers: gpu: Include appropriate header file in radeon_legacy_encoders.c
Include appropriate header file drivers/gpu/drm/radeon/radeon_asic.h in drm/radeon/radeon_legacy_encoders.c because functions radeon_legacy_get_backlight_level() and radeon_legacy_set_backlight_level() have their prototype declarations in the header file. This eliminates the following warnings in drm/radeon/radeon_legacy_encoders.c: drivers/gpu/drm/radeon/radeon_legacy_encoders.c:273:1: warning: no previous prototype for ?radeon_legacy_get_backlight_level? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_legacy_encoders.c:286:1: warning: no previous prototype for ?radeon_legacy_set_backlight_level? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_legacy_encoders.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index c89971d..71672b6 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -27,6 +27,7 @@ #include #include #include "radeon.h" +#include "radeon_asic.h" #include "atom.h" #include #ifdef CONFIG_PMAC_BACKLIGHT -- 1.7.9.5
[PATCH 25/85] drivers: gpu: Mark function as static in radeon_object.c
Mark function radeon_bo_clear_va() as static in drm/radeon/radeon_object.c because it is not used outside this file. This eliminates the following warning in drm/radeon/radeon_object.c: drivers/gpu/drm/radeon/radeon_object.c:49:6: warning: no previous prototype for ?radeon_bo_clear_va? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_object.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 2543430..4820cc8 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -44,7 +44,7 @@ static void radeon_bo_clear_surface_reg(struct radeon_bo *bo); * function are calling it. */ -void radeon_bo_clear_va(struct radeon_bo *bo) +static void radeon_bo_clear_va(struct radeon_bo *bo) { struct radeon_bo_va *bo_va, *tmp; -- 1.7.9.5
[PATCH 24/85] drivers: gpu: Move prototype declarations to header file from radeon_object.c
Move prototype declarations of functions from drm/radeon/radeon_object.c to header file drm/radeon/radeon.h because they are used by more than one file. This eliminates the following warning in drm/radeon/radeon_ttm.c: drivers/gpu/drm/radeon/radeon_ttm.c:691:5: warning: no previous prototype for ?radeon_ttm_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_ttm.c:750:6: warning: no previous prototype for ?radeon_ttm_fini? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon.h|3 +++ drivers/gpu/drm/radeon/radeon_object.c |2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index b1f990d..e874392 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -2246,6 +2246,9 @@ void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v); u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index); void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v); +int radeon_ttm_init(struct radeon_device *rdev); +void radeon_ttm_fini(struct radeon_device *rdev); + /* * Cast helper */ diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index c0fa4aa..2543430 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -37,8 +37,6 @@ #include "radeon_trace.h" -int radeon_ttm_init(struct radeon_device *rdev); -void radeon_ttm_fini(struct radeon_device *rdev); static void radeon_bo_clear_surface_reg(struct radeon_bo *bo); /* -- 1.7.9.5
[PATCH 23/85] drivers: gpu: Mark function as static in radeon_kms.c
Mark function radeon_info_ioctl() as static in drm/radeon/radeon_kms.c because it is not used outside this file. This eliminates the following warning in drm/radeon/radeon_kms.c: drivers/gpu/drm/radeon/radeon_kms.c:194:5: warning: no previous prototype for ?radeon_info_ioctl? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_kms.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 55d0b47..03cbb6b 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -191,7 +191,7 @@ static void radeon_set_filp_rights(struct drm_device *dev, * etc. (all asics). * Returns 0 on success, -EINVAL on failure. */ -int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) +static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) { struct radeon_device *rdev = dev->dev_private; struct drm_radeon_info *info = data; -- 1.7.9.5
[PATCH 22/85] drivers: gpu: Mark functions as static in radeon_device.c
Mark functions radeon_doorbell_init() and radeon_doorbell_fini() as static in drm/radeon/radeon_device.c because they are not used outside this file. This eliminates the following warning in drm/radeon/radeon_device.c: drivers/gpu/drm/radeon/radeon_device.c:252:5: warning: no previous prototype for ?radeon_doorbell_init? [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_device.c:281:6: warning: no previous prototype for ?radeon_doorbell_fini? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/radeon/radeon_device.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 39b033b..caf4975 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -249,7 +249,7 @@ void radeon_scratch_free(struct radeon_device *rdev, uint32_t reg) * Init doorbell driver information (CIK) * Returns 0 on success, error on failure. */ -int radeon_doorbell_init(struct radeon_device *rdev) +static int radeon_doorbell_init(struct radeon_device *rdev) { /* doorbell bar mapping */ rdev->doorbell.base = pci_resource_start(rdev->pdev, 2); @@ -278,7 +278,7 @@ int radeon_doorbell_init(struct radeon_device *rdev) * * Tear down doorbell driver information (CIK) */ -void radeon_doorbell_fini(struct radeon_device *rdev) +static void radeon_doorbell_fini(struct radeon_device *rdev) { iounmap(rdev->doorbell.ptr); rdev->doorbell.ptr = NULL; -- 1.7.9.5
[PATCH 21/85] drivers: gpu: Include appropriate header file in r128_ioc32.c
Include appropriate header file drm/r128/r128_drv.h in drm/r128/r128_ioc32.c because function r128_compat_ioctl() has its prototype declaration in the header file. This eliminates the following warning in drm/r128/r128_ioc32.c: drivers/gpu/drm/r128/r128_ioc32.c:196:6: warning: no previous prototype for ?r128_compat_ioctl? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/r128/r128_ioc32.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/r128/r128_ioc32.c b/drivers/gpu/drm/r128/r128_ioc32.c index a954c54..b0d0fd3 100644 --- a/drivers/gpu/drm/r128/r128_ioc32.c +++ b/drivers/gpu/drm/r128/r128_ioc32.c @@ -33,6 +33,7 @@ #include #include +#include "r128_drv.h" typedef struct drm_r128_init32 { int func; -- 1.7.9.5
[PATCH 20/85] drivers: gpu: Mark function as static in qxl_kms.c
Mark function qxl_device_init() as static in drm/qxl/qxl_kms.c because it is not used outside this file. This eliminates the following warning in drm/qxl/qxl_kms.c: drivers/gpu/drm/qxl/qxl_kms.c:118:5: warning: no previous prototype for ?qxl_device_init? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/qxl/qxl_kms.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index e5ca498..fd88eb4 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -115,7 +115,7 @@ static void qxl_gc_work(struct work_struct *work) qxl_garbage_collect(qdev); } -int qxl_device_init(struct qxl_device *qdev, +static int qxl_device_init(struct qxl_device *qdev, struct drm_device *ddev, struct pci_dev *pdev, unsigned long flags) -- 1.7.9.5
[PATCH 19/85] drivers: gpu: Include appropriate header file in overlay.c
Include appropriate header file drm/nouveau/dispnv04/disp.h in drm/nouveau/dispnv04/overlay.c because function nouveau_overlay_init() has its prototype declaration in the header file. This eliminates the following warning in drm/nouveau/dispnv04/overlay.c: drivers/gpu/drm/nouveau/dispnv04/overlay.c:335:1: warning: no previous prototype for ?nouveau_overlay_init? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/nouveau/dispnv04/overlay.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c b/drivers/gpu/drm/nouveau/dispnv04/overlay.c index 32e7064..178044b 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c +++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c @@ -33,6 +33,7 @@ #include "nouveau_connector.h" #include "nouveau_display.h" #include "nvreg.h" +#include "disp.h" struct nouveau_plane { -- 1.7.9.5
[PATCH 18/85] drivers: gpu: Mark function as static in nv10_fence.c
Mark function nv10_fence_context_new() as static in drm/nouveau/nv10_fence.c because it is not used outside this file. This eliminates the following warning in drm/nouveau/nv10_fence.c: drivers/gpu/drm/nouveau/nv10_fence.c:69:1: warning: no previous prototype for ?nv10_fence_context_new? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/nouveau/nv10_fence.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c index 06f434f..b5de158 100644 --- a/drivers/gpu/drm/nouveau/nv10_fence.c +++ b/drivers/gpu/drm/nouveau/nv10_fence.c @@ -65,7 +65,7 @@ nv10_fence_context_del(struct nouveau_channel *chan) kfree(fctx); } -int +static int nv10_fence_context_new(struct nouveau_channel *chan) { struct nv10_fence_chan *fctx; -- 1.7.9.5
[PATCH 17/85] drivers: gpu: Mark function as static in base.c
Mark function nouveau_perfsig_find() as static in drm/nouveau/core/engine/perfmon/base.c because it is not used outside this file. This eliminates the following warning in drm/nouveau/core/engine/perfmon/base.c: drivers/gpu/drm/nouveau/core/engine/perfmon/base.c:59:1: warning: no previous prototype for ?nouveau_perfsig_find? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/nouveau/core/engine/perfmon/base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c b/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c index e9c5e51..1778c96 100644 --- a/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c @@ -55,7 +55,7 @@ nouveau_perfsig_find_(struct nouveau_perfdom *dom, const char *name, u32 size) return NULL; } -struct nouveau_perfsig * +static struct nouveau_perfsig * nouveau_perfsig_find(struct nouveau_perfmon *ppm, const char *name, u32 size, struct nouveau_perfdom **pdom) { -- 1.7.9.5
[PATCH 16/85] drivers: gpu: Mark functions as static in nvc0.c
Mark functions nvc0_graph_init_fw() and nvc0_graph_ctor_fw() as static in drm/nouveau/core/engine/graph/nvc0.c because they are not used outside this file. This eliminates the following warning in drm/nouveau/core/engine/graph/nvc0.c: drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c:756:1: warning: no previous prototype for ?nvc0_graph_init_fw? [-Wmissing-prototypes] drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c:1082:1: warning: no previous prototype for ?nvc0_graph_ctor_fw? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c index 434bb4b..8d895a9 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c @@ -752,7 +752,7 @@ nvc0_graph_intr(struct nouveau_subdev *subdev) nouveau_engctx_put(engctx); } -void +static void nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base, struct nvc0_graph_fuc *code, struct nvc0_graph_fuc *data) { @@ -1078,7 +1078,7 @@ nvc0_graph_dtor_fw(struct nvc0_graph_fuc *fuc) fuc->data = NULL; } -int +static int nvc0_graph_ctor_fw(struct nvc0_graph_priv *priv, const char *fwname, struct nvc0_graph_fuc *fuc) { -- 1.7.9.5
[PATCH 15/85] drivers: gpu: Mark function as static in ctxnvd7.c
Mark function nvd7_grctx_generate_main() as static in drm/nouveau/core/engine/graph/ctxnvd7.c because it is not used outside this file. This eliminates the following warning in drm/nouveau/core/engine/graph/ctxnvd7.c: drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c:215:1: warning: no previous prototype for ?nvd7_grctx_generate_main? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- .../gpu/drm/nouveau/core/engine/graph/ctxnvd7.c|2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c index c4740d5..0e126ce 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c @@ -211,7 +211,7 @@ nvd7_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) mmio_list(0x17e91c, 0x03060609, 0, 0); /* different from kepler */ } -void +static void nvd7_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) { struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; -- 1.7.9.5
[PATCH 14/85] drivers: gpu: Mark function as static in nv94.c
Mark function nv94_aux() as static in drm/nouveau/core/subdev/i2c/nv94.c because it is not used outside this file. This eliminates the following warning in drm/nouveau/core/subdev/i2c/nv94.c: drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c:72:1: warning: no previous prototype for ?nv94_aux? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c index df6d3e4..67c5622 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c +++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c @@ -68,7 +68,7 @@ auxch_init(struct nouveau_i2c *aux, int ch) return 0; } -int +static int nv94_aux(struct nouveau_i2c_port *base, u8 type, u32 addr, u8 *data, u8 size) { struct nouveau_i2c *aux = nouveau_i2c(base); -- 1.7.9.5
[PATCH 13/85] drivers: gpu: Mark functions as static and remove unused function in nve0.c
Mark functions nve0_gpio_intr(), nve0_gpio_intr_enable(), nve0_gpio_intr_disable(), nve0_gpio_fini() and nve0_gpio_init() as static in drm/nouveau/core/subdev/gpio/nve0.c because they are not used outside this file. Remove unused function nve0_gpio_dtor() from file drm/nouveau/core/subdev/gpio/nve0.c. This eliminates the following warnings in drm/nouveau/core/subdev/gpio/nve0.c: drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c:32:1: warning: no previous prototype for ?nve0_gpio_intr? [-Wmissing-prototypes] drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c:51:1: warning: no previous prototype for ?nve0_gpio_intr_enable? [-Wmissing-prototypes] drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c:60:1: warning: no previous prototype for ?nve0_gpio_intr_disable? [-Wmissing-prototypes] drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c:69:1: warning: no previous prototype for ?nve0_gpio_fini? [-Wmissing-prototypes] drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c:78:1: warning: no previous prototype for ?nve0_gpio_init? [-Wmissing-prototypes] drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c:93:1: warning: no previous prototype for ?nve0_gpio_dtor? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c index 16b8c5b..428374a 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c +++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/nve0.c @@ -28,7 +28,7 @@ struct nve0_gpio_priv { struct nouveau_gpio base; }; -void +static void nve0_gpio_intr(struct nouveau_subdev *subdev) { struct nve0_gpio_priv *priv = (void *)subdev; @@ -47,7 +47,7 @@ nve0_gpio_intr(struct nouveau_subdev *subdev) nv_wr32(priv, 0xdc88, intr1); } -void +static void nve0_gpio_intr_enable(struct nouveau_event *event, int line) { const u32 addr = line < 16 ? 0xdc00 : 0xdc80; @@ -56,7 +56,7 @@ nve0_gpio_intr_enable(struct nouveau_event *event, int line) nv_mask(event->priv, addr + 0x00, mask, mask); } -void +static void nve0_gpio_intr_disable(struct nouveau_event *event, int line) { const u32 addr = line < 16 ? 0xdc00 : 0xdc80; @@ -65,7 +65,7 @@ nve0_gpio_intr_disable(struct nouveau_event *event, int line) nv_mask(event->priv, addr + 0x00, mask, 0x); } -int +static int nve0_gpio_fini(struct nouveau_object *object, bool suspend) { struct nve0_gpio_priv *priv = (void *)object; @@ -74,7 +74,7 @@ nve0_gpio_fini(struct nouveau_object *object, bool suspend) return nouveau_gpio_fini(>base, suspend); } -int +static int nve0_gpio_init(struct nouveau_object *object) { struct nve0_gpio_priv *priv = (void *)object; @@ -89,13 +89,6 @@ nve0_gpio_init(struct nouveau_object *object) return 0; } -void -nve0_gpio_dtor(struct nouveau_object *object) -{ - struct nve0_gpio_priv *priv = (void *)object; - nouveau_gpio_destroy(>base); -} - static int nve0_gpio_ctor(struct nouveau_object *parent, struct nouveau_object *engine, struct nouveau_oclass *oclass, void *data, u32 size, -- 1.7.9.5
[PATCH 12/85] drivers: gpu: Mark functions as static in mgag200_ttm.c
Mark functions mgag200_ttm_global_release(), mgag200_ttm_bo_is_mgag200_bo() and mgag200_ttm_tt_create() as static in drm/mgag200/mgag200_ttm.c because they are not used outside this file. This eliminates the following warning in drm/mgag200/mgag200_ttm.c: drivers/gpu/drm/mgag200/mgag200_ttm.c:84:1: warning: no previous prototype for ?mgag200_ttm_global_release? [-Wmissing-prototypes] drivers/gpu/drm/mgag200/mgag200_ttm.c:105:6: warning: no previous prototype for ?mgag200_ttm_bo_is_mgag200_bo? [-Wmissing-prototypes] drivers/gpu/drm/mgag200/mgag200_ttm.c:211:16: warning: no previous prototype for ?mgag200_ttm_tt_create? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/mgag200/mgag200_ttm.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c index 07b192f..adb5166 100644 --- a/drivers/gpu/drm/mgag200/mgag200_ttm.c +++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c @@ -80,7 +80,7 @@ static int mgag200_ttm_global_init(struct mga_device *ast) return 0; } -void +static void mgag200_ttm_global_release(struct mga_device *ast) { if (ast->ttm.mem_global_ref.release == NULL) @@ -102,7 +102,7 @@ static void mgag200_bo_ttm_destroy(struct ttm_buffer_object *tbo) kfree(bo); } -bool mgag200_ttm_bo_is_mgag200_bo(struct ttm_buffer_object *bo) +static bool mgag200_ttm_bo_is_mgag200_bo(struct ttm_buffer_object *bo) { if (bo->destroy == _bo_ttm_destroy) return true; @@ -208,7 +208,7 @@ static struct ttm_backend_func mgag200_tt_backend_func = { }; -struct ttm_tt *mgag200_ttm_tt_create(struct ttm_bo_device *bdev, +static struct ttm_tt *mgag200_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, uint32_t page_flags, struct page *dummy_read_page) { -- 1.7.9.5
[PATCH 11/85] drivers: gpu: Mark functions as static in mgag200_mode.c
Mark functions mga_set_start_address(), mga_encoder_destroy() and mga_connector_best_encoder() as static in drm/mgag200/mgag200_mode.c because they are not used outside this file. This eliminates the following warnings in drm/mgag200/mgag200_mode.c: drivers/gpu/drm/mgag200/mgag200_mode.c:694:6: warning: no previous prototype for ?mga_set_start_address? [-Wmissing-prototypes] drivers/gpu/drm/mgag200/mgag200_mode.c:1401:6: warning: no previous prototype for ?mga_encoder_destroy? [-Wmissing-prototypes] drivers/gpu/drm/mgag200/mgag200_mode.c:1561:21: warning: no previous prototype for ?mga_connector_best_encoder? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/mgag200/mgag200_mode.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index ee6ed63..b8583f2 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -691,7 +691,7 @@ static void mga_g200wb_commit(struct drm_crtc *crtc) CRTCEXT0 has to be programmed last to trigger an update and make the new addr variable take effect. */ -void mga_set_start_address(struct drm_crtc *crtc, unsigned offset) +static void mga_set_start_address(struct drm_crtc *crtc, unsigned offset) { struct mga_device *mdev = crtc->dev->dev_private; u32 addr; @@ -1398,7 +1398,7 @@ static void mga_encoder_commit(struct drm_encoder *encoder) { } -void mga_encoder_destroy(struct drm_encoder *encoder) +static void mga_encoder_destroy(struct drm_encoder *encoder) { struct mga_encoder *mga_encoder = to_mga_encoder(encoder); drm_encoder_cleanup(encoder); @@ -1558,7 +1558,7 @@ static int mga_vga_mode_valid(struct drm_connector *connector, return MODE_OK; } -struct drm_encoder *mga_connector_best_encoder(struct drm_connector +static struct drm_encoder *mga_connector_best_encoder(struct drm_connector *connector) { int enc_id = connector->encoder_ids[0]; -- 1.7.9.5
[PATCH 10/85] drivers: gpu: Mark function as static in mgag200_main.c
Mark function mgag200_bo_unref() as static in drm/mgag200/mgag200_main.c because it is not used outside this file. This eliminates the following warning in drm/mgag200/mgag200_main.c: drivers/gpu/drm/mgag200/mgag200_main.c:313:6: warning: no previous prototype for ?mgag200_bo_unref? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/mgag200/mgag200_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index b1120cb..a1bfe72 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -310,7 +310,7 @@ int mgag200_dumb_create(struct drm_file *file, return 0; } -void mgag200_bo_unref(struct mgag200_bo **bo) +static void mgag200_bo_unref(struct mgag200_bo **bo) { struct ttm_buffer_object *tbo; -- 1.7.9.5
[PATCH 09/85] drivers: gpu: Include appropriate header file in mga_ioc32.c
Include appropriate header file drivers/gpu/drm/mga/mga_drv.h in drm/mga/mga_ioc32.c because function mga_compat_ioctl() has its prototype declaration in the header file. This eliminates the following warning in drm/mga/mga_ioc32.c: drivers/gpu/drm/mga/mga_ioc32.c:207:6: warning: no previous prototype for ?mga_compat_ioctl? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/mga/mga_ioc32.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mga/mga_ioc32.c b/drivers/gpu/drm/mga/mga_ioc32.c index 709e90d..86b4bb8 100644 --- a/drivers/gpu/drm/mga/mga_ioc32.c +++ b/drivers/gpu/drm/mga/mga_ioc32.c @@ -34,6 +34,7 @@ #include #include +#include "mga_drv.h" typedef struct drm32_mga_init { int func; -- 1.7.9.5
[PATCH 08/85] drivers: gpu: Mark function as static in cdv_intel_dp.c
Mark function cdv_intel_fixed_panel_mode() as static in drm/gma500/cdv_intel_dp.c because it is not used outside this file. This eliminates the following warning in drm/gma500/cdv_intel_dp.c: drivers/gpu/drm/gma500/cdv_intel_dp.c:680:6: warning: no previous prototype for ?cdv_intel_fixed_panel_mode? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/gma500/cdv_intel_dp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c index f88a181..36975bd 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_dp.c +++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c @@ -677,7 +677,7 @@ cdv_intel_dp_i2c_init(struct gma_connector *connector, return ret; } -void cdv_intel_fixed_panel_mode(struct drm_display_mode *fixed_mode, +static void cdv_intel_fixed_panel_mode(struct drm_display_mode *fixed_mode, struct drm_display_mode *adjusted_mode) { adjusted_mode->hdisplay = fixed_mode->hdisplay; -- 1.7.9.5
[PATCH 07/85] drivers: gpu: Mark functions as static and remove unused function in cirrus_ttm.c
Mark functions cirrus_ttm_global_release(), cirrus_ttm_bo_is_cirrus_bo() and cirrus_ttm_tt_create() as static in drm/cirrus/cirrus_ttm.c because they are not used outside this file. Remove unused function cirrus_bo_unpin() from drm/cirrus/cirrus_ttm.c. This eliminates the following warnings in drm/cirrus/cirrus_ttm.c: drivers/gpu/drm/cirrus/cirrus_ttm.c:84:1: warning: no previous prototype for ?cirrus_ttm_global_release? [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_ttm.c:105:6: warning: no previous prototype for ?cirrus_ttm_bo_is_cirrus_bo? [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_ttm.c:211:16: warning: no previous prototype for ?cirrus_ttm_tt_create? [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_ttm.c:378:5: warning: no previous prototype for ?cirrus_bo_unpin? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/cirrus/cirrus_ttm.c | 26 +++--- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 75becde..8b37c25 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -80,7 +80,7 @@ static int cirrus_ttm_global_init(struct cirrus_device *cirrus) return 0; } -void +static void cirrus_ttm_global_release(struct cirrus_device *cirrus) { if (cirrus->ttm.mem_global_ref.release == NULL) @@ -102,7 +102,7 @@ static void cirrus_bo_ttm_destroy(struct ttm_buffer_object *tbo) kfree(bo); } -bool cirrus_ttm_bo_is_cirrus_bo(struct ttm_buffer_object *bo) +static bool cirrus_ttm_bo_is_cirrus_bo(struct ttm_buffer_object *bo) { if (bo->destroy == _bo_ttm_destroy) return true; @@ -208,7 +208,7 @@ static struct ttm_backend_func cirrus_tt_backend_func = { }; -struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev, +static struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, uint32_t page_flags, struct page *dummy_read_page) { @@ -375,26 +375,6 @@ int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr) return 0; } -int cirrus_bo_unpin(struct cirrus_bo *bo) -{ - int i, ret; - if (!bo->pin_count) { - DRM_ERROR("unpin bad %p\n", bo); - return 0; - } - bo->pin_count--; - if (bo->pin_count) - return 0; - - for (i = 0; i < bo->placement.num_placement ; i++) - bo->placements[i] &= ~TTM_PL_FLAG_NO_EVICT; - ret = ttm_bo_validate(>bo, >placement, false, false); - if (ret) - return ret; - - return 0; -} - int cirrus_bo_push_sysram(struct cirrus_bo *bo) { int i, ret; -- 1.7.9.5
[PATCH 06/85] drivers: gpu: Mark functions as static in cirrus_mode.c
Mark functions cirrus_set_start_address(), cirrus_encoder_destroy(), cirrus_vga_get_modes() and cirrus_connector_best_encoder() as static in drm/cirrus/cirrus_mode.c because they are not used outside this file. This eliminates the following warnings in drm/cirrus/cirrus_mode.c: drivers/gpu/drm/cirrus/cirrus_mode.c:105:6: warning: no previous prototype for ?cirrus_set_start_address? [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_mode.c:456:6: warning: no previous prototype for ?cirrus_encoder_destroy? [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_mode.c:495:5: warning: no previous prototype for ?cirrus_vga_get_modes? [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_mode.c:512:21: warning: no previous prototype for ?cirrus_connector_best_encoder? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/cirrus/cirrus_mode.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index adabc3d..58dd900 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -102,7 +102,7 @@ static bool cirrus_crtc_mode_fixup(struct drm_crtc *crtc, return true; } -void cirrus_set_start_address(struct drm_crtc *crtc, unsigned offset) +static void cirrus_set_start_address(struct drm_crtc *crtc, unsigned offset) { struct cirrus_device *cdev = crtc->dev->dev_private; u32 addr; @@ -453,7 +453,7 @@ static void cirrus_encoder_commit(struct drm_encoder *encoder) { } -void cirrus_encoder_destroy(struct drm_encoder *encoder) +static void cirrus_encoder_destroy(struct drm_encoder *encoder) { struct cirrus_encoder *cirrus_encoder = to_cirrus_encoder(encoder); drm_encoder_cleanup(encoder); @@ -492,7 +492,7 @@ static struct drm_encoder *cirrus_encoder_init(struct drm_device *dev) } -int cirrus_vga_get_modes(struct drm_connector *connector) +static int cirrus_vga_get_modes(struct drm_connector *connector) { int count; @@ -509,7 +509,7 @@ static int cirrus_vga_mode_valid(struct drm_connector *connector, return MODE_OK; } -struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector +static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector *connector) { int enc_id = connector->encoder_ids[0]; -- 1.7.9.5
[PATCH 05/85] drivers: gpu: Mark function as static in cirrus_main.c
Mark function cirrus_bo_unref() as static in drm/cirrus/cirrus_main.c because it is not used outside this file. This eliminates the following warning in drm/cirrus/cirrus_main.c: drivers/gpu/drm/cirrus/cirrus_main.c:258:6: warning: no previous prototype for ?cirrus_bo_unref? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/cirrus/cirrus_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_main.c b/drivers/gpu/drm/cirrus/cirrus_main.c index 78e76f2..4b0170c 100644 --- a/drivers/gpu/drm/cirrus/cirrus_main.c +++ b/drivers/gpu/drm/cirrus/cirrus_main.c @@ -255,7 +255,7 @@ int cirrus_dumb_create(struct drm_file *file, return 0; } -void cirrus_bo_unref(struct cirrus_bo **bo) +static void cirrus_bo_unref(struct cirrus_bo **bo) { struct ttm_buffer_object *tbo; -- 1.7.9.5
[PATCH 04/85] drivers: gpu: Mark functions as static in ast_ttm.c
Mark functions ast_ttm_global_release(), ast_ttm_bo_is_ast_bo() and ast_ttm_tt_create() as static in drm/ast/ast_ttm.c because they are not used outside this file. This eliminates the following warnings in drm/ast/ast_ttm.c: drivers/gpu/drm/ast/ast_ttm.c:84:1: warning: no previous prototype for ?ast_ttm_global_release? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_ttm.c:105:6: warning: no previous prototype for ?ast_ttm_bo_is_ast_bo? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_ttm.c:211:16: warning: no previous prototype for ?ast_ttm_tt_create? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/ast/ast_ttm.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_ttm.c b/drivers/gpu/drm/ast/ast_ttm.c index 32aecb3..4ea9b17 100644 --- a/drivers/gpu/drm/ast/ast_ttm.c +++ b/drivers/gpu/drm/ast/ast_ttm.c @@ -80,7 +80,7 @@ static int ast_ttm_global_init(struct ast_private *ast) return 0; } -void +static void ast_ttm_global_release(struct ast_private *ast) { if (ast->ttm.mem_global_ref.release == NULL) @@ -102,7 +102,7 @@ static void ast_bo_ttm_destroy(struct ttm_buffer_object *tbo) kfree(bo); } -bool ast_ttm_bo_is_ast_bo(struct ttm_buffer_object *bo) +static bool ast_ttm_bo_is_ast_bo(struct ttm_buffer_object *bo) { if (bo->destroy == _bo_ttm_destroy) return true; @@ -208,7 +208,7 @@ static struct ttm_backend_func ast_tt_backend_func = { }; -struct ttm_tt *ast_ttm_tt_create(struct ttm_bo_device *bdev, +static struct ttm_tt *ast_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, uint32_t page_flags, struct page *dummy_read_page) { -- 1.7.9.5
[PATCH 03/85] drivers: gpu: Mark functions as static in ast_mode.c
Mark functions ast_set_sync_reg(), ast_set_dac_reg(), ast_set_start_address_crt1(), ast_crtc_init(), ast_encoder_init(), ast_connector_init(), ast_cursor_init(), ast_cursor_fini(), ast_show_cursor() and ast_hide_cursor() as static in drm/ast/ast_mode.c because they are not used outside this file. This eliminates the following warning in drm/ast/ast_mode.c: drivers/gpu/drm/ast/ast_mode.c:407:6: warning: no previous prototype for ?ast_set_sync_reg? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:418:6: warning: no previous prototype for ?ast_set_dac_reg? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:430:6: warning: no previous prototype for ?ast_set_start_address_crt1? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:626:5: warning: no previous prototype for ?ast_crtc_init? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:713:5: warning: no previous prototype for ?ast_encoder_init? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:780:5: warning: no previous prototype for ?ast_connector_init? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:813:5: warning: no previous prototype for ?ast_cursor_init? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:850:6: warning: no previous prototype for ?ast_cursor_fini? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:968:6: warning: no previous prototype for ?ast_show_cursor? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_mode.c:979:6: warning: no previous prototype for ?ast_hide_cursor? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/ast/ast_mode.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 7fc9f72..cca063b 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -404,7 +404,7 @@ static void ast_set_ext_reg(struct drm_crtc *crtc, struct drm_display_mode *mode } } -void ast_set_sync_reg(struct drm_device *dev, struct drm_display_mode *mode, +static void ast_set_sync_reg(struct drm_device *dev, struct drm_display_mode *mode, struct ast_vbios_mode_info *vbios_mode) { struct ast_private *ast = dev->dev_private; @@ -415,7 +415,7 @@ void ast_set_sync_reg(struct drm_device *dev, struct drm_display_mode *mode, ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg); } -bool ast_set_dac_reg(struct drm_crtc *crtc, struct drm_display_mode *mode, +static bool ast_set_dac_reg(struct drm_crtc *crtc, struct drm_display_mode *mode, struct ast_vbios_mode_info *vbios_mode) { switch (crtc->fb->bits_per_pixel) { @@ -427,7 +427,7 @@ bool ast_set_dac_reg(struct drm_crtc *crtc, struct drm_display_mode *mode, return true; } -void ast_set_start_address_crt1(struct drm_crtc *crtc, unsigned offset) +static void ast_set_start_address_crt1(struct drm_crtc *crtc, unsigned offset) { struct ast_private *ast = crtc->dev->dev_private; u32 addr; @@ -623,7 +623,7 @@ static const struct drm_crtc_funcs ast_crtc_funcs = { .destroy = ast_crtc_destroy, }; -int ast_crtc_init(struct drm_device *dev) +static int ast_crtc_init(struct drm_device *dev) { struct ast_crtc *crtc; int i; @@ -710,7 +710,7 @@ static const struct drm_encoder_helper_funcs ast_enc_helper_funcs = { .mode_set = ast_encoder_mode_set, }; -int ast_encoder_init(struct drm_device *dev) +static int ast_encoder_init(struct drm_device *dev) { struct ast_encoder *ast_encoder; @@ -777,7 +777,7 @@ static const struct drm_connector_funcs ast_connector_funcs = { .destroy = ast_connector_destroy, }; -int ast_connector_init(struct drm_device *dev) +static int ast_connector_init(struct drm_device *dev) { struct ast_connector *ast_connector; struct drm_connector *connector; @@ -810,7 +810,7 @@ int ast_connector_init(struct drm_device *dev) } /* allocate cursor cache and pin at start of VRAM */ -int ast_cursor_init(struct drm_device *dev) +static int ast_cursor_init(struct drm_device *dev) { struct ast_private *ast = dev->dev_private; int size; @@ -847,7 +847,7 @@ fail: return ret; } -void ast_cursor_fini(struct drm_device *dev) +static void ast_cursor_fini(struct drm_device *dev) { struct ast_private *ast = dev->dev_private; ttm_bo_kunmap(>cache_kmap); @@ -965,7 +965,7 @@ static void ast_i2c_destroy(struct ast_i2c_chan *i2c) kfree(i2c); } -void ast_show_cursor(struct drm_crtc *crtc) +static void ast_show_cursor(struct drm_crtc *crtc) { struct ast_private *ast = crtc->dev->dev_private; u8 jreg; @@ -976,7 +976,7 @@ void ast_show_cursor(struct drm_crtc *crtc) ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, jreg); } -void ast_hide_cursor(struct drm_crtc *crtc) +static void ast_hide_cursor(struct drm_crtc *crtc) {
[PATCH 02/85] drivers: gpu: Mark function as static and remove unused function in ast_main.c
Mark function ast_bo_unref() as static because it is not used outside file ast_main.c and remove unused function ast_get_max_dclk() in ast_main.c. This eliminates the following warning in drm/ast/ast_main.c: drivers/gpu/drm/ast/ast_main.c:192:10: warning: no previous prototype for ?ast_get_max_dclk? [-Wmissing-prototypes] drivers/gpu/drm/ast/ast_main.c:452:6: warning: no previous prototype for ?ast_bo_unref? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/ast/ast_main.c | 49 +--- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index af0b868..50535fd 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -189,53 +189,6 @@ static int ast_get_dram_info(struct drm_device *dev) return 0; } -uint32_t ast_get_max_dclk(struct drm_device *dev, int bpp) -{ - struct ast_private *ast = dev->dev_private; - uint32_t dclk, jreg; - uint32_t dram_bus_width, mclk, dram_bandwidth, actual_dram_bandwidth, dram_efficency = 500; - - dram_bus_width = ast->dram_bus_width; - mclk = ast->mclk; - - if (ast->chip == AST2100 || - ast->chip == AST1100 || - ast->chip == AST2200 || - ast->chip == AST2150 || - ast->dram_bus_width == 16) - dram_efficency = 600; - else if (ast->chip == AST2300) - dram_efficency = 400; - - dram_bandwidth = mclk * dram_bus_width * 2 / 8; - actual_dram_bandwidth = dram_bandwidth * dram_efficency / 1000; - - if (ast->chip == AST1180) - dclk = actual_dram_bandwidth / ((bpp + 1) / 8); - else { - jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd0, 0xff); - if ((jreg & 0x08) && (ast->chip == AST2000)) - dclk = actual_dram_bandwidth / ((bpp + 1 + 16) / 8); - else if ((jreg & 0x08) && (bpp == 8)) - dclk = actual_dram_bandwidth / ((bpp + 1 + 24) / 8); - else - dclk = actual_dram_bandwidth / ((bpp + 1) / 8); - } - - if (ast->chip == AST2100 || - ast->chip == AST2200 || - ast->chip == AST2300 || - ast->chip == AST1180) { - if (dclk > 200) - dclk = 200; - } else { - if (dclk > 165) - dclk = 165; - } - - return dclk; -} - static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb) { struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb); @@ -449,7 +402,7 @@ int ast_dumb_create(struct drm_file *file, return 0; } -void ast_bo_unref(struct ast_bo **bo) +static void ast_bo_unref(struct ast_bo **bo) { struct ttm_buffer_object *tbo; -- 1.7.9.5
[PATCH 01/85] drivers: gpu: Include appropriate header file in drm_usb.c
Include appropriate header file include/drm/drm_usb.h in drm/drm_usb.c because functions drm_get_usb_dev(), drm_usb_init() and drm_usb_exit() have their prototype declarations in the header file. This eliminates the following warning in drm/drm_usb.c: drivers/gpu/drm/drm_usb.c:5:5: warning: no previous prototype for ?drm_get_usb_dev? [-Wmissing-prototypes] drivers/gpu/drm/drm_usb.c:61:5: warning: no previous prototype for ?drm_usb_init? [-Wmissing-prototypes] drivers/gpu/drm/drm_usb.c:75:6: warning: no previous prototype for ?drm_usb_exit? [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/drm_usb.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_usb.c b/drivers/gpu/drm/drm_usb.c index b179b70..7b8068b 100644 --- a/drivers/gpu/drm/drm_usb.c +++ b/drivers/gpu/drm/drm_usb.c @@ -1,4 +1,5 @@ #include +#include #include #include -- 1.7.9.5
Doubt in gpu driver
Hello, I am trying to eliminate missing-prototypes warnings for drivers/gpu/. I noticed that radeon_reg.h and radeon_drv.h conflict due to incompatible definitions therefore making it difficult to add both the headers in a single file. If it is included, then it throws the following error: drivers/gpu/drm/radeon/radeon_drv.h:849:0: warning: "RADEON_RB3D_DSTCACHE_CTLSTAT" redefined [enabled by default] drivers/gpu/drm/radeon/radeon_reg.h:1627:0: note: this is the location of the previous definition drivers/gpu/drm/radeon/radeon_drv.h:1057:0: warning: "R300_CP_RESYNC_ADDR" redefined [enabled by default] drivers/gpu/drm/radeon/radeon_reg.h:3342:0: note: this is the location of the previous definition drivers/gpu/drm/radeon/radeon_drv.h:1058:0: warning: "R300_CP_RESYNC_DATA" redefined [enabled by default] drivers/gpu/drm/radeon/radeon_reg.h:3343:0: note: this is the location of the previous definition I am therefore not able to add prototypes to radeon.h (which includes radeon_reg.h) or radeon_drv.h if a file that needs to include one already includes the other. For eg. If I add the prototype declaration of function r600_cs_legacy_get_tiling_conf to either header file radeon.h or radeon_drv.h, then I have to add the corresponding header file to r600_cp.c or r600_cs.c. Hence, either r600_cp.c or r600_cs.c would end up including both. I wanted to confirm whether it will be fine to remove the redundant and conflicting definitions from either radeon_reg.h or radeon_drv.h or atleast make the definitions match so that the compiler does not complain. Thanks, -- Rashika Kheria B.Tech CSE IIIT Hyderabad