diff mbox series

[RESEND,3/5] drm/i915: Enable fastset for non-boot modesets.

Message ID 20181217095024.2340-3-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [RESEND,1/5] drm/i915/backlight: Restore backlight on resume, v2. | expand

Commit Message

Maarten Lankhorst Dec. 17, 2018, 9:50 a.m. UTC
Now that our state comparison functions are pretty complete, we should
enable fastset by default when a modeset can be avoided. Even if we're
not completely certain about the inherited state, we can be certain
after the first modeset that our sw state matches the hw state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Hans de Goede Dec. 18, 2018, 4 p.m. UTC | #1
Hi,

On 17-12-18 10:50, Maarten Lankhorst wrote:
> Now that our state comparison functions are pretty complete, we should
> enable fastset by default when a modeset can be avoided. Even if we're
> not completely certain about the inherited state, we can be certain
> after the first modeset that our sw state matches the hw state.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

The patch looks good to me, but we must make sure this passes CI
first, I suggest you test this without the last patch in the series
which unconditionally enables fastset.

Also see Daniel's remarks to my resend of your earlier version of
this patch:

https://www.spinics.net/lists/intel-gfx/msg184622.html

With that said:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans




> ---
>   drivers/gpu/drm/i915/intel_display.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 86e7b145fd98..2dd99e5437a5 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11651,6 +11651,11 @@ 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) {
> +		drm_dbg(DRM_UT_KMS, "initial modeset and fastboot not set\n");
> +		ret = false;
> +	}
> +
>   #define PIPE_CONF_CHECK_X(name) do { \
>   	if (current_config->name != pipe_config->name) { \
>   		pipe_config_err(adjust, __stringify(name), \
> @@ -12674,8 +12679,7 @@ static int intel_atomic_check(struct drm_device *dev,
>   			return ret;
>   		}
>   
> -		if (i915_modparams.fastboot &&
> -		    intel_pipe_config_compare(dev_priv,
> +		if (intel_pipe_config_compare(dev_priv,
>   					to_intel_crtc_state(old_crtc_state),
>   					pipe_config, true)) {
>   			crtc_state->mode_changed = false;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 86e7b145fd98..2dd99e5437a5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11651,6 +11651,11 @@  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) {
+		drm_dbg(DRM_UT_KMS, "initial modeset and fastboot not set\n");
+		ret = false;
+	}
+
 #define PIPE_CONF_CHECK_X(name) do { \
 	if (current_config->name != pipe_config->name) { \
 		pipe_config_err(adjust, __stringify(name), \
@@ -12674,8 +12679,7 @@  static int intel_atomic_check(struct drm_device *dev,
 			return ret;
 		}
 
-		if (i915_modparams.fastboot &&
-		    intel_pipe_config_compare(dev_priv,
+		if (intel_pipe_config_compare(dev_priv,
 					to_intel_crtc_state(old_crtc_state),
 					pipe_config, true)) {
 			crtc_state->mode_changed = false;