1. 03 7月, 2020 1 次提交
  2. 27 6月, 2020 1 次提交
  3. 23 6月, 2020 1 次提交
    • J
      drm/i915/params: switch to device specific parameters · 8a25c4be
      Jani Nikula 提交于
      Start using device specific parameters instead of module parameters for
      most things. The module parameters become the immutable initial values
      for i915 parameters. The device specific parameters in i915->params
      start life as a copy of i915_modparams. Any later changes are only
      reflected in the debugfs.
      
      The stragglers are:
      
      * i915.force_probe and i915.modeset. Needed before dev_priv is
        available. This is fine because the parameters are read-only and never
        modified.
      
      * i915.verbose_state_checks. Passing dev_priv to I915_STATE_WARN and
        I915_STATE_WARN_ON would result in massive and ugly churn. This is
        handled by not exposing the parameter via debugfs, and leaving the
        parameter writable in sysfs. This may be fixed up in follow-up work.
      
      * i915.inject_probe_failure. Only makes sense in terms of the module,
        not the device. This is handled by not exposing the parameter via
        debugfs.
      
      v2: Fix uc i915 lookup code (Michał Winiarski)
      
      Cc: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
      Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: NMichał Winiarski <michal.winiarski@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200618150402.14022-1-jani.nikula@intel.com
      8a25c4be
  4. 10 6月, 2020 1 次提交
    • M
      drm/i915/rkl: RKL uses ABOX0 for pixel transfers · 62afef28
      Matt Roper 提交于
      Rocket Lake uses the same 'abox0' mechanism to handle pixel data
      transfers from memory that gen11 platforms used, rather than the
      abox1/abox2 interfaces used by TGL/DG1.  For the most part this is a
      hardware implementation detail that's transparent to driver software,
      but we do have to program a couple of tuning registers (MBUS_ABOX_CTL
      and BW_BUDDY registers) according to which ABOX instances are used by a
      platform.  Let's track the platform's ABOX usage in the device info
      structure and use that to determine which instances of these registers
      to program.
      
      As an exception to this rule is that even though TGL/DG1 use ABOX1+ABOX2
      for data transfers, we're still directed to program the ABOX_CTL
      register for ABOX0; so we'll handle that as a special case.
      
      v2:
       - Store the mask of platform-specific abox registers in the device
         info structure.
       - Add a TLB_REQ_TIMER() helper macro.  (Aditya)
      
      v3:
       - Squash ABOX and BW_BUDDY patches together and use a single mask for
         both of them, plus a special-case for programming the ABOX0 instance
         on all gen12.  (Ville)
      
      Bspec: 50096
      Bspec: 49218
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Aditya Swarup <aditya.swarup@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200606025740.3308880-2-matthew.d.roper@intel.comReviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      62afef28
  5. 20 5月, 2020 1 次提交
  6. 19 5月, 2020 1 次提交
  7. 16 5月, 2020 3 次提交
  8. 23 4月, 2020 1 次提交
  9. 21 4月, 2020 3 次提交
  10. 18 4月, 2020 7 次提交
  11. 17 4月, 2020 2 次提交
  12. 16 4月, 2020 1 次提交
  13. 26 3月, 2020 1 次提交
    • J
      drm/i915/display_power: use struct drm_device based logging · 3c4e3870
      Jani Nikula 提交于
      Convert all the DRM_* logging macros to the struct drm_device based
      macros to provide device specific logging.
      
      No functional changes.
      
      Generated using the following semantic patch, originally written by
      Wambui Karuga <wambui.karugax@gmail.com>, with manual fixups on top:
      
      @@
      identifier fn, T;
      @@
      
      fn(...,struct drm_i915_private *T,...) {
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_NOTE(
      +drm_notice(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      @@
      identifier fn, T;
      @@
      
      fn(...) {
      ...
      struct drm_i915_private *T = ...;
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_NOTE(
      +drm_notice(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      Cc: Wambui Karuga <wambui.karugax@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/25e56d1b7df3b1e91024eb969fb839fdcbdcb35e.1584714939.git.jani.nikula@intel.com
      3c4e3870
  14. 02 3月, 2020 2 次提交
  15. 27 2月, 2020 1 次提交
  16. 23 2月, 2020 1 次提交
  17. 22 2月, 2020 1 次提交
  18. 21 2月, 2020 2 次提交
  19. 19 2月, 2020 1 次提交
  20. 16 2月, 2020 1 次提交
  21. 06 2月, 2020 3 次提交
    • S
      drm/i915: Manipulate DBuf slices properly · 0f0f9aee
      Stanislav Lisovskiy 提交于
      Start manipulating DBuf slices as a mask,
      but not as a total number, as current approach
      doesn't give us full control on all combinations
      of slices, which we might need(like enabling S2
      only can't enabled by setting enabled_slices=1).
      
      Removed wrong code from intel_get_ddb_size as
      it doesn't match to BSpec. For now still just
      use DBuf slice until proper algorithm is implemented.
      
      Other minor code refactoring to get prepared
      for major DBuf assignment changes landed:
      - As now enabled slices contain a mask
        we still need some value which should
        reflect how much DBuf slices are supported
        by the platform, now device info contains
        num_supported_dbuf_slices.
      - Removed unneeded assertion as we are now
        manipulating slices in a more proper way.
      
      v2: Start using enabled_slices in dev_priv
      
      v3: "enabled_slices" is now "enabled_dbuf_slices_mask",
          as this now sits in dev_priv independently.
      
      v4: - Fixed debug print formatting to hex(Matt Roper)
          - Optimized dbuf slice updates to be used only
            if slice union is different from current conf(Matt Roper)
          - Fixed some functions to be static(Matt Roper)
          - Created a parameterized version for DBUF_CTL to
            simplify DBuf programming cycle(Matt Roper)
          - Removed unrequred field from GEN10_FEATURES(Matt Roper)
      
      v5: - Removed redundant programming dbuf slices helper(Ville Syrjälä)
          - Started to use parameterized loop for hw readout to get slices
            (Ville Syrjälä)
          - Added back assertion checking amount of DBUF slices enabled
            after DC states 5/6 transition, also added new assertion
            as starting from ICL DMC seems to restore the last DBuf
            power state set, rather than power up all dbuf slices
            as assertion was previously expecting(Ville Syrjälä)
      
      v6: - Now using enum for DBuf slices in this patch (Ville Syrjälä)
          - Removed gen11_assert_dbuf_enabled and put gen9_assert_dbuf_enabled
            back, as we really need to have a single unified assert here
            however currently enabling always slice 1 is enforced by BSpec,
            so we will have to OR enabled slices mask with 1 in order
            to be consistent with BSpec, that way we can unify that
            assertion and against the actual state from the driver, but
            not some hardcoded value.(concluded with Ville)
          - Remove parameterized DBUF_CTL version, to extract it to another
            patch.(Ville Syrjälä)
      v7:
          - Removed unneeded hardcoded return value for older gens from
            intel_enabled_dbuf_slices_mask - this now is handled in a
            unified manner since device info anyway returns max dbuf slices
            as 1 for older platforms(Matthew Roper)
          - Now using INTEL_INFO(dev_priv)->num_supported_dbuf_slices instead
            of intel_dbuf_max_slices function as it is trivial(Matthew Roper)
      
      v8: - Fixed icl_dbuf_disable to disable all dbufs still(Ville Syrjälä)
      
      v9: - Renamed _DBUF_CTL_S to DBUF_CTL_S(Ville Syrjälä)
          - Now using power_domain mutex to protect from race condition, which
            can occur because intel_dbuf_slices_update might be running in
            parallel to gen9_dc_off_power_well_enable being called from
            intel_dp_detect for instance, which causes assertion triggered by
            race condition, as gen9_assert_dbuf_enabled might preempt this
            when registers were already updated, while dev_priv was not.
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200202230630.8975-6-stanislav.lisovskiy@intel.com
      0f0f9aee
    • S
      drm/i915: Introduce parameterized DBUF_CTL · 2570b7e3
      Stanislav Lisovskiy 提交于
      Now start using parameterized DBUF_CTL instead
      of hardcoded, this would allow shorter access
      functions when reading or storing entire state.
      
      Tried to implement it in a MMIO_PIPE manner, however
      DBUF_CTL1 address is higher than DBUF_CTL2, which
      implies that we have to now subtract from base
      rather than add.
      
      v2: - Removed unneeded DBUF_CTL_DIST and DBUF_CTL_ADDR
            macros. Started to use _PICK construct as suggested
            by Matt Roper.
      
      v3: - _DBUF_CTL_S* to DBUF_CTL_S*, changed X to "slice"
            in macro(Ville Syrjälä)
          - Introduced enum for enumerating DBUF slices(Ville Syrjälä)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200202230630.8975-5-stanislav.lisovskiy@intel.com
      2570b7e3
    • S
      drm/i915: Remove skl_ddl_allocation struct · 072fcc30
      Stanislav Lisovskiy 提交于
      Current consensus that it is redundant as
      we already have skl_ddb_values struct out there,
      also this struct contains only single member
      which makes it unnecessary.
      
      v2: As dirty_pipes soon going to be nuked away
          from skl_ddb_values, evacuating enabled_slices
          to safer in dev_priv.
      
      v3: Changed "enabled_slices" to be "enabled_dbuf_slices_num"
          (Matt Roper)
      
      v4: - Wrapped the line getting number of dbuf slices(Matt Roper)
          - Removed indeed redundant skl_ddb_values declaration(Matt Roper)
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200202230630.8975-2-stanislav.lisovskiy@intel.com
      072fcc30
  22. 04 2月, 2020 1 次提交
    • C
      drm/i915/display: Defer application of initial chv_phy_control · 1a2466fe
      Chris Wilson 提交于
      To write to the DISPLAY_PHY_CONTROL requires holding the powerwells,
      which during early resume we have not yet acquired until later in
      intel_display_power_init_hw(). So compute the initial chv_phy_control,
      but leave the HW unset until we first acquire the powerwell.
      
      <7> [120.055984] i915 0000:00:02.0: [drm:intel_power_domains_init_hw [i915]] rawclk rate: 200000 kHz
      <4> [120.056381] ------------[ cut here ]------------
      <4> [120.056621] i915 0000:00:02.0: Unclaimed write to register 0x1e0100
      <4> [120.056924] WARNING: CPU: 1 PID: 164 at drivers/gpu/drm/i915/intel_uncore.c:1166 __unclaimed_reg_debug+0x69/0x80 [i915]
      <4> [120.056935] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel i915 bluetooth coretemp crct10dif_pclmul crc32_pclmul snd_hda_intel snd_intel_dspcfg snd_hda_codec ghash_clmulni_intel snd_hwdep ecdh_generic ecc snd_hda_core r8169 snd_pcm lpc_ich realtek pinctrl_cherryview i2c_designware_pci prime_numbers
      <4> [120.057027] CPU: 1 PID: 164 Comm: kworker/u4:3 Tainted: G     U            5.5.0-CI-CI_DRM_7854+ #1
      <4> [120.057038] Hardware name:  /NUC5CPYB, BIOS PYBSWCEL.86A.0055.2016.0812.1130 08/12/2016
      <4> [120.057058] Workqueue: events_unbound async_run_entry_fn
      <4> [120.057275] RIP: 0010:__unclaimed_reg_debug+0x69/0x80 [i915]
      <4> [120.057289] Code: 48 8b 78 18 48 8b 5f 50 48 85 db 74 2d e8 1f a0 3f e1 45 89 e8 48 89 e9 48 89 da 48 89 c6 48 c7 c7 00 8c 48 a0 e8 67 82 df e0 <0f> 0b 83 2d ce e2 2b 00 01 5b 5d 41 5c 41 5d c3 48 8b 1f eb ce 66
      <4> [120.057301] RSP: 0018:ffffc90000bcfd08 EFLAGS: 00010082
      <4> [120.057315] RAX: 0000000000000000 RBX: ffff888079919b60 RCX: 0000000000000003
      <4> [120.057326] RDX: 0000000080000003 RSI: 0000000000000000 RDI: 00000000ffffffff
      <4> [120.057336] RBP: ffffffffa04c9f4e R08: 0000000000000000 R09: 0000000000000001
      <4> [120.057348] R10: 0000000025c3d560 R11: 000000006815f798 R12: 0000000000000000
      <4> [120.057359] R13: 00000000001e0100 R14: 0000000000000286 R15: ffffffff8234a76b
      <4> [120.057371] FS:  0000000000000000(0000) GS:ffff888074b00000(0000) knlGS:0000000000000000
      <4> [120.057382] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [120.057393] CR2: 000055f4197df0d8 CR3: 000000006f326000 CR4: 00000000001006e0
      <4> [120.057404] Call Trace:
      <4> [120.057635]  fwtable_write32+0x114/0x1d0 [i915]
      <4> [120.057892]  intel_power_domains_init_hw+0x4ff/0x650 [i915]
      <4> [120.058150]  intel_power_domains_resume+0x3d/0x70 [i915]
      <4> [120.058363]  i915_drm_resume_early+0x97/0xd0 [i915]
      <4> [120.058575]  ? i915_resume_switcheroo+0x30/0x30 [i915]
      <4> [120.058594]  dpm_run_callback+0x64/0x280
      <4> [120.058626]  device_resume_early+0xa7/0xe0
      <4> [120.058652]  async_resume_early+0x14/0x40
      
      v2: Write our expected value of DISPLAY_PHY_CONTROL during sync_hw, so
      that it should always match the driver state after resume.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1089Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200203145016.216692-1-chris@chris-wilson.co.uk
      1a2466fe
  23. 31 1月, 2020 2 次提交
  24. 29 1月, 2020 1 次提交