From: "Conselvan De Oliveira, Ander" <ander.conselvan.de.oliveira@intel.com>
To: "daniel@ffwll.ch" <daniel@ffwll.ch>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 7/7] drm/i915: Move intel_atomic_get_shared_dpll_state() to intel_dpll_mgr.c
Date: Mon, 2 Jan 2017 09:40:39 +0000 [thread overview]
Message-ID: <1483350039.2497.0.camel@intel.com> (raw)
In-Reply-To: <20161230190433.GI8712@dvetter-linux.ger.corp.intel.com>
On Fri, 2016-12-30 at 20:04 +0100, Daniel Vetter wrote:
> On Thu, Dec 29, 2016 at 05:22:13PM +0200, Ander Conselvan de Oliveira wrote:
> >
> > The function intel_atomic_get_shared_dpll_state() is only called from
> > intel_dpll_mgr.c and it concerns the same data structures as the other
> > functions in that file, so move it there and make it static.
> >
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@inte
> > l.com>
> > Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Always love some doc work, thanks for respinning this series.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Pushed. Thanks for the reviews.
Ander
>
> >
> > ---
> > drivers/gpu/drm/i915/intel_atomic.c | 31 -------------------------------
> > drivers/gpu/drm/i915/intel_dpll_mgr.c | 31 +++++++++++++++++++++++++++++++
> > drivers/gpu/drm/i915/intel_drv.h | 2 --
> > 3 files changed, 31 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_atomic.c
> > b/drivers/gpu/drm/i915/intel_atomic.c
> > index fa6dc43..aa9160e 100644
> > --- a/drivers/gpu/drm/i915/intel_atomic.c
> > +++ b/drivers/gpu/drm/i915/intel_atomic.c
> > @@ -265,37 +265,6 @@ int intel_atomic_setup_scalers(struct drm_device *dev,
> > return 0;
> > }
> >
> > -static void
> > -intel_atomic_duplicate_dpll_state(struct drm_i915_private *dev_priv,
> > - struct intel_shared_dpll_state
> > *shared_dpll)
> > -{
> > - enum intel_dpll_id i;
> > -
> > - /* Copy shared dpll state */
> > - for (i = 0; i < dev_priv->num_shared_dpll; i++) {
> > - struct intel_shared_dpll *pll = &dev_priv->shared_dplls[i];
> > -
> > - shared_dpll[i] = pll->state;
> > - }
> > -}
> > -
> > -struct intel_shared_dpll_state *
> > -intel_atomic_get_shared_dpll_state(struct drm_atomic_state *s)
> > -{
> > - struct intel_atomic_state *state = to_intel_atomic_state(s);
> > -
> > - WARN_ON(!drm_modeset_is_locked(&s->dev-
> > >mode_config.connection_mutex));
> > -
> > - if (!state->dpll_set) {
> > - state->dpll_set = true;
> > -
> > - intel_atomic_duplicate_dpll_state(to_i915(s->dev),
> > - state->shared_dpll);
> > - }
> > -
> > - return state->shared_dpll;
> > -}
> > -
> > struct drm_atomic_state *
> > intel_atomic_state_alloc(struct drm_device *dev)
> > {
> > diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c
> > b/drivers/gpu/drm/i915/intel_dpll_mgr.c
> > index 57d4271..c92a255 100644
> > --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
> > +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
> > @@ -80,6 +80,37 @@ skl_find_link_pll(struct drm_i915_private *dev_priv, int
> > clock)
> > return pll;
> > }
> >
> > +static void
> > +intel_atomic_duplicate_dpll_state(struct drm_i915_private *dev_priv,
> > + struct intel_shared_dpll_state
> > *shared_dpll)
> > +{
> > + enum intel_dpll_id i;
> > +
> > + /* Copy shared dpll state */
> > + for (i = 0; i < dev_priv->num_shared_dpll; i++) {
> > + struct intel_shared_dpll *pll = &dev_priv->shared_dplls[i];
> > +
> > + shared_dpll[i] = pll->state;
> > + }
> > +}
> > +
> > +static struct intel_shared_dpll_state *
> > +intel_atomic_get_shared_dpll_state(struct drm_atomic_state *s)
> > +{
> > + struct intel_atomic_state *state = to_intel_atomic_state(s);
> > +
> > + WARN_ON(!drm_modeset_is_locked(&s->dev-
> > >mode_config.connection_mutex));
> > +
> > + if (!state->dpll_set) {
> > + state->dpll_set = true;
> > +
> > + intel_atomic_duplicate_dpll_state(to_i915(s->dev),
> > + state->shared_dpll);
> > + }
> > +
> > + return state->shared_dpll;
> > +}
> > +
> > /**
> > * intel_get_shared_dpll_by_id - get a DPLL given its id
> > * @dev_priv: i915 device instance
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h
> > b/drivers/gpu/drm/i915/intel_drv.h
> > index 5ee1719..6b02dac 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -1815,8 +1815,6 @@ void intel_crtc_destroy_state(struct drm_crtc *crtc,
> > struct drm_crtc_state *state);
> > struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
> > void intel_atomic_state_clear(struct drm_atomic_state *);
> > -struct intel_shared_dpll_state *
> > -intel_atomic_get_shared_dpll_state(struct drm_atomic_state *s);
> >
> > static inline struct intel_crtc_state *
> > intel_atomic_get_crtc_state(struct drm_atomic_state *state,
> > --
> > 2.5.5
> >
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-01-02 9:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 15:22 [PATCH v2 0/7] Shared DPLL kernel doc and improvements Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 1/7] drm/i915: Introduce intel_release_shared_dpll() Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 2/7] drm/i915: Rename intel_shared_dpll_commit() to _swap_state() Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 3/7] drm/i915: Rename intel_shared_dpll_config to intel_shared_dpll_state Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 4/7] drm/i915: Rename intel_shared_dpll->mode_set() to prepare() Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 5/7] drm/i915: Update kerneldoc for intel_dpll_mgr.c Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 6/7] drm/i915: Add dpll entrypoint for dumping hw state Ander Conselvan de Oliveira
2016-12-29 15:22 ` [PATCH 7/7] drm/i915: Move intel_atomic_get_shared_dpll_state() to intel_dpll_mgr.c Ander Conselvan de Oliveira
2016-12-30 19:04 ` Daniel Vetter
2017-01-02 9:40 ` Conselvan De Oliveira, Ander [this message]
2016-12-29 15:53 ` ✓ Fi.CI.BAT: success for Shared DPLL kernel doc and improvements (rev2) Patchwork
2016-12-30 8:12 ` Ander Conselvan De Oliveira
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=1483350039.2497.0.camel@intel.com \
--to=ander.conselvan.de.oliveira@intel.com \
--cc=daniel@ffwll.ch \
--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