Skip to contentSkip to conversation

CONFIG_FB_ATY linkage error on PPC32

PATCH In review Andrew Morton 3 participants 10 messages Mar 13, 2005 – Mar 14, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CONFIG_FB_ATY linkage error on PPC32

ack?

Begin forwarded message:

Date: Sun, 13 Mar 2005 00:27:01 +0100 (MET)
From: Mikael Pettersson <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH][2.6.11-mm3] CONFIG_FB_ATY linkage error on PPC32

On ppc32 the ATI Mach64 frame buffer references symbols on macmodes.o. In Linus' 2.6.11 macmodes.o is automatically included, but not so in 2.6.11-mm3, causing linkage errors.

The quick-and-dirty hack below worked for me.

/Mikael

drivers/video/Makefile renamed from drivers/video/Makefile.~1~ +1 -1
@@ -29,7 +29,7 @@ obj-$(CONFIG_FB_PM3)		  += pm3fb.o
 obj-$(CONFIG_FB_MATROX)		  += matrox/
 obj-$(CONFIG_FB_RIVA)		  += riva/ vgastate.o
 obj-$(CONFIG_FB_NVIDIA)		  += nvidia/
-obj-$(CONFIG_FB_ATY)		  += aty/
+obj-$(CONFIG_FB_ATY)		  += aty/ macmodes.o
 obj-$(CONFIG_FB_ATY128)		  += aty/
 obj-$(CONFIG_FB_RADEON)		  += aty/
 obj-$(CONFIG_FB_SIS)		  += sis/

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#1 lore raw

That will break x86.

I should move macmodes into the fb base module on PPC and then export the needed symbols.

I'll try to eyeball a patch but I haven't figured out yet how to do remote ppc builds.

Quoted 31 lines · Andrew Morton

ack?

Begin forwarded message:

Date: Sun, 13 Mar 2005 00:27:01 +0100 (MET)
From: Mikael Pettersson <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH][2.6.11-mm3] CONFIG_FB_ATY linkage error on PPC32

On ppc32 the ATI Mach64 frame buffer references symbols on macmodes.o. In Linus' 2.6.11 macmodes.o is automatically included, but not so in 2.6.11-mm3, causing linkage errors.

The quick-and-dirty hack below worked for me.

/Mikael

drivers/video/Makefile 2005-03-11 18:03:29.000000000 +0100 renamed from drivers/video/Makefile.~1~ 2005-03-09 23:20:08.000000000 +0100 +1 -1
@@ -29,7 +29,7 @@ obj-$(CONFIG_FB_PM3)            += pm3fb.o
 obj-$(CONFIG_FB_MATROX)                  += matrox/
 obj-$(CONFIG_FB_RIVA)            += riva/ vgastate.o
 obj-$(CONFIG_FB_NVIDIA)                  += nvidia/
-obj-$(CONFIG_FB_ATY)             += aty/
+obj-$(CONFIG_FB_ATY)             += aty/ macmodes.o
 obj-$(CONFIG_FB_ATY128)                  += aty/
 obj-$(CONFIG_FB_RADEON)                  += aty/
 obj-$(CONFIG_FB_SIS)             += sis/
Signature · 9 lines
Jon Smirl
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#6 lore raw
In reply to Andrew Morton
Quoted 1 line · Andrew Morton

ack?

No, how about this patch?

---

 Kconfig    |   16 ++++++++++++++++
 Makefile   |    9 +++++----
 macmodes.c |    9 ++++++---
 3 files changed, 27 insertions(+), 7 deletions(-)
drivers/video/Kconfig +16 -0
diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig
@@ -74,6 +74,11 @@
 	  This is used by drivers that don't provide their own (accelerated)
 	  version.
 
+config FB_MACMODES
+       tristate
+       depends on FB
+       default n
+
 config FB_MODE_HELPERS
         bool "Enable Video Mode Handling Helpers"
         depends on FB
@@ -323,6 +328,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES
 	help
 	  Say Y if you want support with Open Firmware for your graphics
 	  board.
@@ -334,6 +340,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES
 	help
 	  This driver supports a frame buffer for the graphics adapter in the
 	  Power Macintosh 7300 and others.
@@ -345,6 +352,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES
 	help
 	  This driver supports a frame buffer for the "platinum" graphics
 	  adapter in some Power Macintoshes.
@@ -356,6 +364,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES
 	help
 	  This driver supports a frame buffer for the "valkyrie" graphics
 	  adapter in some Power Macintoshes.
@@ -384,6 +393,7 @@
 	depends on (FB = y) && PCI
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES if PPC
 	help
 	  The IMS Twin Turbo is a PCI-based frame buffer card bundled with
 	  many Macintosh and compatible computers.
@@ -436,6 +446,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES
 
 #      bool '  Apple DAFB display support' CONFIG_FB_DAFB
 config FB_HP300
@@ -753,6 +764,7 @@
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
 	select FB_TILEBLITTING
+	select FB_MACMODES if PPC_PMAC
 	---help---
 	  Say Y here if you have a Matrox Millennium, Matrox Millennium II,
 	  Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
@@ -892,6 +904,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES if PPC
 	help
 	  Choose this option if you want to use an ATI Radeon graphics card as
 	  a framebuffer device.  There are both PCI and AGP versions.  You
@@ -909,6 +922,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES if PPC_OF
 	help
 	  Choose this option if you want to use an ATI Radeon graphics card as
 	  a framebuffer device.  There are both PCI and AGP versions.  You
@@ -947,6 +961,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES if PPC_PMAC
 	help
 	  This driver supports graphics boards with the ATI Rage128 chips.
 	  Say Y if you have such a graphics board and read
@@ -962,6 +977,7 @@
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
 	select FB_SOFT_CURSOR
+	select FB_MACMODES if PPC
 	help
 	  This driver supports graphics boards with the ATI Mach64 chips.
 	  Say Y if you have such a graphics board.
drivers/video/Makefile +5 -4
diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile
@@ -16,6 +16,7 @@
 obj-$(CONFIG_FB_CFB_COPYAREA)  += cfbcopyarea.o
 obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o
 obj-$(CONFIG_FB_SOFT_CURSOR)   += softcursor.o
+obj-$(CONFIG_FB_MACMODES)      += macmodes.o
 
 # Hardware specific drivers go first
 obj-$(CONFIG_FB_RETINAZ3)         += retz3fb.o
@@ -41,9 +42,9 @@
 obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o vgastate.o
 obj-$(CONFIG_FB_VIRGE)            += virgefb.o
 obj-$(CONFIG_FB_3DFX)             += tdfxfb.o
-obj-$(CONFIG_FB_CONTROL)          += controlfb.o macmodes.o
-obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o macmodes.o
-obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o macmodes.o
+obj-$(CONFIG_FB_CONTROL)          += controlfb.o
+obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o
+obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o
 obj-$(CONFIG_FB_CT65550)          += chipsfb.o
 obj-$(CONFIG_FB_IMSTT)            += imsttfb.o
 obj-$(CONFIG_FB_S3TRIO)           += S3triofb.o
@@ -61,7 +62,7 @@
 obj-$(CONFIG_FB_SGIVW)            += sgivwfb.o
 obj-$(CONFIG_FB_ACORN)            += acornfb.o
 obj-$(CONFIG_FB_ATARI)            += atafb.o
-obj-$(CONFIG_FB_MAC)              += macfb.o macmodes.o
+obj-$(CONFIG_FB_MAC)              += macfb.o
 obj-$(CONFIG_FB_HGA)              += hgafb.o
 obj-$(CONFIG_FB_IGA)              += igafb.o
 obj-$(CONFIG_FB_APOLLO)           += dnfb.o
drivers/video/macmodes.c +6 -3
diff -Nru a/drivers/video/macmodes.c b/drivers/video/macmodes.c
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/fb.h>
 #include <linux/string.h>
+#include <linux/module.h>
 
 #include "macmodes.h"
 
@@ -281,7 +282,7 @@
     var->vmode = mode->vmode;
     return 0;
 }
-
+EXPORT_SYMBOL(mac_vmode_to_var);
 
 /**
  *	mac_var_to_vmode - convert var structure to MacOS vmode/cmode pair
@@ -326,7 +327,7 @@
     }
     return -EINVAL;
 }
-
+EXPORT_SYMBOL(mac_var_to_vmode);
 
 /**
  *	mac_map_monitor_sense - Convert monitor sense to vmode
@@ -348,7 +349,7 @@
 	    break;
     return map->vmode;
 }
-
+EXPORT_SYMBOL(mac_map_monitor_sense);
 
 /**
  *	mac_find_mode - find a video mode
@@ -384,3 +385,5 @@
     return fb_find_mode(var, info, mode_option, db, dbsize,
 			&mac_modedb[DEFAULT_MODEDB_INDEX], default_bpp);
 }
+EXPORT_SYMBOL(mac_find_mode);
+

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#7 lore raw

On Mon, 14 Mar 2005 06:57:43 +0800, Antonino A. Daplas <[email protected]> wrote:

That will work too. FB_MACMODES should depend on PPC so that it doesn't appear on x86.

Quoted 17 lines · Andrew Morton
Quoted 1 line

ack?

No, how about this patch?

---

 Kconfig    |   16 ++++++++++++++++
 Makefile   |    9 +++++----
 macmodes.c |    9 ++++++---
 3 files changed, 27 insertions(+), 7 deletions(-)

diff -Nru a/drivers/video/Kconfig b/drivers/video/Kconfig

drivers/video/Kconfig 2005-03-14 06:50:28 +08:00 line 81

Quoted 8 lines
drivers/video/Kconfig 2005-03-14 06:50:28 +08:00 renamed from drivers/video/Kconfig 2005-03-05 07:56:36 +08:00 +5 -0
@@ -74,6 +74,11 @@
          This is used by drivers that don't provide their own (accelerated)
          version.
 
+config FB_MACMODES
+       tristate
+       depends on FB
+       default n
+

depends on FB & PPC

Quoted 170 lines
drivers/video/Kconfig 2005-03-14 06:50:28 +08:00 renamed from drivers/video/Kconfig 2005-03-05 07:56:36 +08:00 +11 -0
 config FB_MODE_HELPERS
         bool "Enable Video Mode Handling Helpers"
         depends on FB
@@ -323,6 +328,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES
        help
          Say Y if you want support with Open Firmware for your graphics
          board.
@@ -334,6 +340,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES
        help
          This driver supports a frame buffer for the graphics adapter in the
          Power Macintosh 7300 and others.
@@ -345,6 +352,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES
        help
          This driver supports a frame buffer for the "platinum" graphics
          adapter in some Power Macintoshes.
@@ -356,6 +364,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES
        help
          This driver supports a frame buffer for the "valkyrie" graphics
          adapter in some Power Macintoshes.
@@ -384,6 +393,7 @@
        depends on (FB = y) && PCI
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES if PPC
        help
          The IMS Twin Turbo is a PCI-based frame buffer card bundled with
          many Macintosh and compatible computers.
@@ -436,6 +446,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES
 
 #      bool '  Apple DAFB display support' CONFIG_FB_DAFB
 config FB_HP300
@@ -753,6 +764,7 @@
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
        select FB_TILEBLITTING
+       select FB_MACMODES if PPC_PMAC
        ---help---
          Say Y here if you have a Matrox Millennium, Matrox Millennium II,
          Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
@@ -892,6 +904,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES if PPC
        help
          Choose this option if you want to use an ATI Radeon graphics card as
          a framebuffer device.  There are both PCI and AGP versions.  You
@@ -909,6 +922,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES if PPC_OF
        help
          Choose this option if you want to use an ATI Radeon graphics card as
          a framebuffer device.  There are both PCI and AGP versions.  You
@@ -947,6 +961,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES if PPC_PMAC
        help
          This driver supports graphics boards with the ATI Rage128 chips.
          Say Y if you have such a graphics board and read
@@ -962,6 +977,7 @@
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_SOFT_CURSOR
+       select FB_MACMODES if PPC
        help
          This driver supports graphics boards with the ATI Mach64 chips.
          Say Y if you have such a graphics board.

diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile

drivers/video/Makefile 2005-03-14 06:55:07 +08:00 renamed from drivers/video/Makefile 2005-03-12 23:22:36 +08:00 +5 -4
@@ -16,6 +16,7 @@
 obj-$(CONFIG_FB_CFB_COPYAREA)  += cfbcopyarea.o
 obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o
 obj-$(CONFIG_FB_SOFT_CURSOR)   += softcursor.o
+obj-$(CONFIG_FB_MACMODES)      += macmodes.o
 
 # Hardware specific drivers go first
 obj-$(CONFIG_FB_RETINAZ3)         += retz3fb.o
@@ -41,9 +42,9 @@
 obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o vgastate.o
 obj-$(CONFIG_FB_VIRGE)            += virgefb.o
 obj-$(CONFIG_FB_3DFX)             += tdfxfb.o
-obj-$(CONFIG_FB_CONTROL)          += controlfb.o macmodes.o
-obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o macmodes.o
-obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o macmodes.o
+obj-$(CONFIG_FB_CONTROL)          += controlfb.o
+obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o
+obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o
 obj-$(CONFIG_FB_CT65550)          += chipsfb.o
 obj-$(CONFIG_FB_IMSTT)            += imsttfb.o
 obj-$(CONFIG_FB_S3TRIO)           += S3triofb.o
@@ -61,7 +62,7 @@
 obj-$(CONFIG_FB_SGIVW)            += sgivwfb.o
 obj-$(CONFIG_FB_ACORN)            += acornfb.o
 obj-$(CONFIG_FB_ATARI)            += atafb.o
-obj-$(CONFIG_FB_MAC)              += macfb.o macmodes.o
+obj-$(CONFIG_FB_MAC)              += macfb.o
 obj-$(CONFIG_FB_HGA)              += hgafb.o
 obj-$(CONFIG_FB_IGA)              += igafb.o
 obj-$(CONFIG_FB_APOLLO)           += dnfb.o

diff -Nru a/drivers/video/macmodes.c b/drivers/video/macmodes.c

drivers/video/macmodes.c 2005-03-14 06:50:30 +08:00 renamed from drivers/video/macmodes.c 2005-03-12 23:23:12 +08:00 +6 -3
@@ -19,6 +19,7 @@
 #include <linux/errno.h>
 #include <linux/fb.h>
 #include <linux/string.h>
+#include <linux/module.h>
 
 #include "macmodes.h"
 
@@ -281,7 +282,7 @@
     var->vmode = mode->vmode;
     return 0;
 }
-
+EXPORT_SYMBOL(mac_vmode_to_var);
 
 /**
  *     mac_var_to_vmode - convert var structure to MacOS vmode/cmode pair
@@ -326,7 +327,7 @@
     }
     return -EINVAL;
 }
-
+EXPORT_SYMBOL(mac_var_to_vmode);
 
 /**
  *     mac_map_monitor_sense - Convert monitor sense to vmode
@@ -348,7 +349,7 @@
            break;
     return map->vmode;
 }
-
+EXPORT_SYMBOL(mac_map_monitor_sense);
 
 /**
  *     mac_find_mode - find a video mode
@@ -384,3 +385,5 @@
     return fb_find_mode(var, info, mode_option, db, dbsize,
                        &mac_modedb[DEFAULT_MODEDB_INDEX], default_bpp);
 }
+EXPORT_SYMBOL(mac_find_mode);
+
Signature · 9 lines
Jon Smirl
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#8 lore raw
Quoted 6 lines · Jon Smirl

On Mon, 14 Mar 2005 06:57:43 +0800, Antonino A. Daplas <[email protected]> wrote:

That will work too. FB_MACMODES should depend on PPC so that it doesn't appear on x86.

That's why some has a 'select FB_MACMODES if <arch>' for multi-arch devices.

Tony

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#3 lore raw
In reply to Jon Smirl
Quoted 4 lines · Jon Smirl

This should be a more general fix. Mikael can you give it a try on ppc
since I don't have one?

Quoted 8 lines

If you have time it would also be helpful if you could try building all of the ppc drivers both as modules and built-in just to make sure they build.

There are 77 framebuffer drivers on eight platforms that need to be checked. I tried to get them all right but I don't own all of the needed hardware.

Confused. Is Tony's patch OK?

Quoted 5 lines

===== drivers/video/Makefile 1.120 vs edited =====
--- 1.120/drivers/video/Makefile 2005-03-10 03:39:10 -05:00
+++ edited/drivers/video/Makefile 2005-03-13 16:56:53 -05:00
@@ -10,6 +10,9 @@

Quoted 7 lines

obj-$(CONFIG_FB) += fb.o
fb-y := fbmem.o fbmon.o fbcmap.o
fbsysfs.o modedb.o
+ifdef $(CONFIG-PPC)
+fb-y += macmodes.o
+endif
fb-objs := $(fb-y)

Your email client is mangling whitespace. This won't apply.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#4 lore raw
Quoted 8 lines · Andrew Morton
Quoted 7 lines · Jon Smirl

This should be a more general fix. Mikael can you give it a try on ppc
since I don't have one?

If you have time it would also be helpful if you could try building all of the ppc drivers both as modules and built-in just to make sure they build.

Quoted 17 lines
Quoted 3 lines

There are 77 framebuffer drivers on eight platforms that need to be checked. I tried to get them all right but I don't own all of the needed hardware.

Confused. Is Tony's patch OK?

Quoted 11 lines

===== drivers/video/Makefile 1.120 vs edited =====
--- 1.120/drivers/video/Makefile 2005-03-10 03:39:10 -05:00
+++ edited/drivers/video/Makefile 2005-03-13 16:56:53 -05:00
@@ -10,6 +10,9 @@

obj-$(CONFIG_FB) += fb.o
fb-y := fbmem.o fbmon.o fbcmap.o
fbsysfs.o modedb.o
+ifdef $(CONFIG-PPC)
+fb-y += macmodes.o
+endif

The problem with generalizing macmodes under CONFIG_PPC is that not all PPC-based drivers will use macmodes. While most depend on PPC, some require PPC_OF, and others PPC_PMAC. It's more flexible if each driver does the selection.

Tony

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

#2 lore raw
In reply to Jon Smirl

This should be a more general fix. Mikael can you give it a try on ppc since I don't have one?

If you have time it would also be helpful if you could try building all of the ppc drivers both as modules and built-in just to make sure they build.

There are 77 framebuffer drivers on eight platforms that need to be checked. I tried to get them all right but I don't own all of the needed hardware.

Signature · 99 lines
Jon Smirl
[email protected]


===== drivers/video/Makefile 1.120 vs edited =====
--- 1.120/drivers/video/Makefile	2005-03-10 03:39:10 -05:00
+++ edited/drivers/video/Makefile	2005-03-13 16:56:53 -05:00
@@ -10,6 +10,9 @@
 
 obj-$(CONFIG_FB)                  += fb.o
 fb-y                              := fbmem.o fbmon.o fbcmap.o
fbsysfs.o modedb.o
+ifdef $(CONFIG-PPC)
+fb-y				  += macmodes.o
+endif
 fb-objs                           := $(fb-y)
 
 obj-$(CONFIG_FB_CFB_FILLRECT)  += cfbfillrect.o
@@ -41,9 +44,9 @@
 obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o vgastate.o
 obj-$(CONFIG_FB_VIRGE)            += virgefb.o
 obj-$(CONFIG_FB_3DFX)             += tdfxfb.o
-obj-$(CONFIG_FB_CONTROL)          += controlfb.o macmodes.o
-obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o macmodes.o
-obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o macmodes.o
+obj-$(CONFIG_FB_CONTROL)          += controlfb.o
+obj-$(CONFIG_FB_PLATINUM)         += platinumfb.o
+obj-$(CONFIG_FB_VALKYRIE)         += valkyriefb.o
 obj-$(CONFIG_FB_CT65550)          += chipsfb.o
 obj-$(CONFIG_FB_IMSTT)            += imsttfb.o
 obj-$(CONFIG_FB_S3TRIO)           += S3triofb.o
@@ -61,7 +64,7 @@
 obj-$(CONFIG_FB_SGIVW)            += sgivwfb.o
 obj-$(CONFIG_FB_ACORN)            += acornfb.o
 obj-$(CONFIG_FB_ATARI)            += atafb.o
-obj-$(CONFIG_FB_MAC)              += macfb.o macmodes.o
+obj-$(CONFIG_FB_MAC)              += macfb.o
 obj-$(CONFIG_FB_HGA)              += hgafb.o
 obj-$(CONFIG_FB_IGA)              += igafb.o
 obj-$(CONFIG_FB_APOLLO)           += dnfb.o
===== drivers/video/macmodes.c 1.6 vs edited =====
--- 1.6/drivers/video/macmodes.c	2002-10-29 15:05:45 -05:00
+++ edited/drivers/video/macmodes.c	2005-03-13 17:01:03 -05:00
@@ -281,6 +281,7 @@
     var->vmode = mode->vmode;
     return 0;
 }
+EXPORT_SYMBOL(mac_vmode_to_var)
 
 
 /**
@@ -326,6 +327,7 @@
     }
     return -EINVAL;
 }
+EXPORT_SYMBOL(mac_var_to_vmode)
 
 
 /**
@@ -348,6 +350,7 @@
 	    break;
     return map->vmode;
 }
+EXPORT_SYMBOL(mac_map_monitor_sense)
 
 
 /**
@@ -370,7 +373,7 @@
  *
  */
 
-int __init mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
+int mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
 			 const char *mode_option, unsigned int default_bpp)
 {
     const struct fb_videomode *db = NULL;
@@ -384,3 +387,4 @@
     return fb_find_mode(var, info, mode_option, db, dbsize,
 			&mac_modedb[DEFAULT_MODEDB_INDEX], default_bpp);
 }
+EXPORT_SYMBOL(mac_find_mode)
===== drivers/video/macmodes.h 1.3 vs edited =====
--- 1.3/drivers/video/macmodes.h	2002-10-29 14:41:43 -05:00
+++ edited/drivers/video/macmodes.h	2005-03-13 17:01:32 -05:00
@@ -55,7 +55,7 @@
 extern int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode,
 			    int *cmode);
 extern int mac_map_monitor_sense(int sense);
-extern int __init mac_find_mode(struct fb_var_screeninfo *var,
+extern int mac_find_mode(struct fb_var_screeninfo *var,
 				struct fb_info *info, const char *mode_option,
 				unsigned int default_bpp);


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#5 lore raw
In reply to Andrew Morton
Quoted 1 line · Andrew Morton

Confused. Is Tony's patch OK?

Tony's patch is fine. I was worried that it would show the macmodes option in xconfig on the x86 but now I see that it doesn't.

We took two differerent approaches for doing the same thing. His is probably the better one.

Signature · 9 lines
Jon Smirl
[email protected]


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
#9 lore raw
In reply to Jon Smirl
Quoted 6 lines · Jon Smirl

On Mon, 14 Mar 2005 06:57:43 +0800, Antonino A. Daplas <[email protected]> wrote:

That will work too. FB_MACMODES should depend on PPC so that it doesn't appear on x86.

OK, thanks.

I didn't apply anything. Tony, could you queue that one up please?

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click