search for: qdev

Displaying 20 results from an estimated 390 matches for "qdev".

Did you mean: mdev
2018 Dec 12
0
[PATCH v2 03/18] drm/qxl: simplify slot management
...mem_slots; - - uint8_t main_mem_slot; - uint8_t surfaces_mem_slot; + struct qxl_memslot main_slot; + struct qxl_memslot surfaces_slot; uint8_t slot_id_bits; uint8_t slot_gen_bits; uint64_t va_slot_mask; @@ -312,8 +311,8 @@ static inline uint64_t qxl_bo_physical_address(struct qxl_device *qdev, struct qxl_bo *bo, unsigned long offset) { - int slot_id = bo->type == QXL_GEM_DOMAIN_VRAM ? qdev->main_mem_slot : qdev->surfaces_mem_slot; - struct qxl_memslot *slot = &(qdev->mem_slots[slot_id]); + struct qxl_memslot *slot = bo->type == QXL_GEM_DOMAIN_VRAM + ? &qdev-...
2018 Jul 27
1
[PATCH] drm: qxl: Fix error handling at qxl_device_init
...- 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 771250aed78d..e25c589d5f50 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -102,8 +102,10 @@ int qxl_device_init(struct qxl_device *qdev, int r, sb; r = drm_dev_init(&qdev->ddev, drv, &pdev->dev); - if (r) - return r; + if (r) { + pr_err("Unable to init drm dev"); + goto error; + } qdev->ddev.pdev = pdev; pci_set_drvdata(pdev, &qdev->ddev); @@ -121,6 +123,11 @@ int qxl_device_init(str...
2018 Feb 16
0
[PATCH 1/4] qxl: remove qxl_io_log()
.../gpu/drm/qxl/qxl_drv.h index 00a1a66b05..4b89840173 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -298,9 +298,6 @@ struct qxl_device { int monitors_config_height; }; -/* forward declaration for QXL_INFO_IO */ -__printf(2,3) void qxl_io_log(struct qxl_device *qdev, const char *fmt, ...); - extern const struct drm_ioctl_desc qxl_ioctls[]; extern int qxl_max_ioctl; diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index c0fb52c6d4..850f8d7d37 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -341,12...
2018 Apr 20
0
[PATCH v2 1/4] qxl: remove qxl_io_log()
.../gpu/drm/qxl/qxl_drv.h index 00a1a66b05..4b89840173 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -298,9 +298,6 @@ struct qxl_device { int monitors_config_height; }; -/* forward declaration for QXL_INFO_IO */ -__printf(2,3) void qxl_io_log(struct qxl_device *qdev, const char *fmt, ...); - extern const struct drm_ioctl_desc qxl_ioctls[]; extern int qxl_max_ioctl; diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index c0fb52c6d4..850f8d7d37 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -341,12...
2020 Feb 07
2
[PATCH] drm/qxl: add drm_driver.release callback.
...> #include <drm/drm_drv.h> #include <drm/drm_file.h> #include <drm/drm_modeset_helper.h> @@ -132,21 +133,25 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return ret; } +static void qxl_drm_release(struct drm_device *dev) +{ + struct qxl_device *qdev = dev->dev_private; + + qxl_modeset_fini(qdev); + qxl_device_fini(qdev); + dev->dev_private = NULL; + kfree(qdev); +} + static void qxl_pci_remove(struct pci_dev *pdev) { struct drm_device *dev = pci_get_drvdata(pdev); - struct qxl_device *qdev = dev->dev_private; drm_dev_unregist...
2020 Apr 15
1
[PATCH 27/59] drm/qxl: Don't use drm_device->dev_private
...dex 88123047fdd4..524d35b648d8 100644 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c @@ -39,7 +39,7 @@ static int qxl_debugfs_irq_received(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *) m->private; - struct qxl_device *qdev = node->minor->dev->dev_private; + struct qxl_device *qdev = to_qxl(node->minor->dev); seq_printf(m, "%d\n", atomic_read(&qdev->irq_received)); seq_printf(m, "%d\n", atomic_read(&qdev->irq_received_display)); @@ -53,7 +53,7 @@ static int qxl_d...
2012 Jan 24
2
[PATCH 26/28] pci: convert to QEMU Object Model
...| 2 +- hw/pcnet-pci.c | 39 +++++---- hw/piix4.c | 30 ++++--- hw/piix_pci.c | 95 +++++++++++++-------- hw/ppc4xx_pci.c | 21 +++-- hw/ppce500_pci.c | 21 +++-- hw/prep_pci.c | 33 ++++---- hw/qdev.c | 1 + hw/qxl.c | 62 ++++++++----- hw/rtl8139.c | 41 ++++++---- hw/sh_pci.c | 19 +++-- hw/spapr_pci.c | 15 +++- hw/sun4u.c | 23 ++++-- hw/unin_pci.c | 92 +++++++++++++-----...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
.../drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 09102e2efabc..6b4ae4c5fb76 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -81,13 +81,16 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -EINVAL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) -...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
.../drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 09102e2efabc..6b4ae4c5fb76 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -81,13 +81,16 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -EINVAL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) -...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
.../drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 09102e2efabc..6b4ae4c5fb76 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -81,13 +81,16 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -EINVAL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) -...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
.../drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 09102e2efabc..6b4ae4c5fb76 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -81,13 +81,16 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -EINVAL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) -...
2018 Feb 16
0
[PATCH 3/4] qxl: hook monitors_config updates into crtc, not encoder.
...files changed, 66 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 850f8d7d37..95db20f214 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -371,6 +371,7 @@ void qxl_io_flush_surfaces(struct qxl_device *qdev) void qxl_io_destroy_primary(struct qxl_device *qdev) { wait_for_io_cmd(qdev, 0, QXL_IO_DESTROY_PRIMARY_ASYNC); + qdev->primary_created = false; } void qxl_io_create_primary(struct qxl_device *qdev, @@ -396,6 +397,7 @@ void qxl_io_create_primary(struct qxl_device *qdev, create->type...
2018 Apr 20
0
[PATCH v2 3/4] qxl: hook monitors_config updates into crtc, not encoder.
...files changed, 66 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 850f8d7d37..95db20f214 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -371,6 +371,7 @@ void qxl_io_flush_surfaces(struct qxl_device *qdev) void qxl_io_destroy_primary(struct qxl_device *qdev) { wait_for_io_cmd(qdev, 0, QXL_IO_DESTROY_PRIMARY_ASYNC); + qdev->primary_created = false; } void qxl_io_create_primary(struct qxl_device *qdev, @@ -396,6 +397,7 @@ void qxl_io_create_primary(struct qxl_device *qdev, create->type...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
....6b4ae4c5fb76 100644 > > --- a/drivers/gpu/drm/qxl/qxl_drv.c > > +++ b/drivers/gpu/drm/qxl/qxl_drv.c > > @@ -81,13 +81,16 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > return -EINVAL; /* TODO: ENODEV ? */ > > } > > > > - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); > > - if (!qdev) > > + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, > > + struct qxl_device, ddev); > > + if (IS_ERR(qdev)) { > > + pr_err("Unable to init drm dev"); > > return...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
....6b4ae4c5fb76 100644 > > --- a/drivers/gpu/drm/qxl/qxl_drv.c > > +++ b/drivers/gpu/drm/qxl/qxl_drv.c > > @@ -81,13 +81,16 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > return -EINVAL; /* TODO: ENODEV ? */ > > } > > > > - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); > > - if (!qdev) > > + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, > > + struct qxl_device, ddev); > > + if (IS_ERR(qdev)) { > > + pr_err("Unable to init drm dev"); > > return...
2020 Apr 03
1
[PATCH 31/44] drm/qxl: Don't use drm_device->dev_private
...dex 88123047fdd4..524d35b648d8 100644 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c @@ -39,7 +39,7 @@ static int qxl_debugfs_irq_received(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *) m->private; - struct qxl_device *qdev = node->minor->dev->dev_private; + struct qxl_device *qdev = to_qxl(node->minor->dev); seq_printf(m, "%d\n", atomic_read(&qdev->irq_received)); seq_printf(m, "%d\n", atomic_read(&qdev->irq_received_display)); @@ -53,7 +53,7 @@ static int qxl_d...
2018 Dec 12
0
[PATCH v2 15/18] drm/qxl: use qxl_num_crtc directly
qdev->monitors_config->max_allowed is effectively set by the qxl.num_heads module parameter, stored in the qxl_num_crtc variable. Lets get rid of the indirection and use the variable qxl_num_crtc directly. The kernel doesn't need to dereference pointers each time it needs the value, and when...
2018 Nov 28
0
[PATCH 6/6] drm/qxl: use qxl_num_crtc directly
Skip the pointless and slightly confusing indirection via qdev->monitors_config->max_allowed. Just use qxl_num_crtc instead. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_display.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/...
2019 Dec 20
2
[PATCH 4/4] drm/qxl: add drm_driver.release callback.
...> #include <drm/drm_drv.h> #include <drm/drm_file.h> #include <drm/drm_modeset_helper.h> @@ -132,21 +133,25 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return ret; } +static void qxl_drm_release(struct drm_device *dev) +{ + struct qxl_device *qdev = dev->dev_private; + + qxl_modeset_fini(qdev); + qxl_device_fini(qdev); + dev->dev_private = NULL; + kfree(qdev); +} + static void qxl_pci_remove(struct pci_dev *pdev) { struct drm_device *dev = pci_get_drvdata(pdev); - struct qxl_device *qdev = dev->dev_private; drm_dev_unregist...
2018 Dec 06
0
[PATCH v2] drm/qxl: use qxl_num_crtc directly
qdev->monitors_config->max_allowed is effectively set by the qxl.num_heads module parameter, stored in the qxl_num_crtc variable. Lets get rid of the indirection and use the variable qxl_num_crtc directly. The kernel doesn't need to dereference pointers each time it needs the value, and when...