All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	mika.kahola@intel.com, Vidya Srinivas <vidya.srinivas@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: imre.deak@linux.intel.com
Subject: Re: [PATCH 10/14] drm/i915: Add MIPI_IO WA
Date: Fri, 13 Jan 2017 13:18:07 +0200	[thread overview]
Message-ID: <1484306287.11304.12.camel@gmail.com> (raw)
In-Reply-To: <877f5zfl6e.fsf@intel.com>

On Fri, 2017-01-13 at 09:55 +0200, Jani Nikula wrote:
> On Thu, 12 Jan 2017, Mika Kahola <mika.kahola@intel.com> wrote:
> > 
> > This is definitely needed to pass igt test on bxt
> > 
> > 'gem_exec_suspend --run-subtest basic-S3'
> > 
> > Tested-by: Mika Kahola <mika.kahola@intel.com>
> > 
> > On Mon, 2017-01-09 at 14:46 +0530, Vidya Srinivas wrote:
> > > 
> > > From: Uma Shankar <uma.shankar@intel.com>
> > > 
> > > Enable MIPI IO WA for BXT DSI as per bspec.
> > > 
> > > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_reg.h  | 3 +++
> > >  drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++
> > >  2 files changed, 12 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> > > b/drivers/gpu/drm/i915/i915_reg.h
> > > index 71b978a..b9d7e98 100644
> > > --- a/drivers/gpu/drm/i915/i915_reg.h
> > > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > > @@ -8301,6 +8301,9 @@ enum {
> > >  #define _BXT_MIPIC_PORT_CTRL				0x6B8C0
> > >  #define BXT_MIPI_PORT_CTRL(tc)	_MMIO_MIPI(tc,
> > > _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)
> > >  
> > > +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR		_MMIO(0
> > > x138090)
> Observe that this register is already defined as BXT_P_CR_GT_DISP_PWRON,
> and already used in intel_dpio_phy.c. It seems to me changing the bits
> in this register should be hooked at the dpio level.

AFAIK this is an uncore register and not exactly part of DPIO. The DPIO phy bits
are power requests that go to the P-Unit, so somewhat similar to power well
enabling. The DSI usage seems orthogonal to the DPIO phys, so I don't think it
makes a lot of sense to do it in intel_dpio_phy.c.

Ander


> 
> Imre?
> 
> > 
> > > 
> > > +#define  MIPIO_RST_CTRL					(1 <<
> > > 2)
> > > +
> > >  #define  DPI_ENABLE					(1 << 31)
> > > /* A + C */
> > >  #define  MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT		27
> > >  #define  MIPIA_MIPI4DPHY_DELAY_COUNT_MASK		(0xf << 27)
> > > diff --git a/drivers/gpu/drm/i915/intel_dsi.c
> > > b/drivers/gpu/drm/i915/intel_dsi.c
> > > index a4bda92..9252490 100644
> > > --- a/drivers/gpu/drm/i915/intel_dsi.c
> > > +++ b/drivers/gpu/drm/i915/intel_dsi.c
> > > @@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct
> > > intel_encoder *encoder)
> > >  
> > >  	DRM_DEBUG_KMS("\n");
> > >  
> > > +	/* Add MIPI IO reset programming for modeset */
> > > +	val = I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);
> > > +	I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,
> > > +					val | MIPIO_RST_CTRL);
> > > +
> > Should we move this WA to intel_dsi_pre_enable() as the counterpart of
> > this WA is defined intel_dsi_post_disable()?
> As I said, this should probably be managed in intel_dpio_phy.c.
> 
> And if not, this is BXT specific, and this hunk runs it on everything
> else too.
> 
> BR,
> Jani.
> 
> 
> > 
> > 
> > > 
> > >  	/* Enable MIPI PHY transparent latch */
> > >  	for_each_dsi_port(port, intel_dsi->ports) {
> > >  		val = I915_READ(BXT_MIPI_PORT_CTRL(port));
> > > @@ -757,6 +762,10 @@ static void intel_dsi_post_disable(struct
> > > intel_encoder *encoder,
> > >  	drm_panel_power_off(intel_dsi->panel);
> > >  	msleep(intel_dsi->panel_off_delay);
> > >  
> > > +	val = I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);
> > > +	I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,
> > > +					val & ~MIPIO_RST_CTRL);
> > > +
> > >  	intel_disable_dsi_pll(encoder);
> > >  
> > >  	/* Panel Disable over CRC PMIC */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-13 11:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09  9:16 [PATCH 10/14] drm/i915: Add MIPI_IO WA Vidya Srinivas
2017-01-12 11:43 ` Mika Kahola
2017-01-13  7:55   ` Jani Nikula
2017-01-13 11:18     ` Ander Conselvan De Oliveira [this message]
2017-01-13 15:03     ` Imre Deak
2017-01-13 15:32       ` Ville Syrjälä
2017-01-16 10:06         ` Srinivas, Vidya
2017-01-18  9:38           ` Jani Nikula
2017-01-19  5:37             ` Srinivas, Vidya
2017-01-18 10:16           ` Imre Deak
2017-01-19  5:36             ` Srinivas, Vidya
2017-01-19  6:11             ` [PATCH] drm/i915: Add MIPI_IO WA and program DSI regulators Vidya Srinivas
2017-01-19  8:42               ` Mika Kahola
2017-01-19  9:28                 ` Jani Nikula
2017-01-16 10:01   ` [PATCH 10/14] drm/i915: Add MIPI_IO WA Srinivas, Vidya

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=1484306287.11304.12.camel@gmail.com \
    --to=conselvan2@gmail.com \
    --cc=imre.deak@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=mika.kahola@intel.com \
    --cc=vidya.srinivas@intel.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 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.