1. 15 3月, 2017 5 次提交
    • A
      drm/i915/guc: Simplify intel_guc_init_hw() · 6cd5a72c
      Arkadiusz Hiler 提交于
      Current version of intel_guc_init_hw() does a lot:
       - cares about submission
       - loads huc
       - implement WA
      
      This change offloads some of the logic to intel_uc_init_hw(), which now
      cares about the above.
      
      v2: rename guc_hw_reset and fix typo in define name (M. Wajdeczko)
      v3: rename once again
      v4: remove spurious comments and add some style (J. Lahtinen)
      v5: flow changes, got rid of dead checks (M. Wajdeczko)
      v6: rebase
      v7: rebase & onion teardown (J. Lahtinen)
      
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      6cd5a72c
    • A
      drm/i915/guc: Extract param logic form guc_init_fw() · d2be9f2f
      Arkadiusz Hiler 提交于
      Let intel_guc_init_fw() focus on determining and fetching the correct
      firmware.
      
      This patch introduces intel_uc_sanitize_options() that is called from
      intel_sanitize_options().
      
      Then, if we have GuC, we can call intel_guc_init_fw() conditionally
      and we do not have to do the internal checks.
      
      v2: fix comment, notify when nuking GuC explicitly enabled (M. Wajdeczko)
      v3: fix comment again, change the nuke message (M. Wajdeczko)
      v4: update title to reflect new function name + rebase
      v5: text && remove 2 uneccessary checks (M. Wajdeczko)
      
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      d2be9f2f
    • A
      drm/i915/uc: Introduce intel_uc_init_fw() · 29ad6a30
      Arkadiusz Hiler 提交于
      Instead of calling intel_guc_init() and intel_huc_init() one by one this
      patch introduces intel_uc_init_fw() function that calls them both.
      
      Called functions are renamed accordingly.
      
      Trying to have subject_verb_object ordering and more descriptive names,
      the intel_huc_init() and intel_guc_init() functions are renamed.
      
      For guc_init():
       * `intel_guc` is the subject, so those functions now take intel_guc
         structure, instead of the dev_priv
       * init is the verb
       * fw is the object which better describes the function's role
      
      huc_init() change follows the same reasoning.
      
      v2: settle on intel_uc_fetch_fw name (M. Wajdeczko)
      v3: yet another rename - intel_uc_init_fw (J. Lahtinen)
      v4: non-trivial rebase
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      29ad6a30
    • A
      drm/i915/uc: Move intel_uc_fw_fetch() to intel_uc.c · 4c0fed79
      Arkadiusz Hiler 提交于
      The file fits better.
      
      Additionally rename it to intel_uc_prepare_fw(), as the function does
      more than simple fetch.
      
      `obj` cleanup in the function is also fixed (i.e. removed). In the fail
      scenario it was always 'put' but there's no possible flow that
      initializes the obj properly and then goes to the fail label.
      
      v2: remove second declaration, reorder (M. Wajdeczko)
      v3: non-trivial rebase
      v4: remove obj cleanup in the fail scenario (C. Wilson)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      4c0fed79
    • A
      drm/i915/uc: Rename intel_?uc_{setup, load}() to _init_hw() · 882d1db0
      Arkadiusz Hiler 提交于
      GuC historically has two "startup" functions called _init() and _setup()
      
      Then HuC came with it's _init() and _load().
      
      This commit renames intel_guc_setup() and intel_huc_load() to
      *uc_init_hw() as they called from the i915_gem_init_hw().
      
      The aim is to be consistent in that entry points called during
      particular driver init phases (e.g. init_hw) are all suffixed by that
      phase. When reading the leaf functions, it should be clear at what stage
      during the driver load it is called and therefore what operations are
      legal at that point.
      
      Also, since the functions start with intel_guc and intel_huc they take
      appropiate structure.
      
      v2: commit message update (Chris Wilson)
      v3: change taken parameters to be more "semantic" (M. Wajdeczko)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      882d1db0
  2. 12 3月, 2017 1 次提交
  3. 10 3月, 2017 1 次提交
  4. 09 3月, 2017 1 次提交
  5. 15 2月, 2017 1 次提交
  6. 09 2月, 2017 1 次提交
  7. 19 1月, 2017 2 次提交
    • A
      drm/i915/huc: Support HuC authentication · dac84a38
      Anusha Srivatsa 提交于
      The HuC authentication is done by host2guc call. The HuC RSA keys
      are sent to GuC for authentication.
      
      v2: rebased on top of drm-tip. Changed name format and upped
      version 1.7.
      v3: changed wait_for_atomic to wait_for
      v4: rebased. Rename intel_huc_auh() to intel_guc_auth_huc()
      and place the prototype in intel_guc.h,correct the comments.
      v5: rebased. Moved intel_guc_auth_huc from i915_guc_submission.c
      to intel_uc.c.Update dev to dev_priv in intel_guc_auth_huc().
      Renamed HOST2GUC_ACTION_AUTHENTICATE_HUC TO INTEL_GUC_ACTION_
      AUTHENTICATE_HUC
      v6: rebased. Add newline on DRM_ERRORs that already dont have one.
      v7: rebased. Replace wait_for with intel_wait_for_register() since
      the latter employs sleep optimisations for quick responses- as pointed
      out by Chris Wilson.
      v8: rebased. Cleanup the intel_guc_auth_huc() by removing checks
      already performed in earlier functions. Make comments more descriptive.
      v9: rebased. Changed the bias for pinning the HuC object. Move
      intel_guc_auth_huc() to intel_huc.c. Change DRM_DEBUGs to DRM_ERRORs
      in intel_guc_auth_huc(). Add return status to DRM_ERRORs.
      v10: Remove message not required for the user..
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Tested-by: NXiang Haihao <haihao.xiang@intel.com>
      Signed-off-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NPeter Antoine <peter.antoine@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-5-git-send-email-anusha.srivatsa@intel.com
      dac84a38
    • A
      drm/i915/huc: Add HuC fw loading support · bd132858
      Anusha Srivatsa 提交于
      The HuC loading process is similar to GuC. The intel_uc_fw_fetch()
      is used for both cases.
      
      HuC loading needs to be before GuC loading. The WOPCM setting must
      be done early before loading any of them.
      
      v2: rebased on-top of drm-intel-nightly.
          removed if(HAS_GUC()) before the guc call. (D.Gordon)
          update huc_version number of format.
      v3: rebased to drm-intel-nightly, changed the file name format to
          match the one in the huc package.
          Changed dev->dev_private to to_i915()
      v4: moved function back to where it was.
          change wait_for_atomic to wait_for.
      v5: rebased. Changed the year in the copyright message to reflect
      the right year.Correct the comments,remove the unwanted WARN message,
      replace drm_gem_object_unreference() with i915_gem_object_put().Make the
      prototypes in intel_huc.h non-extern.
      v6: rebased. Update the file construction done by HuC. It is similar to
      GuC.Adopted the approach used in-
      https://patchwork.freedesktop.org/patch/104355/ <Tvrtko Ursulin>
      v7: Change dev to dev_priv in macro definition.
      Corrected comments.
      v8: rebased on top of drm-tip. Updated functions intel_huc_load(),
      intel_huc_init() and intel_uc_fw_fetch() to accept dev_priv instead of
      dev. Moved contents of intel_huc.h to intel_uc.h.
      v9: change SKL_FW_ to SKL_HUC_FW_. Add intel_ prefix to guc_wopcm_size().
      Remove unwanted checks in intel_uc.h. Rename huc_fw in struct intel_huc to
      simply fw to avoid redundency.
      v10: rebased. Correct comments. Make intel_huc_fini() accept dev_priv
      instead of dev like intel_huc_init() and intel_huc_load().Move definition
      to i915_guc_reg.h from intel_uc.h. Clean DMA_CTRL bits after HuC DMA
      transfer in huc_ucode_xfer() instead of guc_ucode_xfer(). Add suitable
      WARNs to give extra info.
      v11: rebased. Add proper bias for HuC and make sure there are
      asserts on failure by using guc_ggtt_offset_vma(). Introduce
      intel_huc.c and remove intel_huc_loader.c since it has functions that
      do more than just loading.Correct year in copyright.
      v12: remove invalidates that are not required anymore.
      
      Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Tested-by: NXiang Haihao <haihao.xiang@intel.com>
      Signed-off-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NPeter Antoine <peter.antoine@intel.com>
      Reviewed-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-1-git-send-email-anusha.srivatsa@intel.com
      bd132858
  8. 18 1月, 2017 3 次提交
  9. 13 1月, 2017 1 次提交
  10. 12 1月, 2017 1 次提交
  11. 10 1月, 2017 1 次提交
  12. 28 12月, 2016 1 次提交
  13. 02 12月, 2016 3 次提交
  14. 29 11月, 2016 1 次提交
  15. 26 11月, 2016 1 次提交
  16. 23 11月, 2016 1 次提交
  17. 11 11月, 2016 1 次提交
  18. 25 10月, 2016 3 次提交
    • S
      drm/i915: Support for GuC interrupts · 26705e20
      Sagar Arun Kamble 提交于
      There are certain types of interrupts which Host can receive from GuC.
      GuC ukernel sends an interrupt to Host for certain events, like for
      example retrieve/consume the logs generated by ukernel.
      This patch adds support to receive interrupts from GuC but currently
      enables & partially handles only the interrupt sent by GuC ukernel.
      Future patches will add support for handling other interrupt types.
      
      v2:
      - Use common low level routines for PM IER/IIR programming (Chris)
      - Rename interrupt functions to gen9_xxx from gen8_xxx (Chris)
      - Replace disabling of wake ref asserts with rpm get/put (Chris)
      
      v3:
      - Update comments for more clarity. (Tvrtko)
      - Remove the masking of GuC interrupt, which was kept masked till the
        start of bottom half, its not really needed as there is only a
        single instance of work item & wq is ordered. (Tvrtko)
      
      v4:
      - Rebase.
      - Rename guc_events to pm_guc_events so as to be indicative of the
        register/control block it is associated with. (Chris)
      - Add handling for back to back log buffer flush interrupts.
      
      v5:
      - Move the read & clearing of register, containing Guc2Host message
        bits, outside the irq spinlock. (Tvrtko)
      
      v6:
      - Move the log buffer flush interrupt related stuff to the following
        patch so as to do only generic bits in this patch. (Tvrtko)
      - Rebase.
      
      v7:
      - Remove the interrupts_enabled check from gen9_guc_irq_handler, want to
        process that last interrupt also before disabling the interrupt, sync
        against the work queued by irq handler will be done by caller disabling
        the interrupt.
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      26705e20
    • A
      drm/i915: New structure to contain GuC logging related fields · d6b40b4b
      Akash Goel 提交于
      So far there were 2 fields related to GuC logs in 'intel_guc' structure.
      For the support of capturing GuC logs & storing them in a local buffer,
      multiple new fields would have to be added. This warrants a separate
      structure to contain the fields related to GuC logging state.
      Added a new structure 'intel_guc_log' and instance of it inside
      'intel_guc' structure.
      
      v2: Rebase.
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      d6b40b4b
    • S
      drm/i915: Decouple GuC log setup from verbosity parameter · b1e37103
      Sagar Arun Kamble 提交于
      GuC Log buffer allocation was tied up with verbosity level module param
      i915.guc_log_level. User would be given a provision to enable firmware
      logging at runtime, through a host2guc action, and not necessarily during
      Driver load time. But the address of log buffer can be passed only in
      init params, at firmware load time, so GuC has to be reset and firmware
      needs to be reloaded to pass the log buffer address at runtime.
      To avoid reset of GuC & reload of firmware, allocation of log buffer will
      be done always but logging would be enabled initially on GuC side based on
      the value of module parameter guc_log_level.
      
      v2: Update commit message to describe the constraint with allocation of
          log buffer at runtime. (Tvrtko)
      
      v3: Rebase.
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      b1e37103
  19. 18 10月, 2016 1 次提交
  20. 14 10月, 2016 5 次提交
  21. 27 9月, 2016 1 次提交
  22. 26 9月, 2016 2 次提交
  23. 15 9月, 2016 2 次提交