Re: [Intel-gfx] [PATCH 3/5] drm/i915: Enable fastset for non-boot modesets.
On Tue, 08 Jan 2019, 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. > > There is one testcase explicitly testing fastset, > kms_panel_fitting.atomic-fastset but other testcases do so indirectly > because most tests don't clean up the display during exit, or otherwise > indirectly preserve mode by doing igt_display_reset or inheriting during > init. > > Signed-off-by: Maarten Lankhorst > Reviewed-by: Hans de Goede > Cc: Daniel Vetter > --- > 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 696e6f5680df..f8cbdd50fa38 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -11671,6 +11671,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"); DRM_DEBUG_KMS() please. > + ret = false; > + } > + > #define PIPE_CONF_CHECK_X(name) do { \ > if (current_config->name != pipe_config->name) { \ > pipe_config_err(adjust, __stringify(name), \ > @@ -12694,8 +12699,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; -- Jani Nikula, Intel Open Source Graphics Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/5] drm/i915: Enable fastset for non-boot modesets.
On 08-01-19 17:08, 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. There is one testcase explicitly testing fastset, kms_panel_fitting.atomic-fastset but other testcases do so indirectly because most tests don't clean up the display during exit, or otherwise indirectly preserve mode by doing igt_display_reset or inheriting during init. Signed-off-by: Maarten Lankhorst Reviewed-by: Hans de Goede Cc: Daniel Vetter Reviewed-by: Hans de Goede --- 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 696e6f5680df..f8cbdd50fa38 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11671,6 +11671,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), \ @@ -12694,8 +12699,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; ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx