1. 27 Jan, 2023 1 commit
  2. 26 Jan, 2023 2 commits
  3. 24 Jan, 2023 2 commits
    • Javier Martinez Canillas's avatar
      drm/fb-helper: Use a per-driver FB deferred I/O handler · d6591da5
      Javier Martinez Canillas authored
      The DRM fbdev emulation layer sets the struct fb_info .fbdefio field to
      a struct fb_deferred_io pointer, that is shared across all drivers that
      use the generic drm_fbdev_generic_setup() helper function.
      
      It is a problem because the fbdev core deferred I/O logic assumes that
      the struct fb_deferred_io data is not shared between devices, and it's
      stored there state such as the list of pages touched and a mutex that
      is use to synchronize between the fb_deferred_io_track_page() function
      that track the dirty pages and fb_deferred_io_work() workqueue handler
      doing the actual deferred I/O.
      
      The latter can lead to the following error, since it may happen that two
      drivers are probed and then one is removed, which causes the mutex bo be
      destroyed and not existing anymore by the time the other driver tries to
      grab it for the fbdev deferred I/O logic:
      
      [  369.756553] ------------[ cut here ]------------
      [  369.756604] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      [  369.756631] WARNING: CPU: 2 PID: 1023 at kernel/locking/mutex.c:582 __mutex_lock+0x348/0x424
      [  369.756744] Modules linked in: nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ip
      v6 nf_defrag_ipv4 ip_set nf_tables nfnetlink qrtr btsdio bluetooth sunrpc brcmfmac snd_soc_hdmi_codec cpufreq_dt cfg80211 vfat fat vc4 rfkill brcmutil raspberrypi_cpufreq i2c_bcm2835 iproc_rng200 bcm2711_thermal snd_soc_core snd_pcm_dmaen
      gine leds_gpio nvmem_rmem joydev hid_cherry uas usb_storage gpio_raspberrypi_exp v3d snd_pcm raspberrypi_hwmon gpu_sched bcm2835_wdt broadcom bcm_phy_lib snd_timer genet snd mdio_bcm_unimac clk_bcm2711_dvp soundcore drm_display_helper pci
      e_brcmstb cec ip6_tables ip_tables fuse
      [  369.757400] CPU: 2 PID: 1023 Comm: fbtest Not tainted 5.19.0-rc6+ #94
      [  369.757455] Hardware name: raspberrypi,4-model-b Raspberry Pi 4 Model B Rev 1.4/Raspberry Pi 4 Model B Rev 1.4, BIOS 2022.10 10/01/2022
      [  369.757538] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [  369.757596] pc : __mutex_lock+0x348/0x424
      [  369.757635] lr : __mutex_lock+0x348/0x424
      [  369.757672] sp : ffff80000953bb00
      [  369.757703] x29: ffff80000953bb00 x28: ffff17fdc087c000 x27: 0000000000000002
      [  369.757771] x26: ffff17fdc349f9b0 x25: fffffc5ff72e0100 x24: 0000000000000000
      [  369.757838] x23: 0000000000000000 x22: 0000000000000002 x21: ffffa618df636f10
      [  369.757903] x20: ffff80000953bb68 x19: ffffa618e0f18138 x18: 0000000000000001
      [  369.757968] x17: 0000000020000000 x16: 0000000000000002 x15: 0000000000000000
      [  369.758032] x14: 0000000000000000 x13: 284e4f5f4e524157 x12: 5f534b434f4c5f47
      [  369.758097] x11: 00000000ffffdfff x10: ffffa618e0c79f88 x9 : ffffa618de472484
      [  369.758162] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 00000000000affa8
      [  369.758227] x5 : 0000000000001fff x4 : 0000000000000000 x3 : 0000000000000027
      [  369.758292] x2 : 0000000000000001 x1 : ffff17fdc087c000 x0 : 0000000000000028
      [  369.758357] Call trace:
      [  369.758383]  __mutex_lock+0x348/0x424
      [  369.758420]  mutex_lock_nested+0x4c/0x5c
      [  369.758459]  fb_deferred_io_mkwrite+0x78/0x1d8
      [  369.758507]  do_page_mkwrite+0x5c/0x19c
      [  369.758550]  wp_page_shared+0x70/0x1a0
      [  369.758590]  do_wp_page+0x3d0/0x510
      [  369.758628]  handle_pte_fault+0x1c0/0x1e0
      [  369.758670]  __handle_mm_fault+0x250/0x380
      [  369.758712]  handle_mm_fault+0x17c/0x3a4
      [  369.758753]  do_page_fault+0x158/0x530
      [  369.758792]  do_mem_abort+0x50/0xa0
      [  369.758831]  el0_da+0x78/0x19c
      [  369.758864]  el0t_64_sync_handler+0xbc/0x150
      [  369.758904]  el0t_64_sync+0x190/0x194
      [  369.758942] irq event stamp: 11395
      [  369.758973] hardirqs last  enabled at (11395): [<ffffa618de472554>] __up_console_sem+0x74/0x80
      [  369.759042] hardirqs last disabled at (11394): [<ffffa618de47254c>] __up_console_sem+0x6c/0x80
      [  369.760554] softirqs last  enabled at (11392): [<ffffa618de330a74>] __do_softirq+0x4c4/0x6b8
      [  369.762060] softirqs last disabled at (11383): [<ffffa618de3c9124>] __irq_exit_rcu+0x104/0x214
      [  369.763564] ---[ end trace 0000000000000000 ]---
      
      Fixes: d536540f ("drm/fb-helper: Add generic fbdev emulation .fb_probe function")
      Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-4-javierm@redhat.com
      d6591da5
    • Javier Martinez Canillas's avatar
      drm/fb-helper: Check fb_deferred_io_init() return value · cc88ad78
      Javier Martinez Canillas authored
      The fb_deferred_io_init() can fail and return an errno code but currently
      there is no check for its return value.
      
      Fix that and propagate to errno to the caller in the case of a failure.
      
      Fixes: d536540f ("drm/fb-helper: Add generic fbdev emulation .fb_probe function")
      Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-3-javierm@redhat.com
      cc88ad78
  4. 19 Jan, 2023 2 commits
  5. 18 Jan, 2023 4 commits
    • Nirmoy Das's avatar
      drm/i915: Remove unused variable · 2293a73a
      Nirmoy Das authored
      Removed unused i915 var.
      
      Fixes: a273e957 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized")
      Signed-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230118170624.9326-1-nirmoy.das@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      2293a73a
    • Thomas Zimmermann's avatar
      drm/fb-helper: Set framebuffer for vga-switcheroo clients · d1d51014
      Thomas Zimmermann authored
      Set the framebuffer info for drivers that support VGA switcheroo. Only
      affects the amdgpu and nouveau drivers, which use VGA switcheroo and
      generic fbdev emulation. For other drivers, this does nothing.
      
      This fixes a potential regression in the console code. Both, amdgpu and
      nouveau, invoked vga_switcheroo_client_fb_set() from their internal fbdev
      code. But the call got lost when the drivers switched to the generic
      emulation.
      
      Fixes: 087451f3 ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.")
      Fixes: 4a16dd9d ("drm/nouveau/kms: switch to drm fbdev helpers")
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Javier Martinez Canillas <javierm@redhat.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Evan Quan <evan.quan@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Hawking Zhang <Hawking.Zhang@amd.com>
      Cc: Likun Gao <Likun.Gao@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Stanley Yang <Stanley.Yang@amd.com>
      Cc: "Tianci.Yin" <tianci.yin@amd.com>
      Cc: Xiaojian Du <Xiaojian.Du@amd.com>
      Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
      Cc: YiPeng Chai <YiPeng.Chai@amd.com>
      Cc: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
      Cc: Bokun Zhang <Bokun.Zhang@amd.com>
      Cc: Guchun Chen <guchun.chen@amd.com>
      Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
      Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
      Cc: Mario Limonciello <mario.limonciello@amd.com>
      Cc: Solomon Chiu <solomon.chiu@amd.com>
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: Felix Kuehling <Felix.Kuehling@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: "Marek Olšák" <marek.olsak@amd.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.17+
      Link: https://patchwork.freedesktop.org/patch/msgid/20230116115425.13484-3-tzimmermann@suse.de
      d1d51014
    • Thomas Zimmermann's avatar
      drm/i915: Allow switching away via vga-switcheroo if uninitialized · a273e957
      Thomas Zimmermann authored
      Always allow switching away via vga-switcheroo if the display is
      uninitalized. Instead prevent switching to i915 if the device has
      not been initialized.
      
      This issue was introduced by commit 5df7bd13 ("drm/i915: skip
      display initialization when there is no display") protected, which
      protects code paths from being executed on uninitialized devices.
      In the case of vga-switcheroo, we want to allow a switch away from
      i915's device. So run vga_switcheroo_process_delayed_switch() and
      test in the switcheroo callbacks if the i915 device is available.
      
      Fixes: 5df7bd13 ("drm/i915: skip display initialization when there is no display")
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: "Jouni Högander" <jouni.hogander@intel.com>
      Cc: Uma Shankar <uma.shankar@intel.com>
      Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
      Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Ramalingam C <ramalingam.c@intel.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Andi Shyti <andi.shyti@linux.intel.com>
      Cc: Andrzej Hajda <andrzej.hajda@intel.com>
      Cc: "José Roberto de Souza" <jose.souza@intel.com>
      Cc: Julia Lawall <Julia.Lawall@inria.fr>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.14+
      Link: https://patchwork.freedesktop.org/patch/msgid/20230116115425.13484-2-tzimmermann@suse.de
      a273e957
    • Arnd Bergmann's avatar
      drm/panfrost: fix GENERIC_ATOMIC64 dependency · 6437a549
      Arnd Bergmann authored
      On ARMv5 and earlier, a randconfig build can still run into
      
      WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE
        Depends on [n]: IOMMU_SUPPORT [=y] && (ARM [=y] || ARM64 || COMPILE_TEST [=y]) && !GENERIC_ATOMIC64 [=y]
        Selected by [y]:
        - DRM_PANFROST [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARM [=y] || ARM64 || COMPILE_TEST [=y] && !GENERIC_ATOMIC64 [=y]) && MMU [=y]
      
      Rework the dependencies to always require a working cmpxchg64.
      
      Fixes: db594ba3 ("drm/panfrost: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarSteven Price <steven.price@arm.com>
      Signed-off-by: default avatarSteven Price <steven.price@arm.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230117164456.1591901-1-arnd@kernel.org
      6437a549
  6. 13 Jan, 2023 1 commit
  7. 12 Jan, 2023 3 commits
  8. 11 Jan, 2023 1 commit
  9. 10 Jan, 2023 2 commits
  10. 09 Jan, 2023 1 commit
  11. 06 Jan, 2023 1 commit
  12. 05 Jan, 2023 3 commits
  13. 03 Jan, 2023 3 commits
  14. 02 Jan, 2023 4 commits
  15. 01 Jan, 2023 6 commits
  16. 31 Dec, 2022 2 commits
  17. 30 Dec, 2022 2 commits
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c8451c14
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These are new ACPI IRQ override quirks, low-power S0 idle (S0ix)
        support adjustments and ACPI backlight handling fixes, mostly for
        platforms using AMD chips.
      
        Specifics:
      
         - Add ACPI IRQ override quirks for Asus ExpertBook B2502, Lenovo
           14ALC7, and XMG Core 15 (Hans de Goede, Adrian Freund, Erik
           Schumacher).
      
         - Adjust ACPI video detection fallback path to prevent
           non-operational ACPI backlight devices from being created on
           systems where the native driver does not detect a suitable panel
           (Mario Limonciello).
      
         - Fix Apple GMUX backlight detection (Hans de Goede).
      
         - Add a low-power S0 idle (S0ix) handling quirk for HP Elitebook 865
           and stop using AMD-specific low-power S0 idle code path for systems
           with Rembrandt chips and newer (Mario Limonciello)"
      
      * tag 'acpi-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: x86: s2idle: Stop using AMD specific codepath for Rembrandt+
        ACPI: x86: s2idle: Force AMD GUID/_REV 2 on HP Elitebook 865
        ACPI: video: Fix Apple GMUX backlight detection
        ACPI: resource: Add Asus ExpertBook B2502 to Asus quirks
        ACPI: resource: do IRQ override on Lenovo 14ALC7
        ACPI: resource: do IRQ override on XMG Core 15
        ACPI: video: Don't enable fallback path for creating ACPI backlight by default
        drm/amd/display: Report to ACPI video if no panels were found
        ACPI: video: Allow GPU drivers to report no panels
      c8451c14
    • Linus Torvalds's avatar
      Merge tag 'sound-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 262eef26
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a few small fixes:
      
         - A regression fix for HDMI audio on HD-audio AMD codecs
      
         - Fixes for LINE6 MIDI handling
      
         - HD-audio quirk for Dell laptops"
      
      * tag 'sound-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/hdmi: Static PCM mapping again with AMD HDMI codecs
        ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops
        ALSA: line6: fix stack overflow in line6_midi_transmit
        ALSA: line6: correct midi status byte when receiving data from podxt
      262eef26