1. 24 3月, 2018 7 次提交
    • M
      drm/i915/icl: Add Combo PHY DDI Buffer translation tables for Icelake. · 19b904f8
      Manasi Navare 提交于
      These tables are used on voltage vswing sequence initialization on
      Icelake.
      
      The swing_sel on the spec's table is defined in a 4 bits binary like
      1010.  However the register bits are split in upper 1 bit swing_sel
      and lower 3 bits swing sel.
      
      In this table here we store this value as a single value in hex like
      it is mentioned in the Bspec and split it to the upper and lower bit
      values only while programming the registers.
      
      For instance: b1010 is written as 0xA and then while writing to the
      register, the upper 1 bit is obtained by (0xA & 0x8) and shifting by
      appropriate bits while lower 3 bits are obtained by (0xA & 0x7) and
      shifting by appropriate bits.
      
      Some of the columns need to be updated after the spec is updated.
      
      v5 (from Paulo):
      * Checkpatch fixes.
      v4 (from Paulo):
      * Fix minor typo
      * Coding style conformance
      v3:
      * Get rid of HDMI/DVI tables, same as DP (Paulo)
      * Use combo_phy in ddi buf trans table defs (Paulo)
      v2:
      * Added DW4_scaling_hex column to the translation tables (Rodrigo)
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180323172419.24911-3-paulo.r.zanoni@intel.com
      19b904f8
    • M
      drm/i915/icl: Add register definitions for Combo PHY vswing sequences. · 5bb975de
      Manasi Navare 提交于
      This patch defines register definitions required for ICL voltage
      vswing programming for Combo PHY DDI Ports. It uses the same bit
      definitions and macros as the CNL voltage swing sequences.
      
      v8 (from Paulo):
      * Rebase.
      v7:
      * Kill _MMIIO_PORT2_LN (Paulo)
      v6:
      * Replace some spaces with TAB (Paulo)
      v5:
      * Use _PORT instead of _PICK (Paulo)
      * Remove DW7 defs for ICL, not used (Paulo)
      v4:
      * Rebase after _PICK was used instead of _PORT3
      * Use _PICK for _MMIO_PORT2 since address of B is less
      than address of A so cant use the math (Paulo)
      v3:
      * Make changes to the existing macro in a diff patch (Paulo)
      v2:
      * Add new defs fro ICL regs (Paulo)
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180323172419.24911-2-paulo.r.zanoni@intel.com
      5bb975de
    • I
      drm/i915: Fix hibernation with ACPI S0 target state · 0f90603c
      Imre Deak 提交于
      After
      
      commit dd9f31c7
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Wed Aug 16 17:46:07 2017 +0300
      
          drm/i915/gen9+: Set same power state before hibernation image
          save/restore
      
      during hibernation/suspend the power domain functionality got disabled,
      after which resume could leave it incorrectly disabled if the ACPI
      target state was S0 during suspend and i915 was not loaded by the loader
      kernel.
      
      This was caused by not considering if we resumed from hibernation as the
      condition for power domains reiniting.
      
      Fix this by simply tracking if we suspended power domains during system
      suspend and reinit power domains accordingly during resume. This will
      result in reiniting power domains always when resuming from hibernation,
      regardless of the platform and whether or not i915 is loaded by the
      loader kernel.
      
      The reason we didn't catch this earlier is that the enabled/disabled
      state of power domains during PMSG_FREEZE/PMSG_QUIESCE is platform
      and kernel config dependent: on my SKL the target state is S4
      during PMSG_FREEZE and (with the driver loaded in the loader kernel)
      S0 during PMSG_QUIESCE. On the reporter's machine it's S0 during
      PMSG_FREEZE but (contrary to this) power domains are not initialized
      during PMSG_QUIESCE since i915 is not loaded in the loader kernel, or
      it's loaded but without the DMC firmware being available.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105196
      Reported-and-tested-by: amn-bas@hotmail.com
      Fixes: dd9f31c7 ("drm/i915/gen9+: Set same power state before hibernation image save/restore")
      Cc: amn-bas@hotmail.com
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180322143642.26883-1-imre.deak@intel.com
      0f90603c
    • C
      drm/i915: Actually flush interrupts on reset not just wedging · 46b3617d
      Chris Wilson 提交于
      Commit 0f36a85c ("drm/i915: Flush pending interrupt following a GPU
      reset") got confused and only applied the flush to the set-wedge path
      (which itself is proving troublesome), but we also need the
      serialisation on the regular reset path. Oops.
      
      Move the interrupt into reset_irq() and make it common to the reset and
      final set-wedge.
      
      v2: reset_irq() after port cancellation, as we assert that
      execlists->active is sane for cancellation (and is being reset by
      reset_irq).
      
      References: 0f36a85c ("drm/i915: Flush pending interrupt following a GPU reset")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Jeff McGee <jeff.mcgee@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180323101824.14645-1-chris@chris-wilson.co.uk
      46b3617d
    • M
      drm/i915/uc: Fetch uC firmware in init_early · 8c650aef
      Michal Wajdeczko 提交于
      We were fetching uC firmwares in separate uc_init_fw step, while
      there is no reason why we can't fetch them during init_early.
      This will also simplify upcoming patches, as size of the firmware
      may be used for register initialization.
      Signed-off-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180323123451.59244-2-michal.wajdeczko@intel.com
      8c650aef
    • M
      drm/i915: Reorder early initialization · a0de908d
      Michal Wajdeczko 提交于
      In upcoming patch, we want to perform more actions in early
      initialization of the uC. This reordering will help resolve
      new dependencies that will be introduced by future patch.
      
      v2: s/i915_gem_load_init/i915_gem_init_early (Chris)
      v3: s/i915_gem_load_cleanup/i915_gem_cleanup_early (Michal)
      Signed-off-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180323123451.59244-1-michal.wajdeczko@intel.com
      a0de908d
    • P
      drm/i915/guc: Fix null pointer dereference when GuC FW is not available · 28e0e8ac
      Piotr Piórkowski 提交于
      If GuC firmware is not available on the system and we load i915 with enable
      GuC, then we hit this null pointer dereference issue:
      
      [   71.098873] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      [   71.098938] IP: intel_uc_fw_upload+0x1f/0x360 [i915]
      [   71.098947] PGD 0 P4D 0
      [   71.098956] Oops: 0000 [#1] PREEMPT SMP PTI
      [   71.098965] Modules linked in: i915(O+) netconsole x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel mei_me i2c_i801 prime_numbers mei [last unloaded: i915]
      [   71.099005] CPU: 2 PID: 1167 Comm: insmod Tainted: G     U  W  O     4.16.0-rc1+ #337
      [   71.099018] Hardware name: /NUC6i5SYB, BIOS SYSKLi35.86A.0065.2018.0103.1000 01/03/2018
      [   71.099077] RIP: 0010:intel_uc_fw_upload+0x1f/0x360 [i915]
      [   71.099087] RSP: 0018:ffffc90000417aa0 EFLAGS: 00010282
      [   71.099097] RAX: 0000000000000000 RBX: ffff88084cad12f8 RCX: ffffffffa03e9357
      [   71.099108] RDX: 0000000000000002 RSI: ffffffffa034dba0 RDI: ffff88084cad12f8
      [   71.099118] RBP: 0000000000000002 R08: ffff88085344ca90 R09: 0000000000000001
      [   71.099128] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88084cad0000
      [   71.099139] R13: ffffffffa034dba0 R14: 00000000fffffff5 R15: ffff88084cad12b0
      [   71.099151] FS:  00007f7f24ae2740(0000) GS:ffff88085e200000(0000) knlGS:0000000000000000
      [   71.099162] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   71.099171] CR2: 0000000000000008 CR3: 0000000855f48001 CR4: 00000000003606e0
      [   71.099182] Call Trace:
      [   71.099246]  intel_uc_init_hw+0xc8/0x520 [i915]
      [   71.099303]  i915_gem_init_hw+0x11f/0x2d0 [i915]
      [   71.099364]  i915_gem_init+0x2b9/0x640 [i915]
      [   71.099413]  i915_driver_load+0xb74/0x1110 [i915]
      [   71.099462]  i915_pci_probe+0x2e/0x90 [i915]
      [   71.099476]  pci_device_probe+0xa1/0x130
      [   71.099488]  driver_probe_device+0x302/0x470
      [   71.099502]  __driver_attach+0xb9/0xe0
      [   71.099513]  ? driver_probe_device+0x470/0x470
      [   71.099525]  ? driver_probe_device+0x470/0x470
      [   71.099538]  bus_for_each_dev+0x64/0x90
      [   71.099550]  bus_add_driver+0x164/0x260
      [   71.099561]  ? 0xffffffffa04d6000
      [   71.099572]  driver_register+0x57/0xc0
      [   71.099582]  ? 0xffffffffa04d6000
      [   71.099593]  do_one_initcall+0x3b/0x160
      [   71.099606]  ? kmem_cache_alloc_trace+0x1c3/0x2a0
      [   71.099621]  do_init_module+0x5b/0x1f9
      [   71.099635]  load_module+0x2467/0x2a70
      [   71.099654]  ? SyS_finit_module+0xbd/0xe0
      [   71.099668]  SyS_finit_module+0xbd/0xe0
      [   71.099682]  do_syscall_64+0x73/0x1c0
      [   71.099694]  entry_SYSCALL_64_after_hwframe+0x26/0x9b
      [   71.099706] RIP: 0033:0x7f7f23fb40d9
      [   71.099717] RSP: 002b:00007ffda7d67ed8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [   71.099734] RAX: ffffffffffffffda RBX: 000055f96e2a8870 RCX: 00007f7f23fb40d9
      [   71.099748] RDX: 0000000000000000 RSI: 000055f96e2a8260 RDI: 0000000000000003
      [   71.099763] RBP: 000055f96e2a8260 R08: 0000000000000000 R09: 00007ffda7d68088
      [   71.099777] R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
      [   71.099791] R13: 000055f96e2a8830 R14: 0000000000000000 R15: 000055f96e2a8260
      [   71.099810] Code: 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55 41 54 49 89 f5 55 53 48 c7 c1 57 93 3e a0 48 8b 47 10 48 89 fb 4c 8b 07 <48> 8b 68 08 8b 47 28 85 c0 74 15 83 f8 01 48 c7 c1 5b 93 3e a0
      [   71.100004] RIP: intel_uc_fw_upload+0x1f/0x360 [i915] RSP: ffffc90000417aa0
      [   71.100020] CR2: 0000000000000008
      [   71.100031] ---[ end trace d8ac93c30ceff5b2 ]--
      
      Fixes: 6b0478fb ("drm/i915: Implement dynamic GuC WOPCM offset and size calculation")
      
      v2: don't assume it is always GuC FW (Michal)
      v3: added a new variable to avoid exceeding the number of characters in the
      line (Michal)
      Signed-off-by: NPiotr Piórkowski <piotr.piorkowski@intel.com>
      Reported-by: NRadoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Jackie Li <yaodong.li@intel.com>
      Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
      Reviewed-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Reviewed-by: NJackie Li <yaodong.li@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180323112319.16293-1-piotr.piorkowski@intel.com
      28e0e8ac
  2. 23 3月, 2018 7 次提交
  3. 22 3月, 2018 5 次提交
  4. 21 3月, 2018 7 次提交
  5. 20 3月, 2018 8 次提交
  6. 19 3月, 2018 6 次提交