drm: qxl: Deadcoding
Subsystems (4)
cover drm: qxl: Deadcoding
From: "Dr. David Alan Gilbert" <[email protected]>
Hi,
A couple of small deadcodings for qxl. The first
just cleans up a couple of trivial unusued wrappers. The second cleans out some debugfs code that's been unused for a few years.
Dave
Dr. David Alan Gilbert (2):
drm: qxl: Remove dead qxl_io_flush_* functions
drm: qxl: Remove unused debugfs code
drivers/gpu/drm/qxl/qxl_cmd.c | 10 ---------- drivers/gpu/drm/qxl/qxl_debugfs.c | 29 ----------------------------- drivers/gpu/drm/qxl/qxl_drv.h | 12 ------------ 3 files changed, 51 deletions(-)
Signature · 1 line
2.49.0
PATCH 2/2 drm: qxl: Remove unused debugfs code
From: "Dr. David Alan Gilbert" <[email protected]>
qxl_debugfs_add_files() has been unused since 2022's
commit d0719e09264b ("drm/qxl: Use TTM builtin resource manager debugfs code")
Remove it.
This now leaves the debugfs_count and debugfs members of struct qxl_device unused. Remove them.
QXL_DEBUGFS_MAX_COMPONENTS was only used as the size of the debugfs[] array. Remove it.
--- drivers/gpu/drm/qxl/qxl_debugfs.c | 29 ----------------------------- drivers/gpu/drm/qxl/qxl_drv.h | 10 ---------- 2 files changed, 39 deletions(-)
drivers/gpu/drm/qxl/qxl_debugfs.c +0 -29
@@ -95,32 +95,3 @@ qxl_debugfs_init(struct drm_minor *minor)qxl_ttm_debugfs_init (dev);#endif } - -void qxl_debugfs_add_files (struct qxl_device *qdev, -struct drm_info_list *files, -unsigned int nfiles) -{ -unsigned int i; - -for (i =0 ; i < qdev->debugfs_count; i++) { -if (qdev->debugfs[i].files == files) { -/* Already registered */ -return ; - } - } - - i = qdev->debugfs_count +1 ; -if (i >QXL_DEBUGFS_MAX_COMPONENTS ) { -DRM_ERROR ("Reached maximum number of debugfs components.\n" ); -DRM_ERROR ("Report so we increase QXL_DEBUGFS_MAX_COMPONENTS.\n" ); -return ; - } - qdev->debugfs[qdev->debugfs_count].files = files; - qdev->debugfs[qdev->debugfs_count].num_files = nfiles; - qdev->debugfs_count = i; -#if defined(CONFIG_DEBUG_FS ) -drm_debugfs_create_files (files, nfiles, - qdev->ddev.primary->debugfs_root, - qdev->ddev.primary); -#endif -}
drivers/gpu/drm/qxl/qxl_drv.h +0 -10
@@ -59,8 +59,6 @@ struct iosys_map;#define DRIVER_MINOR 1#define DRIVER_PATCHLEVEL 0 -#define QXL_DEBUGFS_MAX_COMPONENTS 32 -extern int qxl_num_crtc;#define QXL_INTERRUPT_MASK (\
@@ -227,10 +225,6 @@ struct qxl_device {wait_queue_head_t io_cmd_event;struct work_struct client_monitors_config_work; -/* debugfs */ -struct qxl_debugfs debugfs[QXL_DEBUGFS_MAX_COMPONENTS ]; -unsigned int debugfs_count; -struct mutex update_area_mutex;struct idr surf_id_idr;
@@ -423,10 +417,6 @@ void qxl_gem_prime_vunmap(struct drm_gem_object *obj,/* qxl_irq.c */ int qxl_irq_init (struct qxl_device *qdev); -void qxl_debugfs_add_files (struct qxl_device *qdev, -struct drm_info_list *files, -unsigned int nfiles); -int qxl_surface_id_alloc (struct qxl_device *qdev,struct qxl_bo *surf); void qxl_surface_id_dealloc(struct qxl_device *qdev,
Signature · 1 line
2.49.0
PATCH 1/2 drm: qxl: Remove dead qxl_io_flush_* functions
In reply to [email protected]From: "Dr. David Alan Gilbert" <[email protected]>
qxl_io_flush_release() and qxl_io_flush_surfaces() were both added in 2013's
commit f64122c1f6ad ("drm: add new QXL driver. (v1.4)")
but have remained unused. Remove them.
--- drivers/gpu/drm/qxl/qxl_cmd.c | 10 ---------- drivers/gpu/drm/qxl/qxl_drv.h | 2 -- 2 files changed, 12 deletions(-)
drivers/gpu/drm/qxl/qxl_cmd.c +0 -10
@@ -356,16 +356,6 @@ void qxl_io_notify_oom(struct qxl_device *qdev)outb (0 , qdev->io_base +QXL_IO_NOTIFY_OOM ); } -void qxl_io_flush_release (struct qxl_device *qdev) -{ -outb (0 , qdev->io_base +QXL_IO_FLUSH_RELEASE ); -} - -void qxl_io_flush_surfaces (struct qxl_device *qdev) -{ -wait_for_io_cmd (qdev,0 ,QXL_IO_FLUSH_SURFACES_ASYNC ); -} -void qxl_io_destroy_primary (struct qxl_device *qdev) {wait_for_io_cmd (qdev,0 ,QXL_IO_DESTROY_PRIMARY_ASYNC );
drivers/gpu/drm/qxl/qxl_drv.h +0 -2
@@ -355,8 +355,6 @@ int qxl_io_update_area(struct qxl_device *qdev, struct qxl_bo *surf,void qxl_io_reset (struct qxl_device *qdev);void qxl_io_monitors_config (struct qxl_device *qdev);int qxl_ring_push (struct qxl_ring *ring,const void *new_elt,bool interruptible); -void qxl_io_flush_release (struct qxl_device *qdev); -void qxl_io_flush_surfaces (struct qxl_device *qdev);union qxl_release_info *qxl_release_map (struct qxl_device *qdev,struct qxl_release *release);
Signature · 1 line
2.49.0
Quoted 10 lines · * [email protected] ([email protected]) wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
Hi,
A couple of small deadcodings for qxl. The first
just cleans up a couple of trivial unusued wrappers. The second cleans out some debugfs code that's been unused for a few years.Dave
Signed-off-by Dr. David Alan Gilbert <[email protected]>
Hi All,
A gentle ping on this clean up set from April.
Thanks in advance,
Dave
Quoted 13 lines
Dr. David Alan Gilbert (2):
drm: qxl: Remove dead qxl_io_flush_* functions
drm: qxl: Remove unused debugfs codedrivers/gpu/drm/qxl/qxl_cmd.c | 10 ---------- drivers/gpu/drm/qxl/qxl_debugfs.c | 29 ----------------------------- drivers/gpu/drm/qxl/qxl_drv.h | 12 ------------ 3 files changed, 51 deletions(-)Signature · 1 line
2.49.0
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/