drm/exynos: add framework to control DISP1BLK setting
Subsystems (5)
cover drm/exynos: add framework to control DISP1BLK setting
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
Exynos SOC have a DISP1BLK register where we can select the path for FIMD output. We can redirect the video data directly to DP/MIPI interface, or we can pass it via image enhancement chips.
Since we don't use any image enhancement chips in exynos-drm, we need to set FIMD BYPASS in DISP1BLK.
This patchset is tested for basic display + DPMS + S2R on snow and peach_pit.
Ajay Kumar (3):
[PATCH 1/3] drm/exynos: Control DISP1BLK system register in FIMD [PATCH 2/3] ARM: dts: exynos5420: Add sysreg phandle to FIMD node [PATCH 3/3] ARM: dts: exynos5250: Add sysreg phandle to FIMD node
.../devicetree/bindings/video/samsung-fimd.txt | 2 ++ arch/arm/boot/dts/exynos5250.dtsi | 1 + arch/arm/boot/dts/exynos5420.dtsi | 1 + drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++++++++++++++++++ include/video/samsung_fimd.h | 5 +++++ 5 files changed, 28 insertions(+)
Signature · 1 line
1.7.9.5
PATCH 1/3 drm/exynos: Control DISP1BLK system register in FIMD
Exynos SOC have a DISP1BLK register where we can select the path for FIMD output. We can redirect the video data directly to DP/MIPI interface, or we can pass it via image enhancement chips.
Since we don't use any image enhancement chips in exynos-drm, we need to set FIMD BYPASS in DISP1BLK.
--- .../devicetree/bindings/video/samsung-fimd.txt | 2 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++++++++++++++++++ include/video/samsung_fimd.h | 5 +++++ 3 files changed, 26 insertions(+)
Documentation/devicetree/bindings/video/samsung-fimd.txt +2 -0
@@ -44,6 +44,8 @@ Optional Properties: - 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. +- samsung,sysreg-phandle - handle to syscon node, used to control the system + registers for DISP1BLK. The device node can contain 'port' child nodes according to the bindings defined in [2]. The following are properties specific to those nodes:
drivers/gpu/drm/exynos/exynos_drm_fimd.c +19 -0
@@ -20,6 +20,8 @@#include <linux/of_device.h> #include <linux/pm_runtime.h> #include <linux/component.h> +#include <linux/mfd/syscon.h> +#include <linux/regmap.h> #include <video/of_display_timing.h> #include <video/of_videomode.h>
@@ -68,6 +70,7 @@struct fimd_driver_data {unsigned int timing_base; +unsigned int sysreg_disp1blk_offset;unsigned int has_shadowcon:1 ;unsigned int has_clksel:1 ;
@@ -83,11 +86,13 @@ static struct fimd_driver_data s3c64xx_fimd_driver_data = {static struct fimd_driver_data exynos4_fimd_driver_data = { .timing_base =0x0 , .has_shadowcon =1 , + .sysreg_disp1blk_offset =0x210 , };static struct fimd_driver_data exynos5_fimd_driver_data = { .timing_base =0x20000 , .has_shadowcon =1 , + .sysreg_disp1blk_offset =0x214 , };struct fimd_win_data {
@@ -112,6 +117,7 @@ struct fimd_context {struct clk *bus_clk;struct clk *lcd_clk;void __iomem *regs; +struct regmap *sysreg;struct drm_display_mode mode;struct fimd_win_data win_data[WINDOWS_NR ];unsigned int default_win;
@@ -760,6 +766,12 @@ static int fimd_poweron(struct exynos_drm_manager *mgr)pm_runtime_get_sync (ctx->dev); +if (ctx->sysreg) +regmap_update_bits (ctx->sysreg, + ctx->driver_data->sysreg_disp1blk_offset, +FIMDBYPASS_MASK , +FIMDBYPASS <<FIMDBYPASS_SHIFT ); + ret =clk_prepare_enable (ctx->bus_clk);if (ret <0 ) {DRM_ERROR ("Failed to prepare_enable the bus clk [%d]\n" , ret);
@@ -998,6 +1010,13 @@ static int fimd_probe(struct platform_device *pdev)if (IS_ERR (ctx->display))return PTR_ERR (ctx->display); + ctx->sysreg =syscon_regmap_lookup_by_phandle ( + pdev->dev.of_node,"samsung,sysreg-phandle" ); +if (IS_ERR (ctx->sysreg)) { +DRM_INFO ("DISP1BLK system register is not configured\n" ); + ctx->sysreg =NULL ; + } +pm_runtime_enable (&pdev->dev); ret =component_add (&pdev->dev, &fimd_component_ops);
include/video/samsung_fimd.h +5 -0
@@ -462,3 +462,8 @@#define FIMD_V8_VIDTCON2 0x20018#define FIMD_V8_VIDTCON3 0x2001C#define FIMD_V8_VIDCON1 0x20004 + +/* SYSREG DISP1BLK definitions */ +#define FIMDBYPASS_SHIFT 15 +#define FIMDBYPASS_MASK (1 << FIMDBYPASS_SHIFT) +#define FIMDBYPASS 1
Signature · 1 line
1.7.9.5
Re: [PATCH 1/3] drm/exynos: Control DISP1BLK system register in FIMD
Hi Ajay,
Quoted 50 lines · Ajay Kumar
Exynos SOC have a DISP1BLK register where we can select the path for FIMD output. We can redirect the video data directly to DP/MIPI interface, or we can pass it via image enhancement chips.
Since we don't use any image enhancement chips in exynos-drm, we need to set FIMD BYPASS in DISP1BLK.
Signed-off-by Ajay Kumar <[email protected]>--- .../devicetree/bindings/video/samsung-fimd.txt | 2 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++++++++++++++++++ include/video/samsung_fimd.h | 5 +++++ 3 files changed, 26 insertions(+)Documentation/devicetree/bindings/video/samsung-fimd.txt +2
-0@@ -44,6 +44,8 @@ Optional Properties: - 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. +- samsung,sysreg-phandle - handle to syscon node, used to control the system + registers for DISP1BLK. The device node can contain 'port' child nodes according to the bindings defined in [2]. The following are properties specific to those nodes:drivers/gpu/drm/exynos/exynos_drm_fimd.c +3
-0@@ -20,6 +20,8 @@#include <linux/of_device.h> #include <linux/pm_runtime.h> #include <linux/component.h> +#include <linux/mfd/syscon.h> +#include <linux/regmap.h> #include <video/of_display_timing.h> #include <video/of_videomode.h> @@ -68,6 +70,7 @@struct fimd_driver_data {unsigned int timing_base; +unsigned int sysreg_disp1blk_offset;unsigned int has_shadowcon:1 ;unsigned int has_clksel:1 ;
drivers/gpu/drm/exynos/exynos_drm_fimd.c static struct fimd_driver_data s3c64xx_fimd_driver_data = { · line 89
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0@@ -83,11 +86,13 @@ static struct fimd_driver_data s3c64xx_fimd_driver_data = {static struct fimd_driver_data exynos4_fimd_driver_data = { .timing_base =0x0 , .has_shadowcon =1 , + .sysreg_disp1blk_offset =0x210 ,
offset should be defined as Macros in reg file.
drivers/gpu/drm/exynos/exynos_drm_fimd.c static struct fimd_driver_data s3c64xx_fimd_driver_data = { · line 96
Quoted 7 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0};static struct fimd_driver_data exynos5_fimd_driver_data = { .timing_base =0x20000 , .has_shadowcon =1 , + .sysreg_disp1blk_offset =0x214 , };
Same as above. Rest looks fine to me.
Regards,
Rahul Sharma.
Quoted 57 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +14
-0struct fimd_win_data {@@ -112,6 +117,7 @@ struct fimd_context {struct clk *bus_clk;struct clk *lcd_clk;void __iomem *regs; +struct regmap *sysreg;struct drm_display_mode mode;struct fimd_win_data win_data[WINDOWS_NR ];unsigned int default_win;@@ -760,6 +766,12 @@ static int fimd_poweron(struct exynos_drm_manager *mgr)pm_runtime_get_sync (ctx->dev); +if (ctx->sysreg) +regmap_update_bits (ctx->sysreg, + ctx->driver_data->sysreg_disp1blk_offset, +FIMDBYPASS_MASK , +FIMDBYPASS <<FIMDBYPASS_SHIFT ); + ret =clk_prepare_enable (ctx->bus_clk);if (ret <0 ) {DRM_ERROR ("Failed to prepare_enable the bus clk [%d]\n" , ret);@@ -998,6 +1010,13 @@ static int fimd_probe(struct platform_device *pdev)if (IS_ERR (ctx->display))return PTR_ERR (ctx->display); + ctx->sysreg =syscon_regmap_lookup_by_phandle ( + pdev->dev.of_node,"samsung,sysreg-phandle" ); +if (IS_ERR (ctx->sysreg)) { +DRM_INFO ("DISP1BLK system register is not configured\n" ); + ctx->sysreg =NULL ; + } +pm_runtime_enable (&pdev->dev); ret =component_add (&pdev->dev, &fimd_component_ops);include/video/samsung_fimd.h +5
-1@@ -462,3 +462,8 @@#define FIMD_V8_VIDTCON2 0x20018#define FIMD_V8_VIDTCON3 0x2001C#define FIMD_V8_VIDCON1 0x20004 + +/* SYSREG DISP1BLK definitions */ +#define FIMDBYPASS_SHIFT 15 +#define FIMDBYPASS_MASK (1 << FIMDBYPASS_SHIFT) +#define FIMDBYPASS 1 --1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/3 ARM: dts: exynos5420: Add sysreg phandle to FIMD node
In reply to Ajay KumarAdd sysreg phandle to FIMD node so that we are able to control DISP1BLK configuration in FIMD driver.
--- arch/arm/boot/dts/exynos5420.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos5420.dtsi +1 -0
@@ -521,6 +521,7 @@ samsung,power-domain = <&disp_pd>; clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; clock-names = "sclk_fimd", "fimd"; + samsung,sysreg-phandle = <&sysreg_system_controller>; }; adc: adc@12D10000 {
Signature · 1 line
1.7.9.5
PATCH 3/3 ARM: dts: exynos5250: Add sysreg phandle to FIMD node
In reply to Ajay KumarAdd sysreg phandle to FIMD node so that we are able to control DISP1BLK configuration in FIMD driver.
--- arch/arm/boot/dts/exynos5250.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos5250.dtsi +1 -0
@@ -758,6 +758,7 @@ fimd@14400000 { clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; clock-names = "sclk_fimd", "fimd"; + samsung,sysreg-phandle = <&sysreg_system_controller>; }; adc: adc@12D10000 {
Signature · 1 line
1.7.9.5
Hi Ajay,
I'm sorry for say that the patchset for exynos drm supporting I80 i/f includes yours.
The patchset is still in reviewing and I'm preparing v5.
Please check this:
http://www.spinics.net/lists/dri-devel/msg60943.html
Thank you.
Best regards YJ
Quoted 9 lines · Ajay Kumar
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.gitExynos SOC have a DISP1BLK register where we can select the path for FIMD output. We can redirect the video data directly to DP/MIPI interface, or we can pass it via image enhancement chips.
Quoted 4 lines
Since we don't use any image enhancement chips in exynos-drm, we need to set FIMD BYPASS in DISP1BLK.
This patchset is tested for basic display + DPMS + S2R on snow and
peach_pit.
Quoted 10 lines
Ajay Kumar (3):
[PATCH 1/3] drm/exynos: Control DISP1BLK system register in FIMD [PATCH 2/3] ARM: dts: exynos5420: Add sysreg phandle to FIMD node [PATCH 3/3] ARM: dts: exynos5250: Add sysreg phandle to FIMD node.../devicetree/bindings/video/samsung-fimd.txt | 2 ++ arch/arm/boot/dts/exynos5250.dtsi | 1 + arch/arm/boot/dts/exynos5420.dtsi | 1 + drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19
+++++++++++++++++++
Quoted 8 lines
include/video/samsung_fimd.h | 5 +++++ 5 files changed, 28 insertions(+)--
1.7.9.5--
To unsubscribe from this list: send the line "unsubscribe
linux-samsung-soc" in
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 50 lines · YoungJun Cho
Hi Ajay,
I'm sorry for say that the patchset for exynos drm supporting I80 i/f includes yours.
The patchset is still in reviewing and I'm preparing v5.
Please check this:
http://www.spinics.net/lists/dri-devel/msg60943.htmlThank you.
Best regards YJQuoted 36 lines · Ajay Kumar
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.gitExynos SOC have a DISP1BLK register where we can select the path for FIMD output. We can redirect the video data directly to DP/MIPI interface, or we can pass it via image enhancement chips.
Since we don't use any image enhancement chips in exynos-drm, we need to set FIMD BYPASS in DISP1BLK.
This patchset is tested for basic display + DPMS + S2R on snow and
peach_pit.Ajay Kumar (3):
[PATCH 1/3] drm/exynos: Control DISP1BLK system register in FIMD [PATCH 2/3] ARM: dts: exynos5420: Add sysreg phandle to FIMD node [PATCH 3/3] ARM: dts: exynos5250: Add sysreg phandle to FIMD node.../devicetree/bindings/video/samsung-fimd.txt | 2 ++ arch/arm/boot/dts/exynos5250.dtsi | 1 + arch/arm/boot/dts/exynos5420.dtsi | 1 + drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++++++++++++++++++ include/video/samsung_fimd.h | 5 +++++ 5 files changed, 28 insertions(+)--
1.7.9.5--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi YoungJun,
Quoted 6 lines · Ajay kumar
Quoted 5 lines · YoungJun Cho
Hi Ajay,
I'm sorry for say that the patchset for exynos drm supporting I80 i/f includes yours.
Quoted 7 lines
Quoted 7 lines
The patchset is still in reviewing and I'm preparing v5.
Please check this:
http://www.spinics.net/lists/dri-devel/msg60943.htmlThank you.
Best regards YJ
Thanks for the link. I saw your code. This functionality is already included in the patch "drm/exynos: fimd: support LCD I80 interface". I hope your patchset gets merged soon!
Thanks and regards,
Ajay
Quoted 37 lines
Quoted 37 lines · Ajay Kumar
Quoted 36 lines
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.gitExynos SOC have a DISP1BLK register where we can select the path for FIMD output. We can redirect the video data directly to DP/MIPI interface, or we can pass it via image enhancement chips.
Since we don't use any image enhancement chips in exynos-drm, we need to set FIMD BYPASS in DISP1BLK.
This patchset is tested for basic display + DPMS + S2R on snow and
peach_pit.Ajay Kumar (3):
[PATCH 1/3] drm/exynos: Control DISP1BLK system register in FIMD [PATCH 2/3] ARM: dts: exynos5420: Add sysreg phandle to FIMD node [PATCH 3/3] ARM: dts: exynos5250: Add sysreg phandle to FIMD node.../devicetree/bindings/video/samsung-fimd.txt | 2 ++ arch/arm/boot/dts/exynos5250.dtsi | 1 + arch/arm/boot/dts/exynos5420.dtsi | 1 + drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 +++++++++++++++++++ include/video/samsung_fimd.h | 5 +++++ 5 files changed, 28 insertions(+)--
1.7.9.5--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html