Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293527
b: refs/heads/master
c: 931872f
h: refs/heads/master
i:
  293525: b0ea5d7
  293523: 8458fa8
  293519: 2008449
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Jan 17, 2012
1 parent 0fe11b7 commit cb8365a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3953dcb98bad1c3badf451bcf41bf83ae2ce542
refs/heads/master: 931872fceabacf2d4f8b6fbd51611c167e83164c
17 changes: 12 additions & 5 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,19 +944,24 @@ void assert_pipe(struct drm_i915_private *dev_priv,
pipe_name(pipe), state_string(state), state_string(cur_state));
}

static void assert_plane_enabled(struct drm_i915_private *dev_priv,
enum plane plane)
static void assert_plane(struct drm_i915_private *dev_priv,
enum plane plane, bool state)
{
int reg;
u32 val;
bool cur_state;

reg = DSPCNTR(plane);
val = I915_READ(reg);
WARN(!(val & DISPLAY_PLANE_ENABLE),
"plane %c assertion failure, should be active but is disabled\n",
plane_name(plane));
cur_state = !!(val & DISPLAY_PLANE_ENABLE);
WARN(cur_state != state,
"plane %c assertion failure (expected %s, current %s)\n",
plane_name(plane), state_string(state), state_string(cur_state));
}

#define assert_plane_enabled(d, p) assert_plane(d, p, true)
#define assert_plane_disabled(d, p) assert_plane(d, p, false)

static void assert_planes_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe)
{
Expand Down Expand Up @@ -3335,6 +3340,8 @@ static void intel_crtc_disable(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev;

crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
assert_plane_disabled(dev->dev_private, to_intel_crtc(crtc)->plane);
assert_pipe_disabled(dev->dev_private, to_intel_crtc(crtc)->pipe);

if (crtc->fb) {
mutex_lock(&dev->struct_mutex);
Expand Down

0 comments on commit cb8365a

Please sign in to comment.