linux-stable/drivers/gpu/drm/i915
Dave Gordon a667429b00 drm/i915/guc: refactor doorbell management code
This patch refactors the driver's handling and tracking of doorbells, in
preparation for a later one which will resolve a suspend-resume issue.

There are three resources to be managed:
1. Cachelines: a single line within the client-object's page 0
   is snooped by doorbell hardware for writes from the host.
2. Doorbell registers: each defines one cacheline to be snooped.
3. Bitmap: tracks which doorbell registers are in use.

The doorbell setup/teardown protocol starts with:
1. Pick a cacheline: select_doorbell_cacheline()
2. Find an available doorbell register: assign_doorbell()
(These values are passed to the GuC via the shared context
descriptor; this part of the sequence remains unchanged).

3. Update the bitmap to reflect registers-in-use
4. Prepare the cacheline for use by setting its status to ENABLED
5. Ask the GuC to program the doorbell to snoop the cacheline

and of course teardown is very similar:
6. Set the cacheline to DISABLED
7. Ask the GuC to reprogram the doorbell to stop snooping
8. Record that the doorbell is not in use.

Operations 6-8 (guc_disable_doorbell(), host2guc_release_doorbell(), and
release_doorbell()) were called in sequence from guc_client_free(), but
are now moved into the teardown phase of the common function.

Steps 4-5 (guc_init_doorbell() and host2guc_allocate_doorbell()) were
similarly done as sequential steps in guc_client_alloc(), but since it
turns out that we don't need to be able to do them separately they're
now collected into the setup phase of the common function.

The only new code (and new capability) is the block tagged
    /* Update the GuC's idea of the doorbell ID */
i.e. we can now *change* the doorbell register used by an existing
client, whereas previously it was set once for the entire lifetime
of the client. We will use this new feature in the next patch.

v2: Trivial independent fixes pushed ahead as separate patches.
    MUCH longer commit message :) [Tvrtko Ursulin]

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-14 15:04:07 +01:00
..
dvo.h
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
i915_cmd_parser.c drm/i915: Fix a buch of kerneldoc warnings 2016-06-06 13:04:26 +01:00
i915_debugfs.c drm/i915/guc: add doorbell map to debugfs/i915_guc_info 2016-06-14 15:04:06 +01:00
i915_dma.c drm/i915/bxt: Add WaEnablePooledEuFor2x6 2016-06-14 10:42:35 +01:00
i915_drv.c drm/i915/bxt: Add WaEnablePooledEuFor2x6 2016-06-14 10:42:35 +01:00
i915_drv.h drm/i915:bxt: Enable Pooled EU support 2016-06-14 10:42:35 +01:00
i915_gem.c drm/i915: Support for pread/pwrite from/to non shmem backed objects 2016-06-13 10:04:38 +01:00
i915_gem.h drm/i915: Add GEM debugging Kconfig option 2016-04-14 10:45:40 +01:00
i915_gem_batch_pool.c drm/i915: Propagate error from drm_gem_object_init() 2016-04-28 12:28:58 +03:00
i915_gem_batch_pool.h
i915_gem_context.c drm/i915: Merge legacy+execlists context structs 2016-05-24 15:30:31 +01:00
i915_gem_debug.c
i915_gem_dmabuf.c Linux 4.6-rc3 2016-04-11 19:25:13 +02:00
i915_gem_evict.c drm/i915: Store a i915 backpointer from engine, and use it 2016-05-09 13:41:24 +01:00
i915_gem_execbuffer.c Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued 2016-06-02 09:54:12 +02:00
i915_gem_fence.c drm/i915: Introduce & use new lightweight SGL iterators 2016-05-20 13:43:00 +01:00
i915_gem_gtt.c drm/i915: Add support for mapping an object page by page 2016-06-13 10:03:54 +01:00
i915_gem_gtt.h drm/i915: Add support for mapping an object page by page 2016-06-13 10:03:54 +01:00
i915_gem_render_state.c drm/i915:bxt: Enable Pooled EU support 2016-06-14 10:42:35 +01:00
i915_gem_render_state.h
i915_gem_shrinker.c drm/i915: Store a i915 backpointer from engine, and use it 2016-05-09 13:41:24 +01:00
i915_gem_stolen.c drm/i915/kbl: Add WaSkipStolenMemoryFirstPage for A0 2016-06-08 16:20:23 +03:00
i915_gem_tiling.c Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:58:36 +10:00
i915_gem_userptr.c drm/i915: Introduce & use new lightweight SGL iterators 2016-05-20 13:43:00 +01:00
i915_gpu_error.c drm/i915: Replace "INTEL_INFO->gen == x" checks with IS_GENx 2016-05-11 12:27:27 +01:00
i915_guc_reg.h drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM 2016-05-18 12:49:19 +01:00
i915_guc_submission.c drm/i915/guc: refactor doorbell management code 2016-06-14 15:04:07 +01:00
i915_ioc32.c
i915_irq.c drm/i915: Fix a buch of kerneldoc warnings 2016-06-06 13:04:26 +01:00
i915_params.c drm/i915/guc: enable GuC loading & submission by default 2016-06-07 14:21:58 +01:00
i915_params.h drm/i915: Revert async unpin and nonblocking atomic commit 2016-06-01 09:46:46 +02:00
i915_reg.h drm/i915/bxt: Add WaDisablePooledEuLoadBalancingFix 2016-06-14 10:44:07 +01:00
i915_suspend.c
i915_sysfs.c drm/i915: Rename struct intel_context 2016-05-24 15:27:14 +01:00
i915_trace.h drm/i915: Rename struct intel_context 2016-05-24 15:27:14 +01:00
i915_trace_points.c
i915_vgpu.c drm/i915: Fix a buch of kerneldoc warnings 2016-06-06 13:04:26 +01:00
i915_vgpu.h drm/i915: Use drm_i915_private as the native pointer for intel_uncore.c 2016-05-10 17:20:20 +01:00
intel_acpi.c
intel_atomic.c drm/i915: Revert async unpin and nonblocking atomic commit 2016-06-01 09:46:46 +02:00
intel_atomic_plane.c drm/i915: Revert async unpin and nonblocking atomic commit 2016-06-01 09:46:46 +02:00
intel_audio.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-05-23 11:48:48 -07:00
intel_bios.c drm/i915: Check VBT for port presence in addition to the strap on VLV/CHV 2016-06-07 18:45:43 +03:00
intel_bios.h drm/i915: Parse LFP brightness control field in VBT 2016-05-02 16:17:38 +03:00
intel_color.c
intel_crt.c drm/i915: Give encoders useful names 2016-05-30 17:02:26 +03:00
intel_csr.c drm/i915/kbl: Introduce the first official DMC for Kabylake. 2016-05-05 16:49:01 -07:00
intel_ddi.c drm/i915/bxt: Sanitiy check the PHY lane power down status 2016-06-13 18:46:10 +03:00
intel_display.c drm/i915/bxt: Rename broxton to bxt in PHY/CDCLK function prefixes 2016-06-13 18:46:09 +03:00
intel_dp.c drm/i915: Extract physical display dimensions from VBT 2016-06-02 14:33:09 +03:00
intel_dp_aux_backlight.c drm/i915: Add Backlight Control using DPCD for eDP connectors (v9) 2016-04-26 15:17:54 +03:00
intel_dp_link_training.c
intel_dp_mst.c drm/i915: Give encoders useful names 2016-05-30 17:02:26 +03:00
intel_dpio_phy.c drm/i915: Move VLV HDMI lane reset work around logic to intel_dpio_phy.c 2016-04-29 09:59:00 +03:00
intel_dpll_mgr.c drm/i915: Use crtc->name in debug messages 2016-05-30 17:01:16 +03:00
intel_dpll_mgr.h
intel_drv.h drm/i915/bxt: Rename broxton to bxt in PHY/CDCLK function prefixes 2016-06-13 18:46:09 +03:00
intel_dsi.c drm/i915/dsi: fix bxt split screen and color issue 2016-06-06 09:44:40 +03:00
intel_dsi.h drm/i915/dsi: CABC support for Panel PWM backlight control 2016-05-17 16:12:39 +03:00
intel_dsi_dcs_backlight.c drm/i915/dsi: CABC support for Panel PWM backlight control 2016-05-17 16:12:39 +03:00
intel_dsi_panel_vbt.c drm/i915/dsi: add support for gpio elements on CHV 2016-04-27 09:48:17 +03:00
intel_dsi_pll.c drm/i915: Eliminate {vlv,bxt}_configure_dsi_pll() 2016-04-15 16:25:27 +03:00
intel_dvo.c drm/i915: Give encoders useful names 2016-05-30 17:02:26 +03:00
intel_fbc.c drm/i915: Revert async unpin and nonblocking atomic commit 2016-06-01 09:46:46 +02:00
intel_fbdev.c drm/i915: Don't unregister fbdev's fb twice 2016-06-13 16:27:53 +02:00
intel_fifo_underrun.c
intel_frontbuffer.c
intel_guc.h drm/i915/guc: prefer 'dev_priv' to 'dev' for intra-module functions 2016-06-13 16:47:39 +01:00
intel_guc_fwif.h drm/i915/guc: rework guc_add_workqueue_item() 2016-05-23 14:21:53 +01:00
intel_guc_loader.c drm/i915/guc: prefer 'dev_priv' to 'dev' for intra-module functions 2016-06-13 16:47:39 +01:00
intel_hdmi.c drm/i915: Check VBT for port presence in addition to the strap on VLV/CHV 2016-06-07 18:45:43 +03:00
intel_hotplug.c drm/i915: Small display interrupt handlers tidy 2016-05-09 13:38:16 +01:00
intel_i2c.c drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS 2016-04-12 13:23:17 +03:00
intel_lrc.c drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch 2016-06-08 16:26:23 +03:00
intel_lrc.h drm/i915: Merge legacy+execlists context structs 2016-05-24 15:30:31 +01:00
intel_lvds.c drm/i915: Extract physical display dimensions from VBT 2016-06-02 14:33:09 +03:00
intel_mocs.c drm/i915/mocs: || vs | typo in get_mocs_settings() 2016-06-13 17:38:01 +03:00
intel_mocs.h drm/i915/mocs: Program MOCS for all engines on init 2016-04-14 10:45:40 +01:00
intel_modes.c
intel_opregion.c drm/i915/opregion: Rename init/fini functions to register/unregister 2016-05-23 16:35:50 +01:00
intel_overlay.c Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:58:36 +10:00
intel_panel.c Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-06-02 07:58:36 +10:00
intel_pm.c drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance 2016-06-08 16:27:07 +03:00
intel_psr.c drm/i915/psr: Try to program link training times correctly 2016-05-23 15:10:25 +03: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/bxt: Add WaDisablePooledEuLoadBalancingFix 2016-06-14 10:44:07 +01:00
intel_ringbuffer.h drm/i915: Rename struct intel_context 2016-05-24 15:27:14 +01:00
intel_runtime_pm.c drm/i915/bxt: Rename broxton to bxt in PHY/CDCLK function prefixes 2016-06-13 18:46:09 +03:00
intel_sdvo.c drm/i915: Give encoders useful names 2016-05-30 17:02:26 +03:00
intel_sdvo_regs.h
intel_sideband.c
intel_sprite.c drm/i915: Give meaningful names to all the planes 2016-05-30 17:02:10 +03:00
intel_tv.c drm/i915: Give encoders useful names 2016-05-30 17:02:26 +03:00
intel_uncore.c drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED 2016-05-23 14:21:52 +01:00
intel_vbt_defs.h drm/i915: Extract physical display dimensions from VBT 2016-06-02 14:33:09 +03:00
Kconfig
Kconfig.debug drm/i915: Add GEM debugging Kconfig option 2016-04-14 10:45:40 +01:00
Makefile drm/i915/dsi: Add DCS control for Panel PWM 2016-05-17 16:12:38 +03:00