1. 04 Mar, 2024 1 commit
  2. 01 Mar, 2024 6 commits
  3. 28 Feb, 2024 4 commits
  4. 27 Feb, 2024 5 commits
  5. 26 Feb, 2024 10 commits
  6. 22 Feb, 2024 14 commits
    • Melissa Wen's avatar
      drm/amd/display: fix null-pointer dereference on edid reading · 21db6199
      Melissa Wen authored
      Use i2c adapter when there isn't aux_mode in dc_link to fix a
      null-pointer derefence that happens when running
      igt@kms_force_connector_basic in a system with DCN2.1 and HDMI connector
      detected as below:
      
      [  +0.178146] BUG: kernel NULL pointer dereference, address: 00000000000004c0
      [  +0.000010] #PF: supervisor read access in kernel mode
      [  +0.000005] #PF: error_code(0x0000) - not-present page
      [  +0.000004] PGD 0 P4D 0
      [  +0.000006] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [  +0.000006] CPU: 15 PID: 2368 Comm: kms_force_conne Not tainted 6.5.0-asdn+ #152
      [  +0.000005] Hardware name: HP HP ENVY x360 Convertible 13-ay1xxx/8929, BIOS F.01 07/14/2021
      [  +0.000004] RIP: 0010:i2c_transfer+0xd/0x100
      [  +0.000011] Code: ea fc ff ff 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 54 55 53 <48> 8b 47 10 48 89 fb 48 83 38 00 0f 84 b3 00 00 00 83 3d 2f 80 16
      [  +0.000004] RSP: 0018:ffff9c4f89c0fad0 EFLAGS: 00010246
      [  +0.000005] RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000080
      [  +0.000003] RDX: 0000000000000002 RSI: ffff9c4f89c0fb20 RDI: 00000000000004b0
      [  +0.000003] RBP: ffff9c4f89c0fb80 R08: 0000000000000080 R09: ffff8d8e0b15b980
      [  +0.000003] R10: 00000000000380e0 R11: 0000000000000000 R12: 0000000000000080
      [  +0.000002] R13: 0000000000000002 R14: ffff9c4f89c0fb0e R15: ffff9c4f89c0fb0f
      [  +0.000004] FS:  00007f9ad2176c40(0000) GS:ffff8d90fe9c0000(0000) knlGS:0000000000000000
      [  +0.000003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  +0.000004] CR2: 00000000000004c0 CR3: 0000000121bc4000 CR4: 0000000000750ee0
      [  +0.000003] PKRU: 55555554
      [  +0.000003] Call Trace:
      [  +0.000006]  <TASK>
      [  +0.000006]  ? __die+0x23/0x70
      [  +0.000011]  ? page_fault_oops+0x17d/0x4c0
      [  +0.000008]  ? preempt_count_add+0x6e/0xa0
      [  +0.000008]  ? srso_alias_return_thunk+0x5/0x7f
      [  +0.000011]  ? exc_page_fault+0x7f/0x180
      [  +0.000009]  ? asm_exc_page_fault+0x26/0x30
      [  +0.000013]  ? i2c_transfer+0xd/0x100
      [  +0.000010]  drm_do_probe_ddc_edid+0xc2/0x140 [drm]
      [  +0.000067]  ? srso_alias_return_thunk+0x5/0x7f
      [  +0.000006]  ? _drm_do_get_edid+0x97/0x3c0 [drm]
      [  +0.000043]  ? __pfx_drm_do_probe_ddc_edid+0x10/0x10 [drm]
      [  +0.000042]  edid_block_read+0x3b/0xd0 [drm]
      [  +0.000043]  _drm_do_get_edid+0xb6/0x3c0 [drm]
      [  +0.000041]  ? __pfx_drm_do_probe_ddc_edid+0x10/0x10 [drm]
      [  +0.000043]  drm_edid_read_custom+0x37/0xd0 [drm]
      [  +0.000044]  amdgpu_dm_connector_mode_valid+0x129/0x1d0 [amdgpu]
      [  +0.000153]  drm_connector_mode_valid+0x3b/0x60 [drm_kms_helper]
      [  +0.000000]  __drm_helper_update_and_validate+0xfe/0x3c0 [drm_kms_helper]
      [  +0.000000]  ? amdgpu_dm_connector_get_modes+0xb6/0x520 [amdgpu]
      [  +0.000000]  ? srso_alias_return_thunk+0x5/0x7f
      [  +0.000000]  drm_helper_probe_single_connector_modes+0x2ab/0x540 [drm_kms_helper]
      [  +0.000000]  status_store+0xb2/0x1f0 [drm]
      [  +0.000000]  kernfs_fop_write_iter+0x136/0x1d0
      [  +0.000000]  vfs_write+0x24d/0x440
      [  +0.000000]  ksys_write+0x6f/0xf0
      [  +0.000000]  do_syscall_64+0x60/0xc0
      [  +0.000000]  ? srso_alias_return_thunk+0x5/0x7f
      [  +0.000000]  ? syscall_exit_to_user_mode+0x2b/0x40
      [  +0.000000]  ? srso_alias_return_thunk+0x5/0x7f
      [  +0.000000]  ? do_syscall_64+0x6c/0xc0
      [  +0.000000]  ? do_syscall_64+0x6c/0xc0
      [  +0.000000]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
      [  +0.000000] RIP: 0033:0x7f9ad46b4b00
      [  +0.000000] Code: 40 00 48 8b 15 19 b3 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d e1 3a 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89
      [  +0.000000] RSP: 002b:00007ffcbd3bd6d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
      [  +0.000000] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9ad46b4b00
      [  +0.000000] RDX: 0000000000000002 RSI: 00007f9ad48a7417 RDI: 0000000000000009
      [  +0.000000] RBP: 0000000000000002 R08: 0000000000000064 R09: 0000000000000000
      [  +0.000000] R10: 0000000000000000 R11: 0000000000000202 R12: 00007f9ad48a7417
      [  +0.000000] R13: 0000000000000009 R14: 00007ffcbd3bd760 R15: 0000000000000001
      [  +0.000000]  </TASK>
      [  +0.000000] Modules linked in: ctr ccm rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel btmtk bluetooth uvcvideo videobuf2_vmalloc sha3_generic videobuf2_memops uvc jitterentropy_rng videobuf2_v4l2 videodev drbg videobuf2_common ansi_cprng mc ecdh_generic ecc qrtr binfmt_misc hid_sensor_accel_3d hid_sensor_magn_3d hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf industrialio snd_ctl_led joydev hid_sensor_iio_common rtw89_8852ae rtw89_8852a rtw89_pci snd_hda_codec_realtek rtw89_core snd_hda_codec_generic intel_rapl_msr ledtrig_audio intel_rapl_common snd_hda_codec_hdmi mac80211 snd_hda_intel snd_intel_dspcfg kvm_amd snd_hda_codec snd_soc_dmic snd_acp3x_rn snd_acp3x_pdm_dma libarc4 snd_hwdep snd_soc_core kvm snd_hda_core cfg80211 snd_pci_acp6x snd_pcm nls_ascii snd_timer hp_wmi snd_pci_acp5x nls_cp437 snd_rn_pci_acp3x ucsi_acpi sparse_keymap ccp snd platform_profile snd_acp_config typec_ucsi irqbypass vfat sp5100_tco
      [  +0.000000]  snd_soc_acpi fat rapl pcspkr wmi_bmof roles rfkill rng_core snd_pci_acp3x soundcore k10temp watchdog typec battery ac amd_pmc acpi_tad button hid_sensor_hub hid_multitouch evdev serio_raw msr parport_pc ppdev lp parport fuse loop efi_pstore configfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 btrfs blake2b_generic dm_crypt dm_mod efivarfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx libcrc32c crc32c_generic xor raid6_pq raid1 raid0 multipath linear md_mod amdgpu amdxcp i2c_algo_bit drm_ttm_helper ttm crc32_pclmul crc32c_intel drm_exec gpu_sched drm_suballoc_helper nvme ghash_clmulni_intel drm_buddy drm_display_helper sha512_ssse3 nvme_core ahci xhci_pci sha512_generic hid_generic xhci_hcd libahci rtsx_pci_sdmmc t10_pi i2c_hid_acpi drm_kms_helper i2c_hid mmc_core libata aesni_intel crc64_rocksoft_generic crypto_simd amd_sfh crc64_rocksoft scsi_mod usbcore cryptd crc_t10dif cec drm crct10dif_generic hid rtsx_pci crct10dif_pclmul scsi_common rc_core crc64 i2c_piix4
      [  +0.000000]  usb_common crct10dif_common video wmi
      [  +0.000000] CR2: 00000000000004c0
      [  +0.000000] ---[ end trace 0000000000000000 ]---
      
      Fixes: 0e859faf ("drm/amd/display: Remove unwanted drm edid references")
      Signed-off-by: default avatarMelissa Wen <mwen@igalia.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      21db6199
    • Yifan Zhang's avatar
      drm/amdgpu: add vcn 4.0.6 discovery support · a24029cc
      Yifan Zhang authored
      This patch is to add vcn 4.0.6 support
      Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
      Signed-off-by: default avatarYifan Zhang <yifan1.zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a24029cc
    • Ilpo Järvinen's avatar
      drm/amdgpu: Use RMW accessors for changing LNKCTL2 · bb87e511
      Ilpo Järvinen authored
      Convert open coded RMW accesses for LNKCTL2 to use
      pcie_capability_clear_and_set_word() which makes its easier to
      understand what the code tries to do.
      
      LNKCTL2 is not really owned by any driver because it is a collection of
      control bits that PCI core might need to touch. RMW accessors already
      have support for proper locking for a selected set of registers
      (LNKCTL2 is not yet among them but likely will be in the future) to
      avoid losing concurrent updates.
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Suggested-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      bb87e511
    • Kunwu Chan's avatar
      drm/amdgpu: Simplify the allocation of sync slab caches · a5fc4e50
      Kunwu Chan authored
      Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
      to simplify the creation of SLAB caches.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a5fc4e50
    • Veerabadhran Gopalakrishnan's avatar
      drm/amdgpu/soc21: Enabling PG and CG flags for VCN 4.0.6 · 84eaa2c2
      Veerabadhran Gopalakrishnan authored
      Enabled the VCN Power Gating and Clock Gating flags for VCN 4.0.6.
      Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
      Signed-off-by: default avatarVeerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      84eaa2c2
    • Srinivasan Shanmugam's avatar
      drm/amdgpu/display: Address kdoc for 'is_psr_su' in 'fill_dc_dirty_rects' · 3651306a
      Srinivasan Shanmugam authored
      The is_psr_su parameter is a boolean flag indicating whether the Panel
      Self Refresh Selective Update (PSR SU) feature is enabled which is a
      power-saving feature that allows only the updated regions of the screen
      to be refreshed, reducing the amount of data that needs to be sent to
      the display.
      
      Fixes the below with gcc W=1:
      drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5257: warning: Function parameter or member 'is_psr_su' not described in 'fill_dc_dirty_rects'
      
      Fixes: d16df040 ("drm/amdgpu: make damage clips support configurable")
      Cc: stable@vger.kernel.org
      Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
      Cc: Mario Limonciello <mario.limonciello@amd.com>
      Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
      Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3651306a
    • Ilpo Järvinen's avatar
      drm/radeon: Use RMW accessors for changing LNKCTL2 · 756762ae
      Ilpo Järvinen authored
      Convert open coded RMW accesses for LNKCTL2 to use
      pcie_capability_clear_and_set_word() which makes its easier to
      understand what the code tries to do.
      
      LNKCTL2 is not really owned by any driver because it is a collection of
      control bits that PCI core might need to touch. RMW accessors already
      have support for proper locking for a selected set of registers
      (LNKCTL2 is not yet among them but likely will be in the future) to
      avoid losing concurrent updates.
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Suggested-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      756762ae
    • Armin Wolf's avatar
      drm/amd/display: Fix memory leak in dm_sw_fini() · 145242ed
      Armin Wolf authored
      After destroying dmub_srv, the memory associated with it is
      not freed, causing a memory leak:
      
      unreferenced object 0xffff896302b45800 (size 1024):
        comm "(udev-worker)", pid 222, jiffies 4294894636
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace (crc 6265fd77):
          [<ffffffff993495ed>] kmalloc_trace+0x29d/0x340
          [<ffffffffc0ea4a94>] dm_dmub_sw_init+0xb4/0x450 [amdgpu]
          [<ffffffffc0ea4e55>] dm_sw_init+0x15/0x2b0 [amdgpu]
          [<ffffffffc0ba8557>] amdgpu_device_init+0x1417/0x24e0 [amdgpu]
          [<ffffffffc0bab285>] amdgpu_driver_load_kms+0x15/0x190 [amdgpu]
          [<ffffffffc0ba09c7>] amdgpu_pci_probe+0x187/0x4e0 [amdgpu]
          [<ffffffff9968fd1e>] local_pci_probe+0x3e/0x90
          [<ffffffff996918a3>] pci_device_probe+0xc3/0x230
          [<ffffffff99805872>] really_probe+0xe2/0x480
          [<ffffffff99805c98>] __driver_probe_device+0x78/0x160
          [<ffffffff99805daf>] driver_probe_device+0x1f/0x90
          [<ffffffff9980601e>] __driver_attach+0xce/0x1c0
          [<ffffffff99803170>] bus_for_each_dev+0x70/0xc0
          [<ffffffff99804822>] bus_add_driver+0x112/0x210
          [<ffffffff99807245>] driver_register+0x55/0x100
          [<ffffffff990012d1>] do_one_initcall+0x41/0x300
      
      Fix this by freeing dmub_srv after destroying it.
      
      Fixes: 743b9786 ("drm/amd/display: Hook up the DMUB service in DM")
      Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      145242ed
    • Lenko Donchev's avatar
      drm/amd/display: Use kcalloc() instead of kzalloc() · f634ee17
      Lenko Donchev authored
      We are trying to get rid of all multiplications from allocation
      functions to prevent integer overflows. Here the multiplication is
      obviously safe, but using kcalloc() is more appropriate and improves
      readability. This patch has no effect on runtime behavior.
      
      Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments
      Link: https://github.com/KSPP/linux/issues/162Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarLenko Donchev <lenko.donchev@gmail.com>
      Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f634ee17
    • Kunwu Chan's avatar
      drm/amdgpu: Simplify the allocation of mux_chunk slab caches · e4e4618b
      Kunwu Chan authored
      Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
      to simplify the creation of SLAB caches.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e4e4618b
    • Kunwu Chan's avatar
      drm/amdgpu: Simplify the allocation of fence slab caches · 3d14cb02
      Kunwu Chan authored
      Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
      to simplify the creation of SLAB caches.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3d14cb02
    • Veerabadhran Gopalakrishnan's avatar
      437591d2
    • Veerabadhran Gopalakrishnan's avatar
      drm/amdgpu/vcn: Enable VCN 4.0.6 Support · 2b53b366
      Veerabadhran Gopalakrishnan authored
      Modified driver to use the appropriate FW files and instance.
      
      v2: squash in fixes (Alex)
      Reviewed-by: default avatarLeo Liu <leo.liu@amd.com>
      Signed-off-by: default avatarVeerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      2b53b366
    • Saleemkhan Jamadar's avatar
      drm/amdgpu/jpeg: add support for jpeg multi instance · 07cb7fd0
      Saleemkhan Jamadar authored
      Enable support for multi instance on JPEG 4.0.6.
      
      v2: squash in fixes (Alex)
      Signed-off-by: default avatarSaleemkhan Jamadar <saleemkhan.jamadar@amd.com>
      Reviewed-by: default avatarVeerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      07cb7fd0