Commit 5e5b7fa2 authored by Eugeni Dodonov's avatar Eugeni Dodonov Committed by Keith Packard

drm/i915: simplify pipe checking

This is also handled by i915_reg.h, so just reuse this trick to reduce
universe entropy.
Signed-off-by: default avatarEugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: default avatarCyril Brulebois <kibi@debian.org>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent a05a5862
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "drm.h" #include "drm.h"
#include "i915_drm.h" #include "i915_drm.h"
#include "intel_drv.h" #include "intel_drv.h"
#include "i915_reg.h"
static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe) static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
{ {
...@@ -35,7 +36,7 @@ static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe) ...@@ -35,7 +36,7 @@ static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
u32 dpll_reg; u32 dpll_reg;
if (HAS_PCH_SPLIT(dev)) if (HAS_PCH_SPLIT(dev))
dpll_reg = (pipe == PIPE_A) ? _PCH_DPLL_A : _PCH_DPLL_B; dpll_reg = PCH_DPLL(pipe);
else else
dpll_reg = (pipe == PIPE_A) ? _DPLL_A : _DPLL_B; dpll_reg = (pipe == PIPE_A) ? _DPLL_A : _DPLL_B;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment