search for: drm_dev_

Displaying 19 results from an estimated 19 matches for "drm_dev_".

Did you mean: drm_dev
2024 Jul 28
1
[PATCH v2 02/37] drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code
...f it just requires calling a put in .remove() - that is pretty Yes, I already mentioned that that DRM devices should still work with this workaround. > normal (though most subsystems would call that unregister, not put) A DRM device is reference counted and can out-live the driver, hence the drm_dev_put() call in .remove(). There is also a special drm_dev_unplug() function, which does not only unregister the DRM device, but also sets a guard to be able prevent HW accesses after the HW is accessible anymore. > > Jason >
2024 Jul 28
1
[PATCH v2 02/37] drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code
On Fri, Jul 26, 2024 at 11:07:19PM +1000, Ben Skeggs wrote: > > Right, I think I took that too literally. > > > > The lifetime of the DRM device (or more precisely one of its references) is > > bound to the binding between the parent device and its corresponding driver. > > > > But the lifetime of the parent device itself is bound to the DRM device. > >
2024 Jul 28
1
[PATCH v2 02/37] drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code
...es creates almost as many bugs as it solves :\ cleanup.h is possibly a better option for most simple things and harder to misuse... > > normal (though most subsystems would call that unregister, not put) > > A DRM device is reference counted and can out-live the driver, hence the > drm_dev_put() call in .remove(). There is also a special drm_dev_unplug() > function, which does not only unregister the DRM device, but also sets a guard > to be able prevent HW accesses after the HW is accessible anymore. Every subsystem has a refcounted object, struct device is inherently refcount...
2020 Feb 11
2
[PATCH v4] drm/bochs: add drm_driver.release callback.
Call bochs_unload via drm_driver.release to make sure we release stuff when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Tidy up here and there. v4: add changelog. v3: use drm_dev_*(). v2: move hardware deinit to pci_remove(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/bochs/bochs_drv.c | 6 +++--- drivers/gpu/...
2020 Feb 11
2
[PATCH v4] drm/bochs: add drm_driver.release callback.
Call bochs_unload via drm_driver.release to make sure we release stuff when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Tidy up here and there. v4: add changelog. v3: use drm_dev_*(). v2: move hardware deinit to pci_remove(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/bochs/bochs_drv.c | 6 +++--- drivers/gpu/...
2020 Feb 11
2
[PATCH v4] drm/virtio: add drm_driver.release callback.
Split virtio_gpu_deinit(), move the drm shutdown and release to virtio_gpu_release(). Drop vqs_ready variable, instead use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Tidy up here and there. v4: add changelog. v3: use drm_dev_*(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 3 ++- drivers/gpu/drm/virtio/virtgpu_display.c | 1 - d...
2020 Feb 11
2
[PATCH v4] drm/virtio: add drm_driver.release callback.
Split virtio_gpu_deinit(), move the drm shutdown and release to virtio_gpu_release(). Drop vqs_ready variable, instead use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Tidy up here and there. v4: add changelog. v3: use drm_dev_*(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 3 ++- drivers/gpu/drm/virtio/virtgpu_display.c | 1 - d...
2024 Jul 26
2
[PATCH v2 02/37] drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code
..._drm *drm; >>>>>> + int ret; >>>>>> + >>>>>> + drm = kzalloc(sizeof(*drm), GFP_KERNEL); >>>>>> + if (!drm) >>>>>> + return ERR_PTR(-ENOMEM); >>>>>> + >>>>>> + drm->dev = drm_dev_alloc(drm_driver, parent); >>>>> Since you're reworking this anyways, can we switch to devm_drm_dev_alloc()? >>>>> >>>>> This also gets us rid of nouveau_drm_device_del(). >>>> No, we can't.? I originally had this change as a cleanup p...
2024 Jul 29
1
[PATCH] drm/nouveau: remove unused variable ret
...../drivers/gpu/drm/nouveau/nouveau_platform.c: In function ?nouveau_platform_probe?: ../drivers/gpu/drm/nouveau/nouveau_platform.c:29:13: error: unused variable ?ret? [-Werror=unused-variable] 29 | int ret; | ^~~ Fixes: 961ae5f9807b ("drm/nouveau: handle pci/tegra drm_dev_{alloc, register} from common code") Cc: Ben Skeggs <bskeggs at nvidia.com> Cc: Danilo Krummrich <dakr at kernel.org> Signed-off-by: Jani Nikula <jani.nikula at intel.com> --- Cc: Karol Herbst <kherbst at redhat.com> Cc: Lyude Paul <lyude at redhat.com> Cc: Danil...
2020 Feb 11
0
[PATCH v4] drm/bochs: add drm_driver.release callback.
On Tue, Feb 11, 2020 at 02:52:18PM +0100, Gerd Hoffmann wrote: > Call bochs_unload via drm_driver.release to make sure we release stuff > when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid > touching hardware after device removal. Tidy up here and there. > > v4: add changelog. > v3: use drm_dev_*(). > v2: move hardware deinit to pci_remove(). > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> Reviewed-by: Daniel Vetter &...
2020 Feb 11
0
[PATCH v4] drm/virtio: add drm_driver.release callback.
On Tue, Feb 11, 2020 at 02:58:04PM +0100, Gerd Hoffmann wrote: > Split virtio_gpu_deinit(), move the drm shutdown and release to > virtio_gpu_release(). Drop vqs_ready variable, instead use > drm_dev_{enter,exit,unplug} to avoid touching hardware after > device removal. Tidy up here and there. > > v4: add changelog. > v3: use drm_dev_*(). > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> Looks reasonable I think. Reviewed-by: Daniel Vetter <daniel.vetter at...
2020 Feb 10
1
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...>> + * 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 should be perfectly fine in the > remove hook. You might need to sprinkle a few drm_dev_enter/exit around to > protect code paths thought. > > Aside from this lgtm, for the series > > Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch> > > And up to you whether you want to fix this or not really. > > Btw for testing all these patches that add a -&gt...
2020 Feb 11
1
[PATCH v3] drm/bochs: add drm_driver.release callback.
Call bochs_unload via drm_driver.release to make sure we release stuff when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Tidy up here and there. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/bochs/bochs_drv.c | 6 +++--- drivers/gpu/drm/bochs/bochs_hw.c | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions...
2020 Feb 11
1
[PATCH v4] drm/cirrus: add drm_driver.release callback.
Move final cleanups from cirrus_pci_remove() to the new callback. Add drm_atomic_helper_shutdown() call to cirrus_pci_remove(). Use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. v4: add changelog. v3: use drm_dev*. v2: stop touching hardware after pci_remove(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/cirrus/cirrus.c | 43 ++++++++++++++++++++++++++++----- 1 file cha...
2020 Feb 11
0
[PATCH v3] drm/cirrus: add drm_driver.release callback.
Move final cleanups from cirrus_pci_remove() to the new callback. Add drm_atomic_helper_shutdown() call to cirrus_pci_remove(). Use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/cirrus/cirrus.c | 43 ++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus.c...
2020 Feb 11
0
[PATCH v3] drm/virtio: add drm_driver.release callback.
Split virtio_gpu_deinit(), move the drm shutdown and release to virtio_gpu_release(). Drop vqs_ready variable, instead use drm_dev_{enter,exit,unplug} to avoid touching hardware after device removal. Tidy up here and there. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_drv.h | 3 ++- drivers/gpu/drm/virtio/virtgpu_display.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.c |...
2020 Feb 10
2
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...) 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_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 = { .ma...
2020 Feb 10
2
[PATCH v2 2/2] drm/qxl: add drm_driver.release callback.
...) 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_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 = { .ma...
2023 Feb 15
17
[PATCH 00/17] cirrus: Modernize the cirrus driver
...es stuck out as specifically hard to interpret. Tested with qemu's cirrus emulation. Thomas Zimmermann (17): drm/cirrus: Compute blit destination offset in single location drm/cirrus: Replace cpp value with format drm/cirrus: Use drm_fb_blit() to update scanout buffer drm/cirrus: Move drm_dev_{enter,exit}() into DRM helpers drm/cirrus: Split cirrus_mode_set() into smaller functions drm/cirrus: Integrate connector into pipeline code drm/cirrus: Move primary-plane format arrays drm/cirrus: Convert to regular atomic helpers drm/cirrus: Enable damage clipping on primary plane drm...