From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 03/20] drm/i915: Fix noatomic crtc disabling.
Date: Wed, 08 Jul 2015 10:50:13 +0200 [thread overview]
Message-ID: <559CE445.5060502@linux.intel.com> (raw)
In-Reply-To: <20150708081235.GA7945@patrik-dev-mach>
Op 08-07-15 om 10:12 schreef Patrik Jakobsson:
> On Tue, Jul 07, 2015 at 04:14:01PM +0200, Maarten Lankhorst wrote:
>> Op 07-07-15 om 14:39 schreef Patrik Jakobsson:
>>> On Tue, Jul 07, 2015 at 12:22:12PM +0200, Maarten Lankhorst wrote:
>>>> Op 07-07-15 om 11:18 schreef Daniel Vetter:
>>>>> On Tue, Jul 07, 2015 at 09:08:14AM +0200, Maarten Lankhorst wrote:
>>>>>> This should fix suspend on newer platforms.
>>>>> Which patch broke this? Also what is "newer platform" and what exactly got
>>>>> fixed? Please elaborate a bit more in your commit messages, they're too
>>>>> terse.
>>>> There were a lot of warnings about active mismatches and power well not being idle on suspend.
>>>>
>>>> This should fix the power well by disabling the shared dpll and unsetting crtc->active.
>>> This got broken by:
>>>
>>> commit eddfcbcdc27fbecb33bff098967bbdd7ca75bfa6
>>> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>> Date: Mon Jun 15 12:33:53 2015 +0200
>>>
>>> drm/i915: Update less state during modeset.
>>>
>>> No need to repeatedly call update_watermarks, or update_fbc.
>>> Down to a single call to update_watermarks in .crtc_enable
>>>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
>>> Tested-by(IVB): Matt Roper <matthew.d.roper@intel.com>
>>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>
>>> Unfortunately the patch doesn't fix the CAT_ERR on resume I'm experiencing on
>>> SKL. An additional intel_update_watermarks() is needed to set DDB back to 0,0.
>>> Also this is required in *_crtc_disable() since we forget to do the same thing
>>> there. Not sure we also need to take care of disabling fbc at these places?
>> I would prefer to have this fix, and leave updating the watermark code out of crtc disable.
>>
>> Does it work If you add a intel_update_watermarks to the noatomic function?
> No that doesn't help. The only other callsite I can find is __intel_set_mode()
> so I guess watermarks need updating there as well.
Did you add it after the line that sets crtc->active = false?
And the watermark update is forced by intel_crtc_atomic_check, if you need 2 wm updates post disable
that seems like a bug..
In any case below should work then.
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6ddb462b4124..c1f7dfb62909 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6179,6 +6179,9 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
for_each_power_domain(domain, domains)
intel_display_power_put(dev_priv, domain);
intel_crtc->enabled_power_domains = 0;
+ intel_crtc->active = false;
+ intel_disable_shared_dpll(intel_crtc);
+ intel_update_watermarks(crtc);
}
/*
@@ -13158,7 +13161,8 @@ static int __intel_set_mode(struct drm_atomic_state *state)
if (needs_modeset(crtc->state) && crtc->state->active) {
update_scanline_offset(to_intel_crtc(crtc));
dev_priv->display.crtc_enable(crtc);
- }
+ } else if (!crtc->state->active && crtc_state->active)
+ intel_update_watermarks(crtc);
drm_atomic_helper_commit_planes_on_crtc(crtc_state);
}
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-08 8:50 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 7:08 [PATCH v2 00/20] Convert to atomic, part 4 Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 01/20] drm/atomic: add connectors_changed to separate it from mode_changed Maarten Lankhorst
2015-07-07 8:59 ` Daniel Vetter
2015-07-07 10:05 ` Maarten Lankhorst
2015-07-07 12:03 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 02/20] drm: Don't update plane properties for atomic planes if it stays the same Maarten Lankhorst
2015-07-07 9:18 ` [Intel-gfx] " Daniel Vetter
2015-07-07 10:20 ` Maarten Lankhorst
2015-07-07 12:10 ` [Intel-gfx] " Daniel Vetter
2015-07-07 14:32 ` Maarten Lankhorst
2015-07-07 16:40 ` Daniel Vetter
2015-07-07 15:08 ` Maarten Lankhorst
2015-07-07 16:43 ` Daniel Vetter
2015-07-08 8:00 ` [Intel-gfx] " Maarten Lankhorst
2015-07-08 8:55 ` Daniel Vetter
2015-07-08 16:35 ` Maarten Lankhorst
2015-07-08 17:52 ` [Intel-gfx] " Daniel Vetter
2015-07-08 18:25 ` Maarten Lankhorst
2015-07-08 20:12 ` Daniel Vetter
2015-07-13 8:59 ` Maarten Lankhorst
2015-07-13 9:13 ` [Intel-gfx] " Daniel Vetter
2015-07-13 9:23 ` Maarten Lankhorst
2015-07-13 9:45 ` Daniel Vetter
2015-07-13 9:49 ` Maarten Lankhorst
2015-07-13 10:06 ` [Intel-gfx] " Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 03/20] drm/i915: Fix noatomic crtc disabling Maarten Lankhorst
2015-07-07 9:18 ` Daniel Vetter
2015-07-07 10:22 ` Maarten Lankhorst
2015-07-07 12:39 ` Patrik Jakobsson
2015-07-07 14:14 ` Maarten Lankhorst
2015-07-08 8:12 ` Patrik Jakobsson
2015-07-08 8:50 ` Maarten Lankhorst [this message]
2015-07-07 7:08 ` [PATCH v2 04/20] drm/i915: Do not update pfit state when toggling crtc enabled Maarten Lankhorst
2015-07-07 9:26 ` Daniel Vetter
2015-07-07 10:46 ` Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 05/20] drm/i915: Do not use plane_config in intel_fbdev.c Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 06/20] drm/i915: Allow fuzzy matching in pipe_config_compare Maarten Lankhorst
2015-07-07 10:11 ` Daniel Vetter
2015-07-08 8:38 ` Maarten Lankhorst
2015-07-08 9:09 ` Daniel Vetter
2015-07-08 9:18 ` Maarten Lankhorst
2015-07-08 9:33 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 07/20] drm/i915: Rework primary plane stuff slightly Maarten Lankhorst
2015-07-07 11:16 ` Daniel Vetter
2015-07-07 14:02 ` Maarten Lankhorst
2015-07-08 9:27 ` Daniel Vetter
2015-07-08 12:36 ` Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 08/20] drm/i915: fill in more mode members Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 09/20] drm/i915: Fill in more crtc state, v2 Maarten Lankhorst
2015-07-07 10:28 ` Daniel Vetter
2015-07-13 9:32 ` Maarten Lankhorst
2015-07-13 9:48 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 10/20] drm/i915: Convert suspend/resume to atomic Maarten Lankhorst
2015-07-07 9:57 ` Daniel Vetter
2015-07-07 10:33 ` Maarten Lankhorst
2015-07-07 13:14 ` Daniel Vetter
2015-07-07 13:20 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 11/20] drm/i915: Update power domains on readout Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 12/20] drm/i915: skip modeset if compatible, and enable fastboot for everyone, v2 Maarten Lankhorst
2015-07-07 10:14 ` Daniel Vetter
2015-07-07 10:34 ` Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 13/20] drm/i915: Always reset in intel_crtc_restore_mode Maarten Lankhorst
2015-07-07 10:17 ` Daniel Vetter
2015-07-07 10:48 ` Maarten Lankhorst
2015-07-07 13:16 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 14/20] drm/i915: Make intel_display_suspend atomic, try 2 Maarten Lankhorst
2015-07-07 9:48 ` Daniel Vetter
2015-07-07 10:50 ` Maarten Lankhorst
2015-07-07 13:21 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 15/20] drm/i915: Use full atomic modeset Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 16/20] drm/i915: Call plane update functions directly from intel_atomic_commit Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 17/20] drm/i915: always disable irqs in intel_pipe_update_start Maarten Lankhorst
2015-07-07 7:08 ` [PATCH v2 18/20] drm/i915: Only commit planes on crtc's that have changed planes Maarten Lankhorst
2015-07-07 9:33 ` Daniel Vetter
2015-07-07 10:51 ` Maarten Lankhorst
2015-07-07 13:22 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 19/20] drm/i915: Remove use of runtime pm in atomic commit functions Maarten Lankhorst
2015-07-07 10:19 ` Daniel Vetter
2015-07-07 7:08 ` [PATCH v2 20/20] drm/i915: Skip modeset checks when modeset is prevented Maarten Lankhorst
2015-07-07 13:42 ` [PATCH v2 00/20] Convert to atomic, part 4 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=559CE445.5060502@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=patrik.jakobsson@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