search for: qxl_device_fini

Displaying 20 results from an estimated 33 matches for "qxl_device_fini".

2020 Feb 10
2
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...<drm/drm_file.h> #include <drm/drm_modeset_helper.h> @@ -132,21 +133,30 @@ 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; + + /* + * TODO: qxl_device_fini() call should be in qxl_pci_remove(), + * reodering qxl_modeset_fini() + qxl_device_fini() calls is + * non-trivial though. + */ + 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...
2020 Feb 10
2
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...<drm/drm_file.h> #include <drm/drm_modeset_helper.h> @@ -132,21 +133,30 @@ 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; + + /* + * TODO: qxl_device_fini() call should be in qxl_pci_remove(), + * reodering qxl_modeset_fini() + qxl_device_fini() calls is + * non-trivial though. + */ + 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...
2020 Feb 07
2
[PATCH] drm/qxl: add drm_driver.release callback.
Move final cleanups to qxl_drm_release() callback. Add drm_atomic_helper_shutdown() call to qxl_pci_remove(). Reorder calls in qxl_device_fini(). Cleaning up gem & ttm might trigger qxl commands, so we should do that before releaseing command rings. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_drv.c | 21 ++++++++++++++------- drivers/gpu/drm/qxl/qxl_kms.c | 8 ++++---- 2 files changed, 18...
2019 Dec 20
2
[PATCH 4/4] drm/qxl: add drm_driver.release callback.
Move final cleanups to qxl_drm_release() callback. Add drm_atomic_helper_shutdown() call to qxl_pci_remove(). Reorder calls in qxl_device_fini(). Cleaning up gem & ttm might trigger qxl commands, so we should do that before releaseing command rings. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_drv.c | 21 ++++++++++++++------- drivers/gpu/drm/qxl/qxl_kms.c | 8 ++++---- 2 files changed, 18...
2020 Feb 10
0
[PATCH v2 1/2] drm/qxl: reorder calls in qxl_device_fini().
Reorder calls in qxl_device_fini(). Cleaning up gem & ttm might trigger qxl commands, so we should do that before releaseing command rings. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_kms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/q...
2020 Feb 10
1
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...3,30 @@ 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; >> + >> + /* >> + * TODO: qxl_device_fini() call should be in qxl_pci_remove(), >> + * reodering qxl_modeset_fini() + qxl_device_fini() calls is >> + * non-trivial though. >> + */ >> + qxl_modeset_fini(qdev); > > So the drm_mode_config_cleanup call in here belongs in ->release, but the > qxl_destroy_...
2020 Feb 10
0
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...set_helper.h> > @@ -132,21 +133,30 @@ 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; > + > + /* > + * TODO: qxl_device_fini() call should be in qxl_pci_remove(), > + * reodering qxl_modeset_fini() + qxl_device_fini() calls is > + * non-trivial though. > + */ > + qxl_modeset_fini(qdev); So the drm_mode_config_cleanup call in here belongs in ->release, but the qxl_destroy_monitors_object feels like shou...
2019 Dec 20
0
[Spice-devel] [PATCH 4/4] drm/qxl: add drm_driver.release callback.
...n() call to qxl_pci_remove(). I suppose this is to replace the former manual cleanup calls, which were moved to qxl_drm_release, I think this could be added in the commit message ("why"), I don't see much value in describing "how" this was done. > > Reorder calls in qxl_device_fini(). Cleaning up gem & ttm > might trigger qxl commands, so we should do that before > releaseing command rings. Typo: releaseing -> releasing Why not putting this in a separate commit? Was this behaviour changed? It does not seem so to me. > > Signed-off-by: Gerd Hoffmann <...
2019 Aug 05
1
[PATCH v2] drm/qxl: get vga ioports
...o disable_pci; + } + } + ret = qxl_device_init(qdev, &qxl_driver, pdev); if (ret) - goto disable_pci; + goto put_vga; ret = qxl_modeset_init(qdev); if (ret) @@ -109,6 +122,9 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) qxl_modeset_fini(qdev); unload: qxl_device_fini(qdev); +put_vga: + if (is_vga(pdev)) + vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); free_dev: @@ -126,6 +142,8 @@ qxl_pci_remove(struct pci_dev *pdev) qxl_modeset_fini(qdev); qxl_device_fini(qdev); + if (is_vga(pdev)) + vga_put(pdev, VGA_RSRC_LEGACY_IO);...
2019 Aug 05
2
[PATCH] drm/qxl: get vga ioports
...); + goto put_vga; + } + ret = qxl_device_init(qdev, &qxl_driver, pdev); if (ret) - goto disable_pci; + goto put_vga; ret = qxl_modeset_init(qdev); if (ret) @@ -109,6 +115,8 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) qxl_modeset_fini(qdev); unload: qxl_device_fini(qdev); +put_vga: + vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); free_dev: @@ -126,6 +134,7 @@ qxl_pci_remove(struct pci_dev *pdev) qxl_modeset_fini(qdev); qxl_device_fini(qdev); + vga_put(pdev, VGA_RSRC_LEGACY_IO); dev->dev_private = NULL; kfree(qdev)...
2019 Aug 05
0
[Spice-devel] [PATCH] drm/qxl: get vga ioports
...&qxl_driver, pdev); > if (ret) > - goto disable_pci; > + goto put_vga; > > ret = qxl_modeset_init(qdev); > if (ret) > @@ -109,6 +115,8 @@ qxl_pci_probe(struct pci_dev *pdev, const struct > pci_device_id *ent) > qxl_modeset_fini(qdev); > unload: > qxl_device_fini(qdev); > +put_vga: > + vga_put(pdev, VGA_RSRC_LEGACY_IO); What happen if you didn't get the I/O? Maybe it's safe to just call vga_put and avoid adding an additional label here? > disable_pci: > pci_disable_device(pdev); > free_dev: > @@ -126,6 +134,7 @@ qxl_pci_remov...
2020 Aug 07
1
[PATCH v2] drm/qxl: don't take vga ports on rev5+
...ev)) { + if (is_vga(pdev) && pdev->revision < 5) { ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); if (ret) { DRM_ERROR("can't get legacy vga ioports\n"); @@ -127,7 +127,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) unload: qxl_device_fini(qdev); put_vga: - if (is_vga(pdev)) + if (is_vga(pdev) && pdev->revision < 5) vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); @@ -155,7 +155,7 @@ qxl_pci_remove(struct pci_dev *pdev) drm_dev_unregister(dev); drm_atomic_helper_shutdown(dev); - if...
2020 Mar 02
1
[PATCH 07/51] drm/qxl: Use drmm_add_final_kfree
...ns(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 4fda3f9b29f4..09102e2efabc 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -144,8 +144,6 @@ static void qxl_drm_release(struct drm_device *dev) */ qxl_modeset_fini(qdev); qxl_device_fini(qdev); - dev->dev_private = NULL; - kfree(qdev); } static void diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 70b20ee4741a..09d7b5f6d172 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -27,6 +27,7 @@ #include <linux/pci....
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...drv.h @@ -276,8 +276,7 @@ struct qxl_device { extern const struct drm_ioctl_desc qxl_ioctls[]; extern int qxl_max_ioctl; -int qxl_device_init(struct qxl_device *qdev, struct drm_driver *drv, - struct pci_dev *pdev); +int qxl_device_init(struct qxl_device *qdev, struct pci_dev *pdev); void qxl_device_fini(struct qxl_device *qdev); int qxl_modeset_init(struct qxl_device *qdev); diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 9eed1a375f24..91a34dd835d7 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -108,21 +108,13 @@ static void qx...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...drv.h @@ -276,8 +276,7 @@ struct qxl_device { extern const struct drm_ioctl_desc qxl_ioctls[]; extern int qxl_max_ioctl; -int qxl_device_init(struct qxl_device *qdev, struct drm_driver *drv, - struct pci_dev *pdev); +int qxl_device_init(struct qxl_device *qdev, struct pci_dev *pdev); void qxl_device_fini(struct qxl_device *qdev); int qxl_modeset_init(struct qxl_device *qdev); diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 9eed1a375f24..91a34dd835d7 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -108,21 +108,13 @@ static void qx...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...drv.h @@ -276,8 +276,7 @@ struct qxl_device { extern const struct drm_ioctl_desc qxl_ioctls[]; extern int qxl_max_ioctl; -int qxl_device_init(struct qxl_device *qdev, struct drm_driver *drv, - struct pci_dev *pdev); +int qxl_device_init(struct qxl_device *qdev, struct pci_dev *pdev); void qxl_device_fini(struct qxl_device *qdev); int qxl_modeset_init(struct qxl_device *qdev); diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 9eed1a375f24..91a34dd835d7 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -108,21 +108,13 @@ static void qx...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...drv.h @@ -276,8 +276,7 @@ struct qxl_device { extern const struct drm_ioctl_desc qxl_ioctls[]; extern int qxl_max_ioctl; -int qxl_device_init(struct qxl_device *qdev, struct drm_driver *drv, - struct pci_dev *pdev); +int qxl_device_init(struct qxl_device *qdev, struct pci_dev *pdev); void qxl_device_fini(struct qxl_device *qdev); int qxl_modeset_init(struct qxl_device *qdev); diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 9eed1a375f24..91a34dd835d7 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -108,21 +108,13 @@ static void qx...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...struct drm_ioctl_desc qxl_ioctls[]; > > extern int qxl_max_ioctl; > > > > -int qxl_device_init(struct qxl_device *qdev, struct drm_driver *drv, > > - struct pci_dev *pdev); > > +int qxl_device_init(struct qxl_device *qdev, struct pci_dev *pdev); > > void qxl_device_fini(struct qxl_device *qdev); > > > > int qxl_modeset_init(struct qxl_device *qdev); > > diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c > > index 9eed1a375f24..91a34dd835d7 100644 > > --- a/drivers/gpu/drm/qxl/qxl_kms.c > > +++ b/driver...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...struct drm_ioctl_desc qxl_ioctls[]; > > extern int qxl_max_ioctl; > > > > -int qxl_device_init(struct qxl_device *qdev, struct drm_driver *drv, > > - struct pci_dev *pdev); > > +int qxl_device_init(struct qxl_device *qdev, struct pci_dev *pdev); > > void qxl_device_fini(struct qxl_device *qdev); > > > > int qxl_modeset_init(struct qxl_device *qdev); > > diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c > > index 9eed1a375f24..91a34dd835d7 100644 > > --- a/drivers/gpu/drm/qxl/qxl_kms.c > > +++ b/driver...
2020 Feb 14
0
[PATCH] drm/qxl: don't take vga ports on rev5+
...ev)) { + if (is_vga(pdev) && pdev->revision < 5) { ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); if (ret) { DRM_ERROR("can't get legacy vga ioports\n"); @@ -124,7 +124,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) unload: qxl_device_fini(qdev); put_vga: - if (is_vga(pdev)) + if (is_vga(pdev) && pdev->revision < 5) vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); @@ -155,7 +155,7 @@ qxl_pci_remove(struct pci_dev *pdev) drm_dev_unregister(dev); drm_atomic_helper_shutdown(dev); - if...