From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915: Update intel_crtc_active() to use state values
Date: Mon, 9 Mar 2015 17:53:25 +0200 [thread overview]
Message-ID: <20150309155325.GX11371@intel.com> (raw)
In-Reply-To: <1425848445-19479-4-git-send-email-matthew.d.roper@intel.com>
On Sun, Mar 08, 2015 at 02:00:43PM -0700, Matt Roper wrote:
> With the switch to atomic plumbing for planes, some of our commit-time
> work (e.g., watermarks) is done after the new atomic state is swapped
> into the relevant DRM object, but before the DRM core has a chance to
> update its legacy state values. Switch intel_crtc_active() to look at
> the state objects rather than legacy fields to ensure we operate on the
> proper values.
>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This gets used from the wm code and for that I think it's correct in the
sense that it'll preventt oopses, and from the FBC code which is.. well
yeah.
So this is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
And due to this I think you can for now drop all the plane->state->fb checks
you add in patch 5/5 to the pre-ilk platforms' wm code. We'll need to
eventually change all that code to consider disabled planes correctly,
but for now just not oopsing is good enough I think.
> ---
> drivers/gpu/drm/i915/intel_display.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b11528f..4f8c622d 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -886,8 +886,6 @@ chv_find_best_dpll(const intel_limit_t *limit, struct intel_crtc *crtc,
>
> bool intel_crtc_active(struct drm_crtc *crtc)
> {
> - struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> -
> /* Be paranoid as we can arrive here with only partial
> * state retrieved from the hardware during setup.
> *
> @@ -897,8 +895,8 @@ bool intel_crtc_active(struct drm_crtc *crtc)
> * We can ditch the crtc->primary->fb check as soon as we can
> * properly reconstruct framebuffers.
> */
> - return crtc->state->active && crtc->primary->fb &&
> - intel_crtc->config->base.adjusted_mode.crtc_clock;
> + return crtc->state->active && crtc->primary->state->fb &&
> + crtc->state->adjusted_mode.crtc_clock;
> }
>
> enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
> --
> 1.8.5.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-09 15:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 21:00 [PATCH 0/5] Fix recent watermark breakage Matt Roper
2015-03-08 21:00 ` [PATCH 1/5] drm/i915: Ensure crtc_state backpointer is initialized Matt Roper
2015-03-09 16:26 ` Daniel Vetter
2015-03-08 21:00 ` [PATCH 2/5] drm/i915: Kill intel_crtc->active Matt Roper
2015-03-09 15:41 ` Ville Syrjälä
2015-03-09 16:27 ` Daniel Vetter
2015-03-08 21:00 ` [PATCH 3/5] drm/i915: Update intel_crtc_active() to use state values Matt Roper
2015-03-09 15:53 ` Ville Syrjälä [this message]
2015-03-09 16:29 ` Daniel Vetter
2015-03-08 21:00 ` [PATCH 4/5] drm/i915: Use crtc->state->active in ilk/skl watermark calculations Matt Roper
2015-03-09 15:57 ` Ville Syrjälä
2015-03-08 21:00 ` [PATCH 5/5] drm/i915: Don't assume primary & cursor are always on for wm calculation (v3) Matt Roper
2015-03-09 0:17 ` shuang.he
2015-03-09 12:04 ` Chris Wilson
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=20150309155325.GX11371@intel.com \
--to=ville.syrjala@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 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.