[PATCH/RFC 6/7] drm: omapdrm: Register omapdrm platform device in omapdss driver

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Dec 14 11:54:00 UTC 2016


Hi Tomi,

On Wednesday 14 Dec 2016 10:20:39 Tomi Valkeinen wrote:
> On 14/12/16 01:38, Laurent Pinchart wrote:
> > The omapdrm platform device is a virtual device created for the sole
> > purpose of handling the omapdss/omapdrm driver split. It should
> > eventually be removed. As a first step to ease refactoring move its
> > registration from platform code to driver code.
> > 
> > The omapdrm driver name must be changed internally to avoid probing both
> > the device registered in platform code and the device registered in the
> > omapdss driver, as that would otherwise break bisection.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> >  drivers/gpu/drm/omapdrm/dss/core.c | 17 +++++++++++++++++
> >  drivers/gpu/drm/omapdrm/omap_drv.c |  2 +-
> >  2 files changed, 18 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/omapdrm/dss/core.c
> > b/drivers/gpu/drm/omapdrm/dss/core.c index 1bf978b5c5bc..b7c44b85b7c3
> > 100644
> > --- a/drivers/gpu/drm/omapdrm/dss/core.c
> > +++ b/drivers/gpu/drm/omapdrm/dss/core.c

[snip]

> > @@ -285,6 +286,16 @@ static void (*dss_output_drv_unreg_funcs[])(void) = {
> > 
> >  	dss_uninit_platform_driver,
> >  
> >  };
> > 
> > +#if IS_ENABLED(CONFIG_DRM_OMAP)
> 
> The #ifs are not needed, don't compile this file if there's no DRM_OMAP.

Right, for a moment I forgot that the dss core isn't shared anymore between 
DRM and FBDEV. I'll fix this.

> > +static struct platform_device omap_drm_device = {
> > +	.dev = {
> > +		.coherent_dma_mask = DMA_BIT_MASK(32),
> > +	},
> > +	.name = "omapdrm_",
> > +	.id = 0,
> > +};
> > +#endif
> > +
> >  static int __init omap_dss_init(void)
> >  {
> >  	int r;
> > @@ -300,6 +311,12 @@ static int __init omap_dss_init(void)
> >  			goto err_reg;
> >  	}
> > 
> > +#if IS_ENABLED(CONFIG_DRM_OMAP)
> > +	r = platform_device_register(&omap_drm_device);
> > +	if (r)
> > +		goto err_reg;
> > +#endif
> 
> Where is the unregister?

Oops. Will fix too.

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list