All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 1/3] drm/i915: Roll intel_crtc->atomic into intel_crtc_state
Date: Wed, 2 Sep 2015 14:15:57 +0300	[thread overview]
Message-ID: <20150902111557.GN29811@intel.com> (raw)
In-Reply-To: <55E6D8AF.4020609@linux.intel.com>

On Wed, Sep 02, 2015 at 01:08:31PM +0200, Maarten Lankhorst wrote:
> Op 02-09-15 om 12:35 schreef Ville Syrjälä:
> > On Wed, Sep 02, 2015 at 07:15:25AM +0200, Maarten Lankhorst wrote:
> >> Op 01-09-15 om 17:48 schreef Ville Syrjälä:
> >>> On Tue, Sep 01, 2015 at 08:30:05AM -0700, Matt Roper wrote:
> >>>> On Tue, Sep 01, 2015 at 07:24:19AM +0200, Maarten Lankhorst wrote:
> >>>>> Op 29-08-15 om 01:57 schreef Matt Roper:
> >>>>>> Way back at the beginning of i915's atomic conversion I added
> >>>>>> intel_crtc->atomic as a temporary dumping ground for "stuff to do
> >>>>>> outside vblank evasion" flags since CRTC states weren't properly wired
> >>>>>> up and tracked at that time.  We've had proper CRTC state tracking for a
> >>>>>> while now, so there's really no reason for this hack to continue to
> >>>>>> exist.  Moving forward we want to store intermediate crtc/plane state
> >>>>>> data for modesets in addition to the final state, so moving these fields
> >>>>>> into the proper state object allows us to properly compute them for both
> >>>>>> the intermediate and final state.
> >>>>>>
> >>>>>> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> >>>>>> ---
> >>>>> Can I shoot this patch down? It's better to add a field 'wm_changed'
> >>>>> to the crtc_state, which gets reset to false for each crtc_state
> >>>>> duplication. It's needed for checking if a cs pageflip can be done for
> >>>>> atomic. It would remove the duplication of some checks there.
> >>>>>
> >>>>> The other atomic state members will die soon. I already have some
> >>>>> patches to achieve that. :)
> >>>>>
> >>>>> I'm not sure if an intermediate state is a good idea. Any code that
> >>>>> disables a crtc should only be looking at the old state.
> >>>>> pre_plane_update runs all stuff in preparation for disabling planes,
> >>>>> while post_plane_update runs everything needed for enabling planes. So
> >>>>> no need to split it up I think, maybe put in some intermediate
> >>>>> watermarks in intel_atomic_state, but no need for a full crtc_state.
> >>>> Well, the intermediate state stuff was requested by Ville in response to
> >>>> my watermark series, so I posted these patches as an RFC to make sure I
> >>>> was understanding what he was looking for properly.
> >>>>
> >>>> Ville, can you comment?
> >>> My opinion is that the current "disable is special" way of doing things
> >>> is quite horrible. For one it makes it really hard to reason about what
> >>> happens to a plane or crtc during the modeset. It's not just off->on,
> >>> on->off, or same->same, but can be on->off->on. With the intermediate
> >>> state in place, there can only be one transition, so really easy to
> >>> think about what's going on.
> >> pre_plane_update deals with all stuff related to disabling planes, while post_plane_update deals with changes after enabling.
> >>
> >> If the crtc goes from on -> off only you could just hammer in the final values after the disable.
> >>
> >> While for off->on or on->off->on you can put in the final values in .crtc_enable before lighting the pipe. I don't see why wm's would need more transitions.
> > One special case after another. Yuck. Not to mention that the plane
> > disable isn't even atomic in the current code, which can look ugly.
> That's easily fixed by adding a pipe_update_start/end pair.
> >>> It'll also mean don't have to sprinkle silly wm update calls all over
> >>> the modeset path. They will just get updated in response to the plane
> >>> state changes. Same for IPS/FBC etc.
> >> IPS and FBC are already calculated correctly in response to modesets.
> > Correctly perhaps, but not in an obvious way.
> It will become more obvious again when pre_plane_update and post_plane_update are loops
> instead of being precalculated from intel_plane_atomic_calc_changes.

It'll never be obvious as long as the on->off->on case exists.

