* [PATCH] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
@ 2010-12-11 20:23 Ben Hutchings
2010-12-25 15:21 ` Francisco Jerez
0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2010-12-11 20:23 UTC (permalink / raw)
To: David Airlie, Ben Skeggs, Francisco Jerez; +Cc: dri-devel
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).
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
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(-)
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 72730e9..21d6c29 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -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.
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
index 23fa82d..101a0f6 100644
--- a/drivers/gpu/drm/nouveau/Makefile
+++ b/drivers/gpu/drm/nouveau/Makefile
@@ -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
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index b14c811..6f3f463 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -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");
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 1c7db64..a18d0ed 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -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);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
2010-12-11 20:23 [PATCH] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met Ben Hutchings
@ 2010-12-25 15:21 ` Francisco Jerez
2010-12-25 16:17 ` [PATCH v2] " Ben Hutchings
0 siblings, 1 reply; 4+ messages in thread
From: Francisco Jerez @ 2010-12-25 15:21 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Ben Skeggs, dri-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 3367 bytes --]
Ben Hutchings <ben@decadent.org.uk> writes:
> 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).
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
First, I'm sorry for the late reply.
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
> index 72730e9..21d6c29 100644
> --- a/drivers/gpu/drm/nouveau/Kconfig
> +++ b/drivers/gpu/drm/nouveau/Kconfig
> @@ -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.
> diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
> index 23fa82d..101a0f6 100644
> --- a/drivers/gpu/drm/nouveau/Makefile
> +++ b/drivers/gpu/drm/nouveau/Makefile
> @@ -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.
> obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
> diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> index b14c811..6f3f463 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
> @@ -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");
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
> index 1c7db64..a18d0ed 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drv.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
> @@ -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);
[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
2010-12-25 15:21 ` Francisco Jerez
@ 2010-12-25 16:17 ` Ben Hutchings
2010-12-25 18:33 ` Francisco Jerez
0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2010-12-25 16:17 UTC (permalink / raw)
To: Francisco Jerez, David Airlie, Ben Skeggs; +Cc: dri-devel
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.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
On Sat, 2010-12-25 at 16:21 +0100, Francisco Jerez wrote:
[...]
> > --- a/drivers/gpu/drm/nouveau/Makefile
> > +++ b/drivers/gpu/drm/nouveau/Makefile
> > @@ -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.
[...]
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(-)
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index 72730e9..21d6c29 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -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.
--
1.7.2.3
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met
2010-12-25 16:17 ` [PATCH v2] " Ben Hutchings
@ 2010-12-25 18:33 ` Francisco Jerez
0 siblings, 0 replies; 4+ messages in thread
From: Francisco Jerez @ 2010-12-25 18:33 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Ben Skeggs, dri-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 1983 bytes --]
Ben Hutchings <ben@decadent.org.uk> writes:
> 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.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> On Sat, 2010-12-25 at 16:21 +0100, Francisco Jerez wrote:
> [...]
>> > --- a/drivers/gpu/drm/nouveau/Makefile
>> > +++ b/drivers/gpu/drm/nouveau/Makefile
>> > @@ -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.
> [...]
>
> 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.
> Ben.
>
> drivers/gpu/drm/nouveau/Kconfig | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
> index 72730e9..21d6c29 100644
> --- a/drivers/gpu/drm/nouveau/Kconfig
> +++ b/drivers/gpu/drm/nouveau/Kconfig
> @@ -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.
>
> --
> 1.7.2.3
[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-25 18:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-11 20:23 [PATCH] drm/nouveau: Only select ACPI_VIDEO if its dependencies are met Ben Hutchings
2010-12-25 15:21 ` Francisco Jerez
2010-12-25 16:17 ` [PATCH v2] " Ben Hutchings
2010-12-25 18:33 ` Francisco Jerez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.