Message ID | 20230907122541.32261-3-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Slightly more atomic multi-pipe commits | expand |
On Thu, Sep 07, 2023 at 03:25:40PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Split intel_update_crtc() into two parts such that the first > part performs all the non-vblank evasion preparatory stuff, > and the second part just does the vblank evasion stuff. > > For now we just call these back to back so that there is > no funcitonal change. > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> > --- > drivers/gpu/drm/i915/display/intel_display.c | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 526f38b502be..7c19a0f380ca 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -6542,8 +6542,8 @@ static void intel_enable_crtc(struct intel_atomic_state *state, > intel_crtc_enable_pipe_crc(crtc); > } > > -static void intel_update_crtc(struct intel_atomic_state *state, > - struct intel_crtc *crtc) > +static void intel_pre_update_crtc(struct intel_atomic_state *state, > + struct intel_crtc *crtc) > { > struct drm_i915_private *i915 = to_i915(state->base.dev); > const struct intel_crtc_state *old_crtc_state = > @@ -6588,6 +6588,15 @@ static void intel_update_crtc(struct intel_atomic_state *state, > intel_color_commit_noarm(new_crtc_state); > > intel_crtc_planes_update_noarm(state, crtc); > +} > + > +static void intel_update_crtc(struct intel_atomic_state *state, > + struct intel_crtc *crtc) > +{ > + const struct intel_crtc_state *old_crtc_state = > + intel_atomic_get_old_crtc_state(state, crtc); > + struct intel_crtc_state *new_crtc_state = > + intel_atomic_get_new_crtc_state(state, crtc); > > /* Perform vblank evasion around commit operation */ > intel_pipe_update_start(new_crtc_state); > @@ -6701,6 +6710,7 @@ static void intel_commit_modeset_enables(struct intel_atomic_state *state) > continue; > > intel_enable_crtc(state, crtc); > + intel_pre_update_crtc(state, crtc); > intel_update_crtc(state, crtc); > } > } > @@ -6753,6 +6763,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) > entries[pipe] = new_crtc_state->wm.skl.ddb; > update_pipes &= ~BIT(pipe); > > + intel_pre_update_crtc(state, crtc); > intel_update_crtc(state, crtc); > > /* > @@ -6820,6 +6831,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) > entries[pipe] = new_crtc_state->wm.skl.ddb; > update_pipes &= ~BIT(pipe); > > + intel_pre_update_crtc(state, crtc); > intel_update_crtc(state, crtc); > } > > -- > 2.41.0 >
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 526f38b502be..7c19a0f380ca 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -6542,8 +6542,8 @@ static void intel_enable_crtc(struct intel_atomic_state *state, intel_crtc_enable_pipe_crc(crtc); } -static void intel_update_crtc(struct intel_atomic_state *state, - struct intel_crtc *crtc) +static void intel_pre_update_crtc(struct intel_atomic_state *state, + struct intel_crtc *crtc) { struct drm_i915_private *i915 = to_i915(state->base.dev); const struct intel_crtc_state *old_crtc_state = @@ -6588,6 +6588,15 @@ static void intel_update_crtc(struct intel_atomic_state *state, intel_color_commit_noarm(new_crtc_state); intel_crtc_planes_update_noarm(state, crtc); +} + +static void intel_update_crtc(struct intel_atomic_state *state, + struct intel_crtc *crtc) +{ + const struct intel_crtc_state *old_crtc_state = + intel_atomic_get_old_crtc_state(state, crtc); + struct intel_crtc_state *new_crtc_state = + intel_atomic_get_new_crtc_state(state, crtc); /* Perform vblank evasion around commit operation */ intel_pipe_update_start(new_crtc_state); @@ -6701,6 +6710,7 @@ static void intel_commit_modeset_enables(struct intel_atomic_state *state) continue; intel_enable_crtc(state, crtc); + intel_pre_update_crtc(state, crtc); intel_update_crtc(state, crtc); } } @@ -6753,6 +6763,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) entries[pipe] = new_crtc_state->wm.skl.ddb; update_pipes &= ~BIT(pipe); + intel_pre_update_crtc(state, crtc); intel_update_crtc(state, crtc); /* @@ -6820,6 +6831,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) entries[pipe] = new_crtc_state->wm.skl.ddb; update_pipes &= ~BIT(pipe); + intel_pre_update_crtc(state, crtc); intel_update_crtc(state, crtc); }