[Intel-gfx] [PATCH 3/3] drm/i915: Do not disable cxsr when crtc is disabled.
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Feb 3 16:12:00 UTC 2016
On Wed, Feb 03, 2016 at 04:53:25PM +0100, Maarten Lankhorst wrote:
> It's safe to assume cxsr is already disabled when the crtc is off.
Hmm. Yeah, looks like that's how we set it up currently. I thought we
might leave it on with 0 active pipes, but I guess not.
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> This prevents an unclaimed register warning when the required power
> wells are not enabled.
>
> [ 262.864984] ------------[ cut here ]------------
> [ 262.865025] WARNING: CPU: 1 PID: 6799 at drivers/gpu/drm/i915/intel_uncore.c:638 __unclaimed_reg_debug+0x68/0x80 [i915]()
> [ 262.865029] Unclaimed register detected before reading register 0x186500
> [ 262.865032] Modules linked in: i915 intel_powerclamp
> [ 262.865057] CPU: 1 PID: 6799 Comm: kms_pipe_crc_ba Tainted: G U W 4.4.0-gfxbench+ #1
> [ 262.865060] Hardware name: DN2820FYK, BIOS FYBYT10H.86A.0038.2014.0717.1455 07/17/2014
> [ 262.865064] ffffffffa0338cf8 ffff88007448ba78 ffffffff813df90c ffff88007448bac0
> [ 262.865071] ffff88007448bab0 ffffffff810746e1 0000000000186500 0000000000000001
> [ 262.865077] 0000000000000001 ffff880074420000 0000000000000000 ffff88007448bb10
> [ 262.865083] Call Trace:
> [ 262.865092] [<ffffffff813df90c>] dump_stack+0x4e/0x82
> [ 262.865098] [<ffffffff810746e1>] warn_slowpath_common+0x81/0xc0
> [ 262.865102] [<ffffffff81074767>] warn_slowpath_fmt+0x47/0x50
> [ 262.865128] [<ffffffffa02a07e8>] __unclaimed_reg_debug+0x68/0x80 [i915]
> [ 262.865154] [<ffffffffa02a0e4e>] vlv_read32+0x2de/0x370 [i915]
> [ 262.865173] [<ffffffffa0256837>] intel_set_memory_cxsr+0x87/0x1a0 [i915]
> [ 262.865200] [<ffffffffa02c4cb3>] intel_pre_plane_update+0xb3/0xf0 [i915]
> [ 262.865228] [<ffffffffa02c54b5>] intel_atomic_commit+0x3b5/0x17c0 [i915]
> [ 262.865234] [<ffffffff8150dc45>] ? drm_atomic_check_only+0x145/0x660
> [ 262.865239] [<ffffffff8150d75a>] ? drm_atomic_set_crtc_for_connector+0x6a/0xe0
> [ 262.865243] [<ffffffff8150e192>] drm_atomic_commit+0x32/0x50
> [ 262.865249] [<ffffffff814eb155>] drm_atomic_helper_set_config+0x75/0xb0
> [ 262.865253] [<ffffffff814fd090>] drm_mode_set_config_internal+0x60/0x110
> [ 262.865258] [<ffffffff81501e26>] drm_mode_setcrtc+0x186/0x4f0
> [ 262.865263] [<ffffffff814f3eed>] drm_ioctl+0x13d/0x590
> [ 262.865267] [<ffffffff81501ca0>] ? drm_mode_setplane+0x1b0/0x1b0
> [ 262.865273] [<ffffffff811d4c4c>] do_vfs_ioctl+0x2fc/0x550
> [ 262.865278] [<ffffffff8118d5ea>] ? vm_munmap+0x4a/0x60
> [ 262.865283] [<ffffffff811e06ba>] ? __fget_light+0x6a/0x90
> [ 262.865287] [<ffffffff811d4edc>] SyS_ioctl+0x3c/0x70
> [ 262.865292] [<ffffffff8179a75b>] entry_SYSCALL_64_fastpath+0x16/0x73
> [ 262.865296] ---[ end trace 6387a0ad001bb39f ]---
>
> Testcase: kms_flip.basic-flip-vs-wf_vblank
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93698
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c7f2a18ab34e..4fcbdd6037a4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -4837,7 +4837,9 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state)
>
> if (pipe_config->disable_cxsr) {
> crtc->wm.cxsr_allowed = false;
> - intel_set_memory_cxsr(dev_priv, false);
> +
> + if (old_crtc_state->base.active)
> + intel_set_memory_cxsr(dev_priv, false);
> }
>
> if (!needs_modeset(&pipe_config->base) && pipe_config->wm_changed)
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list