diff mbox

[07/19] drm/host1x: Call drm_put_dev directly instead of drm_platform_exit

Message ID 1383485485-8210-8-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Nov. 3, 2013, 1:31 p.m. UTC
I'm a bit confused about how this all works wrt host1x clients, but
this patch looks like the right thing to me.

Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/host1x/drm/drm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Thierry Reding Nov. 4, 2013, 9:10 a.m. UTC | #1
On Sun, Nov 03, 2013 at 02:31:13PM +0100, Daniel Vetter wrote:
> I'm a bit confused about how this all works wrt host1x clients, but
> this patch looks like the right thing to me.
> 
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/host1x/drm/drm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

This has been largely rewritten in the code that I submitted in my 3.13
pull request. In fact Tegra DRM no longer uses drm_platform, but a
custom bus type to deal with the quirkiness of the multi-driver
architecture.

So if you really want to get rid of drm_bus altogether I'd appreciate a
heads-up so I know what's coming and can prepare.

Thierry
Thierry Reding Nov. 4, 2013, 9:13 a.m. UTC | #2
On Mon, Nov 04, 2013 at 10:10:38AM +0100, Thierry Reding wrote:
> On Sun, Nov 03, 2013 at 02:31:13PM +0100, Daniel Vetter wrote:
> > I'm a bit confused about how this all works wrt host1x clients, but
> > this patch looks like the right thing to me.
> > 
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> >  drivers/gpu/host1x/drm/drm.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> This has been largely rewritten in the code that I submitted in my 3.13
> pull request. In fact Tegra DRM no longer uses drm_platform, but a
> custom bus type to deal with the quirkiness of the multi-driver
> architecture.

And for what it's worth, there's a drm_host1x_exit() that actually does
only drm_put_dev(), which I guess could be simplified in the way that
you've done here, but I sort of liked the symmetry between an *_init()/
*_exit() pair of functions.

Thierry
Daniel Vetter Nov. 4, 2013, 10:14 a.m. UTC | #3
On Mon, Nov 4, 2013 at 10:10 AM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Sun, Nov 03, 2013 at 02:31:13PM +0100, Daniel Vetter wrote:
>> I'm a bit confused about how this all works wrt host1x clients, but
>> this patch looks like the right thing to me.
>>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>> ---
>>  drivers/gpu/host1x/drm/drm.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> This has been largely rewritten in the code that I submitted in my 3.13
> pull request. In fact Tegra DRM no longer uses drm_platform, but a
> custom bus type to deal with the quirkiness of the multi-driver
> architecture.
>
> So if you really want to get rid of drm_bus altogether I'd appreciate a
> heads-up so I know what's coming and can prepare.

It's almost completely gone now, the one thing left to do is rip out
bus->set_busid. But I have that planned already.

http://cgit.freedesktop.org/~danvet/drm/log/?h=drm-init-cleanup

I guess I get to rebase the entire thing again, meh.

<rant>
It'd be awesome of other drm drivers would submit their stuff a bit
earlier, atm there's absolutely nothing in drm-next beside all of
intel and a few things for armada... Maybe we need to have a drm
integration tree to make this a bit less frustrating.
</rant>

Cheers, Daniel
Thierry Reding Nov. 4, 2013, 10:51 a.m. UTC | #4
On Mon, Nov 04, 2013 at 11:14:39AM +0100, Daniel Vetter wrote:
> On Mon, Nov 4, 2013 at 10:10 AM, Thierry Reding
> <thierry.reding@gmail.com> wrote:
> > On Sun, Nov 03, 2013 at 02:31:13PM +0100, Daniel Vetter wrote:
> >> I'm a bit confused about how this all works wrt host1x clients, but
> >> this patch looks like the right thing to me.
> >>
> >> Cc: Thierry Reding <thierry.reding@gmail.com>
> >> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >> ---
> >>  drivers/gpu/host1x/drm/drm.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > This has been largely rewritten in the code that I submitted in my 3.13
> > pull request. In fact Tegra DRM no longer uses drm_platform, but a
> > custom bus type to deal with the quirkiness of the multi-driver
> > architecture.
> >
> > So if you really want to get rid of drm_bus altogether I'd appreciate a
> > heads-up so I know what's coming and can prepare.
> 
> It's almost completely gone now, the one thing left to do is rip out
> bus->set_busid. But I have that planned already.
> 
> http://cgit.freedesktop.org/~danvet/drm/log/?h=drm-init-cleanup
> 
> I guess I get to rebase the entire thing again, meh.
> 
> <rant>
> It'd be awesome of other drm drivers would submit their stuff a bit
> earlier, atm there's absolutely nothing in drm-next beside all of
> intel and a few things for armada... Maybe we need to have a drm
> integration tree to make this a bit less frustrating.
> </rant>

Yeah, I know. I had actually planned on sending out this pull request
much earlier, but then all the discussion around DRM panel and device
tree bindings started again...

Thierry
diff mbox

Patch

diff --git a/drivers/gpu/host1x/drm/drm.c b/drivers/gpu/host1x/drm/drm.c
index df7d90a3a4fa..e2eabc4078d9 100644
--- a/drivers/gpu/host1x/drm/drm.c
+++ b/drivers/gpu/host1x/drm/drm.c
@@ -161,7 +161,6 @@  int host1x_drm_init(struct host1x_drm *host1x, struct drm_device *drm)
 
 int host1x_drm_exit(struct host1x_drm *host1x)
 {
-	struct platform_device *pdev = to_platform_device(host1x->dev);
 	struct host1x_client *client;
 
 	if (!host1x->drm)
@@ -184,7 +183,7 @@  int host1x_drm_exit(struct host1x_drm *host1x)
 
 	mutex_unlock(&host1x->clients_lock);
 
-	drm_platform_exit(&tegra_drm_driver, pdev);
+	drm_put_dev(host1x->drm);
 	host1x->drm = NULL;
 
 	return 0;