> 
> But if you can precalculate fb_bits and know of wm changed post commit then post_plane_update
> only cares about primary plane state.
> 
> ~Maarten

-- 
Ville Syrjälä
Intel OTC
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-09-02 11:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21  1:11 [PATCH 00/13] Atomic watermark updates (v3) Matt Roper
2015-08-21  1:11 ` [PATCH 01/13] drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code Matt Roper
2015-08-26 12:45   ` Conselvan De Oliveira, Ander
2015-08-26 13:23     ` Ville Syrjälä
2015-08-21  1:11 ` [PATCH 02/13] drm/i915: Eliminate usage of pipe_wm_parameters from ILK-style WM Matt Roper
2015-08-26 12:45   ` Ander Conselvan De Oliveira
2015-08-26 13:39   ` Ville Syrjälä
2015-08-26 15:37     ` Matt Roper
2015-08-26 15:51       ` Ville Syrjälä
2015-08-28 23:57         ` [RFC 1/3] drm/i915: Roll intel_crtc->atomic into intel_crtc_state Matt Roper
2015-08-28 23:57           ` [RFC 2/3] drm/i915: Calculate an intermediate plane/crtc atomic state for modesets Matt Roper
2015-08-28 23:57           ` [RFC 3/3] drm/i915: Update modeset programming to use intermediate state Matt Roper
2015-09-01  5:24           ` [RFC 1/3] drm/i915: Roll intel_crtc->atomic into intel_crtc_state Maarten Lankhorst
2015-09-01 15:30             ` Matt Roper
2015-09-01 15:48               ` Ville Syrjälä
2015-09-02  5:15                 ` Maarten Lankhorst
2015-09-02 10:35                   ` Ville Syrjälä
2015-09-02 11:08                     ` Maarten Lankhorst
2015-09-02 11:15                       ` Ville Syrjälä [this message]
2015-09-02 14:22                         ` Maarten Lankhorst
2015-09-02 15:33                           ` Ville Syrjälä
2015-08-21  1:11 ` [PATCH 03/13] drm/i915/skl: Simplify wm structures slightly Matt Roper
2015-08-26 13:23   ` Ander Conselvan De Oliveira
2015-08-21  1:11 ` [PATCH 04/13] drm/i915/skl: Eliminate usage of pipe_wm_parameters from SKL-style WM Matt Roper
2015-08-27 12:55   ` Ander Conselvan De Oliveira
2015-08-21  1:11 ` [PATCH 05/13] drm/i915/ivb: Move WaCxSRDisabledForSpriteScaling w/a to atomic check Matt Roper
2015-08-21  1:11 ` [PATCH 06/13] drm/i915: Drop intel_update_sprite_watermarks Matt Roper
2015-08-21  1:11 ` [PATCH 07/13] drm/i915: Refactor ilk_update_wm (v3) Matt Roper
2015-08-21  1:11 ` [PATCH 08/13] drm/i915: Move active watermarks into CRTC state (v2) Matt Roper
2015-08-26 13:10   ` Ville Syrjälä
2015-08-21  1:12 ` [PATCH 09/13] drm/i915: Calculate ILK-style watermarks during atomic check (v2) Matt Roper
2015-08-28 12:53   ` Ander Conselvan De Oliveira
2015-08-28 12:56   ` Ander Conselvan De Oliveira
2015-08-21  1:12 ` [PATCH 10/13] drm/i915: Calculate watermark configuration during atomic check Matt Roper
2015-08-28 13:42   ` Ander Conselvan De Oliveira
2015-09-01  5:32     ` Maarten Lankhorst
2015-08-21  1:12 ` [PATCH 11/13] drm/i915: Add two-stage ILK-style watermark programming (v3) Matt Roper
2015-08-31 14:36   ` Ander Conselvan De Oliveira
2015-08-21  1:12 ` [PATCH 12/13] drm/i915/skl: Switch to atomic watermark programming Matt Roper
2015-08-21  1:12 ` [PATCH 13/13] drm/i915/skl: Clarify pending vs hw watermark values Matt Roper
2015-08-26  4:33 ` [PATCH 00/13] Atomic watermark updates (v3) Hindman, Gavin
2015-08-26 18:07   ` Matt Roper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150902111557.GN29811@intel.com \
    --to=ville.syrjala@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.