vga_switcheroo: fix build on platforms with no ACPI
Subsystems (4)
Dave Airlie
maintainerPATCH 1/1 vga_switcheroo: fix build on platforms with no ACPI
From: Dave Airlie <[email protected]>
radeon was always including the atpx code unnecessarily, also core switcheroo was including acpi headers.
--- drivers/gpu/drm/radeon/Makefile | 3 ++- drivers/gpu/drm/radeon/radeon_atpx_handler.c | 1 - drivers/gpu/drm/radeon/radeon_drv.h | 6 ++++++ drivers/gpu/vga/vga_switcheroo.c | 3 --- include/linux/vga_switcheroo.h | 1 - 5 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/Makefile +2 -1
@@ -60,8 +60,9 @@ radeon-y += radeon_device.o radeon_kms.o \ rs400.o rs600.o rs690.o rv515.o r520.o r600.o rv770.o radeon_test.o \ r200.o radeon_legacy_tv.o r600_cs.o r600_blit.o r600_blit_shaders.o \ r600_blit_kms.o radeon_pm.o atombios_dp.o r600_audio.o r600_hdmi.o \ - evergreen.o radeon_atpx_handler.o + evergreen.o radeon-$(CONFIG_COMPAT) += radeon_ioc32.o +radeon-$(CONFIG_VGA_SWITCHEROO) += radone_atpx_handler.o obj-$(CONFIG_DRM_RADEON)+= radeon.o
drivers/gpu/drm/radeon/radeon_atpx_handler.c +0 -1
@@ -6,7 +6,6 @@* * ATPX support for both Intel/ATI */ -#include <linux/vga_switcheroo.h> #include <acpi/acpi.h> #include <acpi/acpi_bus.h>
drivers/gpu/drm/radeon/radeon_drv.h +6 -0
@@ -463,8 +463,14 @@ extern void r600_blit_swap(struct drm_device *dev, int w, int h, int src_pitch, int dst_pitch, int cpp);/* atpx handler */ +#if defined(CONFIG_VGA_SWITCHEROO )void radeon_register_atpx_handler (void );void radeon_unregister_atpx_handler (void ); +#else +static inline void radeon_register_atpx_handler (void ) {} +static inline void radeon_unregister_atpx_handler (void ) {} +#endif +/* Flags for stats.boxes */ #define RADEON_BOX_DMA_IDLE 0x1
drivers/gpu/vga/vga_switcheroo.c +0 -3
@@ -25,9 +25,6 @@#include <linux/debugfs.h> #include <linux/fb.h> -#include <acpi/acpi.h> -#include <acpi/acpi_bus.h> -#include <linux/pci.h> #include <linux/vga_switcheroo.h>
include/linux/vga_switcheroo.h +0 -1
@@ -7,7 +7,6 @@* vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs */ -#include <acpi/acpi.h> #include <linux/fb.h> enum vga_switcheroo_state {
Signature · 10 lines
1.6.5.2 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --
Quoted 25 lines · Dave Airlie
From: Dave Airlie <[email protected]>
radeon was always including the atpx code unnecessarily, also core switcheroo was including acpi headers.
Signed-off-by Dave Airlie <[email protected]>---
drivers/gpu/drm/radeon/Makefile | 3 ++-drivers/gpu/drm/radeon/radeon_atpx_handler.c| 1 -drivers/gpu/drm/radeon/radeon_drv.h| 6 ++++++drivers/gpu/vga/vga_switcheroo.c| 3 ---include/linux/vga_switcheroo.h| 1 -5 files changed, 8 insertions(+), 6 deletions(-)drivers/gpu/drm/radeon/Makefile +1
-1@@ -60,8 +60,9 @@ radeon-y += radeon_device.o radeon_kms.o \ rs400.o rs600.o rs690.o rv515.o r520.o r600.o rv770.o radeon_test.o \ r200.o radeon_legacy_tv.o r600_cs.o r600_blit.o r600_blit_shaders.o \ r600_blit_kms.o radeon_pm.o atombios_dp.o r600_audio.o r600_hdmi.o \ - evergreen.o radeon_atpx_handler.o + evergreen.o
Quoted 2 lines
radeon-$(CONFIG_COMPAT) += radeon_ioc32.o +radeon-$(CONFIG_VGA_SWITCHEROO) += radone_atpx_handler.o
typo. should be radeon_atpx_handler.o
Alex
Quoted 63 lines
obj-$(CONFIG_DRM_RADEON)+= radeon.o
drivers/gpu/drm/radeon/radeon_atpx_handler.c +0
-1@@ -6,7 +6,6 @@* * ATPX support for both Intel/ATI */ - #include <linux/vga_switcheroo.h> #include <acpi/acpi.h> #include <acpi/acpi_bus.h>drivers/gpu/drm/radeon/radeon_drv.h +6
-0@@ -463,8 +463,14 @@ extern void r600_blit_swap(struct drm_device *dev, int w, int h, int src_pitch, int dst_pitch, int cpp); /* atpx handler */ +#if defined(CONFIG_VGA_SWITCHEROO ) void radeon_register_atpx_handler(void); void radeon_unregister_atpx_handler(void); +#else +static inline void radeon_register_atpx_handler (void ) {} +static inline void radeon_unregister_atpx_handler (void ) {} +#endif + /* Flags for stats.boxes */ #define RADEON_BOX_DMA_IDLE 0x1drivers/gpu/vga/vga_switcheroo.c +0
-3@@ -25,9 +25,6 @@ #include <linux/debugfs.h> #include <linux/fb.h> -#include <acpi/acpi.h> -#include <acpi/acpi_bus.h> - #include <linux/pci.h> #include <linux/vga_switcheroo.h>include/linux/vga_switcheroo.h +0
-2@@ -7,7 +7,6 @@* vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs */ -#include <acpi/acpi.h> #include <linux/fb.h> enum vga_switcheroo_state { --1.6.5.2
Quoted 12 lines
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--