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
Patch is based on branch "exynos-drm-next" at http://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git/
It is tested on Exynos5250 and Exynos4412 board by applying dependent patches available at http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
Leela Krishna Amudala (1): video: drm: exynos: Adds display-timing node parsing using video helper function
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)
This patch adds display-timing node parsing using video helper function
Signed-off-by: Leela Krishna Amudala l.krishna@samsung.com Tested-by: Vikas Sajjan vikas.sajjan@linaro.org --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 9537761..19dc842 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -876,6 +876,8 @@ static int fimd_probe(struct platform_device *pdev) struct fimd_context *ctx; struct exynos_drm_subdrv *subdrv; struct exynos_drm_fimd_pdata *pdata; + struct fb_videomode *fbmode; + struct device *disp_dev = &pdev->dev; struct exynos_drm_panel_info *panel; struct resource *res; int win; @@ -883,10 +885,31 @@ 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; + } + + 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; + } }
panel = &pdata->panel;
Hello Sean, This patch set will be abandoned and your comments will be addressed in reply to http://lists.freedesktop.org/archives/dri-devel/2013-January/034080.html
Thanks, Leela Krishna Amudala.
On Tue, Jan 29, 2013 at 1:42 PM, Leela Krishna Amudala l.krishna@samsung.com wrote:
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
Patch is based on branch "exynos-drm-next" at http://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git/
It is tested on Exynos5250 and Exynos4412 board by applying dependent patches available at http://lists.freedesktop.org/archives/dri-devel/2013-January/033998.html
Leela Krishna Amudala (1): video: drm: exynos: Adds display-timing node parsing using video helper function
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)
-- 1.8.0
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
dri-devel@lists.freedesktop.org