1. 08 Apr, 2023 14 commits
  2. 07 Apr, 2023 4 commits
  3. 06 Apr, 2023 15 commits
  4. 05 Apr, 2023 7 commits
    • Daniel Vetter's avatar
      Merge tag 'drm-misc-fixes-2023-04-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 3dfa8926
      Daniel Vetter authored
      Short summary of fixes pull:
      
       * ivpu: DMA fence and suspend fixes
       * nouveau: Color-depth fixes
       * panfrost: Fix mmap error handling
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230405182855.GA1551@linux-uq9g
      3dfa8926
    • Hans de Goede's avatar
      ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530 · a5b2781d
      Hans de Goede authored
      The Lenovo ThinkPad W530 uses a nvidia k1000m GPU. When this gets used
      together with one of the older nvidia binary driver series (the latest
      series does not support it), then backlight control does not work.
      
      This is caused by commit 3dbc80a3 ("ACPI: video: Make backlight
      class device registration a separate step (v2)") combined with
      commit 5aa9d943 ("ACPI: video: Don't enable fallback path for
      creating ACPI backlight by default").
      
      After these changes the acpi_video# backlight device is only registered
      when requested by a GPU driver calling acpi_video_register_backlight()
      which the nvidia binary driver does not do.
      
      I realize that using the nvidia binary driver is not a supported use-case
      and users can workaround this by adding acpi_backlight=video on the kernel
      commandline, but the ThinkPad W530 is a popular model under Linux users,
      so it seems worthwhile to add a quirk for this.
      
      I will also email Nvidia asking them to make the driver call
      acpi_video_register_backlight() when an internal LCD panel is detected.
      So maybe the next maintenance release of the drivers will fix this...
      
      Fixes: 5aa9d943 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
      Cc: All applicable <stable@vger.kernel.org>
      Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a5b2781d
    • Hans de Goede's avatar
      ACPI: video: Add acpi_backlight=video quirk for Apple iMac14,1 and iMac14,2 · 26991079
      Hans de Goede authored
      On the Apple iMac14,1 and iMac14,2 all-in-ones (monitors with builtin "PC")
      the connection between the GPU and the panel is seen by the GPU driver as
      regular DP instead of eDP, causing the GPU driver to never call
      acpi_video_register_backlight().
      
      (GPU drivers only call acpi_video_register_backlight() when an internal
       panel is detected, to avoid non working acpi_video# devices getting
       registered on desktops which unfortunately is a real issue.)
      
      Fix the missing acpi_video# backlight device on these all-in-ones by
      adding a acpi_backlight=video DMI quirk, so that video.ko will
      immediately register the backlight device instead of waiting for
      an acpi_video_register_backlight() call.
      
      Fixes: 5aa9d943 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
      Cc: All applicable <stable@vger.kernel.org>
      Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      26991079
    • Hans de Goede's avatar
      ACPI: video: Make acpi_backlight=video work independent from GPU driver · e506731c
      Hans de Goede authored
      Commit 3dbc80a3 ("ACPI: video: Make backlight class device
      registration a separate step (v2)") combined with
      commit 5aa9d943 ("ACPI: video: Don't enable fallback path for
      creating ACPI backlight by default")
      
      Means that the video.ko code now fully depends on the GPU driver calling
      acpi_video_register_backlight() for the acpi_video# backlight class
      devices to get registered.
      
      This means that if the GPU driver does not do this, acpi_backlight=video
      on the cmdline, or DMI quirks for selecting acpi_video# will not work.
      
      This is a problem on for example Apple iMac14,1 all-in-ones where
      the monitor's LCD panel shows up as a regular DP connection instead of
      eDP so the GPU driver will not call acpi_video_register_backlight() [1].
      
      Fix this by making video.ko directly register the acpi_video# devices
      when these have been explicitly requested either on the cmdline or
      through DMI quirks (rather then auto-detection being used).
      
      [1] GPU drivers only call acpi_video_register_backlight() when an internal
      panel is detected, to avoid non working acpi_video# devices getting
      registered on desktops which unfortunately is a real issue.
      
      Fixes: 5aa9d943 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
      Cc: All applicable <stable@vger.kernel.org>
      Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e506731c
    • Hans de Goede's avatar
      ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type() · 78dfc9d1
      Hans de Goede authored
      Allow callers of __acpi_video_get_backlight_type() to pass a pointer
      to a bool which will get set to false if the backlight-type comes from
      the cmdline or a DMI quirk and set to true if auto-detection was used.
      
      And make __acpi_video_get_backlight_type() non static so that it can
      be called directly outside of video_detect.c .
      
      While at it turn the acpi_video_get_backlight_type() and
      acpi_video_backlight_use_native() wrappers into static inline functions
      in include/acpi/video.h, so that we need to export one less symbol.
      
      Fixes: 5aa9d943 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
      Cc: All applicable <stable@vger.kernel.org>
      Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      78dfc9d1
    • Ard Biesheuvel's avatar
      arm64: compat: Work around uninitialized variable warning · 32d85999
      Ard Biesheuvel authored
      Dan reports that smatch complains about a potential uninitialized
      variable being used in the compat alignment fixup code.
      
      The logic is not wrong per se, but we do end up using an uninitialized
      variable if reading the instruction that triggered the alignment fault
      from user space faults, even if the fault ensures that the uninitialized
      value doesn't propagate any further.
      
      Given that we just give up and return 1 if any fault occurs when reading
      the instruction, let's get rid of the 'success handling' pattern that
      captures the fault in a variable and aborts later, and instead, just
      return 1 immediately if any of the get_user() calls result in an
      exception.
      
      Fixes: 3fc24ef3 ("arm64: compat: Implement misalignment fixups for multiword loads")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Reported-by: default avatarDan Carpenter <error27@gmail.com>
      Link: https://lore.kernel.org/r/202304021214.gekJ8yRc-lkp@intel.com/Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Link: https://lore.kernel.org/r/20230404103625.2386382-1-ardb@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      32d85999
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 99ddf225
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix timerlat notification, as it was not triggering the notify to
         users when a new max latency was hit.
      
       - Do not trigger max latency if the tracing is off.
      
         When tracing is off, the ring buffer is not updated, it does not make
         sense to notify when there's a new max latency detected by the
         tracer, as why that latency happened is not available. The tracing
         logic still runs when the ring buffer is disabled, but it should not
         be triggering notifications.
      
       - Fix race on freeing the synthetic event "last_cmd" variable by adding
         a mutex around it.
      
       - Fix race between reader and writer of the ring buffer by adding
         memory barriers. When the writer is still on the reader page it must
         have its content visible on the buffer before it moves the commit
         index that the reader uses to know how much content is on the page.
      
       - Make get_lock_parent_ip() always inlined, as it uses _THIS_IP_ and
         _RET_IP_, which gets broken if it is not inlined.
      
       - Make __field(int, arr[5]) in a TRACE_EVENT() macro fail to build.
      
         The field formats of trace events are calculated by using
         sizeof(type) and other means by what is passed into the structure
         macros like __field(). The __field() macro is only meant for atom
         types like int, long, short, pointer, etc. It is not meant for
         arrays.
      
         The code will currently compile with arrays, but then the format
         produced will be inaccurate, and user space parsing tools will break.
      
         Two bugs have already been fixed, now add code that will make the
         kernel fail to build if another trace event includes this buggy field
         format.
      
       - Fix boot up snapshot code:
      
         Boot snapshots were triggering when not even asked for on the kernel
         command line. This was caused by two bugs:
      
          1) It would trigger a snapshot on any instance if one was created
             from the kernel command line.
      
          2) The error handling would only affect the top level instance.
             So the fact that a snapshot was done on a instance that didn't
             allocate a buffer triggered a warning written into the top level
             buffer, and worse yet, disabled the top level buffer.
      
       - Fix memory leak that was caused when an error was logged in a trace
         buffer instance, and then the buffer instance was removed.
      
         The allocated error log messages still needed to be freed.
      
      * tag 'trace-v6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: Free error logs of tracing instances
        tracing: Fix ftrace_boot_snapshot command line logic
        tracing: Have tracing_snapshot_instance_cond() write errors to the appropriate instance
        tracing: Error if a trace event has an array for a __field()
        tracing/osnoise: Fix notify new tracing_max_latency
        tracing/timerlat: Notify new max thread latency
        ftrace: Mark get_lock_parent_ip() __always_inline
        ring-buffer: Fix race while reader and writer are on the same page
        tracing/synthetic: Fix races on freeing last_cmd
      99ddf225