Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc() (v2)

2020-09-17 Thread Alex Deucher
On Thu, Sep 17, 2020 at 6:13 PM Luben Tuikov wrote: > > Convert to using devm_drm_dev_alloc(), > as drm_dev_init() is going away. > > v2: Remove drm_dev_put() since > a) devres doesn't do refcounting, see > Documentation/driver-api/driver-model/devres.rst, > Section 4, paragraph 1;

[PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc() (v2)

2020-09-17 Thread Luben Tuikov
Convert to using devm_drm_dev_alloc(), as drm_dev_init() is going away. v2: Remove drm_dev_put() since a) devres doesn't do refcounting, see Documentation/driver-api/driver-model/devres.rst, Section 4, paragraph 1; and since b) devres acts as garbage collector when the DRM

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-14 Thread Alex Deucher
On Fri, Sep 11, 2020 at 4:50 PM Luben Tuikov wrote: > > On 2020-09-08 16:09, Luben Tuikov wrote: > > On 2020-09-07 04:07, Daniel Vetter wrote: > >> On Mon, Sep 07, 2020 at 10:06:08AM +0200, Daniel Vetter wrote: > >>> On Sat, Sep 05, 2020 at 11:50:05AM -0400, Alex Deucher wrote: > On Thu, Sep

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-11 Thread Luben Tuikov
On 2020-09-08 16:09, Luben Tuikov wrote: > On 2020-09-07 04:07, Daniel Vetter wrote: >> On Mon, Sep 07, 2020 at 10:06:08AM +0200, Daniel Vetter wrote: >>> On Sat, Sep 05, 2020 at 11:50:05AM -0400, Alex Deucher wrote: On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: > > Convert to

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-08 Thread Luben Tuikov
On 2020-09-07 04:07, Daniel Vetter wrote: > On Mon, Sep 07, 2020 at 10:06:08AM +0200, Daniel Vetter wrote: >> On Sat, Sep 05, 2020 at 11:50:05AM -0400, Alex Deucher wrote: >>> On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: Convert to using devm_drm_dev_alloc(), as

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-08 Thread Luben Tuikov
On 2020-09-07 04:06, Daniel Vetter wrote: > On Sat, Sep 05, 2020 at 11:50:05AM -0400, Alex Deucher wrote: >> On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: >>> >>> Convert to using devm_drm_dev_alloc(), >>> as drm_dev_init() is going away. >>> >>> Signed-off-by: Luben Tuikov >> >> I think we

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-08 Thread Luben Tuikov
On 2020-09-05 11:50, Alex Deucher wrote: > On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: >> >> Convert to using devm_drm_dev_alloc(), >> as drm_dev_init() is going away. >> >> Signed-off-by: Luben Tuikov > > I think we can drop the final drm_put in the error case? I think the > unwinding

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-07 Thread Daniel Vetter
On Mon, Sep 07, 2020 at 10:06:08AM +0200, Daniel Vetter wrote: > On Sat, Sep 05, 2020 at 11:50:05AM -0400, Alex Deucher wrote: > > On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: > > > > > > Convert to using devm_drm_dev_alloc(), > > > as drm_dev_init() is going away. > > > > > >

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-07 Thread Daniel Vetter
On Sat, Sep 05, 2020 at 11:50:05AM -0400, Alex Deucher wrote: > On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: > > > > Convert to using devm_drm_dev_alloc(), > > as drm_dev_init() is going away. > > > > Signed-off-by: Luben Tuikov > > I think we can drop the final drm_put in the error case?

Re: [PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-05 Thread Alex Deucher
On Thu, Sep 3, 2020 at 9:22 PM Luben Tuikov wrote: > > Convert to using devm_drm_dev_alloc(), > as drm_dev_init() is going away. > > Signed-off-by: Luben Tuikov I think we can drop the final drm_put in the error case? I think the unwinding in current devm code should take care of it. Alex >

[PATCH 1/1] drm/amdgpu: Convert to using devm_drm_dev_alloc()

2020-09-03 Thread Luben Tuikov
Convert to using devm_drm_dev_alloc(), as drm_dev_init() is going away. Signed-off-by: Luben Tuikov --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c