Re: [PATCH v3 1/9] drm/komeda: komeda_dev/pipeline/component definition and initialzation
On Mon, Dec 24, 2018 at 07:57:41PM +0800, Liviu Dudau wrote: > On Fri, Dec 21, 2018 at 09:58:55AM +, james qian wang (Arm Technology > China) wrote: > > 1. Added a brief definition of komeda_dev/pipeline/component, this change > >didn't add the detailed component features and capabilities, which will > >be added in the following changes. > > 2. Corresponding resources discovery and initialzation functions. > > > > Signed-off-by: James (Qian) Wang > > > > Changes in v3: > > - Fixed style problem found by checkpatch.pl --strict. > > > > Changes in v2: > > - Unified abbreviation of "pipeline" to "pipe". > > --- > > drivers/gpu/drm/arm/Kconfig | 2 + > > drivers/gpu/drm/arm/Makefile | 1 + > > drivers/gpu/drm/arm/display/Kbuild| 3 + > > drivers/gpu/drm/arm/display/Kconfig | 14 + > > .../drm/arm/display/include/malidp_product.h | 23 ++ > > .../drm/arm/display/include/malidp_utils.h| 16 + > > drivers/gpu/drm/arm/display/komeda/Makefile | 11 + > > .../gpu/drm/arm/display/komeda/komeda_dev.c | 117 ++ > > .../gpu/drm/arm/display/komeda/komeda_dev.h | 98 + > > .../drm/arm/display/komeda/komeda_pipeline.c | 198 ++ > > .../drm/arm/display/komeda/komeda_pipeline.h | 350 ++ > > 11 files changed, 833 insertions(+) > > create mode 100644 drivers/gpu/drm/arm/display/Kbuild > > create mode 100644 drivers/gpu/drm/arm/display/Kconfig > > create mode 100644 drivers/gpu/drm/arm/display/include/malidp_product.h > > create mode 100644 drivers/gpu/drm/arm/display/include/malidp_utils.h > > create mode 100644 drivers/gpu/drm/arm/display/komeda/Makefile > > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_dev.h > > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c > > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h > > > > diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig > > index f9f7761cb2f4..a204103b3efb 100644 > > --- a/drivers/gpu/drm/arm/Kconfig > > +++ b/drivers/gpu/drm/arm/Kconfig > > @@ -37,4 +37,6 @@ config DRM_MALI_DISPLAY > > > > If compiled as a module it will be called mali-dp. > > > > +source "drivers/gpu/drm/arm/display/Kconfig" > > + > > endmenu > > diff --git a/drivers/gpu/drm/arm/Makefile b/drivers/gpu/drm/arm/Makefile > > index 3bf31d1a4722..120bef801fcf 100644 > > --- a/drivers/gpu/drm/arm/Makefile > > +++ b/drivers/gpu/drm/arm/Makefile > > @@ -3,3 +3,4 @@ obj-$(CONFIG_DRM_HDLCD) += hdlcd.o > > mali-dp-y := malidp_drv.o malidp_hw.o malidp_planes.o malidp_crtc.o > > mali-dp-y += malidp_mw.o > > obj-$(CONFIG_DRM_MALI_DISPLAY) += mali-dp.o > > +obj-$(CONFIG_DRM_KOMEDA) += display/ > > diff --git a/drivers/gpu/drm/arm/display/Kbuild > > b/drivers/gpu/drm/arm/display/Kbuild > > new file mode 100644 > > index ..382f1ca831e4 > > --- /dev/null > > +++ b/drivers/gpu/drm/arm/display/Kbuild > > @@ -0,0 +1,3 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > + > > +obj-$(CONFIG_DRM_KOMEDA) += komeda/ > > diff --git a/drivers/gpu/drm/arm/display/Kconfig > > b/drivers/gpu/drm/arm/display/Kconfig > > new file mode 100644 > > index ..cec0639e3aa1 > > --- /dev/null > > +++ b/drivers/gpu/drm/arm/display/Kconfig > > @@ -0,0 +1,14 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +config DRM_KOMEDA > > + tristate "ARM Komeda display driver" > > + depends on DRM && OF > > + depends on COMMON_CLK > > + select DRM_KMS_HELPER > > + select DRM_KMS_CMA_HELPER > > + select DRM_GEM_CMA_HELPER > > + select VIDEOMODE_HELPERS > > + help > > + Choose this option if you want to compile the ARM Komeda display > > + Processor driver. It supports the D71 variants of the hardware. > > + > > + If compiled as a module it will be called komeda. > > diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h > > b/drivers/gpu/drm/arm/display/include/malidp_product.h > > new file mode 100644 > > index ..b35fc5db866b > > --- /dev/null > > +++ b/drivers/gpu/drm/arm/display/include/malidp_product.h > > @@ -0,0 +1,23 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* > > + * (C) COPYRIGHT 2018 ARM Limited. All rights reserved. > > + * Author: James.Qian.Wang > > + * > > + */ > > +#ifndef _MALIDP_PRODUCT_H_ > > +#define _MALIDP_PRODUCT_H_ > > + > > +/* Product identification */ > > +#define MALIDP_CORE_ID(__product, __major, __minor, __status) \ > > + __product) & 0x) << 16) | (((__major) & 0xF) << 12) | \ > > + (((__minor) & 0xF) << 8) | ((__status) & 0xFF)) > > + > > +#define MALIDP_CORE_ID_PRODUCT_ID(__core_id) ((__u32)(__core_id) >> 16) > > +#define MALIDP_CORE_ID_MAJOR(__core_id) (((__u32)(__core_id) >> 12) & > > 0xF) > > +#define MALIDP_CORE_ID_MINOR(__core_id) (((__u32)(__core_id) >> 8) & > > 0xF) > > +#define
Re: [PATCH v3 1/9] drm/komeda: komeda_dev/pipeline/component definition and initialzation
On Fri, Dec 21, 2018 at 09:58:55AM +, james qian wang (Arm Technology China) wrote: > 1. Added a brief definition of komeda_dev/pipeline/component, this change >didn't add the detailed component features and capabilities, which will >be added in the following changes. > 2. Corresponding resources discovery and initialzation functions. > > Signed-off-by: James (Qian) Wang > > Changes in v3: > - Fixed style problem found by checkpatch.pl --strict. > > Changes in v2: > - Unified abbreviation of "pipeline" to "pipe". > --- > drivers/gpu/drm/arm/Kconfig | 2 + > drivers/gpu/drm/arm/Makefile | 1 + > drivers/gpu/drm/arm/display/Kbuild| 3 + > drivers/gpu/drm/arm/display/Kconfig | 14 + > .../drm/arm/display/include/malidp_product.h | 23 ++ > .../drm/arm/display/include/malidp_utils.h| 16 + > drivers/gpu/drm/arm/display/komeda/Makefile | 11 + > .../gpu/drm/arm/display/komeda/komeda_dev.c | 117 ++ > .../gpu/drm/arm/display/komeda/komeda_dev.h | 98 + > .../drm/arm/display/komeda/komeda_pipeline.c | 198 ++ > .../drm/arm/display/komeda/komeda_pipeline.h | 350 ++ > 11 files changed, 833 insertions(+) > create mode 100644 drivers/gpu/drm/arm/display/Kbuild > create mode 100644 drivers/gpu/drm/arm/display/Kconfig > create mode 100644 drivers/gpu/drm/arm/display/include/malidp_product.h > create mode 100644 drivers/gpu/drm/arm/display/include/malidp_utils.h > create mode 100644 drivers/gpu/drm/arm/display/komeda/Makefile > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_dev.c > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_dev.h > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c > create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h > > diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig > index f9f7761cb2f4..a204103b3efb 100644 > --- a/drivers/gpu/drm/arm/Kconfig > +++ b/drivers/gpu/drm/arm/Kconfig > @@ -37,4 +37,6 @@ config DRM_MALI_DISPLAY > > If compiled as a module it will be called mali-dp. > > +source "drivers/gpu/drm/arm/display/Kconfig" > + > endmenu > diff --git a/drivers/gpu/drm/arm/Makefile b/drivers/gpu/drm/arm/Makefile > index 3bf31d1a4722..120bef801fcf 100644 > --- a/drivers/gpu/drm/arm/Makefile > +++ b/drivers/gpu/drm/arm/Makefile > @@ -3,3 +3,4 @@ obj-$(CONFIG_DRM_HDLCD) += hdlcd.o > mali-dp-y := malidp_drv.o malidp_hw.o malidp_planes.o malidp_crtc.o > mali-dp-y += malidp_mw.o > obj-$(CONFIG_DRM_MALI_DISPLAY) += mali-dp.o > +obj-$(CONFIG_DRM_KOMEDA) += display/ > diff --git a/drivers/gpu/drm/arm/display/Kbuild > b/drivers/gpu/drm/arm/display/Kbuild > new file mode 100644 > index ..382f1ca831e4 > --- /dev/null > +++ b/drivers/gpu/drm/arm/display/Kbuild > @@ -0,0 +1,3 @@ > +# SPDX-License-Identifier: GPL-2.0 > + > +obj-$(CONFIG_DRM_KOMEDA) += komeda/ > diff --git a/drivers/gpu/drm/arm/display/Kconfig > b/drivers/gpu/drm/arm/display/Kconfig > new file mode 100644 > index ..cec0639e3aa1 > --- /dev/null > +++ b/drivers/gpu/drm/arm/display/Kconfig > @@ -0,0 +1,14 @@ > +# SPDX-License-Identifier: GPL-2.0 > +config DRM_KOMEDA > + tristate "ARM Komeda display driver" > + depends on DRM && OF > + depends on COMMON_CLK > + select DRM_KMS_HELPER > + select DRM_KMS_CMA_HELPER > + select DRM_GEM_CMA_HELPER > + select VIDEOMODE_HELPERS > + help > + Choose this option if you want to compile the ARM Komeda display > + Processor driver. It supports the D71 variants of the hardware. > + > + If compiled as a module it will be called komeda. > diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h > b/drivers/gpu/drm/arm/display/include/malidp_product.h > new file mode 100644 > index ..b35fc5db866b > --- /dev/null > +++ b/drivers/gpu/drm/arm/display/include/malidp_product.h > @@ -0,0 +1,23 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * (C) COPYRIGHT 2018 ARM Limited. All rights reserved. > + * Author: James.Qian.Wang > + * > + */ > +#ifndef _MALIDP_PRODUCT_H_ > +#define _MALIDP_PRODUCT_H_ > + > +/* Product identification */ > +#define MALIDP_CORE_ID(__product, __major, __minor, __status) \ > + __product) & 0x) << 16) | (((__major) & 0xF) << 12) | \ > + (((__minor) & 0xF) << 8) | ((__status) & 0xFF)) > + > +#define MALIDP_CORE_ID_PRODUCT_ID(__core_id) ((__u32)(__core_id) >> 16) > +#define MALIDP_CORE_ID_MAJOR(__core_id) (((__u32)(__core_id) >> 12) & > 0xF) > +#define MALIDP_CORE_ID_MINOR(__core_id) (((__u32)(__core_id) >> 8) & > 0xF) > +#define MALIDP_CORE_ID_STATUS(__core_id) (((__u32)(__core_id)) & 0xFF) > + > +/* Mali-display product IDs */ > +#define MALIDP_D71_PRODUCT_ID 0x0071 > + > +#endif /* _MALIDP_PRODUCT_H_ */ > diff --git a/drivers/gpu/drm/arm/display/include/malidp_utils.h >
[PATCH v3 1/9] drm/komeda: komeda_dev/pipeline/component definition and initialzation
1. Added a brief definition of komeda_dev/pipeline/component, this change didn't add the detailed component features and capabilities, which will be added in the following changes. 2. Corresponding resources discovery and initialzation functions. Signed-off-by: James (Qian) Wang Changes in v3: - Fixed style problem found by checkpatch.pl --strict. Changes in v2: - Unified abbreviation of "pipeline" to "pipe". --- drivers/gpu/drm/arm/Kconfig | 2 + drivers/gpu/drm/arm/Makefile | 1 + drivers/gpu/drm/arm/display/Kbuild| 3 + drivers/gpu/drm/arm/display/Kconfig | 14 + .../drm/arm/display/include/malidp_product.h | 23 ++ .../drm/arm/display/include/malidp_utils.h| 16 + drivers/gpu/drm/arm/display/komeda/Makefile | 11 + .../gpu/drm/arm/display/komeda/komeda_dev.c | 117 ++ .../gpu/drm/arm/display/komeda/komeda_dev.h | 98 + .../drm/arm/display/komeda/komeda_pipeline.c | 198 ++ .../drm/arm/display/komeda/komeda_pipeline.h | 350 ++ 11 files changed, 833 insertions(+) create mode 100644 drivers/gpu/drm/arm/display/Kbuild create mode 100644 drivers/gpu/drm/arm/display/Kconfig create mode 100644 drivers/gpu/drm/arm/display/include/malidp_product.h create mode 100644 drivers/gpu/drm/arm/display/include/malidp_utils.h create mode 100644 drivers/gpu/drm/arm/display/komeda/Makefile create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_dev.c create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_dev.h create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.c create mode 100644 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig index f9f7761cb2f4..a204103b3efb 100644 --- a/drivers/gpu/drm/arm/Kconfig +++ b/drivers/gpu/drm/arm/Kconfig @@ -37,4 +37,6 @@ config DRM_MALI_DISPLAY If compiled as a module it will be called mali-dp. +source "drivers/gpu/drm/arm/display/Kconfig" + endmenu diff --git a/drivers/gpu/drm/arm/Makefile b/drivers/gpu/drm/arm/Makefile index 3bf31d1a4722..120bef801fcf 100644 --- a/drivers/gpu/drm/arm/Makefile +++ b/drivers/gpu/drm/arm/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_DRM_HDLCD) += hdlcd.o mali-dp-y := malidp_drv.o malidp_hw.o malidp_planes.o malidp_crtc.o mali-dp-y += malidp_mw.o obj-$(CONFIG_DRM_MALI_DISPLAY) += mali-dp.o +obj-$(CONFIG_DRM_KOMEDA) += display/ diff --git a/drivers/gpu/drm/arm/display/Kbuild b/drivers/gpu/drm/arm/display/Kbuild new file mode 100644 index ..382f1ca831e4 --- /dev/null +++ b/drivers/gpu/drm/arm/display/Kbuild @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_DRM_KOMEDA) += komeda/ diff --git a/drivers/gpu/drm/arm/display/Kconfig b/drivers/gpu/drm/arm/display/Kconfig new file mode 100644 index ..cec0639e3aa1 --- /dev/null +++ b/drivers/gpu/drm/arm/display/Kconfig @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0 +config DRM_KOMEDA + tristate "ARM Komeda display driver" + depends on DRM && OF + depends on COMMON_CLK + select DRM_KMS_HELPER + select DRM_KMS_CMA_HELPER + select DRM_GEM_CMA_HELPER + select VIDEOMODE_HELPERS + help + Choose this option if you want to compile the ARM Komeda display + Processor driver. It supports the D71 variants of the hardware. + + If compiled as a module it will be called komeda. diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h b/drivers/gpu/drm/arm/display/include/malidp_product.h new file mode 100644 index ..b35fc5db866b --- /dev/null +++ b/drivers/gpu/drm/arm/display/include/malidp_product.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * (C) COPYRIGHT 2018 ARM Limited. All rights reserved. + * Author: James.Qian.Wang + * + */ +#ifndef _MALIDP_PRODUCT_H_ +#define _MALIDP_PRODUCT_H_ + +/* Product identification */ +#define MALIDP_CORE_ID(__product, __major, __minor, __status) \ + __product) & 0x) << 16) | (((__major) & 0xF) << 12) | \ + (((__minor) & 0xF) << 8) | ((__status) & 0xFF)) + +#define MALIDP_CORE_ID_PRODUCT_ID(__core_id) ((__u32)(__core_id) >> 16) +#define MALIDP_CORE_ID_MAJOR(__core_id) (((__u32)(__core_id) >> 12) & 0xF) +#define MALIDP_CORE_ID_MINOR(__core_id) (((__u32)(__core_id) >> 8) & 0xF) +#define MALIDP_CORE_ID_STATUS(__core_id) (((__u32)(__core_id)) & 0xFF) + +/* Mali-display product IDs */ +#define MALIDP_D71_PRODUCT_ID 0x0071 + +#endif /* _MALIDP_PRODUCT_H_ */ diff --git a/drivers/gpu/drm/arm/display/include/malidp_utils.h b/drivers/gpu/drm/arm/display/include/malidp_utils.h new file mode 100644 index ..63cc47cefcf8 --- /dev/null +++ b/drivers/gpu/drm/arm/display/include/malidp_utils.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * (C) COPYRIGHT 2018 ARM Limited. All rights reserved. + * Author: James.Qian.Wang + * + */ +#ifndef