drm/i915: Do not disable cxsr when crtc is disabled.
It's safe to assume cxsr is already disabled when the crtc is off.
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@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1454514805-10595-4-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>