All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Enable fastboot by default on Skylake and newer
@ 2019-01-24 13:01 Maarten Lankhorst
  2019-01-24 13:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable fastboot by default on Skylake and newer (rev2) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Maarten Lankhorst @ 2019-01-24 13:01 UTC (permalink / raw)
  To: intel-gfx

From: Hans de Goede <hdegoede@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@redhat.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable fastboot by default on Skylake and newer (rev2)
  2019-01-24 13:01 [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Maarten Lankhorst
@ 2019-01-24 13:15 ` Patchwork
  2019-01-24 13:35 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-24 13:15 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Enable fastboot by default on Skylake and newer (rev2)
URL   : https://patchwork.freedesktop.org/series/54143/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
11c6f092dec9 drm/i915: Enable fastboot by default on Skylake and newer
-:26: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#26: FILE: drivers/gpu/drm/i915/i915_params.c:101:
+i915_param_named(fastboot, int, 0600,
+	"Try to skip unnecessary mode sets at boot time "

total: 0 errors, 0 warnings, 1 checks, 46 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Enable fastboot by default on Skylake and newer (rev2)
  2019-01-24 13:01 [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Maarten Lankhorst
  2019-01-24 13:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable fastboot by default on Skylake and newer (rev2) Patchwork
@ 2019-01-24 13:35 ` Patchwork
  2019-01-24 16:27 ` ✓ Fi.CI.IGT: " Patchwork
  2019-01-24 22:20 ` [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Rodrigo Vivi
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-24 13:35 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Enable fastboot by default on Skylake and newer (rev2)
URL   : https://patchwork.freedesktop.org/series/54143/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5475 -> Patchwork_12026
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/54143/revisions/2/mbox/

Known issues
------------

  Here are the changes found in Patchwork_12026 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       PASS -> INCOMPLETE [fdo#107718]

  
#### Possible fixes ####

  * igt@kms_busy@basic-flip-b:
    - fi-gdg-551:         FAIL [fdo#103182] -> PASS

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       FAIL [fdo#108767] -> PASS

  
  [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767


Participating hosts (45 -> 39)
------------------------------

  Missing    (6): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-icl-y 


Build changes
-------------

    * Linux: CI_DRM_5475 -> Patchwork_12026

  CI_DRM_5475: 9ced33eacb10c4ec1f03010d6efd9f21c6cf3ef7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4788: 3f77380fabd4083f9857daa6cd454d0937077901 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12026: 11c6f092dec9827d0dd77433c2ebcb5eb7748e9a @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

11c6f092dec9 drm/i915: Enable fastboot by default on Skylake and newer

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12026/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: Enable fastboot by default on Skylake and newer (rev2)
  2019-01-24 13:01 [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Maarten Lankhorst
  2019-01-24 13:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable fastboot by default on Skylake and newer (rev2) Patchwork
  2019-01-24 13:35 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-01-24 16:27 ` Patchwork
  2019-01-24 22:20 ` [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Rodrigo Vivi
  3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-01-24 16:27 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Enable fastboot by default on Skylake and newer (rev2)
URL   : https://patchwork.freedesktop.org/series/54143/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5475_full -> Patchwork_12026_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_12026_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_nop@signal-all:
    - shard-apl:          PASS -> INCOMPLETE [fdo#103927]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-snb:          PASS -> INCOMPLETE [fdo#105411]

  * igt@kms_cursor_crc@cursor-64x21-random:
    - shard-apl:          PASS -> FAIL [fdo#103232] +1

  * igt@kms_cursor_crc@cursor-64x64-random:
    - shard-glk:          PASS -> FAIL [fdo#103232]

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
    - shard-apl:          PASS -> FAIL [fdo#103166] +2

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
    - shard-glk:          PASS -> FAIL [fdo#103166] +1

  * igt@kms_setmode@basic:
    - shard-kbl:          NOTRUN -> FAIL [fdo#99912]

  
#### Possible fixes ####

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
    - shard-glk:          FAIL [fdo#108145] -> PASS +1

  * igt@kms_color@pipe-a-degamma:
    - shard-apl:          FAIL [fdo#104782] / [fdo#108145] -> PASS

  * igt@kms_color@pipe-c-ctm-max:
    - shard-apl:          FAIL [fdo#108147] -> PASS

  * igt@kms_cursor_crc@cursor-128x42-onscreen:
    - shard-apl:          FAIL [fdo#103232] -> PASS +2

  * igt@kms_cursor_crc@cursor-size-change:
    - shard-glk:          FAIL [fdo#103232] -> PASS +4

  * igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
    - shard-glk:          FAIL [fdo#108948] -> PASS

  * igt@kms_plane@plane-position-covered-pipe-a-planes:
    - shard-apl:          FAIL [fdo#103166] -> PASS +2

  * igt@kms_plane_multiple@atomic-pipe-b-tiling-none:
    - shard-glk:          FAIL [fdo#103166] -> PASS +2

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-kbl:          INCOMPLETE [fdo#103665] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
  [fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (7 -> 5)
------------------------------

  Missing    (2): shard-skl shard-iclb 


Build changes
-------------

    * Linux: CI_DRM_5475 -> Patchwork_12026

  CI_DRM_5475: 9ced33eacb10c4ec1f03010d6efd9f21c6cf3ef7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4788: 3f77380fabd4083f9857daa6cd454d0937077901 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12026: 11c6f092dec9827d0dd77433c2ebcb5eb7748e9a @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12026/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Enable fastboot by default on Skylake and newer
  2019-01-24 13:01 [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Maarten Lankhorst
                   ` (2 preceding siblings ...)
  2019-01-24 16:27 ` ✓ Fi.CI.IGT: " Patchwork
@ 2019-01-24 22:20 ` Rodrigo Vivi
  2019-01-25  8:36   ` Hans de Goede
  3 siblings, 1 reply; 9+ messages in thread
From: Rodrigo Vivi @ 2019-01-24 22:20 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: intel-gfx

On Thu, Jan 24, 2019 at 02:01:14PM +0100, Maarten Lankhorst wrote:
> From: Hans de Goede <hdegoede@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@redhat.com>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>


I believe at this point you both addressed all of my concerns.
And CI is happy. Let's give a try ;)


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Enable fastboot by default on Skylake and newer
  2019-01-24 22:20 ` [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Rodrigo Vivi
@ 2019-01-25  8:36   ` Hans de Goede
  2019-01-29  9:46     ` Hans de Goede
  2019-01-29 14:02     ` Joonas Lahtinen
  0 siblings, 2 replies; 9+ messages in thread
From: Hans de Goede @ 2019-01-25  8:36 UTC (permalink / raw)
  To: Rodrigo Vivi, Maarten Lankhorst; +Cc: intel-gfx

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@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@redhat.com>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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 ?

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@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@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Enable fastboot by default on Skylake and newer
  2019-01-25  8:36   ` Hans de Goede
@ 2019-01-29  9:46     ` Hans de Goede
  2019-01-29 14:02     ` Joonas Lahtinen
  1 sibling, 0 replies; 9+ messages in thread
From: Hans de Goede @ 2019-01-29  9:46 UTC (permalink / raw)
  To: Rodrigo Vivi, Maarten Lankhorst; +Cc: intel-gfx

Hi,

On 25-01-19 09:36, Hans de Goede wrote:
> 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@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@redhat.com>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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 ?
> 
> 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?

I've gone ahead and pushed this patch to dinq now. I will post a
follow-up patch to also enable fastboot on VLV/CHV.

Then once this mix has seen enough testing out there (and assuming the
testing goes well) then we can try to change to enabling fastboot
by default on gen7+.

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Enable fastboot by default on Skylake and newer
  2019-01-25  8:36   ` Hans de Goede
  2019-01-29  9:46     ` Hans de Goede
@ 2019-01-29 14:02     ` Joonas Lahtinen
  2019-01-29 15:14       ` Hans de Goede
  1 sibling, 1 reply; 9+ messages in thread
From: Joonas Lahtinen @ 2019-01-29 14:02 UTC (permalink / raw)
  To: Hans de Goede, Maarten Lankhorst, Rodrigo Vivi; +Cc: intel-gfx

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@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@redhat.com>
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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@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@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Enable fastboot by default on Skylake and newer
  2019-01-29 14:02     ` Joonas Lahtinen
@ 2019-01-29 15:14       ` Hans de Goede
  0 siblings, 0 replies; 9+ messages in thread
From: Hans de Goede @ 2019-01-29 15:14 UTC (permalink / raw)
  To: Joonas Lahtinen, Maarten Lankhorst, Rodrigo Vivi; +Cc: intel-gfx

Hi,

On 29-01-19 15:02, Joonas Lahtinen wrote:
> 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@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@redhat.com>
>>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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.

No I'm talking about the TEclast X80 pro and the VIOS LTH17 (no-name
X83x0 laptop).

> 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.

The situation on these 2 is different, the VBT appears complete and
subsequent full mode-sets, such as after a suspend/resume do work.

It is just that the LCD goes black if the initial modeset when the
first drm-using app (or fbcon) loads is a full-modeset.

Quite weird. Since the initial modeset involves turning the display
off and then on again in quick succession I've tried adding a
sleep in between, but that does not help. I've also checked the
MIPI sequences to see if there was an unimplemented part (such as
the PMIC sequences I've recently been working on) but that is not
the case either.

> 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 :)

I'm glad you like it.

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-29 15:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 13:01 [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Maarten Lankhorst
2019-01-24 13:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable fastboot by default on Skylake and newer (rev2) Patchwork
2019-01-24 13:35 ` ✓ Fi.CI.BAT: success " Patchwork
2019-01-24 16:27 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-24 22:20 ` [PATCH] drm/i915: Enable fastboot by default on Skylake and newer Rodrigo Vivi
2019-01-25  8:36   ` Hans de Goede
2019-01-29  9:46     ` Hans de Goede
2019-01-29 14:02     ` Joonas Lahtinen
2019-01-29 15:14       ` Hans de Goede

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.