drm/i915: Fix fastboot scalers for skylake.
Subsystems (2)
PATCH 1/2 drm/i915: Fix fastboot scalers for skylake.
The scaler_id in intel_pipe_config_compare should not be checked when adjusting in intel_pipe_config_compare. The hw scaler id may be changed in intel_update_pipe_config.
--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -12467,9 +12467,9 @@ intel_pipe_config_compare(struct drm_device *dev,PIPE_CONF_CHECK_X (pch_pfit.pos);PIPE_CONF_CHECK_X (pch_pfit.size); } - } -PIPE_CONF_CHECK_I (scaler_state.scaler_id); +PIPE_CONF_CHECK_I (scaler_state.scaler_id); + }/* BDW+ don't expose a synchronous way to read the state */ if (IS_HASWELL (dev))
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Only check pipe state for fast modeset when it's possible.
A fast modeset can only be performed when connectors and active are not changed. This prevents a lot of KMS spam when going from a NULL mode with 0 connectors to an actual mode.
When a crtc is inactive there's no need to evade either, the changes can be applied when the crtc turns on again.
--- drivers/gpu/drm/i915/intel_display.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +11 -10
@@ -12281,7 +12281,7 @@ intel_compare_link_m_n(const struct intel_link_m_n *m_n,static bool intel_pipe_config_compare (struct drm_device *dev, -struct intel_crtc_state *current_config, +const struct intel_crtc_state *current_config,struct intel_crtc_state *pipe_config,bool adjust) {
@@ -13013,14 +13013,15 @@ static int intel_atomic_check(struct drm_device *dev,if (ret)return ret; -if (intel_pipe_config_compare (state->dev, -to_intel_crtc_state (crtc->state), - pipe_config, true)) { +if (!crtc_state->connectors_changed && + !crtc_state->active_changed && + crtc_state->active && +intel_pipe_config_compare (state->dev, +to_intel_crtc_state (crtc->state), + pipe_config, true)) { crtc_state->mode_changed = false; -to_intel_crtc_state (crtc_state)->update_pipe = true; - } - -if (needs_modeset (crtc_state)) { + pipe_config->update_pipe = true; + }else { any_ms = true; ret =drm_atomic_add_affected_planes (state, crtc);
@@ -13029,8 +13030,8 @@ static int intel_atomic_check(struct drm_device *dev, }intel_dump_pipe_config (to_intel_crtc (crtc), pipe_config, -needs_modeset (crtc_state) ? -"[modeset]" :"[fastset]" ); + pipe_config->update_pipe ? +"[fastset]" :"[modeset]" ); }if (any_ms) {
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible.
Quoted 8 lines · Maarten Lankhorst
A fast modeset can only be performed when connectors and active are not changed. This prevents a lot of KMS spam when going from a NULL mode with 0 connectors to an actual mode.
When a crtc is inactive there's no need to evade either, the changes can be applied when the crtc turns on again.
Signed-off-by Maarten Lankhorst <[email protected]>
Needs an igt imo.
-Daniel
Quoted 58 lines
--- drivers/gpu/drm/i915/intel_display.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_display.c +11
-10@@ -12281,7 +12281,7 @@ intel_compare_link_m_n(const struct intel_link_m_n *m_n,static bool intel_pipe_config_compare (struct drm_device *dev, -struct intel_crtc_state *current_config, +const struct intel_crtc_state *current_config,struct intel_crtc_state *pipe_config,bool adjust) {@@ -13013,14 +13013,15 @@ static int intel_atomic_check(struct drm_device *dev,if (ret)return ret; -if (intel_pipe_config_compare (state->dev, -to_intel_crtc_state (crtc->state), - pipe_config, true)) { +if (!crtc_state->connectors_changed && + !crtc_state->active_changed && + crtc_state->active && +intel_pipe_config_compare (state->dev, +to_intel_crtc_state (crtc->state), + pipe_config, true)) { crtc_state->mode_changed = false; -to_intel_crtc_state (crtc_state)->update_pipe = true; - } - -if (needs_modeset (crtc_state)) { + pipe_config->update_pipe = true; + }else { any_ms = true; ret =drm_atomic_add_affected_planes (state, crtc);@@ -13029,8 +13030,8 @@ static int intel_atomic_check(struct drm_device *dev, }intel_dump_pipe_config (to_intel_crtc (crtc), pipe_config, -needs_modeset (crtc_state) ? -"[modeset]" :"[fastset]" ); + pipe_config->update_pipe ? +"[fastset]" :"[modeset]" ); }if (any_ms) {Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible.
In reply to Maarten LankhorstHi,
Quoted 11 lines · Maarten Lankhorst
drivers/gpu/drm/i915/intel_display.c +4
-3@@ -13013,14 +13013,15 @@ static int intel_atomic_check(struct drm_device *dev,if (ret)return ret; -if (intel_pipe_config_compare (state->dev, -to_intel_crtc_state (crtc->state), - pipe_config, true)) { +if (!crtc_state->connectors_changed && + !crtc_state->active_changed && look + crtc_state->active && + intel_pipe_config_compare(state->dev,
drivers/gpu/drm/i915/intel_display.c static int intel_atomic_check(struct drm_device *dev, · line 13025
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4
-4+ to_intel_crtc_state(crtc->state), + pipe_config, true)) { crtc_state->mode_changed = false; -to_intel_crtc_state (crtc_state)->update_pipe = true; - } - -if (needs_modeset (crtc_state)) { + pipe_config->update_pipe = true; + } else { any_ms = true;
The change from only setting any_ms if needs_modeset() is true, to always if we can't do a fastset, seems correct but maybe a bit subtle. Was that intended? At the moment it does look like it'll widen the net a little bit, but I _suspect_ that's a good thing. Pending igt:
Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible.
Op 14-09-15 om 19:10 schreef Daniel Stone:
Quoted 19 lines
Hi,
Quoted 15 lines · Maarten Lankhorst
drivers/gpu/drm/i915/intel_display.c +6
-4@@ -13013,14 +13013,15 @@ static int intel_atomic_check(struct drm_device *dev,if (ret)return ret; -if (intel_pipe_config_compare (state->dev, -to_intel_crtc_state (crtc->state), - pipe_config, true)) { +if (!crtc_state->connectors_changed && + !crtc_state->active_changed && look + crtc_state->active && +intel_pipe_config_compare (state->dev, +to_intel_crtc_state (crtc->state), + pipe_config, true)) { crtc_state->mode_changed = false; -to_intel_crtc_state (crtc_state)->update_pipe = true;
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c static int intel_atomic_check(struct drm_device *dev, · line 13025
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +2
-3- } - -if (needs_modeset (crtc_state)) { + pipe_config->update_pipe = true; + }else { any_ms = true;The change from only setting
any_msifneeds_modeset()is true, to always if we can't do a fastset, seems correct but maybe a bit subtle.
It's exactly the same thing, just made a bit more explicit.
before: any_ms = needs_modeset() with mode_changed = !update_pipe.
After: any_ms = !update_pipe.
Quoted 6 lines
Was that intended? At the moment it does look like it'll widen the net a little bit, but I _suspect_ that's a good thing. Pending igt:
Acked-by Daniel Stone <[email protected]>Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible.
In reply to Maarten Lankhorstdrivers/gpu/drm/i915/intel_display.c static int intel_atomic_check(struct drm_device *dev, · line 13021
Quoted 9 lines · Maarten Lankhorst
drivers/gpu/drm/i915/intel_display.c +6
-2+if (!crtc_state->connectors_changed && + !crtc_state->active_changed && + crtc_state->active && +intel_pipe_config_compare (state->dev, +to_intel_crtc_state (crtc->state), + pipe_config, true)) { crtc_state->mode_changed = false; -to_intel_crtc_state (crtc_state)->update_pipe = true; - }
Doesn't needs_modeset() cover the connectors and active changed cases? Could we just hoist that up earlier in this function instead?
Jesse
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible.
Op 16-09-15 om 20:48 schreef Jesse Barnes:
Quoted 12 lines · Maarten Lankhorst
drivers/gpu/drm/i915/intel_display.c static int intel_atomic_check(struct drm_device *dev, · line 13021
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +6
-2+if (!crtc_state->connectors_changed && + !crtc_state->active_changed && + crtc_state->active && +intel_pipe_config_compare (state->dev, +to_intel_crtc_state (crtc->state), + pipe_config, true)) { crtc_state->mode_changed = false; -to_intel_crtc_state (crtc_state)->update_pipe = true; - }Doesn't
needs_modeset()cover the connectors and active changed cases? Could we just hoist that up earlier in this function instead?
Not sure what you're saying, since needs_modeset is always true here.
~Maarten
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · Maarten Lankhorst
The
scaler_idinintel_pipe_config_compareshould not be checked when adjusting inintel_pipe_config_compare. The hw scaler id may be changed inintel_update_pipe_config.Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0@@ -12467,9 +12467,9 @@ intel_pipe_config_compare(struct drm_device *dev,PIPE_CONF_CHECK_X (pch_pfit.pos);
drivers/gpu/drm/i915/intel_display.c intel_pipe_config_compare(struct drm_device *dev, · line 12475
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +2
-2PIPE_CONF_CHECK_X (pch_pfit.size); } - } -PIPE_CONF_CHECK_I (scaler_state.scaler_id); +PIPE_CONF_CHECK_I (scaler_state.scaler_id); + }/* BDW+ don't expose a synchronous way to read the state */ if (IS_HASWELL (dev))
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 24 lines · Jesse Barnes
Quoted 23 lines · Maarten Lankhorst
The
scaler_idinintel_pipe_config_compareshould not be checked when adjusting inintel_pipe_config_compare. The hw scaler id may be changed inintel_update_pipe_config.Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +2
-2@@ -12467,9 +12467,9 @@ intel_pipe_config_compare(struct drm_device *dev,PIPE_CONF_CHECK_X (pch_pfit.pos);PIPE_CONF_CHECK_X (pch_pfit.size); } - } -PIPE_CONF_CHECK_I (scaler_state.scaler_id); +PIPE_CONF_CHECK_I (scaler_state.scaler_id); + }
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c intel_pipe_config_compare(struct drm_device *dev, · line 12475
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +0
-0/* BDW+ don't expose a synchronous way to read the state */ if (IS_HASWELL (dev))Reviewed-by Jesse Barnes <[email protected]>
Queued for -next, thanks for the patch. Still looking for that kms_fastmodeset igt ...
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx