From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 03/11] drm/i915/gen9+: Use for_each_intel_plane_on_crtc in skl_print_wm_changes
Date: Thu, 27 Oct 2016 16:03:00 +0300 [thread overview]
Message-ID: <20161027130300.GA4617@intel.com> (raw)
In-Reply-To: <1477489299-25777-4-git-send-email-maarten.lankhorst@linux.intel.com>
On Wed, Oct 26, 2016 at 03:41:31PM +0200, Maarten Lankhorst wrote:
> This will allow us to find all allocations that may have changed,
What is the "this" you are referring to?
Ie. please don't treat the subject line as part of the commit message
itself, because it's confusing.
> not just the one added by the atomic state.
>
> This is required to stop adding planes to state when its
> allocation changes, and is useful for finding bugs.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index bdb69582e7c5..c1520afb2360 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4090,41 +4090,35 @@ skl_print_wm_changes(const struct drm_atomic_state *state)
> to_intel_atomic_state(state);
> const struct drm_crtc *crtc;
> const struct drm_crtc_state *cstate;
> - const struct drm_plane *plane;
> const struct intel_plane *intel_plane;
> - const struct drm_plane_state *pstate;
> const struct skl_ddb_allocation *old_ddb = &dev_priv->wm.skl_hw.ddb;
> const struct skl_ddb_allocation *new_ddb = &intel_state->wm_results.ddb;
> enum pipe pipe;
> int id;
> - int i, j;
> + int i;
>
> for_each_crtc_in_state(state, crtc, cstate, i) {
So what you're saying is that all crtcs whose DDB allocation may have
changed are part of the state, but not all planes on those crtcs may be
part of the state?
> pipe = to_intel_crtc(crtc)->pipe;
>
> - for_each_plane_in_state(state, plane, pstate, j) {
> + for_each_intel_plane_on_crtc(dev, to_intel_crtc(crtc), intel_plane) {
> const struct skl_ddb_entry *old, *new;
>
> - intel_plane = to_intel_plane(plane);
> id = skl_wm_plane_id(intel_plane);
> old = &old_ddb->plane[pipe][id];
> new = &new_ddb->plane[pipe][id];
>
> - if (intel_plane->pipe != pipe)
> - continue;
> -
> if (skl_ddb_entry_equal(old, new))
> continue;
>
> if (id != PLANE_CURSOR) {
> DRM_DEBUG_ATOMIC("[PLANE:%d:plane %d%c] ddb (%d - %d) -> (%d - %d)\n",
> - plane->base.id, id + 1,
> + intel_plane->base.base.id, id + 1,
Slightly unrelated, but
"[PLANE:%d:%s] ...", plane->base.id, plane->name
and then you can kill off this cursor special case entirely.
We should probably make some macros for those things so pople wouldn't
have to write them by hand.
> pipe_name(pipe),
> old->start, old->end,
> new->start, new->end);
> } else {
> DRM_DEBUG_ATOMIC("[PLANE:%d:cursor %c] ddb (%d - %d) -> (%d - %d)\n",
> - plane->base.id,
> + intel_plane->base.base.id,
> pipe_name(pipe),
> old->start, old->end,
> new->start, new->end);
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-10-27 13:03 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 13:41 [PATCH v2 00/11] drm/i915/gen9+: Atomic watermark fixes Maarten Lankhorst
2016-10-26 13:41 ` [PATCH v2 01/11] drm/i915/skl+: Prepare for removing data rate from skl watermark state, v2 Maarten Lankhorst
2016-10-27 7:12 ` Daniel Vetter
2016-10-27 8:31 ` Maarten Lankhorst
2016-10-27 17:48 ` Paulo Zanoni
2016-10-27 17:55 ` Matt Roper
2016-10-26 13:41 ` [PATCH v2 02/11] drm/i915/gen9+: Use cstate plane mask instead of crtc->state Maarten Lankhorst
2016-10-27 14:50 ` Matt Roper
2016-10-26 13:41 ` [PATCH v2 03/11] drm/i915/gen9+: Use for_each_intel_plane_on_crtc in skl_print_wm_changes Maarten Lankhorst
2016-10-27 13:03 ` Ville Syrjälä [this message]
2016-10-27 17:47 ` Matt Roper
2016-10-27 17:57 ` Paulo Zanoni
2016-11-01 11:04 ` [PATCH v2.1 03/11] drm/i915/gen9+: Use for_each_intel_plane_on_crtc in skl_print_wm_changes, v2 Maarten Lankhorst
2016-11-01 12:33 ` Paulo Zanoni
2016-10-26 13:41 ` [PATCH v2 04/11] drm/i915/skl+: Remove data_rate from watermark struct, v2 Maarten Lankhorst
2016-10-27 18:14 ` Paulo Zanoni
2016-10-26 13:41 ` [PATCH v2 05/11] drm/i915/skl+: Remove minimum block allocation from crtc state Maarten Lankhorst
2016-10-26 13:41 ` [PATCH v2 06/11] drm/i915/skl+: Clean up minimum allocations, v2 Maarten Lankhorst
2016-10-27 19:25 ` Paulo Zanoni
2016-10-26 13:41 ` [PATCH v2 07/11] drm/i915: Add a atomic evasion step to watermark programming, v2 Maarten Lankhorst
2016-10-26 16:19 ` Ville Syrjälä
2016-10-27 7:10 ` Daniel Vetter
2016-10-27 10:37 ` [PATCH v2.1 07/11] drm/i915: Add a atomic evasion step to watermark programming, v3 Maarten Lankhorst
2016-10-26 23:10 ` [PATCH v2 07/11] drm/i915: Add a atomic evasion step to watermark programming, v2 Matt Roper
2016-10-26 13:41 ` [PATCH v2 08/11] drm/i915/gen9+: Use the watermarks from crtc_state for everything, v2 Maarten Lankhorst
2016-10-26 23:13 ` Matt Roper
2016-10-26 13:41 ` [PATCH v2 09/11] drm/i915/gen9+: Program watermarks as a separate step during evasion, v2 Maarten Lankhorst
2016-10-26 16:05 ` Lyude Paul
2016-10-26 23:24 ` Matt Roper
2016-10-27 8:29 ` Maarten Lankhorst
2016-10-27 11:45 ` [PATCH v2.1 09/11] drm/i915/gen9+: Program watermarks as a separate step during evasion, v3 Maarten Lankhorst
2016-10-26 13:41 ` [PATCH v2 10/11] drm/i915/gen9+: Preserve old allocation from crtc_state Maarten Lankhorst
2016-10-26 13:41 ` [PATCH v2 11/11] drm/i915/gen9+: Kill off hw_ddb from intel_crtc Maarten Lankhorst
2016-10-26 14:16 ` ✓ Fi.CI.BAT: success for drm/i915/gen9+: Atomic watermark fixes Patchwork
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=20161027130300.GA4617@intel.com \
--to=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).