OMAP: DSS2: OMAPFB: Allow usage of def_vrfb only for omap2,3
authorSenthilvadivu Guruswamy <svadivu@ti.com>
Fri, 8 Oct 2010 06:44:33 +0000 (08:44 +0200)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Fri, 22 Oct 2010 20:21:07 +0000 (23:21 +0300)
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 <svadivu@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
drivers/video/omap2/omapfb/omapfb-main.c

index 4781421b37f89e5a1353f67ba4084ea086fac9a9..6a704f176c222a004f8732268e04cafb82ed1a70 100644 (file)
@@ -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;