1. 29 8月, 2017 1 次提交
    • C
      drm/i915: Recreate vmapping even when the object is pinned · a575c676
      Chris Wilson 提交于
      Sometimes we know we are the only user of the bo, but since we take a
      protective pin_pages early on, an attempt to change the vmap on the
      object is denied because it is busy. i915_gem_object_pin_map() cannot
      tell from our single pin_count if the operation is safe. Instead we must
      pass that information down from the caller in the manner of
      I915_MAP_OVERRIDE.
      
      This issue has existed from the introduction of the mapping, but was
      never noticed as the only place where this conflict might happen is for
      cached kernel buffers (such as allocated by i915_gem_batch_pool_get()).
      Until recently there was only a single user (the cmdparser) so no
      conflicts ever occurred. However, we now use it to allocate batches for
      different operations (using MAP_WC on !llc for writes) in addition to the
      existing shadow batch (using MAP_WB for reads).
      
      We could either keep both mappings cached, or use a different write
      mechanism if we detect a MAP_WB already exists (i.e. clflush
      afterwards), but as we haven't seen this issue in the wild (it requires
      hitting the GPU reloc path in addition to the cmdparser) for simplicity
      just allow the mappings to be recreated.
      
      v2: Include the i915_MAP_OVERRIDE bit in the enum so the compiler knows
      about all the valid values.
      
      Fixes: 7dd4f672 ("drm/i915: Async GPU relocation processing")
      Testcase: igt/gem_lut_handle # byt, completely by accident
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170828104631.8606-1-chris@chris-wilson.co.ukReviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      a575c676
  2. 17 5月, 2017 1 次提交
  3. 11 4月, 2017 1 次提交
  4. 10 3月, 2017 1 次提交
  5. 07 1月, 2017 1 次提交
  6. 24 11月, 2016 3 次提交
  7. 22 11月, 2016 3 次提交
  8. 29 10月, 2016 1 次提交
  9. 14 10月, 2016 1 次提交
    • A
      drm/i915: Allocate intel_engine_cs structure only for the enabled engines · 3b3f1650
      Akash Goel 提交于
      With the possibility of addition of many more number of rings in future,
      the drm_i915_private structure could bloat as an array, of type
      intel_engine_cs, is embedded inside it.
      	struct intel_engine_cs engine[I915_NUM_ENGINES];
      Though this is still fine as generally there is only a single instance of
      drm_i915_private structure used, but not all of the possible rings would be
      enabled or active on most of the platforms. Some memory can be saved by
      allocating intel_engine_cs structure only for the enabled/active engines.
      Currently the engine/ring ID is kept static and dev_priv->engine[] is simply
      indexed using the enums defined in intel_engine_id.
      To save memory and continue using the static engine/ring IDs, 'engine' is
      defined as an array of pointers.
      	struct intel_engine_cs *engine[I915_NUM_ENGINES];
      dev_priv->engine[engine_ID] will be NULL for disabled engine instances.
      
      There is a text size reduction of 928 bytes, from 1028200 to 1027272, for
      i915.o file (but for i915.ko file text size remain same as 1193131 bytes).
      
      v2:
      - Remove the engine iterator field added in drm_i915_private structure,
        instead pass a local iterator variable to the for_each_engine**
        macros. (Chris)
      - Do away with intel_engine_initialized() and instead directly use the
        NULL pointer check on engine pointer. (Chris)
      
      v3:
      - Remove for_each_engine_id() macro, as the updated macro for_each_engine()
        can be used in place of it. (Chris)
      - Protect the access to Render engine Fault register with a NULL check, as
        engine specific init is done later in Driver load sequence.
      
      v4:
      - Use !!dev_priv->engine[VCS] style for the engine check in getparam. (Chris)
      - Kill the superfluous init_engine_lists().
      
      v5:
      - Cleanup the intel_engines_init() & intel_engines_setup(), with respect to
        allocation of intel_engine_cs structure. (Chris)
      
      v6:
      - Rebase.
      
      v7:
      - Optimize the for_each_engine_masked() macro. (Chris)
      - Change the type of 'iter' local variable to enum intel_engine_id. (Chris)
      - Rebase.
      
      v8: Rebase.
      
      v9: Rebase.
      
      v10:
      - For index calculation use engine ID instead of pointer based arithmetic in
        intel_engine_sync_index() as engine pointers are not contiguous now (Chris)
      - For appropriateness, rename local enum variable 'iter' to 'id'. (Joonas)
      - Use for_each_engine macro for cleanup in intel_engines_init() and remove
        check for NULL engine pointer in cleanup() routines. (Joonas)
      
      v11: Rebase.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1476378888-7372-1-git-send-email-akash.goel@intel.com
      3b3f1650
  10. 16 9月, 2016 1 次提交
  11. 19 8月, 2016 10 次提交
  12. 27 7月, 2016 1 次提交
  13. 06 6月, 2016 1 次提交
  14. 09 5月, 2016 2 次提交
  15. 05 5月, 2016 1 次提交
  16. 21 3月, 2016 5 次提交
  17. 16 3月, 2016 1 次提交
  18. 18 11月, 2015 2 次提交
  19. 06 10月, 2015 1 次提交
  20. 04 9月, 2015 1 次提交
  21. 01 9月, 2015 1 次提交