Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/qxl: drop set_prod_notify parameter from qxl_ring_create

Since qxl_io_reset(qdev) will be called immediately
after qxl_ring_create() been called,
and parameter like notify_on_prod will be set to default value.
So the call to qxl_ring_init_hdr() before becomes meaningless.

Signed-off-by: Zongmin Zhou<zhouzongmin@kylinos.cn>
Suggested-by: Ming Xie<xieming@kylinos.cn>
Link: http://patchwork.freedesktop.org/patch/msgid/20220920065023.1633303-1-zhouzongmin@kylinos.cn
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

authored by

Zongmin Zhou and committed by
Gerd Hoffmann
461a4df2 09847723

+1 -13
-8
drivers/gpu/drm/qxl/qxl_cmd.c
··· 53 53 kfree(ring); 54 54 } 55 55 56 - void qxl_ring_init_hdr(struct qxl_ring *ring) 57 - { 58 - ring->ring->header.notify_on_prod = ring->n_elements; 59 - } 60 - 61 56 struct qxl_ring * 62 57 qxl_ring_create(struct qxl_ring_header *header, 63 58 int element_size, 64 59 int n_elements, 65 60 int prod_notify, 66 - bool set_prod_notify, 67 61 wait_queue_head_t *push_event) 68 62 { 69 63 struct qxl_ring *ring; ··· 71 77 ring->n_elements = n_elements; 72 78 ring->prod_notify = prod_notify; 73 79 ring->push_event = push_event; 74 - if (set_prod_notify) 75 - qxl_ring_init_hdr(ring); 76 80 spin_lock_init(&ring->lock); 77 81 return ring; 78 82 }
-2
drivers/gpu/drm/qxl/qxl_drv.h
··· 277 277 int element_size, 278 278 int n_elements, 279 279 int prod_notify, 280 - bool set_prod_notify, 281 280 wait_queue_head_t *push_event); 282 281 void qxl_ring_free(struct qxl_ring *ring); 283 - void qxl_ring_init_hdr(struct qxl_ring *ring); 284 282 int qxl_check_idle(struct qxl_ring *ring); 285 283 286 284 static inline uint64_t
+1 -3
drivers/gpu/drm/qxl/qxl_kms.c
··· 194 194 sizeof(struct qxl_command), 195 195 QXL_COMMAND_RING_SIZE, 196 196 qdev->io_base + QXL_IO_NOTIFY_CMD, 197 - false, 198 197 &qdev->display_event); 199 198 if (!qdev->command_ring) { 200 199 DRM_ERROR("Unable to create command ring\n"); ··· 206 207 sizeof(struct qxl_command), 207 208 QXL_CURSOR_RING_SIZE, 208 209 qdev->io_base + QXL_IO_NOTIFY_CURSOR, 209 - false, 210 210 &qdev->cursor_event); 211 211 212 212 if (!qdev->cursor_ring) { ··· 217 219 qdev->release_ring = qxl_ring_create( 218 220 &(qdev->ram_header->release_ring_hdr), 219 221 sizeof(uint64_t), 220 - QXL_RELEASE_RING_SIZE, 0, true, 222 + QXL_RELEASE_RING_SIZE, 0, 221 223 NULL); 222 224 223 225 if (!qdev->release_ring) {