1. 28 Feb, 2019 12 commits
    • Evan Quan's avatar
      drm/amd/powerplay: set default fclk for no fclk dpm support case · f5e79735
      Evan Quan authored
      Set the default fclk as what we got from VBIOS.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f5e79735
    • Evan Quan's avatar
      drm/amd/powerplay: support retrieving clock information from other sysplls · 2e41a874
      Evan Quan authored
      There will be some needs to retrieve clock information from other
      sysplls also except default 0.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      2e41a874
    • Evan Quan's avatar
      drm/amd/powerplay: overwrite ODSettingsMin for UCLK_FMAX feature · 3a301bc5
      Evan Quan authored
      For UCLK_FMAX OD feature, SMU overwrites the highest UCLK DPM level freq.
      Therefore it can only take values that are greater than the second highest
      DPM level freq.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3a301bc5
    • Evan Quan's avatar
      drm/amd/powerplay: force FCLK to highest also for 5K or higher displays · 971e7ac1
      Evan Quan authored
      This can fix possible screen freeze on high resolution displays.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      971e7ac1
    • Evan Quan's avatar
      drm/amd/powerplay: need to reapply the dpm level settings · d19e9233
      Evan Quan authored
      As these settings got reset during above phm_apply_clock_adjust_rules.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d19e9233
    • Evan Quan's avatar
      drm/amd/powerplay: drop redundant soft min/max settings · fe1331a2
      Evan Quan authored
      As these are already set during apply_clocks_adjust_rules.
      Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      fe1331a2
    • Kevin Wang's avatar
      drm/amdkfd: use init_mqd function to allocate object for hid_mqd (CI) · cac734c2
      Kevin Wang authored
      if use the legacy method to allocate object, when mqd_hiq need to run
      uninit code, it will be cause WARNING call trace.
      
      eg: (s3 suspend test)
      [   34.918944] Call Trace:
      [   34.918948]  [<ffffffff92961dc1>] dump_stack+0x19/0x1b
      [   34.918950]  [<ffffffff92297648>] __warn+0xd8/0x100
      [   34.918951]  [<ffffffff9229778d>] warn_slowpath_null+0x1d/0x20
      [   34.918991]  [<ffffffffc03ce1fe>] uninit_mqd_hiq_sdma+0x4e/0x50 [amdgpu]
      [   34.919028]  [<ffffffffc03d0ef7>] uninitialize+0x37/0xe0 [amdgpu]
      [   34.919064]  [<ffffffffc03d15a6>] kernel_queue_uninit+0x16/0x30 [amdgpu]
      [   34.919086]  [<ffffffffc03d26c2>] pm_uninit+0x12/0x20 [amdgpu]
      [   34.919107]  [<ffffffffc03d4915>] stop_nocpsch+0x15/0x20 [amdgpu]
      [   34.919129]  [<ffffffffc03c1dce>] kgd2kfd_suspend.part.4+0x2e/0x50 [amdgpu]
      [   34.919150]  [<ffffffffc03c2667>] kgd2kfd_suspend+0x17/0x20 [amdgpu]
      [   34.919171]  [<ffffffffc03c103a>] amdgpu_amdkfd_suspend+0x1a/0x20 [amdgpu]
      [   34.919187]  [<ffffffffc02ec428>] amdgpu_device_suspend+0x88/0x3a0 [amdgpu]
      [   34.919189]  [<ffffffff922e22cf>] ? enqueue_entity+0x2ef/0xbe0
      [   34.919205]  [<ffffffffc02e8220>] amdgpu_pmops_suspend+0x20/0x30 [amdgpu]
      [   34.919207]  [<ffffffff925c56ff>] pci_pm_suspend+0x6f/0x150
      [   34.919208]  [<ffffffff925c5690>] ? pci_pm_freeze+0xf0/0xf0
      [   34.919210]  [<ffffffff926b45c6>] dpm_run_callback+0x46/0x90
      [   34.919212]  [<ffffffff926b49db>] __device_suspend+0xfb/0x2a0
      [   34.919213]  [<ffffffff926b4b9f>] async_suspend+0x1f/0xa0
      [   34.919214]  [<ffffffff922c918f>] async_run_entry_fn+0x3f/0x130
      [   34.919216]  [<ffffffff922b9d4f>] process_one_work+0x17f/0x440
      [   34.919217]  [<ffffffff922bade6>] worker_thread+0x126/0x3c0
      [   34.919218]  [<ffffffff922bacc0>] ? manage_workers.isra.25+0x2a0/0x2a0
      [   34.919220]  [<ffffffff922c1c31>] kthread+0xd1/0xe0
      [   34.919221]  [<ffffffff922c1b60>] ? insert_kthread_work+0x40/0x40
      [   34.919222]  [<ffffffff92974c1d>] ret_from_fork_nospec_begin+0x7/0x21
      [   34.919224]  [<ffffffff922c1b60>] ? insert_kthread_work+0x40/0x40
      [   34.919224] ---[ end trace 38cd9f65c963adad ]---
      Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
      Reviewed-by: default avatarOak Zeng <Oak.Zeng@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      cac734c2
    • Huang Rui's avatar
      drm/amdgpu: use REG32_PCIE wrapper instead for psp · 76f8f699
      Huang Rui authored
      This patch uses REG32_PCIE wrapper instead of writting pci_index2 and reading
      pci_data2 for psp. This sequence should be protected by pcie_idx_lock.
      Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      76f8f699
    • Huang Rui's avatar
      drm/amd/powerplay: use REG32_PCIE wrapper instead for powerplay · 5307db85
      Huang Rui authored
      This patch uses REG32_PCIE wrapper instead of writting pci_index2 and reading
      pci_data2 for powerplay. This sequence should be protected by pcie_idx_lock.
      Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      5307db85
    • Anthony Koo's avatar
      drm/amd/display: Fix issue with link_active state not correct for MST · 293b9160
      Anthony Koo authored
      [Why]
      For MST, link not disabled until all streams disabled
      
      [How]
      Add check for stream_count before setting link_active = false for MST
      Signed-off-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
      Reviewed-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
      Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      293b9160
    • Mathias Fröhlich's avatar
      drm/amd/display: Fix reference counting for struct dc_sink. · dcd5fb82
      Mathias Fröhlich authored
      Reference counting in amdgpu_dm_connector for amdgpu_dm_connector::dc_sink
      and amdgpu_dm_connector::dc_em_sink as well as in dc_link::local_sink seems
      to be out of shape. Thus make reference counting consistent for these
      members and just plain increment the reference count when the variable
      gets assigned and decrement when the pointer is set to zero or replaced.
      Also simplify reference counting in selected function sopes to be sure the
      reference is released in any case. In some cases add NULL pointer check
      before dereferencing.
      At a hand full of places a comment is placed to stat that the reference
      increment happened already somewhere else.
      
      This actually fixes the following kernel bug on my system when enabling
      display core in amdgpu. There are some more similar bug reports around,
      so it probably helps at more places.
      
         kernel BUG at mm/slub.c:294!
         invalid opcode: 0000 [#1] SMP PTI
         CPU: 9 PID: 1180 Comm: Xorg Not tainted 5.0.0-rc1+ #2
         Hardware name: Supermicro X10DAi/X10DAI, BIOS 3.0a 02/05/2018
         RIP: 0010:__slab_free+0x1e2/0x3d0
         Code: 8b 54 24 30 48 89 4c 24 28 e8 da fb ff ff 4c 8b 54 24 28 85 c0 0f 85 67 fe ff ff 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <0f> 0b 49 3b 5c 24 28 75 ab 48 8b 44 24 30 49 89 4c 24 28 49 89 44
         RSP: 0018:ffffb0978589fa90 EFLAGS: 00010246
         RAX: ffff92f12806c400 RBX: 0000000080200019 RCX: ffff92f12806c400
         RDX: ffff92f12806c400 RSI: ffffdd6421a01a00 RDI: ffff92ed2f406e80
         RBP: ffffb0978589fb40 R08: 0000000000000001 R09: ffffffffc0ee4748
         R10: ffff92f12806c400 R11: 0000000000000001 R12: ffffdd6421a01a00
         R13: ffff92f12806c400 R14: ffff92ed2f406e80 R15: ffffdd6421a01a20
         FS:  00007f4170be0ac0(0000) GS:ffff92ed2fb40000(0000) knlGS:0000000000000000
         CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
         CR2: 0000562818aaa000 CR3: 000000045745a002 CR4: 00000000003606e0
         DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
         DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
         Call Trace:
          ? drm_dbg+0x87/0x90 [drm]
          dc_stream_release+0x28/0x50 [amdgpu]
          amdgpu_dm_connector_mode_valid+0xb4/0x1f0 [amdgpu]
          drm_helper_probe_single_connector_modes+0x492/0x6b0 [drm_kms_helper]
          drm_mode_getconnector+0x457/0x490 [drm]
          ? drm_connector_property_set_ioctl+0x60/0x60 [drm]
          drm_ioctl_kernel+0xa9/0xf0 [drm]
          drm_ioctl+0x201/0x3a0 [drm]
          ? drm_connector_property_set_ioctl+0x60/0x60 [drm]
          amdgpu_drm_ioctl+0x49/0x80 [amdgpu]
          do_vfs_ioctl+0xa4/0x630
          ? __sys_recvmsg+0x83/0xa0
          ksys_ioctl+0x60/0x90
          __x64_sys_ioctl+0x16/0x20
          do_syscall_64+0x5b/0x160
          entry_SYSCALL_64_after_hwframe+0x44/0xa9
         RIP: 0033:0x7f417110809b
         Code: 0f 1e fa 48 8b 05 ed bd 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d bd bd 0c 00 f7 d8 64 89 01 48
         RSP: 002b:00007ffdd8d1c268 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
         RAX: ffffffffffffffda RBX: 0000562818a8ebc0 RCX: 00007f417110809b
         RDX: 00007ffdd8d1c2a0 RSI: 00000000c05064a7 RDI: 0000000000000012
         RBP: 00007ffdd8d1c2a0 R08: 0000562819012280 R09: 0000000000000007
         R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c05064a7
         R13: 0000000000000012 R14: 0000000000000012 R15: 00007ffdd8d1c2a0
         Modules linked in: nfsv4 dns_resolver nfs lockd grace fscache fuse vfat fat amdgpu intel_rapl sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul chash gpu_sched crc32_pclmul snd_hda_codec_realtek ghash_clmulni_intel amd_iommu_v2 iTCO_wdt iTCO_vendor_support ttm snd_hda_codec_generic snd_hda_codec_hdmi ledtrig_audio snd_hda_intel drm_kms_helper snd_hda_codec intel_cstate snd_hda_core drm snd_hwdep snd_seq snd_seq_device intel_uncore snd_pcm intel_rapl_perf snd_timer snd soundcore ioatdma pcspkr intel_wmi_thunderbolt mxm_wmi i2c_i801 lpc_ich pcc_cpufreq auth_rpcgss sunrpc igb crc32c_intel i2c_algo_bit dca wmi hid_cherry analog gameport joydev
      
      This patch is based on agd5f/drm-next-5.1-wip. This patch does not require
      all of that, but agd5f/drm-next-5.1-wip contains at least one more dc_sink
      counting fix that I could spot.
      Signed-off-by: default avatarMathias Fröhlich <Mathias.Froehlich@web.de>
      Reviewed-by: default avatarLeo Li <sunpeng.li@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      dcd5fb82
    • Alex Deucher's avatar
      drm/amdgpu/powerplay: add missing breaks in polaris10_smumgr · 6feaa419
      Alex Deucher authored
      This was noticed by Gustavo and his -Wimplicit-fallthrough
      patches.  However, in this case, I believe we should have breaks
      rather than falling though, that said, in practice we should
      never fall through in the first place so there should be no
      change in behavior.
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      6feaa419
  2. 22 Feb, 2019 3 commits
  3. 21 Feb, 2019 4 commits
  4. 20 Feb, 2019 2 commits
  5. 19 Feb, 2019 19 commits