Thread (8 messages) flat view 8 messages, 6 authors, 2005-08-07

Re: framebuffer-driver-for-mq11xx-graphics-chip.patch added to -mm tree

From: James Simmons <hidden>
Date: 2005-08-05 20:15:53

+struct mq1100fb_info {
+	/* Framebuffer info */
+	struct fb_info fb;
+	/* The link to the base SoC driver */
+	struct mediaq11xx_base *base;
+	/* The RGB palette */
+	struct mq1100fb_rgb palette[256];
+	/* Notifier block */
+	struct notifier_block notify;
+	/* Framebuffer offset inside MediaQ RAM */
+	u32 fb_addr, fb_size;
+	/* The pseudo-palette */
+	u32 pseudo_pal[16];
+	/* Device instance number (0-7) */
+	u8 inst;
+	/* Combination of MQ_Rotate_XXX bits */
+	u8 rotation;
+	/* 1 if device is active, 0 if poweroff */
+	unsigned active:1;
+	/* 1 if initialization is complete, 0 while it is deferred */
+	unsigned initcomplete:1;
+	/* 1 if power is enabled to the MEDIAQ_11XX_FB_DEVICE_ID subdevice */
+	unsigned poweron:1;
+};
I recommend you rename that to mq1100_par and remove the struct fb_info in 
there. Its easier to deal with when you will use framebuffer_alloc. 
+static int mq1100fb_probe (struct device *dev, struct mediaq11xx_base *base)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct fb_info *info;
+
+	info = kmalloc (sizeof (struct mq1100fb_info), GFP_KERNEL);
+	memset (info, 0, sizeof (struct mq1100fb_info));
	info = framebuffer_alloc(sizeof(struct mq1100_par), &pdev->dev);
+static int mq1100fb_platform_remove (struct device *dev)
+{
+	struct fb_info *info =
+		(struct fb_info *)dev_get_drvdata (dev);
+
+	debug_func ("\n");
+
+	if (info->active) {
+		mq1100fb_power (info, 4);
+		unregister_framebuffer (&info->fb);
+		info->base->free (info->base, info->fb_addr, info->fb_size);
+	}
	framebuffer_release(info);
+	return 0;
+}


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help