drm/i915: simplify pipe checking
Subsystems (2)
PATCH 1/2 drm/i915: simplify pipe checking
This is also handled by i915_reg.h, so just reuse this trick to reduce universe enthropy.
--- drivers/gpu/drm/i915/i915_suspend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_suspend.c +2 -1
@@ -28,6 +28,7 @@#include "drm.h" #include "i915_drm.h" #include "intel_drv.h" +#include "i915_reg.h" 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;if (HAS_PCH_SPLIT (dev)) - dpll_reg = (pipe ==PIPE_A ) ? _PCH_DPLL_A : _PCH_DPLL_B; + dpll_reg =PCH_DPLL (pipe);else dpll_reg = (pipe ==PIPE_A ) ? _DPLL_A : _DPLL_B;
Signature · 1 line
1.7.8
PATCH 2/2 drm/i915: handle 3rd pipe
We don't need to check 3rd pipe specifically, as it shares PLL with some other one.
--- drivers/gpu/drm/i915/i915_suspend.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_suspend.c +4 -0
@@ -35,6 +35,10 @@ static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)struct drm_i915_private *dev_priv = dev->dev_private;u32 dpll_reg; +/* On IVB, 3rd pipe shares PLL with another one */ +if (pipe >1 ) +return false; +if (HAS_PCH_SPLIT (dev)) dpll_reg =PCH_DPLL (pipe);else
Signature · 1 line
1.7.8
Eugeni Dodonov <[email protected]> (07/01/2012):
Quoted 2 lines
This is also handled by
i915_reg.h, so just reuse this trick to reduce universe enthropy.
entropy.
Besides that:
Quoted 19 lines
Signed-off-by Eugeni Dodonov <[email protected]>Reviewed-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/i915_suspend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/gpu/drm/i915/i915_suspend.c +1
-0@@ -28,6 +28,7 @@#include "drm.h" #include "i915_drm.h" #include "intel_drv.h" +#include "i915_reg.h" static bool i915_pipe_enabled (struct drm_device *dev,enum pipe pipe) {
drivers/gpu/drm/i915/i915_suspend.c static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe) · line 42
Quoted 8 lines
drivers/gpu/drm/i915/i915_suspend.c +1
-1@@ -35,7 +36,7 @@ static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)u32 dpll_reg;if (HAS_PCH_SPLIT (dev)) - dpll_reg = (pipe ==PIPE_A ) ? _PCH_DPLL_A : _PCH_DPLL_B; + dpll_reg =PCH_DPLL (pipe);else dpll_reg = (pipe ==PIPE_A ) ? _DPLL_A : _DPLL_B;
Mraw,
KiBi.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Cyril Brulebois
Eugeni Dodonov <[email protected]> (07/01/2012):
Quoted 2 lines
This is also handled by
i915_reg.h, so just reuse this trick to reduce universe enthropy.entropy.
Besides that:
Reviewed-by Cyril Brulebois <[email protected]>
Both patches queued for -next, thanks.
-Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Quoted 5 lines · Daniel Vetter
Quoted 4 lines · Cyril Brulebois
Eugeni Dodonov <[email protected]> (07/01/2012):
Quoted 2 lines
This is also handled by
i915_reg.h, so just reuse this trick to reduce universe enthropy.
Quoted 7 lines
Quoted 5 lines
entropy.
Besides that:
Reviewed-by Cyril Brulebois <[email protected]>Both patches queued for -next, thanks.
I've botched my cross-checking with Keith's -fixes, these two are already there. Dropped them from my queue.
-Daniel
Signature · 2 lines
Daniel Vetter [email protected] - +41 (0) 79 364 57 48 - http://blog.ffwll.ch