diff mbox

drm/i915/opregion: remove unnecessary ifdefs on CONFIG_ACPI

Message ID 1460127589-8357-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula April 8, 2016, 2:59 p.m. UTC
The whole file is ignored on CONFIG_ACPI=n.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_opregion.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Ander Conselvan de Oliveira April 12, 2016, 10:33 a.m. UTC | #1
On Fri, 2016-04-08 at 17:59 +0300, Jani Nikula wrote:
> The whole file is ignored on CONFIG_ACPI=n.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

> ---
>  drivers/gpu/drm/i915/intel_opregion.c | 6 ------
>  1 file changed, 6 deletions(-)

> diff --git a/drivers/gpu/drm/i915/intel_opregion.c
> b/drivers/gpu/drm/i915/intel_opregion.c
> index c15718b4862a..d5a4cb80273e 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -246,7 +246,6 @@ struct opregion_asle_ext {
>  
>  #define MAX_DSLP	1500
>  
> -#ifdef CONFIG_ACPI
>  static int swsci(struct drm_device *dev, u32 function, u32 parm, u32
> *parm_out)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> @@ -905,9 +904,6 @@ static void swsci_setup(struct drm_device *dev)
>  			 opregion->swsci_gbda_sub_functions,
>  			 opregion->swsci_sbcb_sub_functions);
>  }
> -#else /* CONFIG_ACPI */
> -static inline void swsci_setup(struct drm_device *dev) {}
> -#endif  /* CONFIG_ACPI */
>  
>  static int intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
>  {
> @@ -950,9 +946,7 @@ int intel_opregion_setup(struct drm_device *dev)
>  		return -ENOTSUPP;
>  	}
>  
> -#ifdef CONFIG_ACPI
>  	INIT_WORK(&opregion->asle_work, asle_work);
> -#endif
>  
>  	base = memremap(asls, OPREGION_SIZE, MEMREMAP_WB);
>  	if (!base)
Chris Wilson April 12, 2016, 10:36 a.m. UTC | #2
On Fri, Apr 08, 2016 at 05:59:49PM +0300, Jani Nikula wrote:
> The whole file is ignored on CONFIG_ACPI=n.

That's an issue as we can't then acquire the opregion->vbt (which itself
is not acpi dependent). Shrug no modern system can boot without acpi (at
least not if you want more than cpu etc), so I guess we also don't care
that much?
-Chris
Jani Nikula April 12, 2016, 12:20 p.m. UTC | #3
On Tue, 12 Apr 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Fri, Apr 08, 2016 at 05:59:49PM +0300, Jani Nikula wrote:
>> The whole file is ignored on CONFIG_ACPI=n.
>
> That's an issue as we can't then acquire the opregion->vbt (which itself
> is not acpi dependent). Shrug no modern system can boot without acpi (at
> least not if you want more than cpu etc), so I guess we also don't care
> that much?

Interesting, I thought we shouldn't touch ACPI OpRegion for
CONFIG_ACPI=n, but seems that this was changed only in

commit 27d50c82714f6477ac690034b37d202f76eb4f70
Author: Lv Zheng <lv.zheng@intel.com>
Date:   Fri Dec 6 16:52:05 2013 +0800

    ACPI / i915: Fix incorrect <acpi/acpi.h> inclusions via <linux/acpi_io.h>

So this patch here doesn't change the fact, and since there hasn't been
complaints after the above commit, I wouldn't worry too much.

BR,
Jani.
Jani Nikula April 13, 2016, 1:01 p.m. UTC | #4
On Tue, 12 Apr 2016, Jani Nikula <jani.nikula@intel.com> wrote:
> On Tue, 12 Apr 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> On Fri, Apr 08, 2016 at 05:59:49PM +0300, Jani Nikula wrote:
>>> The whole file is ignored on CONFIG_ACPI=n.
>>
>> That's an issue as we can't then acquire the opregion->vbt (which itself
>> is not acpi dependent). Shrug no modern system can boot without acpi (at
>> least not if you want more than cpu etc), so I guess we also don't care
>> that much?
>
> Interesting, I thought we shouldn't touch ACPI OpRegion for
> CONFIG_ACPI=n, but seems that this was changed only in
>
> commit 27d50c82714f6477ac690034b37d202f76eb4f70
> Author: Lv Zheng <lv.zheng@intel.com>
> Date:   Fri Dec 6 16:52:05 2013 +0800
>
>     ACPI / i915: Fix incorrect <acpi/acpi.h> inclusions via <linux/acpi_io.h>
>
> So this patch here doesn't change the fact, and since there hasn't been
> complaints after the above commit, I wouldn't worry too much.

No further complaints, so pushed to drm-intel-next-queued. Thanks for
the review.

BR,
Jani.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index c15718b4862a..d5a4cb80273e 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -246,7 +246,6 @@  struct opregion_asle_ext {
 
 #define MAX_DSLP	1500
 
-#ifdef CONFIG_ACPI
 static int swsci(struct drm_device *dev, u32 function, u32 parm, u32 *parm_out)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
@@ -905,9 +904,6 @@  static void swsci_setup(struct drm_device *dev)
 			 opregion->swsci_gbda_sub_functions,
 			 opregion->swsci_sbcb_sub_functions);
 }
-#else /* CONFIG_ACPI */
-static inline void swsci_setup(struct drm_device *dev) {}
-#endif  /* CONFIG_ACPI */
 
 static int intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
 {
@@ -950,9 +946,7 @@  int intel_opregion_setup(struct drm_device *dev)
 		return -ENOTSUPP;
 	}
 
-#ifdef CONFIG_ACPI
 	INIT_WORK(&opregion->asle_work, asle_work);
-#endif
 
 	base = memremap(asls, OPREGION_SIZE, MEMREMAP_WB);
 	if (!base)