From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/3] drm/i915: Add encoder .off() hook
Date: Thu, 23 Jan 2014 23:15:33 +0200 [thread overview]
Message-ID: <1390511735-13677-2-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1390511735-13677-1-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Add an encoder specific hook to be called alongside the crtc .off()
hook.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 5 +++++
drivers/gpu/drm/i915/intel_drv.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ec96002..e5b336e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4343,6 +4343,7 @@ void intel_crtc_update_dpms(struct drm_crtc *crtc)
static void intel_crtc_disable(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
+ struct intel_encoder *intel_encoder;
struct drm_connector *connector;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
@@ -4359,6 +4360,10 @@ static void intel_crtc_disable(struct drm_crtc *crtc)
assert_cursor_disabled(dev_priv, to_intel_crtc(crtc)->pipe);
assert_pipe_disabled(dev->dev_private, to_intel_crtc(crtc)->pipe);
+ for_each_encoder_on_crtc(dev, crtc, intel_encoder)
+ if (intel_encoder->off)
+ intel_encoder->off(intel_encoder);
+
if (crtc->fb) {
mutex_lock(&dev->struct_mutex);
intel_unpin_fb_obj(to_intel_framebuffer(crtc->fb)->obj);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 7b3c209..48ad05c 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -139,6 +139,7 @@ struct intel_encoder {
void (*mode_set)(struct intel_encoder *intel_encoder);
void (*disable)(struct intel_encoder *);
void (*post_disable)(struct intel_encoder *);
+ void (*off)(struct intel_encoder *);
/* Read out the current hw state of this connector, returning true if
* the encoder is active. If the encoder is enabled it also set the pipe
* it is connected to in the pipe parameter. */
--
1.8.3.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-01-23 21:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 21:15 [PATCH 0/3] drm/i915: "Fix" g4x infoframes w/ multiple HDMI/DVI monitors ville.syrjala
2014-01-23 21:15 ` ville.syrjala [this message]
2014-02-10 12:10 ` [PATCH 1/3] drm/i915: Add encoder .off() hook Damien Lespiau
2014-01-23 21:15 ` [PATCH 2/3] drm/i915: Convert DIP port switch cases to a simple macro ville.syrjala
2014-02-10 12:11 ` Damien Lespiau
2014-02-13 9:43 ` Daniel Vetter
2014-01-23 21:15 ` [PATCH 3/3] drm/i915: Make infoframe trnsmission more reliable on g4x ville.syrjala
2014-02-10 12:16 ` Damien Lespiau
2014-02-10 12:40 ` Ville Syrjälä
2014-02-10 17:28 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390511735-13677-2-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox