diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-01-11 20:21:17 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-01-16 12:19:53 +0300 |
commit | 9eb4826f2856870a72432e896aab7d920cb410e1 (patch) | |
tree | 7909d178d5c15a7cf136f3671a95736c2f8ae6ab /drivers/gpu/drm/i915/display/intel_opregion.c | |
parent | 37e2100312b17ae29d38884a356e4dd686cdad5a (diff) | |
download | linux-9eb4826f2856870a72432e896aab7d920cb410e1.tar.xz |
drm/i915/opregion: abstract ASLE presence check
Add a function to check the opregion ASLE presence instead of accessing
the opregion structures directly.
Reorder the checks in i915_has_asle() to avoid the function call if
possible.
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1829415d3e7b29e78c46b20bca8175ef373bcd92.1704992868.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_opregion.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_opregion.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c index 8b9e820971cb..26aacb01f9ec 100644 --- a/drivers/gpu/drm/i915/display/intel_opregion.c +++ b/drivers/gpu/drm/i915/display/intel_opregion.c @@ -632,6 +632,11 @@ static void asle_work(struct work_struct *work) asle->aslc = aslc_stat; } +bool intel_opregion_asle_present(struct drm_i915_private *i915) +{ + return i915->display.opregion.asle; +} + void intel_opregion_asle_intr(struct drm_i915_private *dev_priv) { if (dev_priv->display.opregion.asle) |