From 41814cfc01b059df33011d929837558c22f3c0e0 Mon Sep 17 00:00:00 2001 From: Senthilvadivu Guruswamy Date: Fri, 8 Oct 2010 08:44:33 +0200 Subject: [PATCH] OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3 VRFB is supported only on OMAP2 and OMAP3 platforms. If VRFB rotation is not supported by the hardware and the user requests VRFB rotation, print a warning and ignore the request from the user. Signed-off-by: Senthilvadivu Guruswamy Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/omapfb/omapfb-main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 4781421b37f8..6a704f176c22 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2198,6 +2198,16 @@ static int omapfb_probe(struct platform_device *pdev) goto err0; } + /* TODO : Replace cpu check with omap_has_vrfb once HAS_FEATURE + * available for OMAP2 and OMAP3 + */ + if (def_vrfb && !cpu_is_omap24xx() && !cpu_is_omap34xx()) { + def_vrfb = 0; + dev_warn(&pdev->dev, "VRFB is not supported on this hardware, " + "ignoring the module parameter vrfb=y\n"); + } + + mutex_init(&fbdev->mtx); fbdev->dev = &pdev->dev; -- 2.20.1