Add display-timing node parsing to exynos drm fimd
Subsystems (4)
v7 cover Add display-timing node parsing to exynos drm fimd
Add display-timing node parsing to drm fimd and 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.
changes since v6:
addressed comments from Inki Dae <[email protected]> to separated out the pinctrl functionality and made a separate patch.
changes since v5:
- addressed comments from Inki Dae <[email protected]>, to remove the allocation of 'fbmode' and replaced '-1'in "of_get_fb_videomode(dev->of_node, fbmode, -1)" with OF_USE_NATIVE_MODE.
changes since v4:
- addressed comments from Paul Menzel <[email protected]>, to modify the commit message
changes since v3:
- addressed comments from Sean Paul <[email protected]>, to modify the return values and print messages.
changes since v2:
- moved 'devm_pinctrl_get_select_default' function call under 'if (pdev->dev.of_node)', this makes NON-DT code unchanged. (reported by: Rahul Sharma <[email protected]>)
changes since v1:
- addressed comments from Sean Paul <[email protected]>
Vikas Sajjan (2):
video: drm: exynos: Add display-timing node parsing using video
helper function
video: drm: exynos: Add pinctrl support to fimd
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 36 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v7 1/2 video: drm: exynos: Add display-timing node parsing using video helper function
Add support for parsing the display-timing node using video helper function.
The DT node parsing and pinctrl selection is done only if 'dev.of_node' exists and the NON-DT logic is still maintained under the 'else' part.
--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +23 -4
@@ -20,6 +20,7 @@#include <linux/of_device.h> #include <linux/pm_runtime.h> +#include <video/of_display_timing.h> #include <video/samsung_fimd.h> #include <drm/exynos_drm.h>
@@ -877,16 +878,34 @@ static int 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 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" ); -return -EINVAL ; +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 = &pdata->panel.timing; + ret =of_get_fb_videomode (dev->of_node, fbmode, +OF_USE_NATIVE_MODE ); +if (ret) { +DRM_ERROR ("failed: of_get_fb_videomode()\n" +"with return value: %d\n" , ret); +return ret; + } + }else { + pdata = pdev->dev.platform_data; +if (!pdata) { +DRM_ERROR ("no platform data specified\n" ); +return -EINVAL ; + } } panel = &pdata->panel;
Signature · 1 line
1.7.9.5
PATCH v7 2/2 video: drm: exynos: Add pinctrl support to fimd
In reply to Vikas SajjanAdds support for pinctrl to drm fimd.
--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +9 -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/of_display_timing.h> #include <video/samsung_fimd.h>
@@ -879,6 +880,7 @@ static int fimd_probe(struct platform_device *pdev)struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel;struct fb_videomode *fbmode; +struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;
@@ -900,6 +902,13 @@ static int fimd_probe(struct platform_device *pdev) "with return value: %d\n", ret);return ret; } + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR_OR_NULL (pctrl)) { +DRM_ERROR ("failed: devm_pinctrl_get_select_default()\n" +"with return value: %d\n" ,PTR_RET (pctrl)); +return PTR_RET (pctrl); + } + }else { pdata = pdev->dev.platform_data;if (!pdata) {
Signature · 1 line
1.7.9.5
Re: [PATCH v7 2/2] video: drm: exynos: Add pinctrl support to fimd
Hi,
Quoted 29 lines · Vikas Sajjan
Adds support for pinctrl to drm fimd.
Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/gpu/drm/exynos/exynos_drm_fimd.c +2
-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/of_display_timing.h> #include <video/samsung_fimd.h> @@ -879,6 +880,7 @@ static int fimd_probe(struct platform_device *pdev)struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel;struct fb_videomode *fbmode; +struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_probe(struct platform_device *pdev) · line 910
Quoted 9 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +6
-0@@ -900,6 +902,13 @@ static int fimd_probe(struct platform_device *pdev) "with return value: %d\n", ret);return ret; } + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR_OR_NULL (pctrl)) { +DRM_ERROR ("failed: devm_pinctrl_get_select_default()\n" +"with return value: %d\n" ,PTR_RET (pctrl)); +return PTR_RET (pctrl); + }
I think pinctrl isn't related with dt then it doesn't need to be in "if (pdev->dev.of_node)".
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_probe(struct platform_device *pdev) · line 911
Quoted 1 line
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0+
Blank.
Quoted 3 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +0
-0}else { pdata = pdev->dev.platform_data;if (!pdata) {
Re: [PATCH v7 2/2] video: drm: exynos: Add pinctrl support to fimd
Hi Mr.Shim,
Quoted 41 lines · Joonyoung Shim
Hi,
Quoted 37 lines · Vikas Sajjan
Adds support for pinctrl to drm fimd.
Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/gpu/drm/exynos/exynos_drm_fimd.c +5
-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/of_display_timing.h> #include <video/samsung_fimd.h> @@ -879,6 +880,7 @@ static int fimd_probe(struct platform_device *pdev)struct exynos_drm_fimd_pdata *pdata;struct exynos_drm_panel_info *panel;struct fb_videomode *fbmode; +struct pinctrl *pctrl;struct resource *res;int win;int ret = -EINVAL ;@@ -900,6 +902,13 @@ static int fimd_probe(struct platform_device *pdev) "with return value: %d\n", ret);return ret; } + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR_OR_NULL (pctrl)) { + DRM_ERROR("failed:devm_pinctrl_get_select_default()\n"
Quoted 9 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_probe(struct platform_device *pdev) · line 910
Quoted 4 lines
+ "with return value: %d\n",
PTR_RET(pctrl));drivers/gpu/drm/exynos/exynos_drm_fimd.c +2
-0+return PTR_RET (pctrl); + }I think pinctrl isn't related with dt then it doesn't need to be in "if (
pdev->dev.of_node)".
actuall in V1 patchset it was outside "if (pdev->dev.of_node)". lated in V2, I moved 'devm_pinctrl_get_select_default' function call under 'if (pdev->dev.of_node)', to keep NON-DT code unchanged.
Quoted 11 lines
Quoted 1 line
Blank.
Quoted 3 lines
} else { pdata = pdev->dev.platform_data; if (!pdata) {
Signature · 2 lines
Thanks and Regards Vikas Sajjan
Hi,
Please refer my comments about v6 patch.
Quoted 41 lines · Vikas Sajjan
Add display-timing node parsing to drm fimd and 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.
changes since v6:
addressed comments from Inki Dae <[email protected]> to separated out the pinctrl functionality and made a separate patch.changes since v5:
- addressed comments from Inki Dae <[email protected]>, to remove the allocation of 'fbmode' and replaced '-1'in "of_get_fb_videomode(dev->of_node, fbmode, -1)" withOF_USE_NATIVE_MODE.changes since v4:
- addressed comments from Paul Menzel <[email protected]>, to modify the commit messagechanges since v3:
- addressed comments from Sean Paul <[email protected]>, to modify the return values and print messages.changes since v2:
- moved 'devm_pinctrl_get_select_default' function call under 'if (pdev->dev.of_node)', this makes NON-DT code unchanged. (reported by: Rahul Sharma <[email protected]>)changes since v1:
- addressed comments from Sean Paul <[email protected]>Vikas Sajjan (2):
video: drm: exynos: Add display-timing node parsing using video
helper function
video: drm: exynos: Add pinctrl support to fimddrivers/gpu/drm/exynos/exynos_drm_fimd.c | 36 ++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-)