All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org,
	Tsuchiya Yuto <kitakar@gmail.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add NO_VLV_DISP_PW_DPIO_CMN_BC_INIT quirk
Date: Thu, 28 Oct 2021 16:08:16 +0300	[thread overview]
Message-ID: <YXqgwOA53rUB3vYJ@intel.com> (raw)
In-Reply-To: <7e74d851-b575-0f7b-34be-b389bd6323ca@redhat.com>

On Wed, Oct 27, 2021 at 08:39:57PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 10/27/21 15:38, Ville Syrjälä wrote:
> > On Sun, Oct 24, 2021 at 05:50:10PM +0200, Hans de Goede wrote:
> >> Add a NO_VLV_DISP_PW_DPIO_CMN_BC_INIT quirk to fix i915 not working on
> >> the Xiaomi Mi Pad 2 (with CHT x5-Z8500 SoC).
> >>
> >> The Xiaomi Mi Pad 2 uses quite an unusual hardware-design for a Cherry
> >> Trail tablet. It deviates from the typical reference design based tablets
> >> in many ways.
> >>
> >> The Mi Pad 2 does not have any DisplayPort or HDMI outouts. I suspect that
> >> as part of its unusual design it also has some supply rail which is only
> >> used for DisplayPort or HDMI not connected.
> > 
> > Do we have the VBT somewhere (preferable attached to a bug report)?
> > Maybe we can avoid an ugly quirk.
> 
> I agree that solving this in a way where we can avoid the quirk would be great.
> 
> I've filed an issue for this here now:
> 
> https://gitlab.freedesktop.org/drm/intel/-/issues/4385
> 
> This has a dump of /sys/kernel/debug/dri/0/i915_vbt as well as
> dmesg output from a boot with drm.debug=0x1e attached (from a boot
> with this patch, since otherwise the system hangs).
> 
> >>
> >> Force-enabling the dpio-common-bc powerwell as the i915 normal does at boot
> >> appears to cause the P-Unit to hang. When booting with a serial-usb console
> >> the following errors are logged before the system freezes:
> >>
> >>  i915 0000:00:02.0: [drm] *ERROR* timeout setting power well state 00000000 (fffff3ff)
> >>  i915 0000:00:02.0: [drm] *ERROR* Display PHY 0 is not power up
> > 
> > Hmm. I wonder if we're missing a clock or something...
> > 
> > Either of these do anything different?
> > 
> > --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> > @@ -1419,6 +1419,10 @@ static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)
> >  	for_each_pipe(dev_priv, pipe) {
> >  		u32 val = intel_de_read(dev_priv, DPLL(pipe));
> >  
> > +		val |= DPLL_SSC_REF_CLK_CHV;
> > 		or
> > +		val &= ~DPLL_SSC_REF_CLK_CHV;
> > 
> >  		val |= DPLL_REF_CLK_ENABLE_VLV | DPLL_VGA_MODE_DIS;
> >  		if (pipe != PIPE_A)
> >  			val |= DPLL_INTEGRATED_CRI_CLK_VLV;
> > 
> 
> The hang gets triggered from chv_dpio_cmn_power_well_enable() which does not
> call vlv_display_power_well_init() at all, it directly calls vlv_set_power_well()
> without first calling vlv_display_power_well_init() .
> 
> Note the same goes for vlv_dpio_cmn_power_well_enable(). Only the
> vlv_display_power_well_enable() / chv_pipe_power_well_enable() call
> vlv_display_power_well_init().
> 
> Note I can still give the suggested change a try if you want,
> the "display" powerwell is listed first and has DOMAIN_INIT set,
> so assuming for_each_power_domain_well() goes through the domains in
> the order they are listed, then vlv_display_power_well_init() will
> still run first. But it would seem to be wrong if enabling one domain
> depends on things setup by another domain ?

The power wells are hierarchical. Also power wells != power domains.

-- 
Ville Syrjälä
Intel

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org,
	Tsuchiya Yuto <kitakar@gmail.com>
Subject: Re: [PATCH] drm/i915: Add NO_VLV_DISP_PW_DPIO_CMN_BC_INIT quirk
Date: Thu, 28 Oct 2021 16:08:16 +0300	[thread overview]
Message-ID: <YXqgwOA53rUB3vYJ@intel.com> (raw)
In-Reply-To: <7e74d851-b575-0f7b-34be-b389bd6323ca@redhat.com>

On Wed, Oct 27, 2021 at 08:39:57PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 10/27/21 15:38, Ville Syrjälä wrote:
> > On Sun, Oct 24, 2021 at 05:50:10PM +0200, Hans de Goede wrote:
> >> Add a NO_VLV_DISP_PW_DPIO_CMN_BC_INIT quirk to fix i915 not working on
> >> the Xiaomi Mi Pad 2 (with CHT x5-Z8500 SoC).
> >>
> >> The Xiaomi Mi Pad 2 uses quite an unusual hardware-design for a Cherry
> >> Trail tablet. It deviates from the typical reference design based tablets
> >> in many ways.
> >>
> >> The Mi Pad 2 does not have any DisplayPort or HDMI outouts. I suspect that
> >> as part of its unusual design it also has some supply rail which is only
> >> used for DisplayPort or HDMI not connected.
> > 
> > Do we have the VBT somewhere (preferable attached to a bug report)?
> > Maybe we can avoid an ugly quirk.
> 
> I agree that solving this in a way where we can avoid the quirk would be great.
> 
> I've filed an issue for this here now:
> 
> https://gitlab.freedesktop.org/drm/intel/-/issues/4385
> 
> This has a dump of /sys/kernel/debug/dri/0/i915_vbt as well as
> dmesg output from a boot with drm.debug=0x1e attached (from a boot
> with this patch, since otherwise the system hangs).
> 
> >>
> >> Force-enabling the dpio-common-bc powerwell as the i915 normal does at boot
> >> appears to cause the P-Unit to hang. When booting with a serial-usb console
> >> the following errors are logged before the system freezes:
> >>
> >>  i915 0000:00:02.0: [drm] *ERROR* timeout setting power well state 00000000 (fffff3ff)
> >>  i915 0000:00:02.0: [drm] *ERROR* Display PHY 0 is not power up
> > 
> > Hmm. I wonder if we're missing a clock or something...
> > 
> > Either of these do anything different?
> > 
> > --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> > @@ -1419,6 +1419,10 @@ static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)
> >  	for_each_pipe(dev_priv, pipe) {
> >  		u32 val = intel_de_read(dev_priv, DPLL(pipe));
> >  
> > +		val |= DPLL_SSC_REF_CLK_CHV;
> > 		or
> > +		val &= ~DPLL_SSC_REF_CLK_CHV;
> > 
> >  		val |= DPLL_REF_CLK_ENABLE_VLV | DPLL_VGA_MODE_DIS;
> >  		if (pipe != PIPE_A)
> >  			val |= DPLL_INTEGRATED_CRI_CLK_VLV;
> > 
> 
> The hang gets triggered from chv_dpio_cmn_power_well_enable() which does not
> call vlv_display_power_well_init() at all, it directly calls vlv_set_power_well()
> without first calling vlv_display_power_well_init() .
> 
> Note the same goes for vlv_dpio_cmn_power_well_enable(). Only the
> vlv_display_power_well_enable() / chv_pipe_power_well_enable() call
> vlv_display_power_well_init().
> 
> Note I can still give the suggested change a try if you want,
> the "display" powerwell is listed first and has DOMAIN_INIT set,
> so assuming for_each_power_domain_well() goes through the domains in
> the order they are listed, then vlv_display_power_well_init() will
> still run first. But it would seem to be wrong if enabling one domain
> depends on things setup by another domain ?

The power wells are hierarchical. Also power wells != power domains.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-10-28 13:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24 15:50 [Intel-gfx] [PATCH] drm/i915: Add NO_VLV_DISP_PW_DPIO_CMN_BC_INIT quirk Hans de Goede
2021-10-24 15:50 ` Hans de Goede
2021-10-24 15:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-10-24 16:29 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-24 17:39 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-25  8:25 ` [Intel-gfx] [PATCH] " Jani Nikula
2021-10-25  8:25   ` Jani Nikula
2021-10-25  9:15   ` [Intel-gfx] " Hans de Goede
2021-10-25  9:15     ` Hans de Goede
2021-10-27 13:38 ` [Intel-gfx] " Ville Syrjälä
2021-10-27 13:38   ` Ville Syrjälä
2021-10-27 18:39   ` [Intel-gfx] " Hans de Goede
2021-10-27 18:39     ` Hans de Goede
2021-10-28 13:08     ` Ville Syrjälä [this message]
2021-10-28 13:08       ` Ville Syrjälä

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=YXqgwOA53rUB3vYJ@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kitakar@gmail.com \
    --cc=rodrigo.vivi@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.