Re: [PATCH V3] drm/exynos: Add DECON driver
Hi Inki, On Mon, Dec 8, 2014 at 7:09 PM, Inki Dae inki@samsung.com wrote: On 2014년 12월 07일 21:04, Ajay Kumar wrote: This series is based on exynos-drm-next branch of Inki Dae's tree at: git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git DECON(Display and Enhancement Controller) is the new IP in exynos7 SOC for generating video signals using pixel data. DECON driver can be used to drive 2 different interfaces on Exynos7: DECON-INT(video controller) and DECON-EXT(Mixer for HDMI) The existing FIMD driver code was used as a template to create DECON driver. Only DECON-INT is supported as of now, and DECON-EXT support will be added later. Signed-off-by: Akshu Agrawal aks...@gmail.com Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- Changes since V1: -- Address comments from Pankaj and do few cleanups. Changes since V2: -- Address more comments from Pankaj and cleanup. .../devicetree/bindings/video/exynos7-decon.txt| 67 ++ drivers/gpu/drm/exynos/Kconfig | 13 +- drivers/gpu/drm/exynos/Makefile|1 + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1042 drivers/gpu/drm/exynos/exynos_drm_drv.c|4 + drivers/gpu/drm/exynos/exynos_drm_drv.h|1 + include/video/exynos7_decon.h | 346 +++ 7 files changed, 1471 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos7-decon.txt create mode 100644 drivers/gpu/drm/exynos/exynos7_drm_decon.c create mode 100644 include/video/exynos7_decon.h diff --git a/Documentation/devicetree/bindings/video/exynos7-decon.txt b/Documentation/devicetree/bindings/video/exynos7-decon.txt new file mode 100644 index 000..14db519 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos7-decon.txt @@ -0,0 +1,67 @@ +Device-Tree bindings for Samsung Exynos7 SoC display controller (DECON) + +DECON (Display and Enhancement Controller) is the Display Controller for the +Exynos7 series of SoCs which transfers the image data from a video memory +buffer to an external LCD interface. + +Required properties: +- compatible: value should be samsung,exynos7-decon; + +- reg: physical base address and length of the DECON registers set. + +- interrupt-parent: should be the phandle of the decon controller's + parent interrupt controller. + +- interrupts: should contain a list of all DECON IP block interrupts in the + order: FIFO Level, VSYNC, LCD_SYSTEM. The interrupt specifier + format depends on the interrupt controller used. + +- interrupt-names: should contain the interrupt names: fifo, vsync, + lcd_sys, in the same order as they were listed in the interrupts +property. + +- pinctrl-0: pin control group to be used for this controller. + +- pinctrl-names: must contain a default entry. + +- clocks: must include clock specifiers corresponding to entries in the + clock-names property. + +- clock-names: list of clock names sorted in the same order as the clocks + property. Must contain pclk_decon0, aclk_decon0, +decon0_eclk, decon0_vclk. Should the DECON driver really care about decon0_eclk and decon0_vclk? If so then What is the purpose of these special clocks? I'm not sure that these clocks should be cared by driver. Until now, Exynos driver has cared about only video source and core source clocks. Can you give me more details about the use of the special clocks? All these 4 clocks are definitely needed for the DECON to function properly. pclk_decon0 and aclk_decon0 are clocks needed for normal operation of DECON. decon0_eclk and decon0_vclk are like pixel clocks. The clock diagram is present in the Exynos7 user manual in clock generation chapter. + +Optional Properties: +- samsung,power-domain: a phandle to DECON power domain node. +- display-timings: timing settings for FIMD, as described in document [1]. + Can be used in case timings cannot be provided otherwise + or to override timings provided by the panel. + +[1]: Documentation/devicetree/bindings/video/display-timing.txt + +Example: + +SoC specific DT entry: + + decon@1393 { + compatible = samsung,exynos7-decon; + interrupt-parent = combiner; + reg = 0x1393 0x1000; + interrupt-names = lcd_sys, vsync, fifo; + interrupts = 0 188 0, 0 189 0, 0 190 0; + clocks = clock_disp PCLK_DECON_INT, + clock_disp ACLK_DECON_INT, + clock_disp SCLK_DECON_INT_ECLK, + clock_disp SCLK_DECON_INT_EXTCLKPLL; + clock-names = pclk_decon0, aclk_decon0, decon0_eclk, + decon0_vclk; + status = disabled; + }; + +Board specific DT entry:
Re: [PATCH V3] drm/exynos: Add DECON driver
On 2014년 12월 07일 21:04, Ajay Kumar wrote: This series is based on exynos-drm-next branch of Inki Dae's tree at: git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git DECON(Display and Enhancement Controller) is the new IP in exynos7 SOC for generating video signals using pixel data. DECON driver can be used to drive 2 different interfaces on Exynos7: DECON-INT(video controller) and DECON-EXT(Mixer for HDMI) The existing FIMD driver code was used as a template to create DECON driver. Only DECON-INT is supported as of now, and DECON-EXT support will be added later. Signed-off-by: Akshu Agrawal aks...@gmail.com Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- Changes since V1: -- Address comments from Pankaj and do few cleanups. Changes since V2: -- Address more comments from Pankaj and cleanup. .../devicetree/bindings/video/exynos7-decon.txt| 67 ++ drivers/gpu/drm/exynos/Kconfig | 13 +- drivers/gpu/drm/exynos/Makefile|1 + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1042 drivers/gpu/drm/exynos/exynos_drm_drv.c|4 + drivers/gpu/drm/exynos/exynos_drm_drv.h|1 + include/video/exynos7_decon.h | 346 +++ 7 files changed, 1471 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos7-decon.txt create mode 100644 drivers/gpu/drm/exynos/exynos7_drm_decon.c create mode 100644 include/video/exynos7_decon.h diff --git a/Documentation/devicetree/bindings/video/exynos7-decon.txt b/Documentation/devicetree/bindings/video/exynos7-decon.txt new file mode 100644 index 000..14db519 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos7-decon.txt @@ -0,0 +1,67 @@ +Device-Tree bindings for Samsung Exynos7 SoC display controller (DECON) + +DECON (Display and Enhancement Controller) is the Display Controller for the +Exynos7 series of SoCs which transfers the image data from a video memory +buffer to an external LCD interface. + +Required properties: +- compatible: value should be samsung,exynos7-decon; + +- reg: physical base address and length of the DECON registers set. + +- interrupt-parent: should be the phandle of the decon controller's + parent interrupt controller. + +- interrupts: should contain a list of all DECON IP block interrupts in the + order: FIFO Level, VSYNC, LCD_SYSTEM. The interrupt specifier + format depends on the interrupt controller used. + +- interrupt-names: should contain the interrupt names: fifo, vsync, + lcd_sys, in the same order as they were listed in the interrupts +property. + +- pinctrl-0: pin control group to be used for this controller. + +- pinctrl-names: must contain a default entry. + +- clocks: must include clock specifiers corresponding to entries in the + clock-names property. + +- clock-names: list of clock names sorted in the same order as the clocks + property. Must contain pclk_decon0, aclk_decon0, +decon0_eclk, decon0_vclk. Should the DECON driver really care about decon0_eclk and decon0_vclk? If so then What is the purpose of these special clocks? I'm not sure that these clocks should be cared by driver. Until now, Exynos driver has cared about only video source and core source clocks. Can you give me more details about the use of the special clocks? + +Optional Properties: +- samsung,power-domain: a phandle to DECON power domain node. +- display-timings: timing settings for FIMD, as described in document [1]. + Can be used in case timings cannot be provided otherwise + or to override timings provided by the panel. + +[1]: Documentation/devicetree/bindings/video/display-timing.txt + +Example: + +SoC specific DT entry: + + decon@1393 { + compatible = samsung,exynos7-decon; + interrupt-parent = combiner; + reg = 0x1393 0x1000; + interrupt-names = lcd_sys, vsync, fifo; + interrupts = 0 188 0, 0 189 0, 0 190 0; + clocks = clock_disp PCLK_DECON_INT, + clock_disp ACLK_DECON_INT, + clock_disp SCLK_DECON_INT_ECLK, + clock_disp SCLK_DECON_INT_EXTCLKPLL; + clock-names = pclk_decon0, aclk_decon0, decon0_eclk, + decon0_vclk; + status = disabled; + }; + +Board specific DT entry: + + decon@1393 { + pinctrl-0 = lcd_clk pwm1_out; + pinctrl-names = default; + status = okay; + }; diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 7f9f6f9..d3434cb 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -32,9 +32,16 @@ config DRM_EXYNOS_FIMD
[PATCH V3] drm/exynos: Add DECON driver
This series is based on exynos-drm-next branch of Inki Dae's tree at: git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git DECON(Display and Enhancement Controller) is the new IP in exynos7 SOC for generating video signals using pixel data. DECON driver can be used to drive 2 different interfaces on Exynos7: DECON-INT(video controller) and DECON-EXT(Mixer for HDMI) The existing FIMD driver code was used as a template to create DECON driver. Only DECON-INT is supported as of now, and DECON-EXT support will be added later. Signed-off-by: Akshu Agrawal aks...@gmail.com Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- Changes since V1: -- Address comments from Pankaj and do few cleanups. Changes since V2: -- Address more comments from Pankaj and cleanup. .../devicetree/bindings/video/exynos7-decon.txt| 67 ++ drivers/gpu/drm/exynos/Kconfig | 13 +- drivers/gpu/drm/exynos/Makefile|1 + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1042 drivers/gpu/drm/exynos/exynos_drm_drv.c|4 + drivers/gpu/drm/exynos/exynos_drm_drv.h|1 + include/video/exynos7_decon.h | 346 +++ 7 files changed, 1471 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos7-decon.txt create mode 100644 drivers/gpu/drm/exynos/exynos7_drm_decon.c create mode 100644 include/video/exynos7_decon.h diff --git a/Documentation/devicetree/bindings/video/exynos7-decon.txt b/Documentation/devicetree/bindings/video/exynos7-decon.txt new file mode 100644 index 000..14db519 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos7-decon.txt @@ -0,0 +1,67 @@ +Device-Tree bindings for Samsung Exynos7 SoC display controller (DECON) + +DECON (Display and Enhancement Controller) is the Display Controller for the +Exynos7 series of SoCs which transfers the image data from a video memory +buffer to an external LCD interface. + +Required properties: +- compatible: value should be samsung,exynos7-decon; + +- reg: physical base address and length of the DECON registers set. + +- interrupt-parent: should be the phandle of the decon controller's + parent interrupt controller. + +- interrupts: should contain a list of all DECON IP block interrupts in the +order: FIFO Level, VSYNC, LCD_SYSTEM. The interrupt specifier +format depends on the interrupt controller used. + +- interrupt-names: should contain the interrupt names: fifo, vsync, + lcd_sys, in the same order as they were listed in the interrupts +property. + +- pinctrl-0: pin control group to be used for this controller. + +- pinctrl-names: must contain a default entry. + +- clocks: must include clock specifiers corresponding to entries in the + clock-names property. + +- clock-names: list of clock names sorted in the same order as the clocks + property. Must contain pclk_decon0, aclk_decon0, + decon0_eclk, decon0_vclk. + +Optional Properties: +- samsung,power-domain: a phandle to DECON power domain node. +- display-timings: timing settings for FIMD, as described in document [1]. + Can be used in case timings cannot be provided otherwise + or to override timings provided by the panel. + +[1]: Documentation/devicetree/bindings/video/display-timing.txt + +Example: + +SoC specific DT entry: + + decon@1393 { + compatible = samsung,exynos7-decon; + interrupt-parent = combiner; + reg = 0x1393 0x1000; + interrupt-names = lcd_sys, vsync, fifo; + interrupts = 0 188 0, 0 189 0, 0 190 0; + clocks = clock_disp PCLK_DECON_INT, +clock_disp ACLK_DECON_INT, +clock_disp SCLK_DECON_INT_ECLK, +clock_disp SCLK_DECON_INT_EXTCLKPLL; + clock-names = pclk_decon0, aclk_decon0, decon0_eclk, + decon0_vclk; + status = disabled; + }; + +Board specific DT entry: + + decon@1393 { + pinctrl-0 = lcd_clk pwm1_out; + pinctrl-names = default; + status = okay; + }; diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 7f9f6f9..d3434cb 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -32,9 +32,16 @@ config DRM_EXYNOS_FIMD help Choose this option if you want to use Exynos FIMD for DRM. +config DRM_EXYNOS_DECON + bool Exynos DRM DECON + depends on DRM_EXYNOS + select FB_MODE_HELPERS + help + Choose this option if you want to use Exynos DECON for DRM. + config DRM_EXYNOS_DPI bool EXYNOS DRM parallel output support - depends on DRM_EXYNOS_FIMD + depends on (DRM_EXYNOS_FIMD ||