search for: devm_

Displaying 20 results from an estimated 29 matches for "devm_".

2020 Mar 02
1
[PATCH 30/51] drm/cirrus: Fully embrace devm_
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> Cc: Dave Airlie <airlied at redhat.com> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Daniel Vetter <daniel.vetter at ffwll.ch&...
2020 Feb 19
0
[PATCH 31/52] drm/cirrus: Fully embrace devm_
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> Cc: Dave Airlie <airlied at redhat.com> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Daniel Vetter <daniel.vetter at ffwll.ch&...
2017 Dec 13
2
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 06:02:23PM +0100, Cornelia Huck wrote: > On Tue, 12 Dec 2017 13:45:50 +0000 > Mark Rutland <mark.rutland at arm.com> wrote: > > > Recent rework of the virtio_mmio probe/remove paths balanced a > > devm_ioremap() with an iounmap() rather than its devm variant. This ends > > up corrupting the devm datastructures, and results in the following > > boot-time splat on arm64 under QEMU 2.9.0: > > > > [ 3.450397] ------------[ cut here ]------------ > > [ 3.453822] Try...
2017 Dec 13
2
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 06:02:23PM +0100, Cornelia Huck wrote: > On Tue, 12 Dec 2017 13:45:50 +0000 > Mark Rutland <mark.rutland at arm.com> wrote: > > > Recent rework of the virtio_mmio probe/remove paths balanced a > > devm_ioremap() with an iounmap() rather than its devm variant. This ends > > up corrupting the devm datastructures, and results in the following > > boot-time splat on arm64 under QEMU 2.9.0: > > > > [ 3.450397] ------------[ cut here ]------------ > > [ 3.453822] Try...
2020 Feb 07
1
[PATCH 2/6] drm: Add drm_simple_encoder_{init,create}()
...er error code on failure. > + */ > +struct drm_encoder *drm_simple_encoder_create(struct drm_device *dev, > + int encoder_type, > + const char *name, ...) > +{ > + char *namestr = NULL; > + struct drm_encoder *encoder; > + int ret; > + > + encoder = devm_kzalloc(dev->dev, sizeof(*encoder), GFP_KERNEL); The encoder can outlive the devres if the device is unbound when userspace has open fds, so you can't use devm_ here. Noralf. > + if (!encoder) > + return ERR_PTR(-ENOMEM); > + > + if (name) { > + va_list ap; > + > +...
2017 Jul 20
2
[PATCH 000/102] Convert drivers to explicit reset API
...regardless of whether the API is expressed as a bunch of > functions or as a single function with a bunch of flags. > >> What about reset_control_get(struct device *, const char *, int flags) >> to replace all those variants ? > > While I like how this looks, unfortunately (devm_)reset_control_get > already exists without the flags, so we can't change to that with a > gentle transition. This was done for gpiod_get() and its flags argument with horrifying #define-ry, which thankfully was completely hidden from users. -- Dmitry
2017 Jul 20
2
[PATCH 000/102] Convert drivers to explicit reset API
Hello, On Thu, 20 Jul 2017 11:36:55 +0200, Philipp Zabel wrote: > > I don't know if it has been discussed in the past, so forgive me if it > > has been. Have you considered adding a "int flags" argument to the > > existing reset_control_get_*() functions, rather than introducing > > separate exclusive variants ? > > > > Indeed, with a "int
2017 Jul 20
0
[PATCH 000/102] Convert drivers to explicit reset API
.... The complexity increases regardless of whether the API is expressed as a bunch of functions or as a single function with a bunch of flags. > What about reset_control_get(struct device *, const char *, int flags) > to replace all those variants ? While I like how this looks, unfortunately (devm_)reset_control_get already exists without the flags, so we can't change to that with a gentle transition. regards Philipp
2017 Jul 23
0
[PATCH 000/102] Convert drivers to explicit reset API
...com> wrote: > On Thu, Jul 20, 2017 at 5:55 AM, Philipp Zabel <p.zabel at pengutronix.de> wrote: >>> What about reset_control_get(struct device *, const char *, int flags) >>> to replace all those variants ? >> >> While I like how this looks, unfortunately (devm_)reset_control_get >> already exists without the flags, so we can't change to that with a >> gentle transition. > > This was done for gpiod_get() and its flags argument with horrifying > #define-ry, which thankfully was completely hidden from users. For your reference: com...
2017 Jul 24
2
[PATCH 000/102] Convert drivers to explicit reset API
...u, Jul 20, 2017 at 5:55 AM, Philipp Zabel <p.zabel at pengutronix.de> wrote: > > >>> What about reset_control_get(struct device *, const char *, int flags) > >>> to replace all those variants ? > >> > >> While I like how this looks, unfortunately (devm_)reset_control_get > >> already exists without the flags, so we can't change to that with a > >> gentle transition. > > > > This was done for gpiod_get() and its flags argument with horrifying > > #define-ry, which thankfully was completely hidden from users....
2017 Dec 12
0
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, 12 Dec 2017 13:45:50 +0000 Mark Rutland <mark.rutland at arm.com> wrote: > Recent rework of the virtio_mmio probe/remove paths balanced a > devm_ioremap() with an iounmap() rather than its devm variant. This ends > up corrupting the devm datastructures, and results in the following > boot-time splat on arm64 under QEMU 2.9.0: > > [ 3.450397] ------------[ cut here ]------------ > [ 3.453822] Trying to vfree() nonexisten...
2017 Dec 14
0
[PATCHv2] virtio_mmio: fix devm cleanup
...Mark Rutland wrote: > On Tue, Dec 12, 2017 at 06:02:23PM +0100, Cornelia Huck wrote: > > On Tue, 12 Dec 2017 13:45:50 +0000 > > Mark Rutland <mark.rutland at arm.com> wrote: > > > > > Recent rework of the virtio_mmio probe/remove paths balanced a > > > devm_ioremap() with an iounmap() rather than its devm variant. This ends > > > up corrupting the devm datastructures, and results in the following > > > boot-time splat on arm64 under QEMU 2.9.0: > > > > > > [ 3.450397] ------------[ cut here ]------------ > &gt...
2020 Feb 18
4
[PATCH v2 0/4] drm: Provide a simple encoder
...s which can use the helper and I think I did not examine all drivers yet. The patchset was smoke-tested on mgag200 by running the fbdev console and Gnome on X11. v2: * move simple encoder to KMS helpers (Daniel) * remove name argument; simplifies implementation (Gerd) * don't allocate with devm_ interfaces; unsafe with DRM (Noralf) Thomas Zimmermann (4): drm/simple-kms: Add drm_simple_encoder_{init,create}() drm/ast: Use simple encoder drm/mgag200: Use simple encoder drm/qxl: Use simple encoder drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast/ast_mode.c...
2020 Feb 07
2
[PATCH] drm/bochs: add drm_driver.release callback.
From: Gurchetan Singh <gurchetansingh at chromium.org> Move bochs_unload call from bochs_remove() to the new bochs_release() callback. Also call drm_dev_unregister() first in bochs_remove(). Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/bochs/bochs_drv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b48...
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b48...
2018 Apr 26
0
[Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses
...- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c > +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c > @@ -135,7 +135,7 @@ static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev, > /* > * We don't embed drm_device, because that prevent us from using > * devm_kzalloc() to allocate tinydrm_device in the driver since > - * drm_dev_unref() frees the structure. The devm_ functions provide > + * drm_dev_put() frees the structure. The devm_ functions provide > * for easy error handling. > */ > drm = drm_dev_alloc(driver, parent); >...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...8..ca2b6a8b74c2 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -135,7 +135,7 @@ static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev, /* * We don't embed drm_device, because that prevent us from using * devm_kzalloc() to allocate tinydrm_device in the driver since - * drm_dev_unref() frees the structure. The devm_ functions provide + * drm_dev_put() frees the structure. The devm_ functions provide * for easy error handling. */ drm = drm_dev_alloc(driver, parent); @@ -155,7 +155,7 @@ static voi...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...8..ca2b6a8b74c2 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -135,7 +135,7 @@ static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev, /* * We don't embed drm_device, because that prevent us from using * devm_kzalloc() to allocate tinydrm_device in the driver since - * drm_dev_unref() frees the structure. The devm_ functions provide + * drm_dev_put() frees the structure. The devm_ functions provide * for easy error handling. */ drm = drm_dev_alloc(driver, parent); @@ -155,7 +155,7 @@ static voi...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...8..ca2b6a8b74c2 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -135,7 +135,7 @@ static int tinydrm_init(struct device *parent, struct tinydrm_device *tdev, /* * We don't embed drm_device, because that prevent us from using * devm_kzalloc() to allocate tinydrm_device in the driver since - * drm_dev_unref() frees the structure. The devm_ functions provide + * drm_dev_put() frees the structure. The devm_ functions provide * for easy error handling. */ drm = drm_dev_alloc(driver, parent); @@ -155,7 +155,7 @@ static voi...