Em Qui, 2016-11-03 às 18:49 +0200, Ville Syrjälä escreveu:
> On Mon, Oct 17, 2016 at 02:37:16PM +0200, Maarten Lankhorst wrote:
> >
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com
> > >
> > ---
> > Â drivers/gpu/drm/i915/intel_pm.c | 12 ++++++------
> > Â 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c
> > b/drivers/gpu/drm/i915/intel_pm.c
> > index 2df06b703e3d..163b73b493bf 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -3227,7 +3227,7 @@ skl_get_total_relative_data_rate(struct
> > intel_crtc_state *intel_cstate)
> > Â return 0;
> > Â
> > Â /* Calculate and cache data rate for each plane */
> > - for_each_plane_in_state(state, plane, pstate, i) {
> > + for_each_new_plane_in_state(state, plane, pstate, i) {
>
> Looks like this patch needs a refresh due to my tardiness in
> reviewing
> it.
>
> Also unrelated, but I recently noticed that
> skl_get_total_relative_data_rate() doesn't exclude the cursor plane
> from the calculation. I'm thinking it should. Adding some Cc:s...
It seems we're safe because skl_plane_relative_data_rate() returns 0
for cursor. But an explicitly check at the caller would probably be
much much better instead of hidden deep in the code. OTOH, Matt's plans
to exclude cursor case-handling would remove this need again.
>
> >
> > Â id = skl_wm_plane_id(to_intel_plane(plane));
> > Â intel_plane = to_intel_plane(plane);
> > Â
> > @@ -3364,14 +3364,14 @@ skl_allocate_pipe_ddb(struct
> > intel_crtc_state *cstate,
> > Â alloc_size -= cursor_blocks;
> > Â
> > Â /* 1. Allocate the mininum required blocks for each active
> > plane */
> > - for_each_plane_in_state(state, plane, pstate, i) {
> > + for_each_new_plane_in_state(state, plane, pstate, i) {
> > Â intel_plane = to_intel_plane(plane);
> > Â id = skl_wm_plane_id(intel_plane);
> > Â
> > Â if (intel_plane->pipe != pipe)
> > Â continue;
> > Â
> > - if (!to_intel_plane_state(pstate)->base.visible) {
> > + if (!pstate->visible) {
> > Â minimum[id] = 0;
> > Â y_minimum[id] = 0;
> > Â continue;
> > @@ -3933,7 +3933,7 @@ pipes_modified(struct drm_atomic_state
> > *state)
> > Â struct drm_crtc_state *cstate;
> > Â uint32_t i, ret = 0;
> > Â
> > - for_each_crtc_in_state(state, crtc, cstate, i)
> > + for_each_new_crtc_in_state(state, crtc, cstate, i)
> > Â ret |= drm_crtc_mask(crtc);
> > Â
> > Â return ret;
> > @@ -4048,7 +4048,7 @@ skl_compute_wm(struct drm_atomic_state
> > *state)
> > Â Â * since any racing commits that want to update them would
> > need to
> > Â Â * hold _all_ CRTC state mutexes.
> > Â Â */
> > - for_each_crtc_in_state(state, crtc, cstate, i)
> > + for_each_new_crtc_in_state(state, crtc, cstate, i)
> > Â changed = true;
> > Â if (!changed)
> > Â return 0;
> > @@ -4070,7 +4070,7 @@ skl_compute_wm(struct drm_atomic_state
> > *state)
> > Â Â * should allow skl_update_pipe_wm() to return failure in
> > cases where
> > Â Â * no suitable watermark values can be found.
> > Â Â */
> > - for_each_crtc_in_state(state, crtc, cstate, i) {
> > + for_each_new_crtc_in_state(state, crtc, cstate, i) {
> > Â struct intel_crtc *intel_crtc =
> > to_intel_crtc(crtc);
> > Â struct intel_crtc_state *intel_cstate =
> > Â to_intel_crtc_state(cstate);
> > --Â
> > 2.7.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>