1. 11 4月, 2017 1 次提交
  2. 14 3月, 2017 3 次提交
  3. 08 2月, 2017 2 次提交
    • C
      drm/i915: Remove overzealous fence warn on runtime suspend · 83bf6d55
      Chris Wilson 提交于
      The goal of the WARN was to catch when we are still actively using the
      fence as we go into the runtime suspend. However, the reg->pin_count is
      too coarse as it does not distinguish between exclusive ownership of the
      fence register from activity.
      
      I've not improved on the WARN, nor have we captured this WARN in an
      exact igt, but it is showing up regularly in the wild:
      
      [ 1915.935332] WARNING: CPU: 1 PID: 10861 at drivers/gpu/drm/i915/i915_gem.c:2022 i915_gem_runtime_suspend+0x116/0x130 [i915]
      [ 1915.935383] WARN_ON(reg->pin_count)[ 1915.935399] Modules linked in:
       snd_hda_intel i915 drm_kms_helper vgem netconsole scsi_transport_iscsi fuse vfat fat x86_pkg_temp_thermal coretemp intel_cstate intel_uncore snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd mei_me mei serio_raw intel_rapl_perf intel_pch_thermal soundcore wmi acpi_pad i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops drm r8169 mii video [last unloaded: drm_kms_helper]
      [ 1915.935785] CPU: 1 PID: 10861 Comm: kworker/1:0 Tainted: G     U  W       4.9.0-rc5+ #170
      [ 1915.935799] Hardware name: LENOVO 80MX/Lenovo E31-80, BIOS DCCN34WW(V2.03) 12/01/2015
      [ 1915.935822] Workqueue: pm pm_runtime_work
      [ 1915.935845]  ffffc900044fbbf0 ffffffffac3220bc ffffc900044fbc40 0000000000000000
      [ 1915.935890]  ffffc900044fbc30 ffffffffac059bcb 000007e6044fbc60 ffff8801626e3198
      [ 1915.935937]  ffff8801626e0000 0000000000000002 ffffffffc05e5d4e 0000000000000000
      [ 1915.935985] Call Trace:
      [ 1915.936013]  [<ffffffffac3220bc>] dump_stack+0x4f/0x73
      [ 1915.936038]  [<ffffffffac059bcb>] __warn+0xcb/0xf0
      [ 1915.936060]  [<ffffffffac059c4f>] warn_slowpath_fmt+0x5f/0x80
      [ 1915.936158]  [<ffffffffc052d916>] i915_gem_runtime_suspend+0x116/0x130 [i915]
      [ 1915.936251]  [<ffffffffc04f1c74>] intel_runtime_suspend+0x64/0x280 [i915]
      [ 1915.936277]  [<ffffffffac0926f1>] ? dequeue_entity+0x241/0xbc0
      [ 1915.936298]  [<ffffffffac36bb85>] pci_pm_runtime_suspend+0x55/0x180
      [ 1915.936317]  [<ffffffffac36bb30>] ? pci_pm_runtime_resume+0xa0/0xa0
      [ 1915.936339]  [<ffffffffac4514e2>] __rpm_callback+0x32/0x70
      [ 1915.936356]  [<ffffffffac451544>] rpm_callback+0x24/0x80
      [ 1915.936375]  [<ffffffffac36bb30>] ? pci_pm_runtime_resume+0xa0/0xa0
      [ 1915.936392]  [<ffffffffac45222d>] rpm_suspend+0x12d/0x680
      [ 1915.936415]  [<ffffffffac69f6d7>] ? _raw_spin_unlock_irq+0x17/0x30
      [ 1915.936435]  [<ffffffffac0810b8>] ? finish_task_switch+0x88/0x220
      [ 1915.936455]  [<ffffffffac4534bf>] pm_runtime_work+0x6f/0xb0
      [ 1915.936477]  [<ffffffffac074353>] process_one_work+0x1f3/0x4d0
      [ 1915.936501]  [<ffffffffac074678>] worker_thread+0x48/0x4e0
      [ 1915.936523]  [<ffffffffac074630>] ? process_one_work+0x4d0/0x4d0
      [ 1915.936542]  [<ffffffffac074630>] ? process_one_work+0x4d0/0x4d0
      [ 1915.936559]  [<ffffffffac07a2c9>] kthread+0xd9/0xf0
      [ 1915.936580]  [<ffffffffac07a1f0>] ? kthread_park+0x60/0x60
      [ 1915.936600]  [<ffffffffac69fe62>] ret_from_fork+0x22/0x30
      
      In the case the register is pinned, it should be present and we will
      need to invalidate them to be restored upon resume as we cannot expect
      the owner of the pin to call get_fence prior to use after resume.
      
      Fixes: 7c108fd8 ("drm/i915: Move fence cancellation to runtime suspend")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98804Reported-by: NLionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Imre Deak <imre.deak@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
      Link: http://patchwork.freedesktop.org/patch/msgid/20170203125717.8431-1-chris@chris-wilson.co.ukReviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      (cherry picked from commit e0ec3ec6)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      83bf6d55
    • J
      drm/i915: don't warn about Skylake CPU - KabyPoint PCH combo · 85327748
      Jani Nikula 提交于
      Apparently there are machines out there with Skylake CPU and KabyPoint
      PCH. Judging from our driver code, there doesn't seem to be any code
      paths that would do anything different between SunrisePoint and
      KabyPoint PCHs, so it would seem okay to accept the combo without
      warnings.
      
      Fixes: 22dea0be ("drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.")
      References: https://lists.freedesktop.org/archives/intel-gfx/2017-February/118611.htmlReported-by: NRainer Koenig <Rainer.Koenig@ts.fujitsu.com>
      Cc: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: <stable@vger.kernel.org> # v4.8+
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1485956769-26015-1-git-send-email-jani.nikula@intel.com
      (cherry picked from commit 3aac4acb)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      85327748
  4. 07 2月, 2017 1 次提交
    • Z
      drm/i915: make intel_gvt_init() later instead of too early · 26f837e8
      Zhenyu Wang 提交于
      Previously intel_gvt_init() was called very early even before
      MMIO initialization which had several drawbacks:
      - Have to handle MMIO access for initial MMIO state dump if golden
        state firmware is not available
      - Hypervisor detection should depend on pvinfo only instead of detecting
        hypervisor status.
      - Don't know hw resource size e.g aperture, ggtt size to determine
        for vGPU type, etc.
      
      This trys to move intel_gvt_init() call late after required info
      has already been initialized for GVT host.
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      26f837e8
  5. 25 1月, 2017 2 次提交
  6. 19 1月, 2017 2 次提交
    • A
      drm/i915/get_params: Add HuC status to getparams · 5464cd65
      Anusha Srivatsa 提交于
      This patch will allow for getparams to return the status of the HuC.
      As the HuC has to be validated by the GuC this patch uses the validated
      status to show when the HuC is loaded and ready for use. You cannot use
      the loaded status as with the GuC as the HuC is verified after it is
      loaded and is not usable until it is verified.
      
      v2: removed the forewakes as the registers are already force-woken.
           (T.Ursulin)
      v3: rebased on top of drm-tip. Removed any reference to intel_huc.h
      v4: rebased. Rename I915_PARAM_HAS_HUC to I915_PARAM_HUC_STATUS.
      Remove intel_is_huc_valid() since it is used only in one place.
      Put the case of I915_PARAM_HAS_HUC() in the right place.
      v5: rebased. Add a comment to specify that I915_READ(reg)
      does not read garbage value. The register HUC_STATUS2 is force
      woken and no rpm is needed.
      Signed-off-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Signed-off-by: NPeter Antoine <peter.antoine@intel.com>
      Reviewed-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-6-git-send-email-anusha.srivatsa@intel.com
      5464cd65
    • 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
  7. 18 1月, 2017 3 次提交
  8. 12 1月, 2017 1 次提交
  9. 10 1月, 2017 2 次提交
  10. 05 1月, 2017 1 次提交
  11. 24 12月, 2016 1 次提交
  12. 08 12月, 2016 2 次提交
  13. 07 12月, 2016 2 次提交
  14. 02 12月, 2016 9 次提交
  15. 01 12月, 2016 2 次提交
  16. 26 11月, 2016 1 次提交
  17. 25 11月, 2016 1 次提交
  18. 23 11月, 2016 1 次提交
  19. 22 11月, 2016 2 次提交
    • R
      drm/i915: advertise available metrics via sysfs · 442b8c06
      Robert Bragg 提交于
      Each metric set is given a sysfs entry like:
      
      /sys/class/drm/card0/metrics/<guid>/id
      
      This allows userspace to enumerate the specific sets that are available
      for the current system. The 'id' file contains an unsigned integer that
      can be used to open the associated metric set via
      DRM_IOCTL_I915_PERF_OPEN. The <guid> is a globally unique ID for a
      specific OA unit register configuration that can be reliably used by
      userspace as a key to lookup corresponding counter meta data and
      normalization equations.
      
      The guid registry is currently maintained as part of gputop along with
      the XML metric set descriptions and code generation scripts, ref:
      
       https://github.com/rib/gputop
       > gputop-data/guids.xml
       > scripts/update-guids.py
       > gputop-data/oa-*.xml
       > scripts/i915-perf-kernelgen.py
      
       $ make -C gputop-data -f Makefile.xml SYSFS=1 WHITELIST=RenderBasic
      Signed-off-by: NRobert Bragg <robert@sixbynine.org>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: NSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-8-robert@sixbynine.org
      442b8c06
    • R
      drm/i915: Add i915 perf infrastructure · eec688e1
      Robert Bragg 提交于
      Adds base i915 perf infrastructure for Gen performance metrics.
      
      This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64
      properties to configure a stream of metrics and returns a new fd usable
      with standard VFS system calls including read() to read typed and sized
      records; ioctl() to enable or disable capture and poll() to wait for
      data.
      
      A stream is opened something like:
      
        uint64_t properties[] = {
            /* Single context sampling */
            DRM_I915_PERF_PROP_CTX_HANDLE,        ctx_handle,
      
            /* Include OA reports in samples */
            DRM_I915_PERF_PROP_SAMPLE_OA,         true,
      
            /* OA unit configuration */
            DRM_I915_PERF_PROP_OA_METRICS_SET,    metrics_set_id,
            DRM_I915_PERF_PROP_OA_FORMAT,         report_format,
            DRM_I915_PERF_PROP_OA_EXPONENT,       period_exponent,
         };
         struct drm_i915_perf_open_param parm = {
            .flags = I915_PERF_FLAG_FD_CLOEXEC |
                     I915_PERF_FLAG_FD_NONBLOCK |
                     I915_PERF_FLAG_DISABLED,
            .properties_ptr = (uint64_t)properties,
            .num_properties = sizeof(properties) / 16,
         };
         int fd = drmIoctl(drm_fd, DRM_IOCTL_I915_PERF_OPEN, &param);
      
      Records read all start with a common { type, size } header with
      DRM_I915_PERF_RECORD_SAMPLE being of most interest. Sample records
      contain an extensible number of fields and it's the
      DRM_I915_PERF_PROP_SAMPLE_xyz properties given when opening that
      determine what's included in every sample.
      
      No specific streams are supported yet so any attempt to open a stream
      will return an error.
      
      v2:
          use i915_gem_context_get() - Chris Wilson
      v3:
          update read() interface to avoid passing state struct - Chris Wilson
          fix some rebase fallout, with i915-perf init/deinit
      v4:
          s/DRM_IORW/DRM_IOW/ - Emil Velikov
      Signed-off-by: NRobert Bragg <robert@sixbynine.org>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: NSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-2-robert@sixbynine.org
      eec688e1
  20. 17 11月, 2016 1 次提交