+ atyfb-improve-atyfb_atari_probe.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     atyfb: Improve atyfb_atari_probe()
has been added to the -mm tree.  Its filename is
     atyfb-improve-atyfb_atari_probe.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: atyfb: Improve atyfb_atari_probe()
From: Ville Syrjala <syrjala@xxxxxx>

Improve atyfb_atari_probe():
* Call correct_chipset() so that more par members, par->features in
  particular, get initialized.
* If probe fails iounmap() the mapped regions and continue probing for more
  adapters.

Only verified to cross-compile due to lack of hardware.

Signed-off-by: Ville Syrjala <syrjala@xxxxxx>
Cc: "Antonino A. Daplas" <adaplas@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/video/aty/atyfb_base.c |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff -puN drivers/video/aty/atyfb_base.c~atyfb-improve-atyfb_atari_probe drivers/video/aty/atyfb_base.c
--- a/drivers/video/aty/atyfb_base.c~atyfb-improve-atyfb_atari_probe
+++ a/drivers/video/aty/atyfb_base.c
@@ -3629,6 +3629,7 @@ static int __init atyfb_atari_probe(void
 	struct fb_info *info;
 	int m64_num;
 	u32 clock_r;
+	int num_found = 0;
 
 	for (m64_num = 0; m64_num < mach64_count; m64_num++) {
 		if (!phys_vmembase[m64_num] || !phys_size[m64_num] ||
@@ -3676,16 +3677,28 @@ static int __init atyfb_atari_probe(void
 			break;
 		}
 
-		if (aty_init(info)) {
-			if (info->screen_base)
-				iounmap(info->screen_base);
-			if (par->ati_regbase)
-				iounmap(par->ati_regbase);
+		/* Fake pci_id for correct_chipset() */
+		switch (aty_ld_le32(CONFIG_CHIP_ID, par) & CFG_CHIP_TYPE) {
+		case 0x00d7:
+			par->pci_id = PCI_CHIP_MACH64GX;
+			break;
+		case 0x0057:
+			par->pci_id = PCI_CHIP_MACH64CX;
+			break;
+		default:
+			break;
+		}
+
+		if (correct_chipset(par) || aty_init(info)) {
+			iounmap(info->screen_base);
+			iounmap(par->ati_regbase);
 			framebuffer_release(info);
-			/* This is insufficient! kernel_map has added two large chunks!! */
-			return -ENXIO;
+		} else {
+			num_found++;
 		}
 	}
+
+	return num_found ? 0 : -ENXIO;
 }
 
 #endif /* CONFIG_ATARI */
_

Patches currently in -mm which might be from syrjala@xxxxxx are

atyfb-remove-fixme.patch
atyfb-fix-compiler-warnings.patch
atyfb-fix-sparse-warnings.patch
atyfb-fix-blanking-level.patch
atyfb-remove-pointless-aty_init.patch
atyfb-fix-__init-and-__devinit.patch
atyfb-remove-aty_cmap_regs.patch
atyfb-improve-atyfb_atari_probe.patch
atyfb-improve-power-management.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux