search for: vga_rsrc_legacy_io

Displaying 20 results from an estimated 22 matches for "vga_rsrc_legacy_io".

2020 Aug 07
1
[PATCH v2] drm/qxl: don't take vga ports on rev5+
...ers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -96,7 +96,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto disable_pci; - if (is_vga(pdev)) { + 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(...
2019 Aug 05
2
[PATCH] drm/qxl: get vga ioports
...drivers/gpu/drm/qxl/qxl_drv.c index b57a37543613..8a2e86adc423 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -87,9 +87,15 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto disable_pci; + ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); + if (ret) { + DRM_ERROR("can't get legacy vga ports\n"); + 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 *pde...
2019 Aug 05
1
[PATCH v2] drm/qxl: get vga ioports
...LASS_DISPLAY_VGA << 8; +} + static int qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -87,9 +92,17 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto disable_pci; + if (is_vga(pdev)) { + ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); + if (ret) { + DRM_ERROR("can't get legacy vga ioports\n"); + goto 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(struc...
2019 Aug 05
0
[Spice-devel] [PATCH] drm/qxl: get vga ioports
...37543613..8a2e86adc423 100644 > --- a/drivers/gpu/drm/qxl/qxl_drv.c > +++ b/drivers/gpu/drm/qxl/qxl_drv.c > @@ -87,9 +87,15 @@ qxl_pci_probe(struct pci_dev *pdev, const struct > pci_device_id *ent) > if (ret) > goto disable_pci; > > + ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); > + if (ret) { > + DRM_ERROR("can't get legacy vga ports\n"); > + goto put_vga; I suppose that if this fails it's secondary so should continue. What happen configuring 2 QXL devices? Only a card should provide VGA registers in the system so if any other card provide...
2020 Feb 14
0
[PATCH] drm/qxl: don't take vga ports on rev5+
...ers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -93,7 +93,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto disable_pci; - if (is_vga(pdev)) { + 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(...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
..._probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev); + ret = qxl_device_init(qdev, pdev); if (ret) goto put_vga; @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); -free_dev: - kfree(qdev); + return ret; } @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - drm_dev_put(dev); } DEFINE_DRM_GEM_FOPS(qxl_fops); d...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
..._probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev); + ret = qxl_device_init(qdev, pdev); if (ret) goto put_vga; @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); -free_dev: - kfree(qdev); + return ret; } @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - drm_dev_put(dev); } DEFINE_DRM_GEM_FOPS(qxl_fops); d...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
..._probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev); + ret = qxl_device_init(qdev, pdev); if (ret) goto put_vga; @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); -free_dev: - kfree(qdev); + return ret; } @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - drm_dev_put(dev); } DEFINE_DRM_GEM_FOPS(qxl_fops); d...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
..._probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev); + ret = qxl_device_init(qdev, pdev); if (ret) goto put_vga; @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) vga_put(pdev, VGA_RSRC_LEGACY_IO); disable_pci: pci_disable_device(pdev); -free_dev: - kfree(qdev); + return ret; } @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - drm_dev_put(dev); } DEFINE_DRM_GEM_FOPS(qxl_fops); d...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...> > - ret = qxl_device_init(qdev, &qxl_driver, pdev); > > + ret = qxl_device_init(qdev, pdev); > > if (ret) > > goto put_vga; > > > > @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > vga_put(pdev, VGA_RSRC_LEGACY_IO); > > disable_pci: > > pci_disable_device(pdev); > > -free_dev: > > - kfree(qdev); > > + > > return ret; > > } > > > > @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) > > drm_atomic_helper_shutdown(dev); > > if (...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...> > - ret = qxl_device_init(qdev, &qxl_driver, pdev); > > + ret = qxl_device_init(qdev, pdev); > > if (ret) > > goto put_vga; > > > > @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > vga_put(pdev, VGA_RSRC_LEGACY_IO); > > disable_pci: > > pci_disable_device(pdev); > > -free_dev: > > - kfree(qdev); > > + > > return ret; > > } > > > > @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) > > drm_atomic_helper_shutdown(dev); > > if (...
2020 Feb 10
2
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...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_unregister(dev); - - qxl_modeset_fini(qdev); - qxl_device_fini(qdev); + drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - - dev->dev_private = NULL; - kfree(qdev); drm_dev_put(dev); } @@ -279,6 +289,8 @@ static struct drm_driver qxl_driver = { .major = 0, .minor = 1, .patchlevel = 0, + + .release = qxl_drm_release, }; static int __init qxl_init(void) -- 2.18.1
2020 Feb 10
2
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...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_unregister(dev); - - qxl_modeset_fini(qdev); - qxl_device_fini(qdev); + drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - - dev->dev_private = NULL; - kfree(qdev); drm_dev_put(dev); } @@ -279,6 +289,8 @@ static struct drm_driver qxl_driver = { .major = 0, .minor = 1, .patchlevel = 0, + + .release = qxl_drm_release, }; static int __init qxl_init(void) -- 2.18.1
2020 Feb 07
2
[PATCH] drm/qxl: add drm_driver.release callback.
...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_unregister(dev); - - qxl_modeset_fini(qdev); - qxl_device_fini(qdev); + drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - - dev->dev_private = NULL; - kfree(qdev); drm_dev_put(dev); } @@ -279,6 +284,8 @@ static struct drm_driver qxl_driver = { .major = 0, .minor = 1, .patchlevel = 0, + + .release = qxl_drm_release, }; static int __init qxl_init(void) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/d...
2020 Apr 24
0
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...ce_id *ent) > } > } > > - ret = qxl_device_init(qdev, &qxl_driver, pdev); > + ret = qxl_device_init(qdev, pdev); > if (ret) > goto put_vga; > > @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > vga_put(pdev, VGA_RSRC_LEGACY_IO); > disable_pci: > pci_disable_device(pdev); > -free_dev: > - kfree(qdev); > + > return ret; > } > > @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) > drm_atomic_helper_shutdown(dev); > if (is_vga(pdev)) > vga_put(pdev, VGA_RSRC_LEGACY_IO)...
2020 Apr 06
0
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...ce_id *ent) > } > } > > - ret = qxl_device_init(qdev, &qxl_driver, pdev); > + ret = qxl_device_init(qdev, pdev); > if (ret) > goto put_vga; > > @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > vga_put(pdev, VGA_RSRC_LEGACY_IO); > disable_pci: > pci_disable_device(pdev); > -free_dev: > - kfree(qdev); > + > return ret; > } > > @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) > drm_atomic_helper_shutdown(dev); > if (is_vga(pdev)) > vga_put(pdev, VGA_RSRC_LEGACY_IO)...
2020 Apr 28
0
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...e_init(qdev, &qxl_driver, pdev); > > > + ret = qxl_device_init(qdev, pdev); > > > if (ret) > > > goto put_vga; > > > > > > @@ -128,8 +131,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > > vga_put(pdev, VGA_RSRC_LEGACY_IO); > > > disable_pci: > > > pci_disable_device(pdev); > > > -free_dev: > > > - kfree(qdev); > > > + > > > return ret; > > > } > > > > > > @@ -155,7 +157,6 @@ qxl_pci_remove(struct pci_dev *pdev) > > >...
2019 Dec 20
2
[PATCH 4/4] drm/qxl: add drm_driver.release callback.
...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_unregister(dev); - - qxl_modeset_fini(qdev); - qxl_device_fini(qdev); + drm_atomic_helper_shutdown(dev); if (is_vga(pdev)) vga_put(pdev, VGA_RSRC_LEGACY_IO); - - dev->dev_private = NULL; - kfree(qdev); drm_dev_put(dev); } @@ -279,6 +284,8 @@ static struct drm_driver qxl_driver = { .major = 0, .minor = 1, .patchlevel = 0, + + .release = qxl_drm_release, }; static int __init qxl_init(void) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/d...
2020 Feb 10
1
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
..._drvdata(pdev); >> - struct qxl_device *qdev = dev->dev_private; >> >> drm_dev_unregister(dev); >> - >> - qxl_modeset_fini(qdev); >> - qxl_device_fini(qdev); >> + drm_atomic_helper_shutdown(dev); >> if (is_vga(pdev)) >> vga_put(pdev, VGA_RSRC_LEGACY_IO); >> - >> - dev->dev_private = NULL; >> - kfree(qdev); >> drm_dev_put(dev); >> } >> >> @@ -279,6 +289,8 @@ static struct drm_driver qxl_driver = { >> .major = 0, >> .minor = 1, >> .patchlevel = 0, >> + >> + .relea...
2020 Feb 10
0
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...; struct drm_device *dev = pci_get_drvdata(pdev); > - struct qxl_device *qdev = dev->dev_private; > > drm_dev_unregister(dev); > - > - qxl_modeset_fini(qdev); > - qxl_device_fini(qdev); > + drm_atomic_helper_shutdown(dev); > if (is_vga(pdev)) > vga_put(pdev, VGA_RSRC_LEGACY_IO); > - > - dev->dev_private = NULL; > - kfree(qdev); > drm_dev_put(dev); > } > > @@ -279,6 +289,8 @@ static struct drm_driver qxl_driver = { > .major = 0, > .minor = 1, > .patchlevel = 0, > + > + .release = qxl_drm_release, > }; > > stat...