From: Jesse Barnes <jbarnes@virtuousgeek.org> To: intel-gfx@lists.freedesktop.org Subject: [PATCH 1/7] drm/i915: fix eDP detection Date: Wed, 8 Sep 2010 12:41:59 -0700 [thread overview] Message-ID: <1283974925-2913-2-git-send-email-jbarnes@virtuousgeek.org> (raw) In-Reply-To: <1283974925-2913-1-git-send-email-jbarnes@virtuousgeek.org> Panel needs to be powered up. --- drivers/gpu/drm/i915/intel_dp.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 51d1429..625b480 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -754,13 +754,14 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, } } -static void ironlake_edp_panel_on (struct drm_device *dev) +/* Returns true if the panel was already on when called */ +static bool ironlake_edp_panel_on (struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; u32 pp; if (I915_READ(PCH_PP_STATUS) & PP_ON) - return; + return true; pp = I915_READ(PCH_PP_CONTROL); @@ -780,6 +781,8 @@ static void ironlake_edp_panel_on (struct drm_device *dev) pp |= PANEL_POWER_RESET; /* restore panel reset bit */ I915_WRITE(PCH_PP_CONTROL, pp); POSTING_READ(PCH_PP_CONTROL); + + return false; } static void ironlake_edp_panel_off (struct drm_device *dev) @@ -860,7 +863,7 @@ static void intel_dp_prepare(struct drm_encoder *encoder) struct drm_i915_private *dev_priv = dev->dev_private; uint32_t dp_reg = I915_READ(intel_dp->output_reg); - if (IS_eDP(intel_dp)) { + if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp)) { ironlake_edp_backlight_off(dev); ironlake_edp_panel_on(dev); ironlake_edp_pll_on(encoder); @@ -1365,7 +1368,11 @@ ironlake_dp_detect(struct drm_connector *connector) struct drm_encoder *encoder = intel_attached_encoder(connector); struct intel_dp *intel_dp = enc_to_intel_dp(encoder); enum drm_connector_status status; + bool was_on = false; + /* Panel needs power for AUX to work */ + if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp)) + was_on = ironlake_edp_panel_on(connector->dev); status = connector_status_disconnected; if (intel_dp_aux_native_read(intel_dp, 0x000, intel_dp->dpcd, @@ -1376,6 +1383,8 @@ ironlake_dp_detect(struct drm_connector *connector) } DRM_DEBUG_KMS("DPCD: %hx%hx%hx%hx\n", intel_dp->dpcd[0], intel_dp->dpcd[1], intel_dp->dpcd[2], intel_dp->dpcd[3]); + if ((IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp)) && !was_on) + ironlake_edp_panel_off(connector->dev); return status; } -- 1.6.3.3
next prev parent reply other threads:[~2010-09-08 19:42 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-08 19:41 eDP fixes Jesse Barnes 2010-09-08 19:41 ` Jesse Barnes [this message] 2010-09-08 19:42 ` [PATCH 2/7] drm/i915: use 125MHz reference clock for PCH attached eDP Jesse Barnes 2010-09-08 19:42 ` [PATCH 3/7] drm/i915: use VDD AUX for panel power around detection and in prepare Jesse Barnes 2010-09-08 19:42 ` [PATCH 4/7] drm/i915: split DP link training across panel power sequencing Jesse Barnes 2010-09-08 19:42 ` [PATCH 5/7] drm/i915: don't change VDD AUX status in panel power functions Jesse Barnes 2010-09-08 19:42 ` [PATCH 6/7] drm/i915: make sure VDD AUX power has time to settle Jesse Barnes 2010-09-08 19:42 ` [PATCH 7/7] drm/i915: make sure panel is sequenced off when starting a mode set Jesse Barnes 2010-09-08 20:11 ` Chris Wilson
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=1283974925-2913-2-git-send-email-jbarnes@virtuousgeek.org \ --to=jbarnes@virtuousgeek.org \ --cc=intel-gfx@lists.freedesktop.org \ --subject='Re: [PATCH 1/7] drm/i915: fix eDP detection' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.