1. 30 4月, 2019 11 次提交
  2. 29 4月, 2019 1 次提交
  3. 27 4月, 2019 9 次提交
  4. 26 4月, 2019 16 次提交
  5. 25 4月, 2019 3 次提交
    • C
      drm/i915: Allow multiple user handles to the same VM · 1f2b4a7e
      Chris Wilson 提交于
      It was noted that we made the same mistake for VM_ID as for object
      handles, whereby we ensured that we only allocated a single handle for
      one ppgtt. This has the unfortunate consequence for userspace that they
      need to reference count the handles to avoid destroying an active ID. If
      we allow multiple handles to the same ppgtt, userspace can freely
      unreference any handle they own without fear of destroying the same
      handle in use elsewhere.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190425054333.27299-1-chris@chris-wilson.co.uk
      1f2b4a7e
    • C
      drm/i915: Explicitly pin the logical context for execbuf · 8f2a1057
      Chris Wilson 提交于
      In order to separate the reservation phase of building a request from
      its emission phase, we need to pull some of the request alloc activities
      from deep inside i915_request to the surface, GEM_EXECBUFFER.
      
      v2: Be frivolous, use a local drm_i915_private.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190425050143.811-1-chris@chris-wilson.co.uk
      8f2a1057
    • C
      drm/i915: Invert the GEM wakeref hierarchy · 79ffac85
      Chris Wilson 提交于
      In the current scheme, on submitting a request we take a single global
      GEM wakeref, which trickles down to wake up all GT power domains. This
      is undesirable as we would like to be able to localise our power
      management to the available power domains and to remove the global GEM
      operations from the heart of the driver. (The intent there is to push
      global GEM decisions to the boundary as used by the GEM user interface.)
      
      Now during request construction, each request is responsible via its
      logical context to acquire a wakeref on each power domain it intends to
      utilize. Currently, each request takes a wakeref on the engine(s) and
      the engines themselves take a chipset wakeref. This gives us a
      transition on each engine which we can extend if we want to insert more
      powermangement control (such as soft rc6). The global GEM operations
      that currently require a struct_mutex are reduced to listening to pm
      events from the chipset GT wakeref. As we reduce the struct_mutex
      requirement, these listeners should evaporate.
      
      Perhaps the biggest immediate change is that this removes the
      struct_mutex requirement around GT power management, allowing us greater
      flexibility in request construction. Another important knock-on effect,
      is that by tracking engine usage, we can insert a switch back to the
      kernel context on that engine immediately, avoiding any extra delay or
      inserting global synchronisation barriers. This makes tracking when an
      engine and its associated contexts are idle much easier -- important for
      when we forgo our assumed execution ordering and need idle barriers to
      unpin used contexts. In the process, it means we remove a large chunk of
      code whose only purpose was to switch back to the kernel context.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-5-chris@chris-wilson.co.uk
      79ffac85