From: syrjala@sci.fi
To: linux-fbdev-devel@lists.sourceforge.net
Cc: alex.kern@gmx.de, Ville Syrjala <syrjala@sci.fi>
Subject: [patch 7/9] atyfb: Remove aty_cmap_regs
Date: Mon, 04 Sep 2006 01:06:54 +0300 [thread overview]
Message-ID: <20060903220703.645688335@proteus.korsu.shacknet.nu> (raw)
In-Reply-To: 20060903220646.894202994@proteus.korsu.shacknet.nu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: atyfb_remove_aty_cmap_regs.patch --]
[-- Type: text/plain, Size: 3462 bytes --]
Remove aty_cmap_regs. Access the LUT in the same way as other registers.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
---
drivers/video/aty/atyfb.h | 1
drivers/video/aty/atyfb_base.c | 45 ++++++++++-------------------------------
2 files changed, 12 insertions(+), 34 deletions(-)
Index: linux-2.6.18-rc4/drivers/video/aty/atyfb_base.c
===================================================================
--- linux-2.6.18-rc4.orig/drivers/video/aty/atyfb_base.c
+++ linux-2.6.18-rc4/drivers/video/aty/atyfb_base.c
@@ -203,14 +203,6 @@ static void ATIReduceRatio(int *Numerato
* The Hardware parameters for each card
*/
-struct aty_cmap_regs {
- u8 windex;
- u8 lut;
- u8 mask;
- u8 rindex;
- u8 cntl;
-};
-
struct pci_mmap_map {
unsigned long voff;
unsigned long poff;
@@ -1937,17 +1929,14 @@ static void atyfb_save_palette(struct at
aty_st_8(DAC_CNTL, tmp, par);
aty_st_8(DAC_MASK, 0xff, par);
- writeb(i, &par->aty_cmap_regs->rindex);
- atyfb_save.r[enter][i] = readb(&par->aty_cmap_regs->lut);
- atyfb_save.g[enter][i] = readb(&par->aty_cmap_regs->lut);
- atyfb_save.b[enter][i] = readb(&par->aty_cmap_regs->lut);
- writeb(i, &par->aty_cmap_regs->windex);
- writeb(atyfb_save.r[1 - enter][i],
- &par->aty_cmap_regs->lut);
- writeb(atyfb_save.g[1 - enter][i],
- &par->aty_cmap_regs->lut);
- writeb(atyfb_save.b[1 - enter][i],
- &par->aty_cmap_regs->lut);
+ aty_st_8(DAC_R_INDEX, i, par);
+ atyfb_save.r[enter][i] = aty_ld_8(DAC_DATA, par);
+ atyfb_save.g[enter][i] = aty_ld_8(DAC_DATA, par);
+ atyfb_save.b[enter][i] = aty_ld_8(DAC_DATA, par);
+ aty_st_8(DAC_W_INDEX, i, par);
+ aty_st_8(DAC_DATA, atyfb_save.r[1 - enter][i], par);
+ aty_st_8(DAC_DATA, atyfb_save.g[1 - enter][i], par);
+ aty_st_8(DAC_DATA, atyfb_save.b[1 - enter][i], par);
}
}
@@ -2351,9 +2340,6 @@ static int __devinit aty_init(struct fb_
init_waitqueue_head(&par->vblank.wait);
spin_lock_init(&par->int_lock);
- par->aty_cmap_regs =
- (struct aty_cmap_regs __iomem *) (par->ati_regbase + 0xc0);
-
#ifdef CONFIG_PPC_PMAC
/* The Apple iBook1 uses non-standard memory frequencies. We detect it
* and set the frequency manually. */
@@ -2858,17 +2844,10 @@ static int atyfb_blank(int blank, struct
static void aty_st_pal(u_int regno, u_int red, u_int green, u_int blue,
const struct atyfb_par *par)
{
-#ifdef CONFIG_ATARI
- out_8(&par->aty_cmap_regs->windex, regno);
- out_8(&par->aty_cmap_regs->lut, red);
- out_8(&par->aty_cmap_regs->lut, green);
- out_8(&par->aty_cmap_regs->lut, blue);
-#else
- writeb(regno, &par->aty_cmap_regs->windex);
- writeb(red, &par->aty_cmap_regs->lut);
- writeb(green, &par->aty_cmap_regs->lut);
- writeb(blue, &par->aty_cmap_regs->lut);
-#endif
+ aty_st_8(DAC_W_INDEX, regno, par);
+ aty_st_8(DAC_DATA, red, par);
+ aty_st_8(DAC_DATA, green, par);
+ aty_st_8(DAC_DATA, blue, par);
}
/*
Index: linux-2.6.18-rc4/drivers/video/aty/atyfb.h
===================================================================
--- linux-2.6.18-rc4.orig/drivers/video/aty/atyfb.h
+++ linux-2.6.18-rc4/drivers/video/aty/atyfb.h
@@ -126,7 +126,6 @@ union aty_pll {
*/
struct atyfb_par {
- struct aty_cmap_regs __iomem *aty_cmap_regs;
struct { u8 red, green, blue; } palette[256];
const struct aty_dac_ops *dac_ops;
const struct aty_pll_ops *pll_ops;
--
Ville Syrj������l������
syrjala@sci.fi
http://www.sci.fi/~syrjala/
[-- Attachment #2: Type: text/plain, Size: 373 bytes --]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
[-- Attachment #3: Type: text/plain, Size: 182 bytes --]
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
next prev parent reply other threads:[~2006-09-03 22:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-03 22:06 [patch 1/9] atyfb: Remove FIXME syrjala
2006-09-03 22:06 ` [patch 2/9] atyfb: Fix compiler warnings syrjala
2006-09-03 22:06 ` [patch 3/9] atyfb: Fix sparse warnings syrjala
2006-09-03 22:06 ` [patch 4/9] atyfb: Fix blanking level transitions syrjala
2006-09-03 22:06 ` [patch 5/9] atyfb: Remove pointless aty_init() argument syrjala
2006-09-03 22:06 ` [patch 6/9] atyfb: Fix __init and __devinit annotations syrjala
2006-09-03 22:06 ` syrjala [this message]
2006-09-03 22:06 ` [patch 8/9] atyfb: Improve atyfb_atari_probe() syrjala
2006-09-04 9:20 ` Geert Uytterhoeven
2006-09-03 22:06 ` [patch 9/9] atyfb: Improve power management syrjala
2006-09-08 22:02 ` [patch 1/9] atyfb: Remove FIXME Alexander Kern
2006-09-09 7:46 ` Ville Syrjälä
2006-09-09 8:20 ` Geert Uytterhoeven
2006-09-09 12:39 ` Ville Syrjälä
2006-09-10 7:48 ` Geert Uytterhoeven
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=20060903220703.645688335@proteus.korsu.shacknet.nu \
--to=syrjala@sci.fi \
--cc=alex.kern@gmx.de \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).