From: Alexander Kern <alex.kern@gmx.de>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: James Simmons <jsimmons@infradead.org>
Subject: Re: [PATCH 6/7]
Date: Sun, 21 Mar 2004 21:47:00 +0100 [thread overview]
Message-ID: <200403212147.00908.alex.kern@gmx.de> (raw)
In-Reply-To: <200403212039.22396.alex.kern@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Am Sonntag, 21. März 2004 20:39 schrieb Alexander Kern:
Uups, something goes wrong
here another version...
[-- Attachment #2: 06_mach64-laterinit2.diff --]
[-- Type: text/x-diff, Size: 3277 bytes --]
diff -U 3 -H -d -I '*.o' -p -r -- linux-2.6.4/drivers/video/aty/atyfb_base.c linux-2.6.alex/drivers/video/aty/atyfb_base.c
--- linux-2.6.4/drivers/video/aty/atyfb_base.c 2004-03-21 21:30:07.000000000 +0100
+++ linux-2.6.alex/drivers/video/aty/atyfb_base.c 2004-03-20 21:33:24.000000000 +0100
@@ -366,24 +366,29 @@ static struct {
};
/* can not fail */
-static void __devinit correct_chipset(int i, struct atyfb_par *par)
+static void __devinit correct_chipset(struct atyfb_par *par)
{
u8 rev;
u16 type;
u32 chip_id;
const char *name;
+ int i;
+
+ for (i = sizeof(aty_chips) / sizeof(*aty_chips) - 1; i >= 0; i--)
+ if (par->pci_id == aty_chips[i].pci_id)
+ break;
name = aty_chips[i].name;
par->pll_limits.pll_max = aty_chips[i].pll;
par->pll_limits.mclk = aty_chips[i].mclk;
par->pll_limits.xclk = aty_chips[i].xclk;
par->features = aty_chips[i].features;
- par->pci_id = aty_chips[i].pci_id;
chip_id = aty_ld_le32(CONFIG_CHIP_ID, par);
type = chip_id & CFG_CHIP_TYPE;
rev = (chip_id & CFG_CHIP_REV) >> 24;
- switch(aty_chips[i].pci_id) {
+
+ switch(par->pci_id) {
#ifdef CONFIG_FB_ATY_GX
case PCI_CHIP_MACH64GX:
assert(type == 0x00d7);
@@ -432,7 +437,7 @@ static void __devinit correct_chipset(in
#endif
}
- printk("atyfb: %s [0x%04x rev 0x%02x] ", name, type, rev);
+ printk("atyfb: %s [0x%04x rev 0x%02x]\n", name, type, rev);
}
static char ram_dram[] __initdata = "DRAM";
@@ -2648,6 +2653,8 @@ static int __devinit atyfb_setup_sparc(s
par->mmap_map[j].prot_flag = _PAGE_E;
j++;
}
+
+ correct_chipset(par);
if (IS_XL(pdev->device)) {
/*
@@ -3094,6 +3101,7 @@ static int __devinit atyfb_setup_generic
}
/* always succeeded ? */
+ correct_chipset(par);
init_from_bios(par);
if (!(aty_ld_le32(CRTC_GEN_CNTL, par) & CRTC_EXT_DISP_EN))
@@ -3120,6 +3128,7 @@ static int __devinit atyfb_pci_probe(str
for (i = sizeof(aty_chips) / sizeof(*aty_chips) - 1; i >= 0; i--)
if (pdev->device == aty_chips[i].pci_id)
break;
+
if (i < 0)
return -ENODEV;
@@ -3145,6 +3154,7 @@ static int __devinit atyfb_pci_probe(str
}
par = info->par;
info->fix = atyfb_fix;
+ par->pci_id = aty_chips[i].pci_id;
/* Reserve space */
par->res_start = rp->start;
@@ -3154,9 +3164,6 @@ static int __devinit atyfb_pci_probe(str
goto err_free;
}
- /* set default Values aus pci_table */
- correct_chipset(i, par);
-
/* Setup "info" structure */
#ifdef __sparc__
rc = atyfb_setup_sparc(pdev, info, addr);
diff -U 3 -H -d -I '*.o' -p -r -- linux-2.6.4/drivers/video/aty/mach64_ct.c linux-2.6.alex/drivers/video/aty/mach64_ct.c
--- linux-2.6.4/drivers/video/aty/mach64_ct.c 2004-03-21 21:28:27.000000000 +0100
+++ linux-2.6.alex/drivers/video/aty/mach64_ct.c 2004-03-20 20:10:00.000000000 +0100
@@ -273,12 +273,11 @@ void aty_set_pll_ct(const struct fb_info
__FUNCTION__,
pll->ct.pll_ext_cntl, pll->ct.pll_gen_cntl, pll->ct.pll_vclk_cntl);
-#endif
printk("atyfb(%s): setting clock %lu for FeedBackDivider %i, ReferenceDivider %i, PostDivider %i(%i)\n",
__FUNCTION__,
par->clk_wr_offset, pll->ct.vclk_fb_div,
pll->ct.pll_ref_div, pll->ct.vclk_post_div, pll->ct.vclk_post_div_real);
-
+#endif
#ifdef CONFIG_FB_ATY_GENERIC_LCD
if (par->lcd_table != 0) {
/* turn off LCD */
next prev parent reply other threads:[~2004-03-21 20:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-21 19:33 [PATCH 0/7] Bunch of patches Alexander Kern
2004-03-21 19:37 ` [PATCH 1/7] Alexander Kern
2004-03-21 19:37 ` [PATCH 2/7] Alexander Kern
2004-03-21 19:38 ` [PATCH 3/7] Alexander Kern
2004-03-21 19:38 ` [PATCH 4/7] Alexander Kern
2004-03-21 19:38 ` [PATCH 5/7] Alexander Kern
2004-03-21 19:39 ` [PATCH 6/7] Alexander Kern
2004-03-21 20:47 ` Alexander Kern [this message]
2004-03-21 19:39 ` [PATCH 7/7] Alexander Kern
2004-03-21 20:49 ` [PATCH] all changes in two, again James mach64.diff Alexander Kern
2004-03-23 18:57 ` [PATCH 0/7] Bunch of patches James Simmons
2004-03-24 20:39 ` Alexander Kern
2004-03-24 21:25 ` all in one patch Alexander Kern
2004-03-24 21:27 ` James Simmons
2004-03-24 21:44 ` James Simmons
2004-03-24 21:26 ` Re: [PATCH 0/7] Bunch of patches James Simmons
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=200403212147.00908.alex.kern@gmx.de \
--to=alex.kern@gmx.de \
--cc=jsimmons@infradead.org \
--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).