linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: aliguori@us.ibm.com, adaplas@gmail.com, linux-sh@vger.kernel.org,
	armbru@redhat.com, lethal@linux-sh.org,
	Magnus Damm <magnus.damm@gmail.com>,
	jayakumar.lkml@gmail.com
Subject: [PATCH 02/05] video: deferred io sys helpers - sh_mobile_lcdcfb
Date: Mon, 22 Dec 2008 14:52:52 +0900	[thread overview]
Message-ID: <20081222055252.27821.80248.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20081222055233.27821.68008.sendpatchset@rx1.opensource.se>

From: Magnus Damm <damm@igel.co.jp>

Change the sh_mobile_lcdcfb driver to use the new shared sys helpers.
This allows us to remove some code. Also, "sysdelay" is set to the same
value as "delay" to keep same behavior as before.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 drivers/video/Kconfig            |    4 ---
 drivers/video/sh_mobile_lcdcfb.c |   40 +++++---------------------------------
 2 files changed, 6 insertions(+), 38 deletions(-)

--- 0049/drivers/video/Kconfig
+++ work/drivers/video/Kconfig	2008-12-22 14:05:10.000000000 +0900
@@ -1893,10 +1893,6 @@ config FB_W100
 config FB_SH_MOBILE_LCDC
 	tristate "SuperH Mobile LCDC framebuffer support"
 	depends on FB && SUPERH
-	select FB_SYS_FILLRECT
-	select FB_SYS_COPYAREA
-	select FB_SYS_IMAGEBLIT
-	select FB_SYS_FOPS
 	select FB_DEFERRED_IO
 	---help---
 	  Frame buffer driver for the on-chip SH-Mobile LCD controller.
--- 0006/drivers/video/sh_mobile_lcdcfb.c
+++ work/drivers/video/sh_mobile_lcdcfb.c	2008-12-22 14:05:10.000000000 +0900
@@ -215,14 +215,6 @@ static void sh_mobile_lcdc_deferred_io(s
 	lcdc_write_chan(ch, LDSM2R, 1);
 }
 
-static void sh_mobile_lcdc_deferred_io_touch(struct fb_info *info)
-{
-	struct fb_deferred_io *fbdefio = info->fbdefio;
-
-	if (fbdefio)
-		schedule_delayed_work(&info->deferred_work, fbdefio->delay);
-}
-
 static irqreturn_t sh_mobile_lcdc_irq(int irq, void *data)
 {
 	struct sh_mobile_lcdc_priv *priv = data;
@@ -410,6 +402,7 @@ static int sh_mobile_lcdc_start(struct s
 		if (ch->ldmt1r_value & (1 << 12) && tmp) {
 			ch->defio.deferred_io = sh_mobile_lcdc_deferred_io;
 			ch->defio.delay = msecs_to_jiffies(tmp);
+			ch->defio.sysdelay = msecs_to_jiffies(tmp);
 			ch->info.fbdefio = &ch->defio;
 			fb_deferred_io_init(&ch->info);
 
@@ -586,34 +579,13 @@ static struct fb_fix_screeninfo sh_mobil
 	.accel =	FB_ACCEL_NONE,
 };
 
-static void sh_mobile_lcdc_fillrect(struct fb_info *info,
-				    const struct fb_fillrect *rect)
-{
-	sys_fillrect(info, rect);
-	sh_mobile_lcdc_deferred_io_touch(info);
-}
-
-static void sh_mobile_lcdc_copyarea(struct fb_info *info,
-				    const struct fb_copyarea *area)
-{
-	sys_copyarea(info, area);
-	sh_mobile_lcdc_deferred_io_touch(info);
-}
-
-static void sh_mobile_lcdc_imageblit(struct fb_info *info,
-				     const struct fb_image *image)
-{
-	sys_imageblit(info, image);
-	sh_mobile_lcdc_deferred_io_touch(info);
-}
-
 static struct fb_ops sh_mobile_lcdc_ops = {
 	.fb_setcolreg	= sh_mobile_lcdc_setcolreg,
-	.fb_read        = fb_sys_read,
-	.fb_write       = fb_sys_write,
-	.fb_fillrect	= sh_mobile_lcdc_fillrect,
-	.fb_copyarea	= sh_mobile_lcdc_copyarea,
-	.fb_imageblit	= sh_mobile_lcdc_imageblit,
+	.fb_read        = fb_deferred_io_read,
+	.fb_write       = fb_deferred_io_write,
+	.fb_fillrect	= fb_deferred_io_fillrect,
+	.fb_copyarea	= fb_deferred_io_copyarea,
+	.fb_imageblit	= fb_deferred_io_imageblit,
 };
 
 static int sh_mobile_lcdc_set_bpp(struct fb_var_screeninfo *var, int bpp)

  parent reply	other threads:[~2008-12-22  5:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-22  5:52 [PATCH 00/05] video: deferred io sys helpers Magnus Damm
2008-12-22  5:52 ` [PATCH 01/05] video: deferred io sys helpers - core Magnus Damm
2008-12-22  5:52 ` Magnus Damm [this message]
2008-12-22  5:53 ` [PATCH 03/05] video: deferred io sys helpers - hecuba / n411 Magnus Damm
2008-12-22  5:58   ` Paul Mundt
2008-12-22  6:12     ` Magnus Damm
2008-12-22  5:53 ` [PATCH 04/05] video: deferred io sys helpers - metronome Magnus Damm
2008-12-24  4:58   ` Jaya Kumar
2008-12-24  5:46     ` Magnus Damm
2008-12-24  6:44       ` Jaya Kumar
2008-12-22  5:53 ` [PATCH 05/05] video: deferred io sys helpers - xen Magnus Damm

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=20081222055252.27821.80248.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=adaplas@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=jayakumar.lkml@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-sh@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).