From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 14/14] drm/i915: Add two-stage ILK-style watermark programming (v4)
Date: Thu, 17 Sep 2015 14:38:12 +0200 [thread overview]
Message-ID: <55FAB434.4030304@linux.intel.com> (raw)
In-Reply-To: <1442283570-26824-15-git-send-email-matthew.d.roper@intel.com>
Hey,
It's worh nothing this series may have a soft dependency on Ville's cleanups,
because else pixel_rate == 0 during boot. :(
This patch breaks when the initial sprite watermarks are set on ironlake, but no sprite is enabled.
A naive fix is below, without it my laptop won't power the screen because intermediate wm calculation fails. :(
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 41a4dbaf600b..bf874ff97024 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2457,7 +2457,7 @@ static int ilk_compute_intermediate_wm(struct drm_device *dev,
a_wm->enable &= b_wm->enable;
a_wm->pri_val = max(a_wm->pri_val, b_wm->pri_val);
- a_wm->spr_val = max(a_wm->spr_val, b_wm->spr_val);
+ a_wm->spr_val = a->sprites_enabled ? max(a_wm->spr_val, b_wm->spr_val) : 0;
a_wm->cur_val = max(a_wm->cur_val, b_wm->cur_val);
a_wm->fbc_val = max(a_wm->fbc_val, b_wm->fbc_val);
}
Op 15-09-15 om 04:19 schreef Matt Roper:
> <snip>
> @@ -13202,6 +13229,20 @@ static int intel_atomic_commit(struct drm_device *dev,
> /* FIXME: add subpixel order */
>
> drm_atomic_helper_wait_for_vblanks(dev, state);
> +
> + /*
> + * Now that the vblank has passed, we can go ahead and program the
> + * optimal watermarks on platforms that need two-step watermark
> + * programming.
> + *
> + * TODO: Move this (and other cleanup) to an async worker eventually.
> + */
> + for_each_crtc_in_state(state, crtc, crtc_state, i) {
> + intel_cstate = to_intel_crtc_state(crtc->state);
> +
> + dev_priv->display.optimize_watermarks(intel_cstate);
> + }
^Breaks on my skylake with a null pointer deref; I think you might want to hide it behind a if. :-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-17 12:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 2:19 [PATCH 00/14] Atomic watermark updates (v4) Matt Roper
2015-09-15 2:19 ` [PATCH 01/14] drm/i915: Drop redundant watermark programming Matt Roper
2015-09-15 2:19 ` [PATCH 02/14] drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2) Matt Roper
2015-09-15 2:19 ` [PATCH 03/14] drm/i915: Eliminate usage of pipe_wm_parameters from ILK-style WM (v2) Matt Roper
2015-09-15 2:19 ` [PATCH 04/14] drm/i915: Determine I915_MAX_PLANES from plane enum Matt Roper
2015-09-15 2:19 ` [PATCH 05/14] drm/i915/skl: Simplify wm structures slightly (v2) Matt Roper
2015-09-15 2:19 ` [PATCH 06/14] drm/i915/skl: Eliminate usage of pipe_wm_parameters from SKL-style WM (v2) Matt Roper
2015-09-17 13:24 ` Maarten Lankhorst
2015-09-15 2:19 ` [PATCH 07/14] drm/i915/ivb: Move WaCxSRDisabledForSpriteScaling w/a to atomic check Matt Roper
2015-09-15 2:19 ` [PATCH 08/14] drm/i915: Drop intel_update_sprite_watermarks Matt Roper
2015-09-15 2:19 ` [PATCH 09/14] drm/i915: Refactor ilk_update_wm (v3) Matt Roper
2015-09-15 2:19 ` [PATCH 10/14] drm/i915: Calculate pipe watermarks into CRTC state (v3) Matt Roper
2015-09-15 2:19 ` [PATCH 11/14] drm/i915: Calculate ILK-style watermarks during atomic check (v3) Matt Roper
2015-09-15 2:19 ` [PATCH 12/14] drm/i915: Don't set plane visible during HW readout if CRTC is off Matt Roper
2015-09-15 2:19 ` [PATCH 13/14] drm/i915: Calculate watermark configuration during atomic check (v2) Matt Roper
2015-09-15 2:19 ` [PATCH 14/14] drm/i915: Add two-stage ILK-style watermark programming (v4) Matt Roper
2015-09-17 12:38 ` Maarten Lankhorst [this message]
2015-09-17 13:05 ` Ville Syrjälä
2015-09-17 13:24 ` Maarten Lankhorst
2015-09-23 9:16 ` Daniel Vetter
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=55FAB434.4030304@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@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