Re: [PATCH v3 07/11] drm: omapdrm: Register omapdrm platform device in omapdss driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 11/08/17 16:49, 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@xxxxxxxxxxxxxxxx>
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
> ---
> Changes since v1:
> 
> - Drop the CONFIG_DRM_OMAP conditional compilation
> - Unregister the platform device at exit time
> ---
>  drivers/gpu/drm/omapdrm/dss/core.c | 15 +++++++++++++++
>  drivers/gpu/drm/omapdrm/omap_drv.c |  2 +-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/core.c b/drivers/gpu/drm/omapdrm/dss/core.c
> index 4dabe32c7098..8678d8b4efce 100644
> --- a/drivers/gpu/drm/omapdrm/dss/core.c
> +++ b/drivers/gpu/drm/omapdrm/dss/core.c
> @@ -22,6 +22,7 @@
>  
>  #define DSS_SUBSYS_NAME "CORE"
>  
> +#include <linux/dma-mapping.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/clk.h>
> @@ -103,6 +104,14 @@ static void (*dss_output_drv_unreg_funcs[])(void) = {
>  	dss_uninit_platform_driver,
>  };
>  
> +static struct platform_device omap_drm_device = {
> +	.dev = {
> +		.coherent_dma_mask = DMA_BIT_MASK(32),
> +	},
> +	.name = "omapdrm_",
> +	.id = 0,
> +};
> +
>  static int __init omap_dss_init(void)
>  {
>  	int r;
> @@ -118,6 +127,10 @@ static int __init omap_dss_init(void)
>  			goto err_reg;
>  	}
>  
> +	r = platform_device_register(&omap_drm_device);
> +	if (r)
> +		goto err_reg;
> +

Was there a reason to create the omapdrm device in omap_dss_init (i.e.
module_init), instead of omapdss's probe? Now the omapdrm device is
always created even if there's no DSS device on the SoC.

 Tomi

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux