From: Jani Nikula <jani.nikula@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>, intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 19/19] drm/i915: init the DP panel power seq regs earlier
Date: Thu, 05 Dec 2013 17:00:41 +0200 [thread overview]
Message-ID: <87bo0vqr52.fsf@intel.com> (raw)
In-Reply-To: <1385048853-1579-20-git-send-email-przanoni@gmail.com>
On Thu, 21 Nov 2013, Paulo Zanoni <przanoni@gmail.com> wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> When we call intel_dp_i2c_init we already get some I2C calls, which
> will trigger a VDD enable, which will make use of the panel power
> sequencing registers, so we need to have them ready by this time.
But this patch won't make the registers ready either! The only thing
this one does is initialize the delays in intel_dp. (And unlock the
registers, but that's done in the vdd enable function too.)
And you actually can't trivially initialize the registers either,
because we will only later figure out whether this is a ghost eDP, and
such initialization might botch up LVDS.
See
commit f30d26e468322b50d5e376bec40658683aff8ece
Author: Jani Nikula <jani.nikula@intel.com>
Date: Wed Jan 16 10:53:40 2013 +0200
drm/i915/eDP: do not write power sequence registers for ghost eDP
I'm sorry I don't readily have any suggestions.
If you are only interested in fixing the delays for msleep, then please
fix the commit message!
BR,
Jani.
>
> The good side is that we were reading the values, but were not using
> them for anything (because we were just skipping the msleep(0) calls),
> so this "fix" shouldn't fix any real existing bugs. I was only able to
> identify the problem because I added some debug code to check how much
> time time we were saving with my previous patch.
>
> Regression introduced by:
> commit ed92f0b239ac971edc509169ae3d6955fbe0a188
> Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Date: Wed Jun 12 17:27:24 2013 -0300
> drm/i915: extract intel_edp_init_connector
>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 3a1ca80..23927a0 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3565,14 +3565,14 @@ intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev,
> }
>
> static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> - struct intel_connector *intel_connector)
> + struct intel_connector *intel_connector,
> + struct edp_power_seq *power_seq)
> {
> struct drm_connector *connector = &intel_connector->base;
> struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> struct drm_device *dev = intel_dig_port->base.base.dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct drm_display_mode *fixed_mode = NULL;
> - struct edp_power_seq power_seq = { 0 };
> bool has_dpcd;
> struct drm_display_mode *scan;
> struct edid *edid;
> @@ -3580,8 +3580,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> if (!is_edp(intel_dp))
> return true;
>
> - intel_dp_init_panel_power_sequencer(dev, intel_dp, &power_seq);
> -
> /* Cache DPCD and EDID for edp. */
> ironlake_edp_panel_vdd_on(intel_dp);
> has_dpcd = intel_dp_get_dpcd(intel_dp);
> @@ -3599,8 +3597,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> }
>
> /* We now know it's not a ghost, init power sequence regs. */
> - intel_dp_init_panel_power_sequencer_registers(dev, intel_dp,
> - &power_seq);
> + intel_dp_init_panel_power_sequencer_registers(dev, intel_dp, power_seq);
>
> edid = drm_get_edid(connector, &intel_dp->adapter);
> if (edid) {
> @@ -3649,6 +3646,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> struct drm_device *dev = intel_encoder->base.dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> enum port port = intel_dig_port->port;
> + struct edp_power_seq power_seq = { 0 };
> const char *name = NULL;
> int type, error;
>
> @@ -3748,13 +3746,16 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> BUG();
> }
>
> + if (is_edp(intel_dp))
> + intel_dp_init_panel_power_sequencer(dev, intel_dp, &power_seq);
> +
> error = intel_dp_i2c_init(intel_dp, intel_connector, name);
> WARN(error, "intel_dp_i2c_init failed with error %d for port %c\n",
> error, port_name(port));
>
> intel_dp->psr_setup_done = false;
>
> - if (!intel_edp_init_connector(intel_dp, intel_connector)) {
> + if (!intel_edp_init_connector(intel_dp, intel_connector, &power_seq)) {
> i2c_del_adapter(&intel_dp->adapter);
> if (is_edp(intel_dp)) {
> cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-12-05 14:58 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 15:47 [PATCH 00/19] Haswell runtime PM support + D3 Paulo Zanoni
2013-11-21 15:47 ` [PATCH 01/19] drm/i915: WARN if !HAS_PC8 when enabling/disabling PC8 Paulo Zanoni
2013-11-29 11:11 ` Rodrigo Vivi
2013-11-29 12:55 ` Paulo Zanoni
2013-11-29 13:31 ` Rodrigo Vivi
2013-11-21 15:47 ` [PATCH 02/19] drm/i915: use the correct force_wake function at the PC8 code Paulo Zanoni
2013-11-27 19:57 ` Paulo Zanoni
2013-11-29 11:14 ` [Intel-gfx] " Rodrigo Vivi
2013-11-29 13:23 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 03/19] drm/i915: get a PC8 reference when enabling the power well Paulo Zanoni
2013-11-27 19:59 ` Paulo Zanoni
2013-11-29 12:35 ` Rodrigo Vivi
2013-11-29 13:34 ` Rodrigo Vivi
2013-12-10 21:29 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 04/19] drm/i915: get/put PC8 when we get/put a CRTC Paulo Zanoni
2013-11-21 16:12 ` Chris Wilson
2013-11-27 20:01 ` Paulo Zanoni
2013-11-29 12:38 ` Rodrigo Vivi
2013-11-29 13:34 ` Rodrigo Vivi
2013-12-04 9:01 ` Daniel Vetter
2013-12-04 13:44 ` Paulo Zanoni
2013-12-04 14:07 ` Daniel Vetter
2013-12-05 13:43 ` Paulo Zanoni
2013-12-05 14:40 ` Daniel Vetter
2013-12-06 22:29 ` [PATCH] drm/i915: change CRTC assertion on LCPLL disable Paulo Zanoni
2013-12-06 22:37 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 05/19] drm/i915: add initial Runtime PM functions Paulo Zanoni
2013-11-27 20:10 ` Paulo Zanoni
2013-11-29 12:54 ` Rodrigo Vivi
2013-11-29 13:33 ` Rodrigo Vivi
2013-11-29 14:05 ` Takashi Iwai
2013-12-06 22:31 ` Paulo Zanoni
2013-12-06 22:32 ` Paulo Zanoni
2013-12-08 9:06 ` Takashi Iwai
2013-12-02 12:23 ` Imre Deak
2013-11-21 15:47 ` [PATCH 06/19] drm/i915: do adapter power state notification at runtime PM Paulo Zanoni
2013-11-21 16:14 ` Chris Wilson
2013-11-27 20:13 ` Paulo Zanoni
2013-11-29 12:56 ` Rodrigo Vivi
2013-11-29 13:33 ` Rodrigo Vivi
2013-12-06 22:34 ` Paulo Zanoni
2013-11-21 15:47 ` [PATCH 07/19] drm/i915: add runtime put/get calls at the basic places Paulo Zanoni
2013-11-21 16:07 ` Chris Wilson
2013-11-25 20:55 ` Paulo Zanoni
2013-11-25 21:21 ` Chris Wilson
2013-11-27 20:20 ` Paulo Zanoni
2013-11-29 13:03 ` Rodrigo Vivi
2013-11-29 13:32 ` Rodrigo Vivi
2013-12-10 21:49 ` Daniel Vetter
2013-12-12 20:07 ` Paulo Zanoni
2013-12-12 20:54 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 08/19] drm/i915: add some runtime PM get/put calls Paulo Zanoni
2013-11-27 20:21 ` Paulo Zanoni
2013-11-29 13:05 ` Rodrigo Vivi
2013-11-29 13:31 ` Rodrigo Vivi
2013-11-29 13:42 ` Daniel Vetter
2013-11-29 13:56 ` Paulo Zanoni
2013-11-21 15:47 ` [PATCH 09/19] drm/i915: get a runtime PM reference when the panel VDD is on Paulo Zanoni
2013-11-29 13:50 ` Rodrigo Vivi
2013-11-29 13:59 ` Paulo Zanoni
2013-11-29 14:37 ` Rodrigo Vivi
2013-12-06 22:23 ` Paulo Zanoni
2013-11-21 15:47 ` [PATCH 10/19] drm/i915: do not assert DE_PCH_EVENT_IVB enabled Paulo Zanoni
2013-11-29 14:30 ` Rodrigo Vivi
2013-12-10 21:54 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 11/19] drm/i915: disable interrupts when enabling PC8 Paulo Zanoni
2013-12-02 13:33 ` Rodrigo Vivi
2013-12-10 21:59 ` Daniel Vetter
2013-12-11 21:33 ` Paulo Zanoni
2013-11-21 15:47 ` [PATCH 12/19] drm/i915: release the GTT mmaps when going into D3 Paulo Zanoni
2013-11-21 16:02 ` Chris Wilson
2013-11-21 16:27 ` Paulo Zanoni
2013-12-10 22:03 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 13/19] drm: do not steal the display if we have a master Paulo Zanoni
2013-11-21 16:04 ` Chris Wilson
2013-11-27 20:24 ` Paulo Zanoni
2013-11-29 13:37 ` Daniel Vetter
2013-11-30 11:19 ` David Herrmann
2013-11-21 15:47 ` [PATCH 14/19] drm/i915: add runtime PM support on Haswell Paulo Zanoni
2013-12-02 13:37 ` Rodrigo Vivi
2013-12-10 22:10 ` Daniel Vetter
2013-12-10 22:06 ` Daniel Vetter
2013-11-21 15:47 ` [PATCH 15/19] drm/i915: don't enable VDD just to enable the panel Paulo Zanoni
2013-11-29 14:40 ` Rodrigo Vivi
2013-11-21 15:47 ` [PATCH 16/19] drm/i915: don't touch the VDD when disabling " Paulo Zanoni
2013-11-29 14:41 ` Rodrigo Vivi
2013-11-21 15:47 ` [PATCH 17/19] drm/i915: fix VDD override off wait Paulo Zanoni
2013-11-21 15:47 ` [PATCH 18/19] drm/i915: save some time when waiting the eDP timings Paulo Zanoni
2013-11-21 16:00 ` Chris Wilson
2013-11-25 22:17 ` Ben Widawsky
2013-11-25 23:25 ` Chris Wilson
2013-11-26 2:38 ` Ben Widawsky
2013-11-26 9:14 ` Chris Wilson
2013-11-26 15:53 ` Paulo Zanoni
2013-11-21 15:47 ` [PATCH 19/19] drm/i915: init the DP panel power seq regs earlier Paulo Zanoni
2013-12-05 15:00 ` Jani Nikula [this message]
2013-12-06 18:39 ` Paulo Zanoni
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=87bo0vqr52.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=przanoni@gmail.com \
/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