From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible.
Date: Mon, 14 Sep 2015 15:55:07 +0200 [thread overview]
Message-ID: <20150914135507.GJ3383@phenom.ffwll.local> (raw)
In-Reply-To: <1442223011-15581-2-git-send-email-maarten.lankhorst@linux.intel.com>
On Mon, Sep 14, 2015 at 11:30:11AM +0200, Maarten Lankhorst wrote:
> A fast modeset can only be performed when connectors and active are
> not changed. This prevents a lot of KMS spam when going from a NULL
> mode with 0 connectors to an actual mode.
>
> When a crtc is inactive there's no need to evade either, the changes
> can be applied when the crtc turns on again.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Needs an igt imo.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 21 +++++++++++----------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index deb76c84a307..eddc81c2d459 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12281,7 +12281,7 @@ intel_compare_link_m_n(const struct intel_link_m_n *m_n,
>
> static bool
> intel_pipe_config_compare(struct drm_device *dev,
> - struct intel_crtc_state *current_config,
> + const struct intel_crtc_state *current_config,
> struct intel_crtc_state *pipe_config,
> bool adjust)
> {
> @@ -13013,14 +13013,15 @@ static int intel_atomic_check(struct drm_device *dev,
> if (ret)
> return ret;
>
> - if (intel_pipe_config_compare(state->dev,
> - to_intel_crtc_state(crtc->state),
> - pipe_config, true)) {
> + if (!crtc_state->connectors_changed &&
> + !crtc_state->active_changed &&
> + crtc_state->active &&
> + intel_pipe_config_compare(state->dev,
> + to_intel_crtc_state(crtc->state),
> + pipe_config, true)) {
> crtc_state->mode_changed = false;
> - to_intel_crtc_state(crtc_state)->update_pipe = true;
> - }
> -
> - if (needs_modeset(crtc_state)) {
> + pipe_config->update_pipe = true;
> + } else {
> any_ms = true;
>
> ret = drm_atomic_add_affected_planes(state, crtc);
> @@ -13029,8 +13030,8 @@ static int intel_atomic_check(struct drm_device *dev,
> }
>
> intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config,
> - needs_modeset(crtc_state) ?
> - "[modeset]" : "[fastset]");
> + pipe_config->update_pipe ?
> + "[fastset]" : "[modeset]");
> }
>
> if (any_ms) {
> --
> 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
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-14 13:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 9:30 [PATCH 1/2] drm/i915: Fix fastboot scalers for skylake Maarten Lankhorst
2015-09-14 9:30 ` [PATCH 2/2] drm/i915: Only check pipe state for fast modeset when it's possible Maarten Lankhorst
2015-09-14 13:55 ` Daniel Vetter [this message]
2015-09-14 17:10 ` Daniel Stone
2015-09-23 13:35 ` Maarten Lankhorst
2015-09-16 18:48 ` Jesse Barnes
2015-09-23 11:38 ` Maarten Lankhorst
2015-09-16 18:45 ` [PATCH 1/2] drm/i915: Fix fastboot scalers for skylake Jesse Barnes
2015-09-23 8:55 ` Daniel Vetter
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=20150914135507.GJ3383@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox