Message ID | 1383485485-8210-8-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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
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
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
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 --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;
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(-)