public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/3] drm/i915/gen9: Initialize intel_state->active_crtcs during WM sanitization (v2)
Date: Wed, 13 Jul 2016 16:10:37 +0100	[thread overview]
Message-ID: <578659ED.1070606@linux.intel.com> (raw)
In-Reply-To: <1466196140-16336-2-git-send-email-matthew.d.roper@intel.com>


On 17/06/16 21:42, Matt Roper wrote:
> intel_state->active_crtcs is usually only initialized when doing a
> modeset.  During our first atomic commit after boot, we're effectively
> faking a modeset to sanitize the DDB/wm setup, so ensure that this field
> gets initialized before use.
>
> v2:
>   - Don't clobber active_crtcs if our first commit really is a modeset
>     (Maarten)
>   - Grab connection_mutex when faking a modeset during sanitization
>     (Maarten)
>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

I am still applying this series locally in order to run nightly on SKL 
RVP with DP and no fbcon. :)

Regards,

Tvrtko

> ---
>   drivers/gpu/drm/i915/intel_pm.c | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 658a756..c06a8a3 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3896,9 +3896,24 @@ skl_compute_ddb(struct drm_atomic_state *state)
>   	 * pretend that all pipes switched active status so that we'll
>   	 * ensure a full DDB recompute.
>   	 */
> -	if (dev_priv->wm.distrust_bios_wm)
> +	if (dev_priv->wm.distrust_bios_wm) {
> +		ret = drm_modeset_lock(&dev->mode_config.connection_mutex,
> +				       state->acquire_ctx);
> +		if (ret)
> +			return ret;
> +
>   		intel_state->active_pipe_changes = ~0;
>
> +		/*
> +		 * We usually only initialize intel_state->active_crtcs if we
> +		 * we're doing a modeset; make sure this field is always
> +		 * initialized during the sanitization process that happens
> +		 * on the first commit too.
> +		 */
> +		if (!intel_state->modeset)
> +			intel_state->active_crtcs = dev_priv->active_crtcs;
> +	}
> +
>   	/*
>   	 * If the modeset changes which CRTC's are active, we need to
>   	 * recompute the DDB allocation for *all* active pipes, even
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-07-13 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 20:42 [PATCH v2 0/3] SKL watermark fixes for !fbcon Matt Roper
2016-06-17 20:42 ` [PATCH v2 1/3] drm/i915/gen9: Initialize intel_state->active_crtcs during WM sanitization (v2) Matt Roper
2016-07-13 15:10   ` Tvrtko Ursulin [this message]
2016-06-17 20:42 ` [PATCH v2 2/3] drm/i915/gen9: Compute data rates for all planes on first commit Matt Roper
2016-06-17 20:42 ` [PATCH v2 3/3] drm/i915/gen9: Drop invalid WARN() during data rate calculation Matt Roper
2016-06-18  6:09 ` ✓ Ro.CI.BAT: success for SKL watermark fixes for !fbcon (rev2) 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=578659ED.1070606@linux.intel.com \
    --to=tvrtko.ursulin@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