Skip to content

Commit

Permalink
drm/i915: Fix edp vdd locking
Browse files Browse the repository at this point in the history
Introduce a new mutex (pps_mutex) to protect the power sequencer
state. For now this state includes want_panel_vdd as well as the
power sequencer registers.

We need a single mutex (as opposed to per port) because later on we
will need to deal with VLV/CHV which have multiple power sequencer
which can be reassigned to different ports.

v2: Add the locking to intel_dp_encoder_suspend too (Imre)
v3: Take care intel_edp_backlight_power() and
    _intel_edp_backlight_on/off(), deal with reboot notifier
    vlv_power_sequencer_pipe() call (Imre)

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ville Syrjälä authored and Daniel Vetter committed Sep 4, 2014
1 parent 9546889 commit e39b999
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 13 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,9 @@ struct drm_i915_private {
/* LVDS info */
bool no_aux_handshake;

/* protects panel power sequencer state */
struct mutex pps_mutex;

struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES]; /* assume 965 */
int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
int num_fence_regs; /* 8 on pre-965, 16 otherwise */
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -12559,6 +12559,8 @@ static void intel_init_display(struct drm_device *dev)
}

intel_panel_init_backlight_funcs(dev);

mutex_init(&dev_priv->pps_mutex);
}

/*
Expand Down
Loading

0 comments on commit e39b999

Please sign in to comment.