1. 26 8月, 2015 29 次提交
  2. 25 8月, 2015 1 次提交
  3. 15 8月, 2015 10 次提交
    • J
      drm/i915: remove excessive scaler debugging messages · 66e28066
      Jani Nikula 提交于
      There's so much scaler debugging messages that it makes other debugging
      hard. Remove them.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66e28066
    • D
      drm/i915: Debugfs interface for GuC submission statistics · 8b417c26
      Dave Gordon 提交于
      This provides a means of reading status and counts relating
      to GuC actions and submissions.
      
      v2:
          Remove surplus blank line in output [Chris Wilson]
      
      v5:
          Added GuC per-engine submission & seqno statistics
      
      v6:
          Add per-ring statistics to client, refactor client-dumper.
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8b417c26
    • A
      drm/i915: Integrate GuC-based command submission · d1675198
      Alex Dai 提交于
      GuC-based submission is mostly the same as execlist mode, up to
      intel_logical_ring_advance_and_submit(), where the context being
      dispatched would be added to the execlist queue; at this point
      we submit the context to the GuC backend instead.
      
      There are, however, a few other changes also required, notably:
      1.  Contexts must be pinned at GGTT addresses accessible by the GuC
          i.e. NOT in the range [0..WOPCM_SIZE), so we have to add the
          PIN_OFFSET_BIAS flag to the relevant GGTT-pinning calls.
      
      2.  The GuC's TLB must be invalidated after a context is pinned at
          a new GGTT address.
      
      3.  GuC firmware uses the one page before Ring Context as shared data.
          Therefore, whenever driver wants to get base address of LRC, we
          will offset one page for it. LRC_PPHWSP_PN is defined as the page
          number of LRCA.
      
      4.  In the work queue used to pass requests to the GuC, the GuC
          firmware requires the ring-tail-offset to be represented as an
          11-bit value, expressed in QWords. Therefore, the ringbuffer
          size must be reduced to the representable range (4 pages).
      
      v2:
          Defer adding #defines until needed [Chris Wilson]
          Rationalise type declarations [Chris Wilson]
      
      v4:
          Squashed kerneldoc patch into here [Daniel Vetter]
      
      v5:
          Update request->tail in code common to both GuC and execlist modes.
          Add a private version of lr_context_update(), as sharing the
              execlist version leads to race conditions when the CPU and
              the GuC both update TAIL in the context image.
          Conversion of error-captured HWS page to string must account
              for offset from start of object to actual HWS (LRC_PPHWSP_PN).
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d1675198
    • D
      drm/i915: Interrupt routing for GuC submission · 4df001d3
      Dave Gordon 提交于
      Turn on interrupt steering to route necessary interrupts to GuC.
      
      v6:
          Rebased
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4df001d3
    • D
      drm/i915: Implementation of GuC submission client · 44a28b1d
      Dave Gordon 提交于
      A GuC client has its own doorbell and workqueue. It maintains the
      doorbell cache line, process description object and work queue item.
      
      A default guc_client is created for the i915 driver to use for
      normal-priority in-order submission.
      
      Note that the created client is not yet ready for use; doorbell
      allocation will fail as we haven't yet linked the GuC's context
      descriptor to the default contexts for each ring (see later patch).
      
      v2:
          Defer adding structure members until needed [Chris Wilson]
          Rationalise type declarations [Chris Wilson]
      
      v5:
          Add GuC per-engine submission & seqno statistics.
          Move wq locking to encompass both get_space() and add_item().
          Take forcewake lock in host2guc_action() [Tom O'Rourke]
      
      v6:
          Fix GuC doorbell cacheline selection code (the
              cacheline-within-page calculation was wrong).
          Rename GuC priorities to make them closer to the names used in
              the GuC firmware source, matching what the autogenerated
              versions will (probably) be.
          Add per-ring statistics to client.
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      44a28b1d
    • A
      drm/i915: Enable GuC firmware log · 4c7e77fc
      Alex Dai 提交于
      Allocate a GEM object to hold GuC log data. A debugfs interface
      (i915_guc_log_dump) is provided to print out the log content.
      
      v2:
          Add struct members at point of use [Chris Wilson]
      
      v6:
          Rebased
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c7e77fc
    • A
      drm/i915: Prepare for GuC-based command submission · bac427f8
      Alex Dai 提交于
      This adds the first of the data structures used to communicate with the
      GuC (the pool of guc_context structures).
      
      We create a GuC-specific wrapper round the GEM object allocator as all
      GEM objects shared with the GuC must be pinned into GGTT space at an
      address that is NOT in the range [0..WOPCM_TOP), as that range of GGTT
      addresses is not accessible to the GuC (from the GuC's point of view,
      it's permanently reserved for other objects such as the BootROM & SRAM).
      
      Later, we will need to allocate additional GuC-sharable objects for the
      submission client(s) and the GuC's debug log.
      
      v2:
          Remove redundant initialisation [Chris Wilson]
          Defer adding struct members until needed [Chris Wilson]
          Local functions should pass dev_priv rather than dev [Chris Wilson]
      
      v5:
          Invalidate GuC TLB after allocating and pinning a new object
      
      v6:
          Rebased
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bac427f8
    • D
      drm/i915: Expose one LRC function for GuC submission mode · 919f1f55
      Dave Gordon 提交于
      GuC submission is basically execlist submission, but with the GuC
      handling the actual writes to the ELSP and the resulting context
      switch interrupts.  So to describe a context for submission via
      the GuC, we need one of the same functions used in execlist mode.
      This commit exposes one such function, changing its name to better
      describe what it does (it's related to logical ring contexts rather
      than to execlists per se).
      
      v2:
          Replaces previous "drm/i915: Move execlists defines from .c to .h"
      
      v3:
          Incorporates a change to one of the functions exposed here that was
              previously part of an internal patch, but which was omitted from
              the version recently committed to drm-intel-nightly:
      	    7a01a0a2 drm/i915/lrc: Update PDPx registers with lri commands
              So we reinstate this change here.
      
      v4:
          Drop v3 change, update function parameters due to collision with
              8ee36152 drm/i915: Convert execlists_ctx_descriptor() for requests
      
      v5:
          Don't expose execlists_update_context() after all. The current
              version is no longer compatible with GuC submission; trying to
              share the execlist version of this function results in both GuC
              and CPU updating TAIL in the context image, with bad results when
              they get out of step. The GuC submission path now has its own
              private version that just updates the ringbuffer start address,
              and not TAIL or PDPx.
      
      v6:
          Rebased
      
      Issue: VIZ-4884
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      919f1f55
    • A
      drm/i915: Debugfs interface to read GuC load status · fdf5d357
      Alex Dai 提交于
      The new node provides access to the status of the GuC-specific loader;
      also the scratch registers used for communication between the i915
      driver and the GuC firmware.
      
      v2:
          Changes to output formats per Chris Wilson's suggestions
      
      v6:
          Rebased
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fdf5d357
    • A
      drm/i915: GuC-specific firmware loader · 33a732f4
      Alex Dai 提交于
      This fetches the required firmware image from the filesystem,
      then loads it into the GuC's memory via a dedicated DMA engine.
      
      This patch is derived from GuC loading work originally done by
      Vinit Azad and Ben Widawsky.
      
      v2:
          Various improvements per review comments by Chris Wilson
      
      v3:
          Removed 'wait' parameter to intel_guc_ucode_load() as firmware
              prefetch is no longer supported in the common firmware loader,
      	per Daniel Vetter's request.
          Firmware checker callback fn now returns errno rather than bool.
      
      v4:
          Squash uC-independent code into GuC-specifc loader [Daniel Vetter]
          Don't keep the driver working (by falling back to execlist mode)
              if GuC firmware loading fails [Daniel Vetter]
      
      v5:
          Clarify WOPCM-related #defines [Tom O'Rourke]
          Delete obsolete code no longer required with current h/w & f/w
              [Tom O'Rourke]
          Move the call to intel_guc_ucode_init() later, so that it can
              allocate GEM objects, and have it fetch the firmware; then
      	intel_guc_ucode_load() doesn't need to fetch it later.
              [Daniel Vetter].
      
      v6:
          Update comment describing intel_guc_ucode_load() [Tom O'Rourke]
      
      Issue: VIZ-4884
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTom O'Rourke <Tom.O'Rourke@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      33a732f4