Add display-timing node parsing to exynos drm fimd
Subsystems (4)
v10 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 v9:
- replaced IS_ERR_OR_NULL() with IS_ERR(), since IS_ERR_OR_NULL() will be depreciated, as discussed at http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/140543.html http://www.mail-archive.com/[email protected]/msg78030.html
changes since v8:
- replaced IS_ERR() with IS_ERR_OR_NULL(),
because devm_pinctrl_get_select_default can return NULL, If CONFIG_PINCTRL is disabled.
- modified the error log, such that it shall NOT cross 80 column.
- added Acked-by.
changes since v7:
- addressed comments from Joonyoung Shim <[email protected]> to remove a unnecessary variable.
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 | 33 ++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v10 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 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 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimd.c +20 -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>
@@ -883,10 +884,25 @@ static int fimd_probe(struct platform_device *pdev)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 ; + } + + ret =of_get_fb_videomode (dev->of_node, &pdata->panel.timing, +OF_USE_NATIVE_MODE ); +if (ret) { +DRM_ERROR ("failed: of_get_fb_videomode() : %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
Inki Dae
maintainerRe: [PATCH v10 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
2013/3/1 Vikas Sajjan <[email protected]>:
Quoted 32 lines
Add support for parsing the display-timing node using video helper function.
The DT node parsing is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>Acked-by Joonyoung Shim <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-3@@ -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> @@ -883,10 +884,25 @@ static int fimd_probe(struct platform_device *pdev)DRM_DEBUG_KMS ("%s\n" , __FILE__); - pdata = pdev->dev.platform_data; -if (!pdata) { -dev_err (dev,"no platform data specified\n" );
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_probe(struct platform_device *pdev) · line 895
Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +9
-1-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 ; + } + + ret =of_get_fb_videomode (dev->of_node, &pdata->panel.timing, +OF_USE_NATIVE_MODE );
Add "select OF_VIDEOMODE" and "select FB_MODE_HELPERS" to drivers/gpu/drm/exynos/Kconfig. When EXYNOS_DRM_FIMD config is selected, these two configs should also be selected.
Thanks,
Inki Dae
Quoted 20 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +10
-1+if (ret) { +DRM_ERROR ("failed: of_get_fb_videomode() : %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; --1.7.9.5
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v10 1/2] video: drm: exynos: Add display-timing node parsing using video helper function
Hi,
Quoted 39 lines · Inki Dae
2013/3/1 Vikas Sajjan <[email protected]>:
Quoted 38 lines
Add support for parsing the display-timing node using video helper function.
The DT node parsing is done only if 'dev.of_node'
exists and the NON-DT logic is still maintained under the 'else' part.Signed-off-by Leela Krishna Amudala <[email protected]>Signed-off-by Vikas Sajjan <[email protected]>Acked-by Joonyoung Shim <[email protected]>--- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)drivers/gpu/drm/exynos/exynos_drm_fimd.c +6
-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> @@ -883,10 +884,25 @@ static int fimd_probe(struct platform_device *pdev)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 ;
Quoted 9 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_probe(struct platform_device *pdev) · line 895
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +4
-0+ } + + ret =of_get_fb_videomode (dev->of_node, &pdata->panel.timing, +OF_USE_NATIVE_MODE );Add "select
OF_VIDEOMODE" and "selectFB_MODE_HELPERS" todrivers/gpu/drm/exynos/Kconfig. WhenEXYNOS_DRM_FIMDconfig is selected, these two configs should also be selected.
Sure. Will add and resend.
Quoted 23 lines
Thanks,
Inki DaeQuoted 20 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +10
-1+if (ret) { +DRM_ERROR ("failed: of_get_fb_videomode() : %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; --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
PATCH v10 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 resource *res; +struct pinctrl *pctrl;int win;int ret = -EINVAL ;
@@ -897,6 +899,13 @@ static int fimd_probe(struct platform_device *pdev)DRM_ERROR ("failed: of_get_fb_videomode() : %d\n" , ret);return ret; } + pctrl =devm_pinctrl_get_select_default (dev); +if (IS_ERR (pctrl)) { +DRM_ERROR ("failed: devm_pinctrl_get_select_default():\n" +"%d\n" ,PTR_RET (pctrl)); +return PTR_ERR (pctrl); + } + }else { pdata = pdev->dev.platform_data;if (!pdata) {
Signature · 1 line
1.7.9.5
Re: [PATCH v10 2/2] video: drm: exynos: Add pinctrl support to fimd
Hi All,
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 resource *res; +struct pinctrl *pctrl;int win;int ret = -EINVAL ;
drivers/gpu/drm/exynos/exynos_drm_fimd.c static int fimd_probe(struct platform_device *pdev) · line 902
Quoted 4 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1
-0@@ -897,6 +899,13 @@ static int fimd_probe(struct platform_device *pdev)DRM_ERROR ("failed: of_get_fb_videomode() : %d\n" , ret);return ret; } + pctrl =devm_pinctrl_get_select_default (dev);
This patch is abandoned, as the device core will do this for you as of commit ab78029ecc347debbd737f06688d788bd9d60c1d
"drivers/pinctrl: grab default handles from device core"
Quoted 16 lines
drivers/gpu/drm/exynos/exynos_drm_fimd.c +6
-1+if (IS_ERR (pctrl)) { +DRM_ERROR ("failed: devm_pinctrl_get_select_default():\n" +"%d\n" ,PTR_RET (pctrl)); +return PTR_ERR (pctrl); + } + }else { pdata = pdev->dev.platform_data;if (!pdata) { --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