1. 12 Apr, 2022 5 commits
  2. 11 Apr, 2022 4 commits
    • Lucas De Marchi's avatar
      drm/i915/dg2: Do not explode on phy calibration error · 82c362f2
      Lucas De Marchi authored
      When the PHY fails on calibration we were previously skipping the ddi
      initialization. However the driver is not really prepared for that,
      ultimately leading to a NULL pointer dereference:
      
      [   75.748348] i915 0000:03:00.0: [drm:intel_modeset_init_nogem [i915]] SNPS PHY A failed to calibrate; output will not be used.
      ...
      [   75.750336] i915 0000:03:00.0: [drm:intel_modeset_setup_hw_state [i915]] [CRTC:80:pipe A] hw state readout: enabled
      ...
      
      ( no DDI A/PHY A )
      [   75.753080] i915 0000:03:00.0: [drm:intel_modeset_setup_hw_state [i915]] [ENCODER:235:DDI B/PHY B] hw state readout: disabled, pipe A
      [   75.753164] i915 0000:03:00.0: [drm:intel_modeset_setup_hw_state [i915]] [ENCODER:245:DDI C/PHY C] hw state readout: disabled, pipe A
      ...
      [   75.754425] i915 0000:03:00.0: [drm] *ERROR* crtc 80: Can't calculate constants, dotclock = 0!
      [   75.765558] i915 0000:03:00.0: drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev))
      [   75.765569] WARNING: CPU: 5 PID: 1759 at drivers/gpu/drm/drm_vblank.c:728 drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x347/0x360
      ...
      [   75.781230] BUG: kernel NULL pointer dereference, address: 000000000000007c
      [   75.788198] #PF: supervisor read access in kernel mode
      [   75.793347] #PF: error_code(0x0000) - not-present page
      [   75.798480] PGD 0 P4D 0
      [   75.801019] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [   75.805377] CPU: 5 PID: 1759 Comm: modprobe Tainted: G        W         5.18.0-rc1-demarchi+ #199
      [   75.827613] RIP: 0010:icl_aux_power_well_disable+0x3b/0x200 [i915]
      [   75.833890] Code: 83 ec 30 65 48 8b 04 25 28 00 00 00 48 89 44 24 28 48 8b 06 0f b6 70 1c f6 40 20 04 8d 56 fa 0f 45 f2 e8 88 bd ff ff 48 89 ef <8b> 70 7c e8 ed 67 ff ff 48 89 ef 89 c6 e8 73 67 ff ff 84 c0 75 0a
      [   75.852629] RSP: 0018:ffffc90003a7fb30 EFLAGS: 00010246
      [   75.857852] RAX: 0000000000000000 RBX: ffff8881145e8f10 RCX: 0000000000000000
      [   75.864978] RDX: ffff888115220840 RSI: 0000000000000000 RDI: ffff888115220000
      [   75.872106] RBP: ffff888115220000 R08: ffff88888effffe8 R09: 00000000fffdffff
      [   75.879234] R10: ffff88888e200000 R11: ffff88888ed00000 R12: ffff8881145e8f10
      [   75.886363] R13: 0000000000000001 R14: ffff888115223240 R15: 0000000000000000
      [   75.893490] FS:  00007ff6e753a740(0000) GS:ffff88888f680000(0000) knlGS:0000000000000000
      [   75.901573] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   75.907313] CR2: 000000000000007c CR3: 00000001216a6001 CR4: 0000000000770ee0
      [   75.914446] PKRU: 55555554
      [   75.917153] Call Trace:
      [   75.919603]  <TASK>
      [   75.921709]  intel_power_domains_sanitize_state+0x88/0xb0 [i915]
      [   75.927814]  intel_modeset_init_nogem+0x317/0xef0 [i915]
      [   75.933205]  i915_driver_probe+0x5f6/0xdf0 [i915]
      [   75.937976]  i915_pci_probe+0x51/0x1d0 [i915]
      
      We skip the initialization of PHY A, but later we try to find out what
      is the phy for that power well and dereference dig_port, which is NULL.
      
      Failing the PHY calibration could be left as a warning or error, like it
      was before commit b4eb76d8 ("drm/i915/dg2: Skip output init on PHY
      calibration failure"). However that often fails for outputs not being
      used, which would make the warning/error appear on systems that have no
      visible issues. Anyway, there is still a need to fix those failures,
      but that is left for later.
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220410061537.4187383-1-lucas.demarchi@intel.com
      82c362f2
    • Stanislav Lisovskiy's avatar
      drm/i915: Swap ret and status returned from skl_pcode_request · 40a56956
      Stanislav Lisovskiy authored
      If ret isn't zero, it is almost for sure ETIMEDOUT, because
      we use it in wait_for macro which does continuous retries
      until timeout is reached. If we still ran out of time and
      retries, we most likely would be interested in getting status,
      to understand what was the actual error propagated from PCode,
      rather than to find out that we had a time out, which is anyway
      quite obvious, if the function fails.
      
      v2: Make it status ? status : ret(thanks Vinod for the hint)
      Signed-off-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Reviewed-by: default avatarVinod Govindapillai <vinod.govindapillai@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220411081343.18099-1-stanislav.lisovskiy@intel.com
      40a56956
    • Stanislav Lisovskiy's avatar
      drm/i915: Fix skl_pcode_try_request function · 9e0a1c3c
      Stanislav Lisovskiy authored
      Currently skl_pcode_try_request function doesn't
      properly handle return value it gets from
      snb_pcode_rw, but treats status != 0 as success,
      returning true, which basically doesn't allow
      to use retry/timeout mechanisms if PCode happens
      to be busy and returns EGAIN or some other status
      code not equal to 0.
      
      We saw this on real hw and also tried simulating this
      by always returning -EAGAIN from snb_pcode_rw for 6 times, which
      currently will just result in false success, while it should
      have tried until timeout is reached:
      
      [   22.357729] i915 0000:00:02.0: [drm:intel_cdclk_dump_config [i915]] Changing CDCLK to
      307200 kHz, VCO 614400 kHz, ref 38400 kHz, bypass 19200 kHz, voltage level 0
      [   22.357831] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 1
      [   22.357892] i915 0000:00:02.0: [drm:skl_pcode_request [i915]] Success, exiting
      [   22.357936] i915 0000:00:02.0: [drm] ERROR Failed to inform PCU about cdclk change (err -11, freq 307200)
      
      We see en error because higher level api, still notices that status was wrong,
      however we still did try only once.
      
      We fix it by requiring _both_ the status to be 0 and
      request/reply match for success(true) and function
      should return failure(false) if either status turns
      out to be EAGAIN, EBUSY or whatever or reply/request
      masks do not match.
      
      So now we see this in the logs:
      
      [   22.318667] i915 0000:00:02.0: [drm:intel_cdclk_dump_config [i915]] Changing CDCLK to
      307200 kHz, VCO 614400 kHz, ref 38400 kHz, bypass 19200 kHz, voltage level 0
      [   22.318782] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 1
      [   22.318849] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 2
      [   22.319006] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 3
      [   22.319091] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 4
      [   22.319158] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 5
      [   22.319224] i915 0000:00:02.0: [drm:__snb_pcode_rw [i915]] Returning EAGAIN retry 6
      Reviewed-by: default avatarVinod Govindapillai <vinod.govindapillai@intel.com>
      Signed-off-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220408125200.9069-2-stanislav.lisovskiy@intel.com
      9e0a1c3c
    • Jani Nikula's avatar
      Merge drm/drm-next into drm-intel-next · 83970cd6
      Jani Nikula authored
      Sync up with v5.18-rc1, in particular to get 5e3094cf
      ("drm/i915/xehpsdv: Add has_flat_ccs to device info").
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      83970cd6
  3. 09 Apr, 2022 1 commit
  4. 08 Apr, 2022 1 commit
  5. 06 Apr, 2022 7 commits
  6. 05 Apr, 2022 12 commits
  7. 04 Apr, 2022 3 commits
  8. 03 Apr, 2022 7 commits
    • Linus Torvalds's avatar
      Linux 5.18-rc1 · 31231092
      Linus Torvalds authored
      31231092
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 09bb8856
      Linus Torvalds authored
      Pull more tracing updates from Steven Rostedt:
      
       - Rename the staging files to give them some meaning. Just
         stage1,stag2,etc, does not show what they are for
      
       - Check for NULL from allocation in bootconfig
      
       - Hold event mutex for dyn_event call in user events
      
       - Mark user events to broken (to work on the API)
      
       - Remove eBPF updates from user events
      
       - Remove user events from uapi header to keep it from being installed.
      
       - Move ftrace_graph_is_dead() into inline as it is called from hot
         paths and also convert it into a static branch.
      
      * tag 'trace-v5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Move user_events.h temporarily out of include/uapi
        ftrace: Make ftrace_graph_is_dead() a static branch
        tracing: Set user_events to BROKEN
        tracing/user_events: Remove eBPF interfaces
        tracing/user_events: Hold event_mutex during dyn_event_add
        proc: bootconfig: Add null pointer check
        tracing: Rename the staging files for trace_events
      09bb8856
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 34a53ff9
      Linus Torvalds authored
      Pull clk fix from Stephen Boyd:
       "A single revert to fix a boot regression seen when clk_put() started
        dropping rate range requests. It's best to keep various systems
        booting so we'll kick this out and try again next time"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        Revert "clk: Drop the rate range on clk_put()"
      34a53ff9
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2022-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8b5656bc
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes and updates:
      
         - Make the prctl() for enabling dynamic XSTATE components correct so
           it adds the newly requested feature to the permission bitmap
           instead of overwriting it. Add a selftest which validates that.
      
         - Unroll string MMIO for encrypted SEV guests as the hypervisor
           cannot emulate it.
      
         - Handle supervisor states correctly in the FPU/XSTATE code so it
           takes the feature set of the fpstate buffer into account. The
           feature sets can differ between host and guest buffers. Guest
           buffers do not contain supervisor states. So far this was not an
           issue, but with enabling PASID it needs to be handled in the buffer
           offset calculation and in the permission bitmaps.
      
         - Avoid a gazillion of repeated CPUID invocations in by caching the
           values early in the FPU/XSTATE code.
      
         - Enable CONFIG_WERROR in x86 defconfig.
      
         - Make the X86 defconfigs more useful by adapting them to Y2022
           reality"
      
      * tag 'x86-urgent-2022-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu/xstate: Consolidate size calculations
        x86/fpu/xstate: Handle supervisor states in XSTATE permissions
        x86/fpu/xsave: Handle compacted offsets correctly with supervisor states
        x86/fpu: Cache xfeature flags from CPUID
        x86/fpu/xsave: Initialize offset/size cache early
        x86/fpu: Remove unused supervisor only offsets
        x86/fpu: Remove redundant XCOMP_BV initialization
        x86/sev: Unroll string mmio with CC_ATTR_GUEST_UNROLL_STRING_IO
        x86/config: Make the x86 defconfigs a bit more usable
        x86/defconfig: Enable WERROR
        selftests/x86/amx: Update the ARCH_REQ_XCOMP_PERM test
        x86/fpu/xstate: Fix the ARCH_REQ_XCOMP_PERM implementation
      8b5656bc
    • Linus Torvalds's avatar
      Merge tag 'core-urgent-2022-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e235f419
      Linus Torvalds authored
      Pull RT signal fix from Thomas Gleixner:
       "Revert the RT related signal changes. They need to be reworked and
        generalized"
      
      * tag 'core-urgent-2022-04-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Revert "signal, x86: Delay calling signals in atomic on RT enabled kernels"
      e235f419
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.18-1' of git://git.infradead.org/users/hch/dma-mapping · 63d12cc3
      Linus Torvalds authored
      Pull more dma-mapping updates from Christoph Hellwig:
      
       - fix a regression in dma remap handling vs AMD memory encryption (me)
      
       - finally kill off the legacy PCI DMA API (Christophe JAILLET)
      
      * tag 'dma-mapping-5.18-1' of git://git.infradead.org/users/hch/dma-mapping:
        dma-mapping: move pgprot_decrypted out of dma_pgprot
        PCI/doc: cleanup references to the legacy PCI DMA API
        PCI: Remove the deprecated "pci-dma-compat.h" API
      63d12cc3
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 5dee8721
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
      
       - avoid unnecessary rebuilds for library objects
      
       - fix return value of __setup handlers
      
       - fix invalid input check for "crashkernel=" kernel option
      
       - silence KASAN warnings in unwind_frame
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 9191/1: arm/stacktrace, kasan: Silence KASAN warnings in unwind_frame()
        ARM: 9190/1: kdump: add invalid input check for 'crashkernel=0'
        ARM: 9187/1: JIVE: fix return value of __setup handler
        ARM: 9189/1: decompressor: fix unneeded rebuilds of library objects
      5dee8721