[Intel-gfx] [PATCH] drm/i915: Enable fastboot by default on Skylake and newer

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Jan 29 14:02:02 UTC 2019


Quoting Hans de Goede (2019-01-25 10:36:48)
> Hi Rodrigo and Maarten,
> 
> On 24-01-19 23:20, Rodrigo Vivi wrote:
> > On Thu, Jan 24, 2019 at 02:01:14PM +0100, Maarten Lankhorst wrote:
> >> From: Hans de Goede <hdegoede at redhat.com>
> >>
> >> We really want to have fastboot enabled by default to avoid an ugly
> >> modeset during boot.
> >>
> >> Rather then enabling it everywhere, lets start with enabling it on
> >> Skylake and newer.
> >>
> >> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> > 
> > 
> > I believe at this point you both addressed all of my concerns.
> > And CI is happy. Let's give a try ;)
> 
> Great, thank you.
> 
> On IRC Maarten asked me about if we should also enable this for
> VLV/CHV. As you may know, as a spare time/weekend project, I've been
> working on making Linux support Bay and Cherry Trail based hardware,
> better. As such I've about 40 different devices with these SoCs and
> I've tested fastboot=1 on all of them. fastboot=1 not only works on
> all of them, on 2 devices the display goes black when we have
> fastboot=0 for some reason which I've been unable to figure out.
> These 2 devices do survive a full-modeset just fine after the initial
> one ?

You're not talking about PIPO X8(s) by any chance? I also happen to own
those devices for side projects.

The verdict is that some revisions of them are missing the VBT sequences
to actually bring up the display. So if you try to change the display
mode after boot from Linux, the display won't ever come back up, as the
GPIO sequences to bring them up do not exist.

Those information blocks are simply empty or missing, and the sequences
have been hacked into the GOP driver and the Android/Windows display
drivers. It also involved programming a mux configuration in addition to
bringing up the display.

I even found some Android source dumps for the platform, but as I'm not
that much of a display side guy and it was not a straightforward matter
I gave up and got my devices exchanged for ones that include the VBT :P

Porting the code (they had basically re-used big portions of the GMA
drivers) seemed like a doable although big task.

Regards, Joonas

PS. I'm huge fan of this non-flicker boot effort! I contributed the
original splashscreen patches for gummiboot (now systemd-boot) for a
project. Hopefully we soon have a completely smooth graphical
boot process :)

> So my response to Maarten was, yes we should enable fastboot=1 by
> default on VLV/CHV too and I plan to submit a follow-up patch for
> that once we have agreement on this patch.
> 
> Maarten suggested to just go for enabling it on gen7+ instead of
> the current gen9+.
> 
> I personally tend towards merging this patch with your
> Reviewed-by + doing a follow-up patch for just VLV/CHV, but
> Maarten prefers doing the gen7+ solution, what is your take on this?
> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
> > 
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > 
> > 
> > 
> >> ---
> >>   drivers/gpu/drm/i915/i915_params.c   |  6 ++++--
> >>   drivers/gpu/drm/i915/i915_params.h   |  2 +-
> >>   drivers/gpu/drm/i915/intel_display.c | 11 ++++++++++-
> >>   3 files changed, 15 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> >> index 9f0539bdaa39..b5be0abbba35 100644
> >> --- a/drivers/gpu/drm/i915/i915_params.c
> >> +++ b/drivers/gpu/drm/i915/i915_params.c
> >> @@ -97,8 +97,10 @@ i915_param_named_unsafe(disable_power_well, int, 0400,
> >>
> >>   i915_param_named_unsafe(enable_ips, int, 0600, "Enable IPS (default: true)");
> >>
> >> -i915_param_named(fastboot, bool, 0600,
> >> -    "Try to skip unnecessary mode sets at boot time (default: false)");
> >> +i915_param_named(fastboot, int, 0600,
> >> +    "Try to skip unnecessary mode sets at boot time "
> >> +    "(0=disabled, 1=enabled) "
> >> +    "Default: -1 (use per-chip default)");
> >>
> >>   i915_param_named_unsafe(prefault_disable, bool, 0600,
> >>      "Disable page prefaulting for pread/pwrite/reloc (default:false). "
> >> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> >> index 6efcf330bdab..3f14e9881a0d 100644
> >> --- a/drivers/gpu/drm/i915/i915_params.h
> >> +++ b/drivers/gpu/drm/i915/i915_params.h
> >> @@ -63,10 +63,10 @@ struct drm_printer;
> >>      param(int, edp_vswing, 0) \
> >>      param(int, reset, 2) \
> >>      param(unsigned int, inject_load_failure, 0) \
> >> +    param(int, fastboot, -1) \
> >>      /* leave bools at the end to not create holes */ \
> >>      param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \
> >>      param(bool, enable_hangcheck, true) \
> >> -    param(bool, fastboot, false) \
> >>      param(bool, prefault_disable, false) \
> >>      param(bool, load_detect_test, false) \
> >>      param(bool, force_reset_modeset_test, false) \
> >> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >> index 36c1126cbc85..097e46819d3a 100644
> >> --- a/drivers/gpu/drm/i915/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/intel_display.c
> >> @@ -11690,6 +11690,15 @@ pipe_config_err(bool adjust, const char *name, const char *format, ...)
> >>      va_end(args);
> >>   }
> >>
> >> +static bool fastboot_enabled(struct drm_i915_private *dev_priv)
> >> +{
> >> +    if (i915_modparams.fastboot != -1)
> >> +            return i915_modparams.fastboot;
> >> +
> >> +    /* Enable fastboot by default on Skylake and newer */
> >> +    return INTEL_GEN(dev_priv) >= 9;
> >> +}
> >> +
> >>   static bool
> >>   intel_pipe_config_compare(struct drm_i915_private *dev_priv,
> >>                        struct intel_crtc_state *current_config,
> >> @@ -11701,7 +11710,7 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
> >>              (current_config->base.mode.private_flags & I915_MODE_FLAG_INHERITED) &&
> >>              !(pipe_config->base.mode.private_flags & I915_MODE_FLAG_INHERITED);
> >>
> >> -    if (fixup_inherited && !i915_modparams.fastboot) {
> >> +    if (fixup_inherited && !fastboot_enabled(dev_priv)) {
> >>              DRM_DEBUG_KMS("initial modeset and fastboot not set\n");
> >>              ret = false;
> >>      }
> >> --
> >> 2.20.1
> >>
> >> _______________________________________________
> >> Intel-gfx mailing list
> >> Intel-gfx at lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list