Adds display-timing node parsing to exynos drm fimd
Subsystems (4)
v2 cover Adds display-timing node parsing to exynos drm fimd
This patch adds display-timing node parsing to drm fimd, this depends on the display helper patchset at
http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
It also adds pinctrl support for drm fimd.
patch is based on branch "exynos-drm-next" at
http://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
Is tested on Exynos5250 and Exynos4412 by applying dependent patches available at http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
Vikas Sajjan (1):
video: drm: exynos: Adds display-timing node parsing using video
helper function
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/1 video: drm: exynos: Adds display-timing node parsing using video helper function
This patch adds display-timing node parsing using video helper function
--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +35 -3
@@ -19,6 +19,7 @@#include <linux/clk.h> #include <linux/of_device.h> #include <linux/pm_runtime.h> +#include <linux/pinctrl/consumer.h> #include <video/samsung_fimd.h> #include <drm/exynos_drm.h>
@@ -905,15 +906,46 @@ static int __devinit fimd_probe(struct platform_device *pdev)struct exynos_drm_subdrv *subdrv;struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel; +struct fb_videomode *fbmode; +struct device *disp_dev = &pdev->dev; +struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;DRM_DEBUG_KMS ("%s\n" , __FILE__); - pdata = pdev->dev.platform_data; -if (!pdata) { -dev_err (dev,"no platform data specified\n" ); +if (pdev->dev.of_node) { + pdata =devm_kzalloc (dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { +DRM_ERROR ("memory allocation for pdata failed\n" ); +return -ENOMEM ; + } + + fbmode =devm_kzalloc (dev,sizeof (*fbmode),GFP_KERNEL ); +if (!fbmode) { +DRM_ERROR ("memory allocation for fbmode failed\n" ); +return -ENOMEM ; + } + + ret =of_get_fb_videomode (disp_dev->of_node, fbmode,-1 ); +if (ret) { +DRM_ERROR ("failed to get fb_videomode\n" ); +return -EINVAL ; + } + pdata->panel.timing = (struct fb_videomode ) *fbmode; + + }else { + pdata = pdev->dev.platform_data; +if (!pdata) { +DRM_ERROR ("no platform data specified\n" ); +return -EINVAL ; + } + } + + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR (pctrl)) { +DRM_ERROR ("no pinctrl data provided.\n" );return -EINVAL ; }
Signature · 1 line
1.7.9.5
Re: [PATCH v2 1/1] video: drm: exynos: Adds display-timing node parsing using video helper function
Quoted 21 lines · Vikas Sajjan
This patch adds display-timing node parsing using video helper function
Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0@@ -19,6 +19,7 @@#include <linux/clk.h> #include <linux/of_device.h> #include <linux/pm_runtime.h> +#include <linux/pinctrl/consumer.h> #include <video/samsung_fimd.h> #include <drm/exynos_drm.h>
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int __devinit fimd_probe(struct platform_device *pdev) · line 910
Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +2
-0@@ -905,15 +906,46 @@ static int __devinit fimd_probe(struct platform_device *pdev)struct exynos_drm_subdrv *subdrv;struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel; +struct fb_videomode *fbmode; +struct device *disp_dev = &pdev->dev;
Isn't this the same as dev (maybe I'm missing some dependent patch)?
Quoted 30 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +21
-3+struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;DRM_DEBUG_KMS ("%s\n" , __FILE__); - pdata = pdev->dev.platform_data; -if (!pdata) { -dev_err (dev,"no platform data specified\n" ); +if (pdev->dev.of_node) { + pdata =devm_kzalloc (dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { +DRM_ERROR ("memory allocation for pdata failed\n" ); +return -ENOMEM ; + } + + fbmode =devm_kzalloc (dev,sizeof (*fbmode),GFP_KERNEL ); +if (!fbmode) { +DRM_ERROR ("memory allocation for fbmode failed\n" ); +return -ENOMEM ; + } + + ret =of_get_fb_videomode (disp_dev->of_node, fbmode,-1 ); +if (ret) { +DRM_ERROR ("failed to get fb_videomode\n" ); +return -EINVAL ; + } + pdata->panel.timing = (struct fb_videomode ) *fbmode; +
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int __devinit fimd_probe(struct platform_device *pdev) · line 947
Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +10
-0+ }else { + pdata = pdev->dev.platform_data; +if (!pdata) { +DRM_ERROR ("no platform data specified\n" ); +return -EINVAL ; + } + } + + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR (pctrl)) {
Will this work for exynos5? AFAICT, there's no pinctrl setup for it.
Sean
Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-1+DRM_ERROR ("no pinctrl data provided.\n" );return -EINVAL ; } --1.7.9.5
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 1/1] video: drm: exynos: Adds display-timing node parsing using video helper function
Hi Sean,
Quoted 19 lines · Sean Paul
Quoted 18 lines · Vikas Sajjan
This patch adds display-timing node parsing using video helper function
Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0@@ -19,6 +19,7 @@#include <linux/clk.h> #include <linux/of_device.h> #include <linux/pm_runtime.h> +#include <linux/pinctrl/consumer.h>
Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int __devinit fimd_probe(struct platform_device *pdev) · line 910
Quoted 8 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +2
-0#include <video/samsung_fimd.h> #include <drm/exynos_drm.h> @@ -905,15 +906,46 @@ static int __devinit fimd_probe(struct platform_device *pdev)struct exynos_drm_subdrv *subdrv;struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel; +struct fb_videomode *fbmode; +struct device *disp_dev = &pdev->dev;Isn't this the same as dev (maybe I'm missing some dependent patch)?
yeah, its same. Will remove the duplicate variable.
Quoted 34 lines
Quoted 34 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +25
-3+struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;DRM_DEBUG_KMS ("%s\n" , __FILE__); - pdata = pdev->dev.platform_data; -if (!pdata) { -dev_err (dev,"no platform data specified\n" ); +if (pdev->dev.of_node) { + pdata =devm_kzalloc (dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { +DRM_ERROR ("memory allocation for pdata failed\n" ); +return -ENOMEM ; + } + + fbmode =devm_kzalloc (dev,sizeof (*fbmode),GFP_KERNEL ); +if (!fbmode) { +DRM_ERROR ("memory allocation for fbmode failed\n" ); +return -ENOMEM ; + } + + ret =of_get_fb_videomode (disp_dev->of_node, fbmode,-1 ); +if (ret) { +DRM_ERROR ("failed to get fb_videomode\n" ); +return -EINVAL ; + } + pdata->panel.timing = (struct fb_videomode ) *fbmode; + + }else { + pdata = pdev->dev.platform_data; +if (!pdata) { +DRM_ERROR ("no platform data specified\n" );
Quoted 8 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int __devinit fimd_probe(struct platform_device *pdev) · line 947
Quoted 6 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +6
-0+return -EINVAL ; + } + } + + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR (pctrl)) {Will this work for exynos5? AFAICT, there's no pinctrl setup for it.
Was tested with
Quoted 14 lines
Sean
Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-1+DRM_ERROR ("no pinctrl data provided.\n" );return -EINVAL ; } --1.7.9.5
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 2 lines
Thanks and Regards Vikas Sajjan
Re: [PATCH v2 1/1] video: drm: exynos: Adds display-timing node parsing using video helper function
Hi Sean,
Sorry, wrongly sent incomplete mail.
Quoted 78 lines · Vikas Sajjan
Hi Sean,
Quoted 19 lines · Sean Paul
Quoted 18 lines · Vikas Sajjan
This patch adds display-timing node parsing using video helper function
Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0@@ -19,6 +19,7 @@#include <linux/clk.h> #include <linux/of_device.h> #include <linux/pm_runtime.h> +#include <linux/pinctrl/consumer.h> Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int __devinit fimd_probe(struct platform_device *pdev) · line 910
Quoted 8 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +2
-0#include <video/samsung_fimd.h> #include <drm/exynos_drm.h> @@ -905,15 +906,46 @@ static int __devinit fimd_probe(struct platform_device *pdev)struct exynos_drm_subdrv *subdrv;struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel; +struct fb_videomode *fbmode; +struct device *disp_dev = &pdev->dev;Isn't this the same as dev (maybe I'm missing some dependent patch)?
yeah, its same. Will remove the duplicate variable.
Quoted 34 lines
Quoted 34 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +25
-3+struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;DRM_DEBUG_KMS ("%s\n" , __FILE__); - pdata = pdev->dev.platform_data; -if (!pdata) { -dev_err (dev,"no platform data specified\n" ); +if (pdev->dev.of_node) { + pdata =devm_kzalloc (dev,sizeof (*pdata),GFP_KERNEL ); +if (!pdata) { +DRM_ERROR ("memory allocation for pdata failed\n" ); +return -ENOMEM ; + } + + fbmode =devm_kzalloc (dev,sizeof (*fbmode),GFP_KERNEL ); +if (!fbmode) { +DRM_ERROR ("memory allocation for fbmode failed\n" ); +return -ENOMEM ; + } + + ret =of_get_fb_videomode (disp_dev->of_node, fbmode,-1 ); +if (ret) { +DRM_ERROR ("failed to get fb_videomode\n" ); +return -EINVAL ; + } + pdata->panel.timing = (struct fb_videomode ) *fbmode; + + }else { + pdata = pdev->dev.platform_data; +if (!pdata) { +DRM_ERROR ("no platform data specified\n" );Quoted 8 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int __devinit fimd_probe(struct platform_device *pdev) · line 947
Quoted 6 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +6
-0+return -EINVAL ; + } + } + + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR (pctrl)) {Will this work for exynos5? AFAICT, there's no pinctrl setup for it.
Quoted 1 line
Was tested with test on Exynos 4412 SoC, with the arch side changes (refer below link )
http://www.mail-archive.com/[email protected]/msg15336.html
as you said there's no pinctrl setup for it, by making similar changes for exynos5, it should work for exynos5 also.
Quoted 20 lines
Quoted 14 lines
Sean
Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-1+DRM_ERROR ("no pinctrl data provided.\n" );return -EINVAL ; } --1.7.9.5
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel--
Thanks and Regards
Vikas Sajjan
Signature · 2 lines
Thanks and Regards Vikas Sajjan
Hi Vikas,
Changelog mentioning differences between v1 and v2 is generally preferred as it will help the reviewers.
Quoted 26 lines · Vikas Sajjan
This patch adds display-timing node parsing to drm fimd, this depends on the display helper patchset at
http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.htmlIt also adds pinctrl support for drm fimd.
patch is based on branch "exynos-drm-next" at
http://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.gitIs tested on Exynos5250 and Exynos4412 by applying dependent patches available at http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
Vikas Sajjan (1):
video: drm: exynos: Adds display-timing node parsing using video
helper functiondrivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)--
1.7.9.5--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
With warm regards, Sachin