From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/atomic-helper: Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state()
Date: Mon, 14 Sep 2020 23:16:34 +0300 [thread overview]
Message-ID: <20200914201634.GC6112@intel.com> (raw)
In-Reply-To: <20200907181256.GB2352366@phenom.ffwll.local>
On Mon, Sep 07, 2020 at 08:12:56PM +0200, Daniel Vetter wrote:
> On Mon, Sep 07, 2020 at 03:00:25PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > The timestamping constants have nothing to do with any legacy state
> > so should not be updated from
> > drm_atomic_helper_update_legacy_modeset_state().
> >
> > Let's make everyone call drm_atomic_helper_calc_timestamping_constants()
> > directly instead of relying on
> > drm_atomic_helper_update_legacy_modeset_state() to call it.
> >
> > @@
> > expression S;
> > @@
> > - drm_atomic_helper_calc_timestamping_constants(S);
> >
> > @@
> > expression D, S;
> > @@
> > drm_atomic_helper_update_legacy_modeset_state(D, S);
> > + drm_atomic_helper_calc_timestamping_constants(S);
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> I think the kerneldoc for
> drm_crtc_vblank_helper_get_vblank/_timestamp_internal (both of them) also
> needs to be updated to mention the new function. With that fixed:
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Fixed the docs while applying. Thanks for the review.
>
>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
> > drivers/gpu/drm/drm_atomic_helper.c | 7 ++-----
> > drivers/gpu/drm/i915/display/intel_display.c | 1 +
> > drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 +
> > 4 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index 490684787cff..0511097343da 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -7397,6 +7397,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
> > int crtc_disable_count = 0;
> >
> > drm_atomic_helper_update_legacy_modeset_state(dev, state);
> > + drm_atomic_helper_calc_timestamping_constants(state);
> >
> > dm_state = dm_atomic_get_new_state(state);
> > if (dm_state && dm_state->context) {
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > index 673e3fc282d9..45ee613c8efd 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -1115,9 +1115,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
> > * @old_state: atomic state object with old state structures
> > *
> > * This function updates all the various legacy modeset state pointers in
> > - * connectors, encoders and CRTCs. It also updates the timestamping constants
> > - * used for precise vblank timestamps by calling
> > - * drm_calc_timestamping_constants().
> > + * connectors, encoders and CRTCs.
> > *
> > * Drivers can use this for building their own atomic commit if they don't have
> > * a pure helper-based modeset implementation.
> > @@ -1187,8 +1185,6 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
> > crtc->y = new_plane_state->src_y >> 16;
> > }
> > }
> > -
> > - drm_atomic_helper_calc_timestamping_constants(old_state);
> > }
> > EXPORT_SYMBOL(drm_atomic_helper_update_legacy_modeset_state);
> >
> > @@ -1296,6 +1292,7 @@ void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
> > disable_outputs(dev, old_state);
> >
> > drm_atomic_helper_update_legacy_modeset_state(dev, old_state);
> > + drm_atomic_helper_calc_timestamping_constants(old_state);
> >
> > crtc_set_mode(dev, old_state);
> > }
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index ec148a8da2c2..035840ce3825 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -15578,6 +15578,7 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
> >
> > if (state->modeset) {
> > drm_atomic_helper_update_legacy_modeset_state(dev, &state->base);
> > + drm_atomic_helper_calc_timestamping_constants(&state->base);
> >
> > intel_set_cdclk_pre_plane_update(state);
> >
> > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > index 7799530e07c1..b6d1b926bc5e 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > @@ -2069,6 +2069,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
> > drm_atomic_helper_wait_for_fences(dev, state, false);
> > drm_atomic_helper_wait_for_dependencies(state);
> > drm_atomic_helper_update_legacy_modeset_state(dev, state);
> > + drm_atomic_helper_calc_timestamping_constants(state);
> >
> > if (atom->lock_core)
> > mutex_lock(&disp->mutex);
> > --
> > 2.26.2
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-09-14 20:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 12:00 [Intel-gfx] [PATCH 1/3] drm/atomic-helper: Extract drm_atomic_helper_calc_timestamping_constants() Ville Syrjala
2020-09-07 12:00 ` [Intel-gfx] [PATCH 2/3] drm/atomic-helper: Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state() Ville Syrjala
2020-09-07 18:12 ` Daniel Vetter
2020-09-14 20:16 ` Ville Syrjälä [this message]
2020-09-07 12:00 ` [Intel-gfx] [PATCH 3/3] drm/i915: Drop the drm_atomic_helper_calc_timestamping_constants() call Ville Syrjala
2020-09-07 18:14 ` Daniel Vetter
2020-09-08 11:50 ` Ville Syrjälä
2020-09-07 12:07 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/atomic-helper: Extract drm_atomic_helper_calc_timestamping_constants() Patchwork
2020-09-07 12:30 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-07 18:08 ` [Intel-gfx] [PATCH 1/3] " Daniel Vetter
2020-09-08 8:36 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/3] " 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=20200914201634.GC6112@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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