linux-stable/drivers/gpu/drm/i915
Paulo Zanoni 010cf73d46 drm/i915/fbc: rewrite the multiple_pipes_ok() code for locking
Older FBC platforms have this restriction where FBC can't be enabled
if multiple pipes are enabled. In the current code, we disable FBC
before the second pipe becomes visible.

One of the problems with this code is that the current
multiple_pipes_ok() implementation just iterates through all CRTCs
looking at their states, but it doesn't make sure that the state
locks are grabbed. It also can't just grab the locks for every CRTC
since this would kill one of the biggest advantages of atomic
modesetting.

After the recent FBC changes, we now have the appropriate locks for
the given CRTC, so we can just try to maintain the state of each CRTC
and update it once intel_fbc_pre_update is called.

As a last note, I don't have gen 2/3 machines to test this code. My
current plan is to enable FBC on just the newer platforms, so this
patch is just an attempt to get the gen 2/3 code at least looking
sane, so if one day someone decide to fix FBC on these platforms, they
may have less work to do.

Not-tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> (only on HSW+)
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-16-git-send-email-paulo.r.zanoni@intel.com
2016-01-29 18:15:56 -02:00
..
dvo.h drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
dvo_ch7xxx.c drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
dvo_ch7017.c drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
dvo_ivch.c drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
dvo_ns2501.c drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
dvo_sil164.c drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
dvo_tfp410.c drm/i915: constify intel_dvo_dev_ops structures 2015-12-09 08:21:10 +01:00
i915_cmd_parser.c drm/i915: Type safe register read/write 2015-11-18 15:39:11 +02:00
i915_debugfs.c drm/i915/gen9: Add framework to whitelist specific GPU registers 2016-01-25 16:48:04 +01:00
i915_dma.c drm/i915: Move stolen memory initialization earlier during loading 2016-01-27 17:43:16 +02:00
i915_drv.c drm/i915: refine qemu south bridge detection 2016-01-29 08:56:26 +02:00
i915_drv.h drm/i915/fbc: rewrite the multiple_pipes_ok() code for locking 2016-01-29 18:15:56 -02:00
i915_gem.c drm/i915: Make LRC (un)pinning work on context and engine 2016-01-28 17:23:15 +00:00
i915_gem_batch_pool.c
i915_gem_batch_pool.h
i915_gem_context.c drm/i915: Fix premature LRC unpin in GuC mode 2016-01-28 17:23:15 +00:00
i915_gem_debug.c
i915_gem_dmabuf.c
i915_gem_evict.c drm/i915: Add soft-pinning API for execbuffer 2015-12-09 10:20:17 +00:00
i915_gem_execbuffer.c Fix pointer tests in error-handling paths 2016-01-28 17:42:14 +00:00
i915_gem_fence.c Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
i915_gem_gtt.c drm/i915: Pass rotation_info to intel_rotate_fb_obj_pages() 2016-01-28 20:56:32 +02:00
i915_gem_gtt.h drm/i915: Rename the rotated gtt view member to 'rotated' 2016-01-28 20:55:55 +02:00
i915_gem_render_state.c drm/i915: mark GEM object pages dirty when mapped & written by the CPU 2015-12-11 18:11:53 +01:00
i915_gem_render_state.h
i915_gem_shrinker.c drm/i915: Sanitize GEM shrinker init and clean-up 2016-01-27 17:43:14 +02:00
i915_gem_stolen.c drm/i915: Allow use of get_dma_address for stolen backed objects 2016-01-05 17:46:27 +01:00
i915_gem_tiling.c drm/i915: get runtime PM reference around GEM set_tiling IOCTL 2015-11-17 18:43:30 +02:00
i915_gem_userptr.c drm/i915: Improve handling of overlapping objects 2016-01-25 19:03:46 +01:00
i915_gpu_error.c drm/i915: abolish separate per-ring default_context pointers 2016-01-21 09:21:29 +01:00
i915_guc_reg.h drm/i915/guc: Add GuC ADS (Addition Data Structure) - allocation 2016-01-05 11:33:34 +01:00
i915_guc_submission.c drm/i915/guc: Decouple GuC engine id from ring id 2016-01-25 10:56:30 +00:00
i915_ioc32.c
i915_irq.c drm/i915/gen8: Factor out display interrupt handling 2016-01-13 10:01:53 +00:00
i915_params.c drm/i915: Decouple struct i915_params i915 into i915_params.h 2015-12-21 14:35:03 +01:00
i915_params.h drm/i915: Reorder i915_params struct. 2015-12-21 14:35:12 +01:00
i915_reg.h drm/i915/skl: Enable Per context Preemption granularity control 2016-01-25 16:48:52 +01:00
i915_suspend.c drm/i915/fbc: rename the FBC disable functions 2016-01-29 18:13:33 -02:00
i915_sysfs.c drm/i915: use kobj_to_dev() 2016-01-13 16:40:50 +01:00
i915_trace.h drm/i915: Type safe register read/write 2015-11-18 15:39:11 +02:00
i915_trace_points.c
i915_vgpu.c
i915_vgpu.h drm/i915: Type safe register read/write 2015-11-18 15:39:11 +02:00
intel_acpi.c
intel_atomic.c Revert "drm/i915: Add two-stage ILK-style watermark programming (v10)" 2016-01-20 10:07:22 +01:00
intel_atomic_plane.c drm/i915: Remove commit_plane function pointer. 2016-01-07 13:52:04 +01:00
intel_audio.c Add get_eld audio component for i915/HD-audio 2015-12-11 19:28:27 +01:00
intel_bios.c drm/i915/bios: Fix the sequence size calculations for MIPI seq v3 2016-01-15 11:38:11 +02:00
intel_bios.h drm/i915/bios: add defines for v3 sequence block 2016-01-11 19:16:19 +02:00
intel_crt.c Merge tag 'drm-intel-next-2015-12-18' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-12-23 14:22:09 +10:00
intel_csr.c drm/i915: Demote user facing DMC firmware load failure message 2016-01-19 11:11:58 +01:00
intel_ddi.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued 2016-01-18 08:18:16 +01:00
intel_display.c drm/i915/fbc: rewrite the multiple_pipes_ok() code for locking 2016-01-29 18:15:56 -02:00
intel_dp.c drm/i915: Do not put big intel_crtc_state on the stack 2016-01-20 10:08:54 +00:00
intel_dp_link_training.c
intel_dp_mst.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued 2016-01-18 08:18:16 +01:00
intel_drv.h drm/i915/fbc: rewrite the multiple_pipes_ok() code for locking 2016-01-29 18:15:56 -02:00
intel_dsi.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued 2016-01-18 08:18:16 +01:00
intel_dsi.h drm/i915/dsi: abstract get pclk platform differences 2016-01-08 13:25:12 +02:00
intel_dsi_panel_vbt.c drm/i915/dsi: add debug printing of the new sequence block names 2016-01-11 19:20:59 +02:00
intel_dsi_pll.c drm/i915/dsi: remove unused dsi_rr_formula() 2016-01-08 13:30:55 +02:00
intel_dvo.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
intel_fbc.c drm/i915/fbc: rewrite the multiple_pipes_ok() code for locking 2016-01-29 18:15:56 -02:00
intel_fbdev.c drm/i915: Remove obsolete code from intelfb_alloc() 2015-12-21 17:03:25 +01:00
intel_fifo_underrun.c drm/i915: Introduce bdw_{update,enable,disable}_pipe_irq() 2015-11-26 18:55:39 +02:00
intel_frontbuffer.c
intel_guc.h drm/i915/guc: Decouple GuC engine id from ring id 2016-01-25 10:56:30 +00:00
intel_guc_fwif.h drm/i915/guc: Decouple GuC engine id from ring id 2016-01-25 10:56:30 +00:00
intel_guc_loader.c drm/i915/guc: Fix a memory leak where guc->execbuf_client is not freed 2016-01-18 09:58:49 +00:00
intel_hdmi.c drm/i915: Fix file permissions 2016-01-29 10:16:24 +02:00
intel_hotplug.c drm/i915: intel_hpd_init(): Fix suspend/resume reprobing 2016-01-13 10:49:42 +02:00
intel_i2c.c drm/i915: Separate cherryview from valleyview 2015-12-10 11:07:24 +01:00
intel_lrc.c drm/i915: Fix premature LRC unpin in GuC mode 2016-01-28 17:23:15 +00:00
intel_lrc.h drm/i915: Make LRC (un)pinning work on context and engine 2016-01-28 17:23:15 +00:00
intel_lvds.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
intel_mocs.c drm/i915: Type safe register read/write 2015-11-18 15:39:11 +02:00
intel_mocs.h
intel_modes.c
intel_opregion.c drm/i915/opregion: handle VBT sizes bigger than 6 KB 2015-12-17 11:40:57 +02:00
intel_overlay.c drm/i915: simplify allocation of driver-internal requests 2016-01-21 09:21:29 +01:00
intel_panel.c drm/i915/backlight: prefer dev_priv over dev pointer 2015-12-18 11:37:44 +02:00
intel_pm.c drm/i915: Standardize on 'cpp' for bytes per pixel 2016-01-28 20:56:57 +02:00
intel_psr.c drm/i915: PSR also doesn't have link_entry_time on SKL. 2015-12-11 16:32:56 -08:00
intel_renderstate.h
intel_renderstate_gen6.c
intel_renderstate_gen7.c
intel_renderstate_gen8.c
intel_renderstate_gen9.c
intel_ringbuffer.c drm/i915/gen9: Add WaOCLCoherentLineFlush 2016-01-25 16:49:15 +01:00
intel_ringbuffer.h drm/i915/guc: Decouple GuC engine id from ring id 2016-01-25 10:56:30 +00:00
intel_runtime_pm.c drm/i915: Kill intel_prepare_ddi() 2016-01-12 16:05:12 +02:00
intel_sdvo.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
intel_sdvo_regs.h drm/i915/sdvo: revert bogus kernel-doc comments to normal comments 2016-01-20 10:21:34 +02:00
intel_sideband.c
intel_sprite.c drm/i915: Standardize on 'cpp' for bytes per pixel 2016-01-28 20:56:57 +02:00
intel_tv.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
intel_uncore.c drm/i915: Limit the auto arming of mmio debugs on vlv/chv 2016-01-21 11:52:45 +02:00
Kconfig drm/i915: Remove select to deleted STOP_MACHINE from Kconfig 2016-01-25 16:38:39 +01:00
Makefile