Skip to contentSkip to conversation

gma500: fix build when ACPI isn't set

PATCH NAK Sasha Levin 2 participants 4 messages May 11, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gma500: fix build when ACPI isn't set

---
 drivers/gpu/drm/gma500/opregion.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/gma500/opregion.c +4 -0
index 05661bf..e2fbf4d 100644
@@ -258,6 +258,7 @@ void psb_intel_opregion_init(struct drm_device *dev)
 	if (!opregion->header)
 		return;
 
+#ifdef CONFIG_ACPI
 	if (opregion->acpi) {
 		/* Notify BIOS we are ready to handle ACPI video ext notifs.
 		 * Right now, all the events are handled by the ACPI video
@@ -268,6 +269,7 @@ void psb_intel_opregion_init(struct drm_device *dev)
 		system_opregion = opregion;
 		register_acpi_notifier(&psb_intel_opregion_notifier);
 	}
+#endif
 
 	if (opregion->asle)
 		psb_intel_opregion_enable_asle(dev);
@@ -281,12 +283,14 @@ void psb_intel_opregion_fini(struct drm_device *dev)
 	if (!opregion->header)
 		return;
 
+#ifdef CONFIG_ACPI
 	if (opregion->acpi) {
 		opregion->acpi->drdy = 0;
 
 		system_opregion = NULL;
 		unregister_acpi_notifier(&psb_intel_opregion_notifier);
 	}
+#endif
 
 	/* just clear all opregion memory pointers now */
 	iounmap(opregion->header);
Signature · 1 line
1.7.8.5
#1 lore raw
Quoted 1 line · On Fri, 11 May 2012 06:39:02 +0200 Sasha Levin <[email protected]> wrote:

NAK - see the patch I posted for Randy to test. That avoids all the ifdeffery and simply doesn't touch the opregion at all in a non ACPI build.

Not btw that I imagine you could run a non ACPI kernel on a box new enough to have a GMA500 8)

Alan

#2 lore raw
Quoted 2 lines · Alan Cox

Not btw that I imagine you could run a non ACPI kernel on a box new enough to have a GMA500 8)

Probably not, but I saw more #ifdef CONFIG_ACPI below and assumed there's a good reason for that.

Out of curiously, is a scenario where a GMA500 is assigned to a KVM guest which doesn't have ACPI support plausible?

#3 lore raw
Quoted 9 lines · On Fri, 11 May 2012 11:49:48 +0200 Sasha Levin <[email protected]> wrote:
Quoted 2 lines · Alan Cox

Not btw that I imagine you could run a non ACPI kernel on a box new enough to have a GMA500 8)

Probably not, but I saw more #ifdef CONFIG_ACPI below and assumed there's a good reason for that.

Out of curiously, is a scenario where a GMA500 is assigned to a KVM guest which doesn't have ACPI support plausible?

I doubt it - the GMA500 is doing direct memory access via the GTT and hitting hardware level stuff. I don't believe any work has ever been done for Imagination based graphics pass through.

Alan