From: Daniel Vetter <daniel@ffwll.ch>
To: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: Split shared dpll setup out of __intel_set_mode()
Date: Fri, 30 Jan 2015 17:31:59 +0100 [thread overview]
Message-ID: <20150130163159.GH14009@phenom.ffwll.local> (raw)
In-Reply-To: <1422543311-5107-1-git-send-email-ander.conselvan.de.oliveira@intel.com>
On Thu, Jan 29, 2015 at 04:55:08PM +0200, Ander Conselvan de Oliveira wrote:
> This simplifies __intel_set_mode() a little.
>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Merged this one here, please sign up Matt or someone else suitable for the
in-depth review.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 50 ++++++++++++++++++++++++------------
> 1 file changed, 33 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 423ef95..3d220a6 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11021,6 +11021,36 @@ out:
> return pipe_config;
> }
>
> +static int __intel_set_mode_setup_plls(struct drm_device *dev,
> + unsigned modeset_pipes,
> + unsigned disable_pipes)
> +{
> + struct drm_i915_private *dev_priv = to_i915(dev);
> + unsigned clear_pipes = modeset_pipes | disable_pipes;
> + struct intel_crtc *intel_crtc;
> + int ret = 0;
> +
> + if (!dev_priv->display.crtc_compute_clock)
> + return 0;
> +
> + ret = intel_shared_dpll_start_config(dev_priv, clear_pipes);
> + if (ret)
> + goto done;
> +
> + for_each_intel_crtc_masked(dev, modeset_pipes, intel_crtc) {
> + struct intel_crtc_state *state = intel_crtc->new_config;
> + ret = dev_priv->display.crtc_compute_clock(intel_crtc,
> + state);
> + if (ret) {
> + intel_shared_dpll_abort_config(dev_priv);
> + goto done;
> + }
> + }
> +
> +done:
> + return ret;
> +}
> +
> static int __intel_set_mode(struct drm_crtc *crtc,
> struct drm_display_mode *mode,
> int x, int y, struct drm_framebuffer *fb,
> @@ -11058,23 +11088,9 @@ static int __intel_set_mode(struct drm_crtc *crtc,
> prepare_pipes &= ~disable_pipes;
> }
>
> - if (dev_priv->display.crtc_compute_clock) {
> - unsigned clear_pipes = modeset_pipes | disable_pipes;
> -
> - ret = intel_shared_dpll_start_config(dev_priv, clear_pipes);
> - if (ret)
> - goto done;
> -
> - for_each_intel_crtc_masked(dev, modeset_pipes, intel_crtc) {
> - struct intel_crtc_state *state = intel_crtc->new_config;
> - ret = dev_priv->display.crtc_compute_clock(intel_crtc,
> - state);
> - if (ret) {
> - intel_shared_dpll_abort_config(dev_priv);
> - goto done;
> - }
> - }
> - }
> + ret = __intel_set_mode_setup_plls(dev, modeset_pipes, disable_pipes);
> + if (ret)
> + goto done;
>
> for_each_intel_crtc_masked(dev, disable_pipes, intel_crtc)
> intel_crtc_disable(&intel_crtc->base);
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-01-30 16:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 14:55 [PATCH 1/4] drm/i915: Split shared dpll setup out of __intel_set_mode() Ander Conselvan de Oliveira
2015-01-29 14:55 ` [PATCH 2/4] drm/i915: Move pll new_config field into intel_atomic_state Ander Conselvan de Oliveira
2015-01-29 14:55 ` [PATCH 3/4] drm/i915: Move current pll config to shared global state Ander Conselvan de Oliveira
2015-01-29 14:55 ` [PATCH 4/4] drm/i915: Simplify pll state commit by swapping new and old state Ander Conselvan de Oliveira
2015-01-31 21:37 ` shuang.he
2015-01-30 16:31 ` Daniel Vetter [this message]
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=20150130163159.GH14009@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ander.conselvan.de.oliveira@intel.com \
--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