All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 06/10] drm/i915: Update legacy primary state outside the commit hook.
Date: Mon, 14 Sep 2015 16:26:53 +0200	[thread overview]
Message-ID: <20150914142653.GM3383@phenom.ffwll.local> (raw)
In-Reply-To: <55F6C8A4.4010004@linux.intel.com>

On Mon, Sep 14, 2015 at 03:16:20PM +0200, Maarten Lankhorst wrote:
> Op 14-09-15 om 15:13 schreef Daniel Vetter:
> > On Mon, Sep 14, 2015 at 11:52:26AM +0200, Maarten Lankhorst wrote:
> >> Op 10-09-15 om 17:41 schreef Daniel Vetter:
> >>> On Thu, Sep 10, 2015 at 04:08:01PM +0200, Maarten Lankhorst wrote:
> >>>> This should allow not running plane commit when the crtc is off.
> >>>> While the atomic helpers update those, crtc->x/y is only updated
> >>>> during modesets, and primary plane is updated after this function
> >>>> returns.
> >>>>
> >>>> Unfortunately non-atomic watermarks and fbc still depend on this
> >>>> state inside i915, so it has to be kept in sync.
> >>>>
> >>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >>>> ---
> >>>>  drivers/gpu/drm/i915/intel_display.c | 15 ++++++++-------
> >>>>  1 file changed, 8 insertions(+), 7 deletions(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >>>> index 87c5eba08454..b809ee2a8678 100644
> >>>> --- a/drivers/gpu/drm/i915/intel_display.c
> >>>> +++ b/drivers/gpu/drm/i915/intel_display.c
> >>>> @@ -12198,6 +12198,14 @@ intel_modeset_update_crtc_state(struct drm_atomic_state *state)
> >>>>  			crtc->hwmode = crtc->state->adjusted_mode;
> >>>>  		else
> >>>>  			crtc->hwmode.crtc_clock = 0;
> >>>> +
> >>>> +		if (drm_atomic_get_existing_plane_state(state, crtc->primary)) {
> >>>> +			struct drm_plane_state *plane_state = crtc->primary->state;
> >>>> +
> >>>> +			crtc->primary->fb = plane_state->fb;
> >>>> +			crtc->x = plane_state->src_x >> 16;
> >>>> +			crtc->y = plane_state->src_y >> 16;
> >>>> +		}
> >>> drm_atomic_helper_update_legacy_modeset_state should do that for us, not?
> >>> Atm we have an if (any_ms) check for it, but that seems to just be a bug
> >>> really.
> >> That function doesn't update primary->fb though. This is fixed up by the caller of drm_atomic_commit
> >> after the call succeeds. We need it sooner because update_fbc unfortunately still looks at the legacy state.
> >>
> >> There are a few other users of the legacy state left in i915, but they should be more easy to convert than fbc.
> > Hm, I tried looking really hard but didn't find anything that cared about
> > plane->fb. Can you please point me at them?
> >
> Look for primary->fb. :-) Also crtc->y is used in __intel_fbc_update.

Well I did hunt for that but only found usage in crtc_disable functions
(where we need the old value anyway) and flip code (which updates it
itself). I did indeed somehow miss the fbc code. Oh well. Comment might be
good for that.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-09-14 14:24 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 14:07 [PATCH 00/10] Nuke some legacy state Maarten Lankhorst
2015-09-10 14:07 ` [PATCH 01/10] drm/i915: Use atomic plane state in the primary plane update Maarten Lankhorst
2015-09-14 13:27   ` Ville Syrjälä
2015-09-14 13:40     ` Maarten Lankhorst
2015-09-14 13:54       ` Ville Syrjälä
2015-09-14 14:23     ` Daniel Vetter
2015-09-14 14:31       ` Ville Syrjälä
2015-09-10 14:07 ` [PATCH 02/10] drm/i915: Use the plane state in intel_crtc_info Maarten Lankhorst
2015-09-10 14:07 ` [PATCH 03/10] drm/i915: Use the atomic state in intel_update_primary_planes Maarten Lankhorst
2015-09-10 15:32   ` Daniel Vetter
2015-09-10 15:43   ` Ville Syrjälä
2015-09-10 16:31     ` Daniel Vetter
2015-09-10 16:34       ` Ville Syrjälä
2015-09-14  9:02         ` Daniel Vetter
2015-09-14  9:41           ` [fixup PATCH] drm/i915: Only commit active planes when updating planes during reset Maarten Lankhorst
2015-09-14 13:12             ` Daniel Vetter
2015-09-10 14:07 ` [PATCH 04/10] drm/i915: Use atomic state when changing cursor visibility Maarten Lankhorst
2015-09-10 15:46   ` Ville Syrjälä
2015-09-10 14:08 ` [PATCH 05/10] drm/i915: Remove legacy plane updates for cursor and sprite planes Maarten Lankhorst
2015-09-10 15:38   ` Daniel Vetter
2015-09-10 14:08 ` [PATCH 06/10] drm/i915: Update legacy primary state outside the commit hook Maarten Lankhorst
2015-09-10 15:41   ` Daniel Vetter
2015-09-14  9:52     ` Maarten Lankhorst
2015-09-14 13:13       ` Daniel Vetter
2015-09-14 13:16         ` Maarten Lankhorst
2015-09-14 14:26           ` Daniel Vetter [this message]
2015-09-23 14:08             ` Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 07/10] drm/i915: Do not handle a null plane state Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 08/10] drm/i915: Use crtc->state for duplication Maarten Lankhorst
2015-09-10 15:46   ` Daniel Vetter
2015-09-10 15:49     ` Daniel Vetter
2015-09-10 14:08 ` [PATCH 09/10] drm/i915: Kill off a user of update_state_fb Maarten Lankhorst
2015-09-10 15:50   ` Daniel Vetter
2015-09-14  9:56     ` Maarten Lankhorst
2015-09-10 14:08 ` [PATCH 10/10] drm/i915: Only run commit when crtc is active Maarten Lankhorst
2015-09-10 15:51   ` Daniel Vetter
2015-09-14 10:02     ` Maarten Lankhorst

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=20150914142653.GM3383@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --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.