Hi Sean, Sorry, wrongly sent incomplete mail. On 31 January 2013 10:41, Vikas Sajjan <vikas.sajjan@xxxxxxxxxx> wrote: > Hi Sean, > > On 30 January 2013 21:28, Sean Paul <seanpaul@xxxxxxxxxxxx> wrote: >> On Wed, Jan 30, 2013 at 1:30 AM, Vikas Sajjan <vikas.sajjan@xxxxxxxxxx> wrote: >>> This patch adds display-timing node parsing using video helper function >>> >>> Signed-off-by: Leela Krishna Amudala <l.krishna@xxxxxxxxxxx> >>> Signed-off-by: Vikas Sajjan <vikas.sajjan@xxxxxxxxxx> >>> --- >>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 38 +++++++++++++++++++++++++++--- >>> 1 file changed, 35 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >>> index bf0d9ba..94729ed 100644 >>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c >>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >>> @@ -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; >> >> Isn't this the same as dev (maybe I'm missing some dependent patch)? >> > yeah, its same. Will remove the duplicate variable. > >>> + 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)) { >> >> Will this work for exynos5? AFAICT, there's no pinctrl setup for it. > > Was tested with test on Exynos 4412 SoC, with the arch side changes (refer below link ) http://www.mail-archive.com/linux-samsung-soc@xxxxxxxxxxxxxxx/msg15336.html as you said there's no pinctrl setup for it, by making similar changes for exynos5, it should work for exynos5 also. >> >> Sean >> >>> + DRM_ERROR("no pinctrl data provided.\n"); >>> return -EINVAL; >>> } >>> >>> -- >>> 1.7.9.5 >>> >>> _______________________________________________ >>> dri-devel mailing list >>> dri-devel@xxxxxxxxxxxxxxxxxxxxx >>> http://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > -- > Thanks and Regards > Vikas Sajjan -- Thanks and Regards Vikas Sajjan _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel