Add ARCH_MULTIPLATFORM support
Subsystems (8)
cover Add ARCH_MULTIPLATFORM support
From: Rob Clark <[email protected]>
I was updating omapdrm to support ARCH_MULTIPLATFORM, and noticed that imx and exynos only required a Kconfig change, so I went ahead and updated them too. The shmobile driver didn't seem so straightforward due to backlight device stuff, so I skipped it.
Having ARCH_MULTIPLATFORM support is quite convenient to be able to at least compile test the different ARM DRM devices without having to switch configs.
Rob Clark (3):
drm/omap: add support for ARCH_MULTIPLATFORM
drm/exynos: add support for ARCH_MULTIPLATFORM
drm/imx: add support for ARCH_MULTIPLATFORM
arch/arm/mach-omap2/drm.c | 7 +++++++ drivers/gpu/drm/exynos/Kconfig | 2 +- drivers/staging/imx-drm/Kconfig | 2 +- drivers/staging/omapdrm/Kconfig | 2 +- drivers/staging/omapdrm/omap_dmm_tiler.h | 1 - drivers/staging/omapdrm/omap_drv.c | 6 +++++- drivers/staging/omapdrm/omap_drv.h | 2 ++ include/linux/platform_data/omap_drm.h | 1 + 8 files changed, 18 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/3 drm/omap: add support for ARCH_MULTIPLATFORM
From: Rob Clark <[email protected]>
Remove usage of plat/cpu.h and get information from platform data instead. This enables omapdrm to be built with ARCH_MULTIPLATFORM.
--- arch/arm/mach-omap2/drm.c | 7 +++++++ drivers/staging/omapdrm/Kconfig | 2 +- drivers/staging/omapdrm/omap_dmm_tiler.h | 1 - drivers/staging/omapdrm/omap_drv.c | 6 +++++- drivers/staging/omapdrm/omap_drv.h | 2 ++ include/linux/platform_data/omap_drm.h | 1 + 6 files changed, 16 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/drm.c +7 -0
@@ -23,15 +23,20 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> +#include <linux/platform_data/omap_drm.h> #include <plat/omap_device.h> #include <plat/omap_hwmod.h> +#include <plat/cpu.h> #if defined(CONFIG_DRM_OMAP ) || (CONFIG_DRM_OMAP_MODULE ) +static struct omap_drm_platform_data platform_data; +static struct platform_device omap_drm_device = { .dev = { .coherent_dma_mask =DMA_BIT_MASK (32 ), + .platform_data = &platform_data, }, .name ="omapdrm" , .id = 0,
@@ -52,6 +57,8 @@ static int __init omap_init_drm(void) oh->name); } + platform_data.omaprev =GET_OMAP_REVISION (); +return platform_device_register (&omap_drm_device); }
drivers/staging/omapdrm/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_OMAP tristate "OMAP DRM" depends on DRM && !CONFIG_FB_OMAP2 - depends on ARCH_OMAP2PLUS + depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM select DRM_KMS_HELPER select OMAP2_DSS select FB_SYS_FILLRECT
drivers/staging/omapdrm/omap_dmm_tiler.h +0 -1
@@ -16,7 +16,6 @@#ifndef OMAP_DMM_TILER_H #define OMAP_DMM_TILER_H -#include <plat/cpu.h> #include "omap_drv.h" #include "tcm.h"
drivers/staging/omapdrm/omap_drv.c +5 -1
@@ -278,13 +278,14 @@ static void omap_modeset_free(struct drm_device *dev)static int ioctl_get_param (struct drm_device *dev,void *data,struct drm_file *file_priv) { +struct omap_drm_private *priv = dev->dev_private;struct drm_omap_param *args = data;DBG ("%p: param=%llu" , dev, args->param);switch (args->param) {case OMAP_PARAM_CHIPSET_ID : - args->value =GET_OMAP_TYPE ; + args->value = priv->omaprev;break ;default :DBG ("unknown parameter %lld" , args->param);
@@ -416,6 +417,7 @@ struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = {*/ static int dev_load (struct drm_device *dev,unsigned long flags) { +struct omap_drm_platform_data *pdata = dev->dev->platform_data;struct omap_drm_private *priv;int ret;
@@ -427,6 +429,8 @@ static int dev_load(struct drm_device *dev, unsigned long flags)return -ENOMEM ; } + priv->omaprev = pdata->omaprev; + dev->dev_private = priv; priv->wq =alloc_ordered_workqueue ("omapdrm" ,0 );
drivers/staging/omapdrm/omap_drv.h +2 -0
@@ -89,6 +89,8 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait, unsigned long timeout);struct omap_drm_private { +uint32_t omaprev; +unsigned int num_crtcs;struct drm_crtc *crtcs[8 ];
include/linux/platform_data/omap_drm.h +1 -0
@@ -46,6 +46,7 @@ struct omap_kms_platform_data { };struct omap_drm_platform_data { +uint32_t omaprev;struct omap_kms_platform_data *kms_pdata; };
Signature · 1 line
1.7.9.5
Re: [PATCH 1/3] drm/omap: add support for ARCH_MULTIPLATFORM
Quoted 54 lines · Rob Clark
From: Rob Clark <[email protected]>
Remove usage of
plat/cpu.hand get information from platform data instead. This enables omapdrm to be built withARCH_MULTIPLATFORM.Signed-off-by Rob Clark <[email protected]>--- arch/arm/mach-omap2/drm.c | 7 +++++++ drivers/staging/omapdrm/Kconfig | 2 +- drivers/staging/omapdrm/omap_dmm_tiler.h | 1 - drivers/staging/omapdrm/omap_drv.c | 6 +++++- drivers/staging/omapdrm/omap_drv.h | 2 ++ include/linux/platform_data/omap_drm.h | 1 + 6 files changed, 16 insertions(+), 3 deletions(-)arch/arm/mach-omap2/drm.c +7
-0@@ -23,15 +23,20 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> +#include <linux/platform_data/omap_drm.h> #include <plat/omap_device.h> #include <plat/omap_hwmod.h> +#include <plat/cpu.h> #if defined(CONFIG_DRM_OMAP ) || (CONFIG_DRM_OMAP_MODULE ) +static struct omap_drm_platform_data platform_data; +static struct platform_device omap_drm_device = { .dev = { .coherent_dma_mask =DMA_BIT_MASK (32 ), + .platform_data = &platform_data, }, .name ="omapdrm" , .id = 0,@@ -52,6 +57,8 @@ static int __init omap_init_drm(void) oh->name); } + platform_data.omaprev =GET_OMAP_REVISION (); +return platform_device_register (&omap_drm_device); }drivers/staging/omapdrm/Kconfig +0
-0
drivers/staging/omapdrm/Kconfig line 5
Quoted 5 lines
drivers/staging/omapdrm/Kconfig +1
-1@@ -2,7 +2,7 @@ config DRM_OMAP tristate "OMAP DRM" depends on DRM && !CONFIG_FB_OMAP2 - depends on ARCH_OMAP2PLUS + depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
If you remove the omap include dependencies, is there any reason to keep ARCH_OMAP2PLUS here? And if you remove that, you don't need ARCH_MULTIPLATFORM either.
omapdrm is not a driver for OMAP, even if the name so suggests. It's a driver for a display subsystem hardware, that happens to be used in OMAP (with the help of omapdss driver), and the tiler memory system used in OMAP.
I just recently removed omap dependencies from omapdss driver, and it now compiles fine on x86 config also.
Tomi
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/3] drm/omap: add support for ARCH_MULTIPLATFORM
Quoted 49 lines · Tomi Valkeinen
Quoted 48 lines · Rob Clark
From: Rob Clark <[email protected]>
Remove usage of
plat/cpu.hand get information from platform data instead. This enables omapdrm to be built withARCH_MULTIPLATFORM.Signed-off-by Rob Clark <[email protected]>--- arch/arm/mach-omap2/drm.c | 7 +++++++ drivers/staging/omapdrm/Kconfig | 2 +- drivers/staging/omapdrm/omap_dmm_tiler.h | 1 - drivers/staging/omapdrm/omap_drv.c | 6 +++++- drivers/staging/omapdrm/omap_drv.h | 2 ++ include/linux/platform_data/omap_drm.h | 1 + 6 files changed, 16 insertions(+), 3 deletions(-)arch/arm/mach-omap2/drm.c +7
-0@@ -23,15 +23,20 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> +#include <linux/platform_data/omap_drm.h> #include <plat/omap_device.h> #include <plat/omap_hwmod.h> +#include <plat/cpu.h> #if defined(CONFIG_DRM_OMAP ) || (CONFIG_DRM_OMAP_MODULE ) +static struct omap_drm_platform_data platform_data; +static struct platform_device omap_drm_device = { .dev = { .coherent_dma_mask =DMA_BIT_MASK (32 ), + .platform_data = &platform_data, }, .name ="omapdrm" , .id = 0,@@ -52,6 +57,8 @@ static int __init omap_init_drm(void) oh->name); } + platform_data.omaprev =GET_OMAP_REVISION (); +return platform_device_register (&omap_drm_device);
Quoted 15 lines
drivers/staging/omapdrm/Kconfig line 5
Quoted 11 lines
arch/arm/mach-omap2/drm.c +0
-0}drivers/staging/omapdrm/Kconfig +1
-1@@ -2,7 +2,7 @@ config DRM_OMAP tristate "OMAP DRM" depends on DRM && !CONFIG_FB_OMAP2 - depends on ARCH_OMAP2PLUS + depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORMIf you remove the omap include dependencies, is there any reason to keep
ARCH_OMAP2PLUShere? And if you remove that, you don't needARCH_MULTIPLATFORMeither.
I suppose probably not.. although it does seem a bit pointless to build it for x86 for the most point, other than compile testing changes in drm core.
I could go with whichever approach that people prefer.
BR,
-R
Quoted 10 lines
omapdrm is not a driver for OMAP, even if the name so suggests. It's a driver for a display subsystem hardware, that happens to be used in OMAP (with the help of omapdss driver), and the tiler memory system used in OMAP.
I just recently removed omap dependencies from omapdss driver, and it now compiles fine on x86 config also.
Tomi
PATCH 2/3 drm/exynos: add support for ARCH_MULTIPLATFORM
In reply to Rob ClarkFrom: Rob Clark <[email protected]>
Exynos does not seem to have any dependency on anything from platform headers so just needs Kconfig updated to build in ARCH_MULTIPLATFORM builds.
--- drivers/gpu/drm/exynos/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/Kconfig +1 -1
@@ -1,6 +1,6 @@ config DRM_EXYNOS tristate "DRM Support for Samsung SoC EXYNOS Series" - depends on DRM && PLAT_SAMSUNG + depends on DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM) select DRM_KMS_HELPER select FB_CFB_FILLRECT select FB_CFB_COPYAREA
Signature · 1 line
1.7.9.5
Re: [PATCH 2/3] drm/exynos: add support for ARCH_MULTIPLATFORM
Quoted 10 lines · Rob Clark
From: Rob Clark <[email protected]>
Exynos does not seem to have any dependency on anything from platform headers so just needs
Kconfigupdated to build inARCH_MULTIPLATFORMbuilds.Signed-off-by Rob Clark <[email protected]>--- drivers/gpu/drm/exynos/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
As this isn't in the drivers/staging/ directory, I can't take this, it should go through the drm tree.
thanks,
greg k-h
Re: [PATCH 2/3] drm/exynos: add support for ARCH_MULTIPLATFORM
2012/10/31 Greg KH <[email protected]>:
Quoted 12 lines · Rob Clark
Quoted 10 lines
From: Rob Clark <[email protected]>
Exynos does not seem to have any dependency on anything from platform headers so just needs
Kconfigupdated to build inARCH_MULTIPLATFORMbuilds.Signed-off-by Rob Clark <[email protected]>--- drivers/gpu/drm/exynos/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
As this isn't in the
drivers/staging/directory, I can't take this, it should go through the drm tree.thanks,
Applied.
Thank you,
Inki Dae
Quoted 6 lines
greg k-h
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/3 drm/imx: add support for ARCH_MULTIPLATFORM
In reply to Rob ClarkFrom: Rob Clark <[email protected]>
No dependency on plat headers, so only needs Kconfig update to build for ARCH_MULTIPLATFORM.
--- drivers/staging/imx-drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/imx-drm/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_IMX select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER - depends on DRM && ARCH_MXC + depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) help enable i.MX graphics support
Signature · 1 line
1.7.9.5
Re: [PATCH 3/3] drm/imx: add support for ARCH_MULTIPLATFORM
Quoted 6 lines · Rob Clark
From: Rob Clark <[email protected]>
No dependency on plat headers, so only needs
Kconfigupdate to build forARCH_MULTIPLATFORM.Signed-off-by Rob Clark <[email protected]>
Sascha
Quoted 21 lines
--- drivers/staging/imx-drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/imx-drm/Kconfig +1
-1@@ -3,7 +3,7 @@ config DRM_IMX select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER - depends on DRM && ARCH_MXC + depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM) help enable i.MX graphics supportSignature · 1 line
1.7.9.5
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |