diff options
author | Dave Airlie <airlied@redhat.com> | 2010-03-01 05:50:01 -0500 |
---|---|---|
committer | Dave Airlie <airlied@ppcg5.localdomain> | 2010-03-01 06:21:58 -0500 |
commit | 8edb381d6705811b278527907a5ae2a9c4db8074 (patch) | |
tree | 3e9c0c6474eba65cfafc2652c49be002ae76a493 /drivers/gpu/drm/radeon | |
parent | 55a5cb5d594c18b3147a2288b00ea359c1a38cf8 (diff) |
vga_switcheroo: fix build on platforms with no ACPI
radeon was always including the atpx code unnecessarily, also core
switcheroo was including acpi headers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/Makefile | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atpx_handler.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.h | 6 |
4 files changed, 19 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile index 0a4d526e4f44..0adf49eea7fa 100644 --- a/drivers/gpu/drm/radeon/Makefile +++ b/drivers/gpu/drm/radeon/Makefile | |||
@@ -60,8 +60,9 @@ radeon-y += radeon_device.o radeon_kms.o \ | |||
60 | rs400.o rs600.o rs690.o rv515.o r520.o r600.o rv770.o radeon_test.o \ | 60 | rs400.o rs600.o rs690.o rv515.o r520.o r600.o rv770.o radeon_test.o \ |
61 | r200.o radeon_legacy_tv.o r600_cs.o r600_blit.o r600_blit_shaders.o \ | 61 | r200.o radeon_legacy_tv.o r600_cs.o r600_blit.o r600_blit_shaders.o \ |
62 | r600_blit_kms.o radeon_pm.o atombios_dp.o r600_audio.o r600_hdmi.o \ | 62 | r600_blit_kms.o radeon_pm.o atombios_dp.o r600_audio.o r600_hdmi.o \ |
63 | evergreen.o radeon_atpx_handler.o | 63 | evergreen.o |
64 | 64 | ||
65 | radeon-$(CONFIG_COMPAT) += radeon_ioc32.o | 65 | radeon-$(CONFIG_COMPAT) += radeon_ioc32.o |
66 | radeon-$(CONFIG_VGA_SWITCHEROO) += radone_atpx_handler.o | ||
66 | 67 | ||
67 | obj-$(CONFIG_DRM_RADEON)+= radeon.o | 68 | obj-$(CONFIG_DRM_RADEON)+= radeon.o |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index ad9d55f94398..829e26e8a4bb 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -121,8 +121,19 @@ struct radeon_device; | |||
121 | */ | 121 | */ |
122 | #define ATRM_BIOS_PAGE 4096 | 122 | #define ATRM_BIOS_PAGE 4096 |
123 | 123 | ||
124 | #if defined(CONFIG_VGA_SWITCHEROO) | ||
124 | bool radeon_atrm_supported(struct pci_dev *pdev); | 125 | bool radeon_atrm_supported(struct pci_dev *pdev); |
125 | int radeon_atrm_get_bios_chunk(uint8_t *bios, int offset, int len); | 126 | int radeon_atrm_get_bios_chunk(uint8_t *bios, int offset, int len); |
127 | #else | ||
128 | static inline bool radeon_atrm_supported(struct pci_dev *pdev) | ||
129 | { | ||
130 | return false; | ||
131 | } | ||
132 | |||
133 | static inline int radeon_atrm_get_bios_chunk(uint8_t *bios, int offset, int len){ | ||
134 | return -EINVAL; | ||
135 | } | ||
136 | #endif | ||
126 | bool radeon_get_bios(struct radeon_device *rdev); | 137 | bool radeon_get_bios(struct radeon_device *rdev); |
127 | 138 | ||
128 | 139 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 0ae52f19071d..3f557c4151e0 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | * ATPX support for both Intel/ATI | 7 | * ATPX support for both Intel/ATI |
8 | */ | 8 | */ |
9 | |||
10 | #include <linux/vga_switcheroo.h> | 9 | #include <linux/vga_switcheroo.h> |
11 | #include <acpi/acpi.h> | 10 | #include <acpi/acpi.h> |
12 | #include <acpi/acpi_bus.h> | 11 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index 4fe16461bb1b..ec55f2b23c22 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
@@ -463,8 +463,14 @@ extern void r600_blit_swap(struct drm_device *dev, | |||
463 | int w, int h, int src_pitch, int dst_pitch, int cpp); | 463 | int w, int h, int src_pitch, int dst_pitch, int cpp); |
464 | 464 | ||
465 | /* atpx handler */ | 465 | /* atpx handler */ |
466 | #if defined(CONFIG_VGA_SWITCHEROO) | ||
466 | void radeon_register_atpx_handler(void); | 467 | void radeon_register_atpx_handler(void); |
467 | void radeon_unregister_atpx_handler(void); | 468 | void radeon_unregister_atpx_handler(void); |
469 | #else | ||
470 | static inline void radeon_register_atpx_handler(void) {} | ||
471 | static inline void radeon_unregister_atpx_handler(void) {} | ||
472 | #endif | ||
473 | |||
468 | /* Flags for stats.boxes | 474 | /* Flags for stats.boxes |
469 | */ | 475 | */ |
470 | #define RADEON_BOX_DMA_IDLE 0x1 | 476 | #define RADEON_BOX_DMA_IDLE 0x1 |