Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329400
b: refs/heads/master
c: ef9c3ae
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Sep 6, 2012
1 parent 423dfd6 commit 3fd3418
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 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: eae307a5304f8c0956b8eab75596abba7ad58a5c
refs/heads/master: ef9c3aee60442d1eaf81fbd7b63f256410cc0aa9
38 changes: 36 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -3209,13 +3209,16 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
u32 temp;
bool is_pch_port;

/* XXX: For compatability with the crtc helper code, call the encoder's
* enable function unconditionally for now. */
if (intel_crtc->active)
return;
goto encoders;

intel_crtc->active = true;
intel_update_watermarks(dev);
Expand Down Expand Up @@ -3262,17 +3265,31 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
mutex_unlock(&dev->struct_mutex);

intel_crtc_update_cursor(crtc, true);

encoders:
for_each_encoder_on_crtc(dev, crtc, encoder) {
if (encoder->enable)
encoder->enable(encoder);
}
}

static void ironlake_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;
u32 reg, temp;

/* XXX: For compatability with the crtc helper code, call the encoder's
* disable function unconditionally for now. */
for_each_encoder_on_crtc(dev, crtc, encoder) {
if (encoder->disable)
encoder->disable(encoder);
}

if (!intel_crtc->active)
return;

Expand Down Expand Up @@ -3371,11 +3388,14 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;

/* XXX: For compatability with the crtc helper code, call the encoder's
* enable function unconditionally for now. */
if (intel_crtc->active)
return;
goto encoders;

intel_crtc->active = true;
intel_update_watermarks(dev);
Expand All @@ -3390,16 +3410,30 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc)
/* Give the overlay scaler a chance to enable if it's on this pipe */
intel_crtc_dpms_overlay(intel_crtc, true);
intel_crtc_update_cursor(crtc, true);

encoders:
for_each_encoder_on_crtc(dev, crtc, encoder) {
if (encoder->enable)
encoder->enable(encoder);
}
}

static void i9xx_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_encoder *encoder;
int pipe = intel_crtc->pipe;
int plane = intel_crtc->plane;

/* XXX: For compatability with the crtc helper code, call the encoder's
* disable function unconditionally for now. */
for_each_encoder_on_crtc(dev, crtc, encoder) {
if (encoder->disable)
encoder->disable(encoder);
}

if (!intel_crtc->active)
return;

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ struct intel_encoder {
*/
bool cloneable;
void (*hot_plug)(struct intel_encoder *);
void (*enable)(struct intel_encoder *);
void (*disable)(struct intel_encoder *);
int crtc_mask;
};

Expand Down

0 comments on commit 3fd3418

Please sign in to comment.