static int num_ctxs;
static struct vrfb_ctx *ctxs;
+static bool vrfb_loaded;
+
static void omap2_sms_write_rot_control(u32 val, unsigned ctx)
{
__raw_writel(val, vrfb_base + SMS_ROT_CONTROL(ctx));
}
EXPORT_SYMBOL(omap_vrfb_request_ctx);
+bool omap_vrfb_supported(void)
+{
+ return vrfb_loaded;
+}
+EXPORT_SYMBOL(omap_vrfb_supported);
+
static int __init vrfb_probe(struct platform_device *pdev)
{
struct resource *mem;
ctxs[i].base = mem->start;
}
+ vrfb_loaded = true;
+
return 0;
}
+static void __exit vrfb_remove(struct platform_device *pdev)
+{
+ vrfb_loaded = false;
+}
+
static struct platform_driver vrfb_driver = {
.driver.name = "omapvrfb",
+ .remove = __exit_p(vrfb_remove),
};
static int __init vrfb_init(void)
};
#ifdef CONFIG_OMAP2_VRFB
+extern bool omap_vrfb_supported(void);
extern int omap_vrfb_request_ctx(struct vrfb *vrfb);
extern void omap_vrfb_release_ctx(struct vrfb *vrfb);
extern void omap_vrfb_adjust_size(u16 *width, u16 *height,
extern void omap_vrfb_restore_context(void);
#else
+static inline bool omap_vrfb_supported(void) { return false; }
static inline int omap_vrfb_request_ctx(struct vrfb *vrfb) { return 0; }
static inline void omap_vrfb_release_ctx(struct vrfb *vrfb) {}
static inline void omap_vrfb_adjust_size(u16 *width, u16 *height,