drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
Subsystems (3)
PATCH 1/1 drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
CONFIG_ACPI_VIDEO depends on more than just CONFIG_ACPI, so add those dependencies to the Kconfig select condition and make the code conditional on CONFIG_ACPI_VIDEO.
Fixes building for ia64 (ACPI && !X86).
---
Please send this up to Linus for 2.6.37.
Ben.
drivers/gpu/drm/nouveau/Kconfig | 2 +- drivers/gpu/drm/nouveau/Makefile | 2 +- drivers/gpu/drm/nouveau/nouveau_backlight.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/Kconfig +1 -1
@@ -10,7 +10,7 @@ config DRM_NOUVEAU select FB select FRAMEBUFFER_CONSOLE if !EMBEDDED select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT - select ACPI_VIDEO if ACPI + select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT help Choose this option for open-source nVidia support.
drivers/gpu/drm/nouveau/Makefile +1 -1
@@ -30,6 +30,6 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o -nouveau-$(CONFIG_ACPI) += nouveau_acpi.o +nouveau-$(CONFIG_ACPI_VIDEO) += nouveau_acpi.o obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
drivers/gpu/drm/nouveau/nouveau_backlight.c +1 -1
@@ -137,7 +137,7 @@ int nouveau_backlight_init(struct drm_device *dev) {struct drm_nouveau_private *dev_priv = dev->dev_private; -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_VIDEO if (acpi_video_backlight_support ()) {NV_INFO (dev,"ACPI backlight interface available, " "not registering our own\n" );
drivers/gpu/drm/nouveau/nouveau_drv.h +1 -1
@@ -894,7 +894,7 @@ extern int nouveau_dma_wait(struct nouveau_channel *, int slots, int size);/* nouveau_acpi.c */ #define ROM_BIOS_PAGE 4096 -#if defined(CONFIG_ACPI ) +#if defined(CONFIG_ACPI_VIDEO )void nouveau_register_dsm_handler (void );void nouveau_unregister_dsm_handler (void );int nouveau_acpi_get_bios_chunk (uint8_t *bios,int offset,int len);
Signature · 1 line
1.7.2.3
Quoted 7 lines · Ben Hutchings
CONFIG_ACPI_VIDEOdepends on more than justCONFIG_ACPI, so add those dependencies to theKconfigselect condition and make the code conditional onCONFIG_ACPI_VIDEO.Fixes building for ia64 (ACPI && !X86).
Signed-off-by Ben Hutchings <[email protected]>
First, I'm sorry for the late reply.
Quoted 16 lines
---
Please send this up to Linus for 2.6.37.Ben.
drivers/gpu/drm/nouveau/Kconfig | 2 +- drivers/gpu/drm/nouveau/Makefile | 2 +- drivers/gpu/drm/nouveau/nouveau_backlight.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/nouveau/Kconfig +0
-0
drivers/gpu/drm/nouveau/Kconfig config DRM_NOUVEAU · line 16
Quoted 8 lines
drivers/gpu/drm/nouveau/Kconfig +1
-1@@ -10,7 +10,7 @@ config DRM_NOUVEAU select FB select FRAMEBUFFER_CONSOLE if !EMBEDDED select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT - select ACPI_VIDEO if ACPI + select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT help Choose this option for open-source nVidia support.
This looks OK to me.
drivers/gpu/drm/nouveau/Makefile nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ · line 34
Quoted 11 lines
drivers/gpu/drm/nouveau/Makefile +1
-1@@ -30,6 +30,6 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o -nouveau-$(CONFIG_ACPI) += nouveau_acpi.o +nouveau-$(CONFIG_ACPI_VIDEO) += nouveau_acpi.o
Not sure this makes sense, most of the code in nouveau_acpi.c doesn't depend on ACPI_VIDEO at all. Do you really need to do it? Apparently all the ACPI_VIDEO functions will be turned into stubs (see "acpi/video.h") on kernels without ACPI_VIDEO support.
Quoted 19 lines
drivers/gpu/drm/nouveau/Makefile +0
-0obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.odrivers/gpu/drm/nouveau/nouveau_backlight.c +1
-1@@ -137,7 +137,7 @@ int nouveau_backlight_init(struct drm_device *dev) {struct drm_nouveau_private *dev_priv = dev->dev_private; -#ifdef CONFIG_ACPI +#ifdef CONFIG_ACPI_VIDEO if (acpi_video_backlight_support ()) {NV_INFO (dev,"ACPI backlight interface available, " "not registering our own\n" );drivers/gpu/drm/nouveau/nouveau_drv.h +0
-0
drivers/gpu/drm/nouveau/nouveau_drv.h extern int nouveau_dma_wait(struct nouveau_channel *, int slots, int size); · line 900
Quoted 8 lines
drivers/gpu/drm/nouveau/nouveau_drv.h +1
-1@@ -894,7 +894,7 @@ extern int nouveau_dma_wait(struct nouveau_channel *, int slots, int size);/* nouveau_acpi.c */ #define ROM_BIOS_PAGE 4096 -#if defined(CONFIG_ACPI ) +#if defined(CONFIG_ACPI_VIDEO )void nouveau_register_dsm_handler (void );void nouveau_unregister_dsm_handler (void );int nouveau_acpi_get_bios_chunk (uint8_t *bios,int offset,int len);
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/1 drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
CONFIG_ACPI_VIDEO depends on more than just CONFIG_ACPI, so add those dependencies to the Kconfig select condition and make the code conditional on CONFIG_ACPI_VIDEO.
---
On Sat, 2010-12-25 at 16:21 +0100, Francisco Jerez wrote:
[...]
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/nouveau/Makefile +0
-0@@ -30,6 +30,6 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
Quoted 8 lines
drivers/gpu/drm/nouveau/Makefile nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ · line 34
Quoted 4 lines
drivers/gpu/drm/nouveau/Makefile +1
-1nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o -nouveau-$(CONFIG_ACPI) += nouveau_acpi.o +nouveau-$(CONFIG_ACPI_VIDEO) += nouveau_acpi.oNot sure this makes sense, most of the code in
nouveau_acpi.cdoesn't depend onACPI_VIDEOat all. Do you really need to do it? Apparently all theACPI_VIDEOfunctions will be turned into stubs (see "acpi/video.h") on kernels withoutACPI_VIDEOsupport.
[...]
You're right; there's no need for the changes outside of Kconfig.
Ben.
drivers/gpu/drm/nouveau/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/Kconfig +1 -1
@@ -10,7 +10,7 @@ config DRM_NOUVEAU select FB select FRAMEBUFFER_CONSOLE if !EMBEDDED select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT - select ACPI_VIDEO if ACPI + select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT help Choose this option for open-source nVidia support.
Signature · 5 lines
1.7.2.3 -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse.
Quoted 21 lines · Ben Hutchings
CONFIG_ACPI_VIDEOdepends on more than justCONFIG_ACPI, so add those dependencies to theKconfigselect condition and make the code conditional onCONFIG_ACPI_VIDEO.Signed-off-by Ben Hutchings <[email protected]>---
On Sat, 2010-12-25 at 16:21 +0100, Francisco Jerez wrote:
[...]Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/nouveau/Makefile +0
-0@@ -30,6 +30,6 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.oQuoted 8 lines
drivers/gpu/drm/nouveau/Makefile nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ · line 34
Quoted 4 lines
drivers/gpu/drm/nouveau/Makefile +1
-1nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o -nouveau-$(CONFIG_ACPI) += nouveau_acpi.o +nouveau-$(CONFIG_ACPI_VIDEO) += nouveau_acpi.oNot sure this makes sense, most of the code in
nouveau_acpi.cdoesn't depend onACPI_VIDEOat all. Do you really need to do it? Apparently all theACPI_VIDEOfunctions will be turned into stubs (see "acpi/video.h") on kernels withoutACPI_VIDEOsupport.
Quoted 4 lines
[...]
You're right; there's no need for the changes outside of
Kconfig.
Thanks, I've pushed this to the Nouveau kernel tree, with a small clarification to the commit message.
Quoted 20 lines
Ben.
drivers/gpu/drm/nouveau/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/nouveau/Kconfig +1
-1@@ -10,7 +10,7 @@ config DRM_NOUVEAU select FB select FRAMEBUFFER_CONSOLE if !EMBEDDED select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT - select ACPI_VIDEO if ACPI + select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT help Choose this option for open-source nVidia support.Signature · 1 line
1.7.2.3
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel