From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 04/12] Remove the old videomode functions
Date: Tue, 26 Oct 2010 13:31:40 +0200 [thread overview]
Message-ID: <1288092708-5187-5-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1288092708-5187-1-git-send-email-jbe@pengutronix.de>
Remove the old functions from the framebuffer framework. This patch is kept
separate for review only. Should be merged with the previous one patch
prior commit.
This is patch 2 of 7 to keep the repository bisectable.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
drivers/video/fb.c | 67 ++-------------------------------------------------
include/fb.h | 40 -------------------------------
2 files changed, 3 insertions(+), 104 deletions(-)
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index c3c4761..428ad34 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -11,6 +11,7 @@
static int fb_ioctl(struct cdev* cdev, int req, void *data)
{
+ struct fb_host *host = cdev->dev->platform_data;
struct fb_info *info = cdev->priv;
switch (req) {
@@ -18,10 +19,10 @@ static int fb_ioctl(struct cdev* cdev, int req, void *data)
memcpy(data, info, sizeof(*info));
break;
case FBIO_ENABLE:
- info->fbops->fb_enable(info);
+ (host->fb_enable)(cdev->priv);
break;
case FBIO_DISABLE:
- info->fbops->fb_disable(info);
+ (host->fb_disable)(cdev->priv);
break;
default:
return -ENOSYS;
@@ -30,37 +31,6 @@ static int fb_ioctl(struct cdev* cdev, int req, void *data)
return 0;
}
-static int fb_enable_set(struct device_d *dev, struct param_d *param,
- const char *val)
-{
- struct fb_info *info = dev->priv;
- int enable;
- char *new;
-
- if (!val)
- return dev_param_set_generic(dev, param, NULL);
-
- enable = simple_strtoul(val, NULL, 0);
-
- if (info->enabled == !!enable)
- return 0;
-
- if (enable) {
- info->fbops->fb_enable(info);
- new = "1";
- } else {
- info->fbops->fb_disable(info);
- new = "0";
- }
-
- dev_param_set_generic(dev, param, new);
-
- info->enabled = !!enable;
-
- return 0;
-}
-
-#if 0
#ifdef CONFIG_VIDEO_DELAY_INIT
static int fb_check_if_already_initialized(struct device_d *fb_dev)
{
@@ -191,7 +161,6 @@ static int fb_mode_set(struct device_d *fb_dev, struct param_d *param, const cha
return rc;
}
#endif
-#endif
static struct file_operations fb_ops = {
.read = mem_read,
@@ -201,7 +170,6 @@ static struct file_operations fb_ops = {
.ioctl = fb_ioctl,
};
-#if 0
static int add_fb_parameter(struct device_d *fb_dev)
{
#ifdef CONFIG_VIDEO_DELAY_INIT
@@ -306,32 +274,3 @@ struct device_d *register_framebuffer(struct fb_host *host, void *base, unsigned
return fb_dev;
}
-#endif
-
-int register_framebuffer(struct fb_info *info)
-{
- int id = get_free_deviceid("fb");
- struct device_d *dev;
-
- info->cdev.ops = &fb_ops;
- info->cdev.name = asprintf("fb%d", id);
- info->cdev.size = info->xres * info->yres * (info->bits_per_pixel >> 3);
- info->cdev.dev = &info->dev;
- info->cdev.priv = info;
- info->cdev.dev->map_base = (unsigned long)info->screen_base;
- info->cdev.dev->size = info->cdev.size;
-
- dev = &info->dev;
- dev->priv = info;
-
- sprintf(dev->name, "fb");
-
- register_device(&info->dev);
- dev_add_param(dev, "enable", fb_enable_set, NULL, 0);
- dev_set_param(dev, "enable", "0");
-
- devfs_create(&info->cdev);
-
- return 0;
-}
-
diff --git a/include/fb.h b/include/fb.h
index 96edc24..c94c1d0 100644
--- a/include/fb.h
+++ b/include/fb.h
@@ -77,15 +77,6 @@ struct fb_bitfield {
struct fb_info;
-struct fb_ops {
- /* set color register */
- int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green,
- unsigned blue, unsigned transp, struct fb_info *info);
- void (*fb_enable)(struct fb_info *info);
- void (*fb_disable)(struct fb_info *info);
-};
-
-#if 0
struct fb_host {
const struct fb_videomode *mode;
unsigned mode_cnt;
@@ -117,41 +108,10 @@ struct fb_info {
struct fb_bitfield blue;
struct fb_bitfield transp; /* transparency */
-#ifdef CONFIG_VIDEO_DELAY_ENABLING
int enabled;
-#endif
};
struct device_d *register_framebuffer(struct fb_host*, void*, unsigned);
-#endif
-
-struct fb_info {
- struct fb_videomode *mode;
-
- struct fb_ops *fbops;
- struct device_d dev; /* This is this fb device */
-
- void *screen_base;
-
- void *priv;
-
- struct cdev cdev;
-
- u32 xres; /* visible resolution */
- u32 yres;
- u32 bits_per_pixel; /* guess what */
-
- u32 grayscale; /* != 0 Graylevels instead of colors */
-
- struct fb_bitfield red; /* bitfield in fb mem if true color, */
- struct fb_bitfield green; /* else only length is significant */
- struct fb_bitfield blue;
- struct fb_bitfield transp; /* transparency */
-
- int enabled;
-};
-
-int register_framebuffer(struct fb_info *info);
#define FBIOGET_SCREENINFO _IOR('F', 1, loff_t)
#define FBIO_ENABLE _IO('F', 2)
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-10-26 11:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 11:31 [PATCHv2] Add dynamic video initialization to barebox Juergen Beisert
2010-10-26 11:31 ` [PATCH 01/12] Separate framebuffer platformdata and the videomode Juergen Beisert
2010-10-26 11:31 ` [PATCH 02/12] Add more flags for sync control Juergen Beisert
2010-10-26 11:31 ` [PATCH 03/12] Bring in dynamic videomode selection at runtime Juergen Beisert
2010-11-01 13:47 ` Sascha Hauer
2010-11-15 10:04 ` Juergen Beisert
2010-11-17 8:27 ` Sascha Hauer
2010-11-01 14:16 ` Sascha Hauer
2010-11-15 10:08 ` Juergen Beisert
2010-10-26 11:31 ` Juergen Beisert [this message]
2010-10-26 11:31 ` [PATCH 05/12] Add verbose framebuffer device info Juergen Beisert
2010-10-26 11:31 ` [PATCH 06/12] Adapt the existing imx fb driver to support runtime videomode selection Juergen Beisert
2010-10-26 11:31 ` [PATCH 07/12] Adapt the existing imx-ipu " Juergen Beisert
2010-10-26 11:31 ` [PATCH 08/12] Add a video driver for S3C2440 bases platforms Juergen Beisert
2010-11-01 14:41 ` Sascha Hauer
2010-11-15 11:35 ` Juergen Beisert
2010-11-17 8:36 ` Sascha Hauer
2010-10-26 11:31 ` [PATCH 09/12] STM378x: Add video driver for this platform Juergen Beisert
2010-10-26 11:31 ` [PATCH 10/12] Remove variable size restrictions Juergen Beisert
2010-10-26 11:31 ` [PATCH 11/12] Add doxygen documentation to the framebfuffer code Juergen Beisert
2010-10-26 11:31 ` [PATCH 12/12] Provide more driver specific data in a videomode Juergen Beisert
2010-11-01 13:19 ` [PATCHv2] Add dynamic video initialization to barebox Sascha Hauer
2010-11-01 13:29 ` Eric Bénard
2010-11-01 14:18 ` Sascha Hauer
2010-11-15 9:57 ` Juergen Beisert
2010-11-15 10:25 ` Belisko Marek
2010-11-17 8:44 ` Sascha Hauer
2010-11-18 8:18 ` Belisko Marek
2010-11-18 10:09 ` Sascha Hauer
2010-11-17 8:43 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288092708-5187-5-git-send-email-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox