1. 19 11月, 2019 2 次提交
  2. 30 10月, 2019 1 次提交
  3. 08 10月, 2019 1 次提交
  4. 03 10月, 2019 1 次提交
    • M
      drm/i915/dp: Fix dsc bpp calculations, v5. · cffb4c3e
      Maarten Lankhorst 提交于
      There was a integer wraparound when mode_clock became too high,
      and we didn't correct for the FEC overhead factor when dividing,
      with the calculations breaking at HBR3.
      
      As a result our calculated bpp was way too high, and the link width
      limitation never came into effect.
      
      Print out the resulting bpp calcululations as a sanity check, just
      in case we ever have to debug it later on again.
      
      We also used the wrong factor for FEC. While bspec mentions 2.4%,
      all the calculations use 1/0.972261, and the same ratio should be
      applied to data M/N as well, so use it there when FEC is enabled.
      
      This fixes the FIFO underrun we are seeing with FEC enabled.
      
      Changes since v2:
      - Handle fec_enable in intel_link_compute_m_n, so only data M/N is adjusted. (Ville)
      - Fix initial hardware readout for FEC. (Ville)
      Changes since v3:
      - Remove bogus fec_to_mode_clock. (Ville)
      Changes since v4:
      - Use the correct register for icl. (Ville)
      - Split hw readout to a separate patch.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: d9218c8f ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC")
      Cc: <stable@vger.kernel.org> # v5.0+
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190925082110.17439-1-maarten.lankhorst@linux.intel.comReviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      (cherry picked from commit ed06efb8)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      cffb4c3e
  5. 21 8月, 2019 1 次提交
    • L
      drm/i915/tgl: disable DDIC · ea6591b4
      Lucas De Marchi 提交于
      The current SKUs added for Tiger Lake don't have DDIC hooked up, even
      though it is supported by the SoC. The current state for these SKUs is
      problematic since while enabling the combo phy, PORT_COMP_DW* return
      0xFFFFFFFF, which is invalid per register definition.
      
      During initialization we check what phys are not yet enabled by reading
      PHY_MISC_C and try to enable it by toggling the "DE to IO Comp Pwr Down"
      bit.  But after that any read to the PORT_COMP_DW* returns invalid
      results. This removes the following warning
      
      [56997.634353] Missing case (val == 4294967295)
      [56997.639241] WARNING: CPU: 5 PID: 768 at drivers/gpu/drm/i915/display/intel_combo_phy.c:54 cnl_get_procmon_ref_values+0xc9/0xf0 [i915]
      [56997.639808] Modules linked in: i915(+) prime_numbers x86_pkg_temp_thermal coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e [last unloaded: prime_numbers]
      [56997.639808] CPU: 5 PID: 768 Comm: insmod Tainted: G     U  W         5.2.0-demarchi+ #65
      [56997.639808] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2252.A03.1906270154 06/27/2019
      [56997.639808] RIP: 0010:cnl_get_procmon_ref_values+0xc9/0xf0 [i915]
      [56997.639808] Code: 2c a0 85 c9 74 e0 81 f9 00 00 00 01 75 09 48 c7 c0 0c a4 2c a0 eb cf 48 c7 c6 3c 3a 31 a0 48 c7 c7 40 3a 31 a0 e8 6b 4d ea e0 <0f> 0b 48 c7 c0 00 a4 2c a0 eb b1 48 c7 c0 24 a4 2
      c a0 eb a8 e8 be
      [56997.639808] RSP: 0018:ffffc9000068f8a8 EFLAGS: 00010286
      [56997.639808] RAX: 0000000000000000 RBX: ffff88848fa90000 RCX: 0000000000000000
      [56997.639808] RDX: ffff8884a08b5ef8 RSI: ffff8884a08a6658 RDI: 00000000ffffffff
      [56997.639808] RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
      [56997.639808] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88848fa90000
      [56997.639808] R13: 0000000000000000 R14: 0000000000000002 R15: 0006c00000162000
      [56997.639808] FS:  00007f61ca3d12c0(0000) GS:ffff8884a0880000(0000) knlGS:0000000000000000
      [56997.639808] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [56997.639808] CR2: 00007f71be6a92c0 CR3: 0000000494750006 CR4: 0000000000760ee0
      [56997.639808] PKRU: 55555554
      [56997.639808] Call Trace:
      [56997.639808]  cnl_verify_procmon_ref_values+0x36/0xf0 [i915]
      [56997.639808]  ? rcu_read_lock_sched_held+0x6f/0x80
      [56997.639808]  ? gen11_fwtable_read32+0x257/0x290 [i915]
      [56997.639808]  icl_combo_phy_verify_state.part.0+0x22/0xa0 [i915]
      [56997.639808]  intel_combo_phy_init+0x17e/0x3e0 [i915]
      [56997.639808]  ? icl_display_core_init+0x2c/0x1a0 [i915]
      [56997.639808]  ? _raw_spin_unlock_irqrestore+0x4c/0x60
      [56997.639808]  icl_display_core_init+0x34/0x1a0 [i915]
      [56997.639808]  intel_power_domains_init_hw+0x200/0x570 [i915]
      [56997.639808]  i915_driver_probe+0x103b/0x17e0 [i915]
      [56997.639808]  ? printk+0x53/0x6a
      [56997.639808]  i915_pci_probe+0x3b/0x190 [i915]
      
      We may or may not need to change the implementation to account for DDIC
      being available on other SKUs. For now I think the best thing to do is
      to just disable the port.
      
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NUma Shankar <uma.shankar@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190814235517.10032-1-lucas.demarchi@intel.com
      ea6591b4
  6. 17 8月, 2019 1 次提交
  7. 16 8月, 2019 1 次提交
  8. 14 8月, 2019 1 次提交
  9. 13 8月, 2019 1 次提交
  10. 09 8月, 2019 1 次提交
  11. 08 8月, 2019 1 次提交
  12. 07 8月, 2019 1 次提交
  13. 29 7月, 2019 1 次提交
  14. 27 7月, 2019 1 次提交
  15. 26 7月, 2019 1 次提交
    • G
      drm/i915: Mark expected switch fall-throughs · 2defb94e
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function ‘i915_gem_fault’:
      drivers/gpu/drm/i915/gem/i915_gem_mman.c:342:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (!i915_terminally_wedged(i915))
            ^
      drivers/gpu/drm/i915/gem/i915_gem_mman.c:345:2: note: here
        case -EAGAIN:
        ^~~~
      
      drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function ‘i915_gem_object_map’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/gem/i915_gem_pages.c:270:3: note: in expansion of macro ‘MISSING_CASE’
         MISSING_CASE(type);
         ^~~~~~~~~~~~
      drivers/gpu/drm/i915/gem/i915_gem_pages.c:272:2: note: here
        case I915_MAP_WB:
        ^~~~
      
      drivers/gpu/drm/i915/i915_gpu_error.c: In function ‘error_record_engine_registers’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/i915_gpu_error.c:1196:5: note: in expansion of macro ‘MISSING_CASE’
           MISSING_CASE(engine->id);
           ^~~~~~~~~~~~
      drivers/gpu/drm/i915/i915_gpu_error.c:1197:4: note: here
          case RCS0:
          ^~~~
      
      drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_get_fia_supported_lane_count’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/display/intel_dp.c:233:3: note: in expansion of macro ‘MISSING_CASE’
         MISSING_CASE(lane_info);
         ^~~~~~~~~~~~
      drivers/gpu/drm/i915/display/intel_dp.c:234:2: note: here
        case 1:
        ^~~~
      
      drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:
        CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.o
      drivers/gpu/drm/i915/display/intel_display.c:12043:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (WARN_ON(!HAS_DDI(to_i915(dev))))
             ^
      drivers/gpu/drm/i915/display/intel_display.c:12046:3: note: here
         case INTEL_OUTPUT_DP:
         ^~~~
      
      Also, notice that the Makefile is modified to stop ignoring
      fall-through warnings. The -Wimplicit-fallthrough option
      will be enabled globally in v5.3.
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      2defb94e
  16. 13 7月, 2019 2 次提交
  17. 12 7月, 2019 11 次提交
  18. 11 7月, 2019 4 次提交
  19. 09 7月, 2019 1 次提交
  20. 05 7月, 2019 3 次提交
  21. 01 7月, 2019 3 次提交
    • I
      drm/i915: Keep the TypeC port mode fixed when the port is active · 24a7bfe0
      Imre Deak 提交于
      The TypeC port mode needs to stay fixed whenever the port is active. Do
      that by introducing a tc_link_refcount to account for active ports,
      avoiding changing the port mode if a reference is held.
      
      During the modeset commit phase we also have to reset the port mode and
      update the active PLL reflecting the new port mode. We can do this only
      once the port and its old PLL has been already disabled. Add the new
      encoder update_prepare/complete hooks that are called around the whole
      enabling sequence. The TypeC specific hooks of these will reset the port
      mode, update the active PLL if the port will be active and ensure that
      the port mode will stay fixed for the duration of the whole enabling
      sequence by holding a tc_link_refcount.
      
      During the port enabling, the pre_pll_enable/post_pll_disable hooks will
      take/release a tc_link_refcount to ensure the port mode stays fixed
      while the port is active.
      
      Changing the port mode should also be avoided during connector detection
      and AUX transfers if the port is active, we'll do that by checking the
      port's tc_link_refcount.
      
      When resetting the port mode we also have to take into account the
      maximum lanes provided by the FIA. It's guaranteed to be 4 in TBT-alt
      and legacy modes, but there may be less lanes available in DP-alt mode,
      in which case we have to fall back to TBT-alt mode.
      
      While at it also update icl_tc_phy_connect()'s code comment, reflecting
      the current way of switching the port mode.
      
      v2:
      - Add the update_prepare/complete hooks to the encoder instead of the
        connector. (Ville)
      - Simplify intel_connector_needs_modeset() by removing redundant if.
        (Ville)
      v3:
      - Fix sparse warning, marking static functions as such.
      v4:
      - Rebase on drm-tip.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      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/20190628143635.22066-21-imre.deak@intel.com
      24a7bfe0
    • I
      drm/i915/icl: Reserve all required PLLs for TypeC ports · eea72c4c
      Imre Deak 提交于
      When enabling a TypeC port we need to reserve all the required PLLs for
      it, the TBT PLL for TBT-alt and the MG PHY PLL for DP-alt/legacy sinks.
      We can select the proper PLL for the current port mode from the reserved
      PLLs only once we selected and locked down the port mode for the whole
      duration of the port's active state. Resetting and locking down the port
      mode can in turn happen only during the modeset commit phase once we
      disabled the given port and the PLL it used.
      
      To support the above reserve-and-select PLL semantic we store the
      reserved PLLs along with their HW state in the CRTC state and provide a
      way to select the active PLL from these. The selected PLL along with its
      HW state will be pointed at by crtc_state->shared_dpll/dpll_hw_state as
      in the case of other port types.
      
      Besides reserving all required PLLs no functional changes.
      
      v2:
      - Fix releasing the ICL PLLs, not clearing the PLLs from the old
        crtc_state.
      - Init port_dpll to ICL_PORT_DPLL_DEFAULT closer to where port_dpll is
        used for symmetry with the corresponding ICL_PORT_DPLL_MG_PHY init.
        (Ville)
      v3:
      - Add FIXME: for clearing the ICL port PLLs from the new crtc state.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      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/20190628143635.22066-20-imre.deak@intel.com
      eea72c4c
    • I
      drm/i915: Sanitize the shared DPLL reserve/release interface · 866955fa
      Imre Deak 提交于
      For consistency s/intel_get_shared_dpll()/intel_reserve_shared_dplls()/
      to better match intel_release_shared_dplls(). Also, pass to the
      reserve/release and get_dplls/put_dplls hooks the intel_atomic_state and
      CRTC object, that way these functions can look up the old or new state
      as needed.
      
      Also release the PLLs from the atomic state via a new
      put_dplls->intel_unreference_shared_dpll() call chain for better
      symmetry with the reservation via the
      get_dplls->intel_reference_shared_dpll() call chain.
      
      Since nothing uses the PLL returned by intel_reserve_shared_dplls(),
      make it return only a bool.
      
      While at it also clarify the reserve/release function docbook headers
      making it clear that multiple DPLLs will be reserved/released and
      whether the new or old atomic CRTC state is affected.
      
      This refactoring is also a preparation for a follow-up change that needs
      to reserve multiple DPLLs.
      
      Kudos to Ville for the idea to pass intel_atomic_state around, to make
      things clearer locally where an object's old/new atomic state is
      required.
      
      No functional changes.
      
      v2:
      - Fix checkpatch issue: typo in code comment.
      v3:
      - Rebase on drm-tip.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      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/20190628143635.22066-17-imre.deak@intel.com
      866955fa