* [PATCH 1/2] drm: qxl: Remove dead qxl_io_flush_* functions
2025-04-13 17:10 [PATCH 0/2] drm: qxl: Deadcoding linux
@ 2025-04-13 17:10 ` linux
2025-04-13 17:10 ` [PATCH 2/2] drm: qxl: Remove unused debugfs code linux
2025-07-08 20:48 ` [PATCH 0/2] drm: qxl: Deadcoding Dr. David Alan Gilbert
2 siblings, 0 replies; 4+ messages in thread
From: linux @ 2025-04-13 17:10 UTC (permalink / raw)
To: kraxel, airlied
Cc: maarten.lankhorst, mripard, tzimmermann, airlied, simona,
virtualization, spice-devel, dri-devel, linux-kernel,
Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/gpu/drm/qxl/qxl_cmd.c | 10 ----------
drivers/gpu/drm/qxl/qxl_drv.h | 2 --
2 files changed, 12 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index d6ea01f3797b..1bdc5abf8dd1 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -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);
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index cc02b5f10ad9..a6184aaebf62 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -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);
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] drm: qxl: Remove unused debugfs code
2025-04-13 17:10 [PATCH 0/2] drm: qxl: Deadcoding linux
2025-04-13 17:10 ` [PATCH 1/2] drm: qxl: Remove dead qxl_io_flush_* functions linux
@ 2025-04-13 17:10 ` linux
2025-07-08 20:48 ` [PATCH 0/2] drm: qxl: Deadcoding Dr. David Alan Gilbert
2 siblings, 0 replies; 4+ messages in thread
From: linux @ 2025-04-13 17:10 UTC (permalink / raw)
To: kraxel, airlied
Cc: maarten.lankhorst, mripard, tzimmermann, airlied, simona,
virtualization, spice-devel, dri-devel, linux-kernel,
Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
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.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/gpu/drm/qxl/qxl_debugfs.c | 29 -----------------------------
drivers/gpu/drm/qxl/qxl_drv.h | 10 ----------
2 files changed, 39 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c
index 2d9ed3b94574..bdfce1a8f006 100644
--- a/drivers/gpu/drm/qxl/qxl_debugfs.c
+++ b/drivers/gpu/drm/qxl/qxl_debugfs.c
@@ -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
-}
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index a6184aaebf62..ea977c238b27 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -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,
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] drm: qxl: Deadcoding
2025-04-13 17:10 [PATCH 0/2] drm: qxl: Deadcoding linux
2025-04-13 17:10 ` [PATCH 1/2] drm: qxl: Remove dead qxl_io_flush_* functions linux
2025-04-13 17:10 ` [PATCH 2/2] drm: qxl: Remove unused debugfs code linux
@ 2025-07-08 20:48 ` Dr. David Alan Gilbert
2 siblings, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-07-08 20:48 UTC (permalink / raw)
To: kraxel, airlied, mripard
Cc: maarten.lankhorst, tzimmermann, airlied, simona, virtualization,
spice-devel, dri-devel, linux-kernel
* linux@treblig.org (linux@treblig.org) wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> 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 <linux@treblig.org>
Hi All,
A gentle ping on this clean up set from April.
Thanks in advance,
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(-)
>
> --
> 2.49.0
>
--
-----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 |_______/
^ permalink raw reply [flat|nested] 4+ messages in thread