1. 12 3月, 2020 7 次提交
  2. 06 3月, 2020 1 次提交
  3. 05 3月, 2020 7 次提交
    • H
      drm/amdgpu/display: navi1x copy dcn watermark clock settings to smu resume from s3 (v2) · 09ed6ba4
      Hersen Wu 提交于
       This interface is for dGPU Navi1x. Linux dc-pplib interface depends
       on window driver dc implementation.
      
       For Navi1x, clock settings of dcn watermarks are fixed. the settings
       should be passed to smu during boot up and resume from s3.
       boot up: dc calculate dcn watermark clock settings within dc_create,
       dcn20_resource_construct, then call pplib functions below to pass
       the settings to smu:
       smu_set_watermarks_for_clock_ranges
       smu_set_watermarks_table
       navi10_set_watermarks_table
       smu_write_watermarks_table
      
       For Renoir, clock settings of dcn watermark are also fixed values.
       dc has implemented different flow for window driver:
       dc_hardware_init / dc_set_power_state
       dcn10_init_hw
       notify_wm_ranges
       set_wm_ranges
      
       For Linux
       smu_set_watermarks_for_clock_ranges
       renoir_set_watermarks_table
       smu_write_watermarks_table
      
       dc_hardware_init -> amdgpu_dm_init
       dc_set_power_state --> dm_resume
      
       therefore, linux dc-pplib interface of navi10/12/14 is different
       from that of Renoir.
      
      v2: add missing unlock in error case
      Signed-off-by: NHersen Wu <hersenxs.wu@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      09ed6ba4
    • P
      drm/amd/powerplay: map mclk to fclk for COMBINATIONAL_BYPASS case · ab65a371
      Prike Liang 提交于
      When hit COMBINATIONAL_BYPASS the mclk will be bypass and can export
      fclk frequency to user usage.
      Signed-off-by: NPrike Liang <Prike.Liang@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      ab65a371
    • P
      drm/amd/powerplay: fix pre-check condition for setting clock range · 80381d40
      Prike Liang 提交于
      This fix will handle some MP1 FW issue like as mclk dpm table in renoir has a reverse
      dpm clock layout and a zero frequency dpm level as following case.
      
      cat pp_dpm_mclk
      0: 1200Mhz
      1: 1200Mhz
      2: 800Mhz
      3: 0Mhz
      Signed-off-by: NPrike Liang <Prike.Liang@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      80381d40
    • J
      drm/amd/display: fix dcc swath size calculations on dcn1 · a0275dfc
      Josip Pavic 提交于
      [Why]
      Swath sizes are being calculated incorrectly. The horizontal swath size
      should be the product of block height, viewport width, and bytes per
      element, but the calculation uses viewport height instead of width. The
      vertical swath size is similarly incorrectly calculated. The effect of
      this is that we report the wrong DCC caps.
      
      [How]
      Use viewport width in the horizontal swath size calculation and viewport
      height in the vertical swath size calculation.
      Signed-off-by: NJosip Pavic <Josip.Pavic@amd.com>
      Reviewed-by: NAric Cyr <Aric.Cyr@amd.com>
      Acked-by: NRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      a0275dfc
    • B
      drm/amd/display: Clear link settings on MST disable connector · 5ac7fd2f
      Bhawanpreet Lakha 提交于
      [Why]
      If we have a single MST display and we disconnect it, we dont disable that
      link. This causes the old link settings to still exist
      
      Now on a replug for MST we think its a link loss and will try to reallocate
      mst payload which will fail, throwing warning below.
      
      [  129.374192] [drm] Failed to updateMST allocation table forpipe idx:0
      [  129.374206] ------------[ cut here ]------------
      [  129.374284] WARNING: CPU: 14 PID: 1710 at
      drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/core/dc_link.c:3153
      dc_link_allocate_mst_payload+0x1f7/0x220 [amdgpu]
      
      [  129.374285] Modules linked in: amdgpu(OE) amd_iommu_v2 gpu_sched ttm
      drm_kms_helper drm fb_sys_fops syscopyarea sysfillrect sysimgblt
      binfmt_misc nls_iso8859_1 edac_mce_amd snd_hda_codec_realtek
      snd_hda_codec_generic ledtrig_audio kvm snd_hda_codec_hdmi snd_hda_intel
      snd_intel_nhlt snd_hda_codec irqbypass snd_hda_core snd_hwdep snd_pcm
      snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul snd_seq
      crc32_pclmul ghash_clmulni_intel snd_seq_device snd_timer snd aesni_intel
      eeepc_wmi crypto_simd asus_wmi joydev cryptd sparse_keymap input_leds
      soundcore video glue_helper wmi_bmof mxm_wmi k10temp ccp mac_hid
      sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4
      hid_generic usbhid hid igb i2c_algo_bit ahci dca i2c_piix4 libahci
      gpio_amdpt wmi gpio_generic
      
      [  129.374318] CPU: 14 PID: 1710 Comm: kworker/14:2 Tainted: G        W  OE     5.4.0-rc7bhawan+ #480
      [  129.374318] Hardware name: System manufacturer System Product Name/PRIME X370-PRO, BIOS 0515 03/30/2017
      [  129.374397] Workqueue: events dm_irq_work_func [amdgpu]
      [  129.374468] RIP: 0010:dc_link_allocate_mst_payload+0x1f7/0x220 [amdgpu]
      [  129.374470] Code: 52 20 e8 1c 63 ad f4 48 8b 5d d0 65 48 33 1c 25 28 00
      00 00 b8 01 00 00 00 75 16 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3
      <0f> 0b e9 fa fe ff ff e8 ed 5b d6 f3 41 0f b6 b6 c4 02 00 00 48 c7
      [  129.374471] RSP: 0018:ffff9f9141e7fcc0 EFLAGS: 00010246
      [  129.374472] RAX: 0000000000000000 RBX: ffff91ef0762f800 RCX: 0000000000000000
      [  129.374473] RDX: 0000000000000005 RSI: ffffffffc0c4a988 RDI: 0000000000000004
      [  129.374474] RBP: ffff9f9141e7fd10 R08: 0000000000000005 R09: 0000000000000000
      [  129.374475] R10: 0000000000000002 R11: 0000000000000001 R12: ffff91eebd510c00
      [  129.374475] R13: ffff91eebd510e58 R14: ffff91ef052c01b8 R15: 0000000000000006
      [  129.374476] FS:  0000000000000000(0000) GS:ffff91ef0ef80000(0000) knlGS:0000000000000000
      [  129.374477] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  129.374478] CR2: 000055623ea01d50 CR3: 0000000408a8c000 CR4: 00000000003406e0
      [  129.374479] Call Trace:
      [  129.374550]  dc_link_reallocate_mst_payload+0x12e/0x150 [amdgpu]
      [  129.374617]  dc_link_handle_hpd_rx_irq+0x6d4/0x6e0 [amdgpu]
      [  129.374693]  handle_hpd_rx_irq+0x77/0x310 [amdgpu]
      [  129.374768]  dm_irq_work_func+0x53/0x70 [amdgpu]
      [  129.374774]  process_one_work+0x1fd/0x3f0
      [  129.374776]  worker_thread+0x255/0x410
      [  129.374778]  kthread+0x121/0x140
      [  129.374780]  ? process_one_work+0x3f0/0x3f0
      [  129.374781]  ? kthread_park+0x90/0x90
      [  129.374785]  ret_from_fork+0x22/0x40
      
      [How]
      when we disable MST we should clear the cur link settings (lane_count=0 is
      good enough). This will cause us to not reallocate payloads earlier than
      expected and not throw the warning
      Signed-off-by: NBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Reviewed-by: NHersen Wu <hersenxs.wu@amd.com>
      Acked-by: NRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      5ac7fd2f
    • T
      drm/amdgpu: disable 3D pipe 1 on Navi1x · 194bcf35
      Tianci.Yin 提交于
      [why]
      CP firmware decide to skip setting the state for 3D pipe 1 for Navi1x as there
      is no use case.
      
      [how]
      Disable 3D pipe 1 on Navi1x.
      Reviewed-by: NFeifei Xu <Feifei.Xu@amd.com>
      Reviewed-by: NMonk Liu <monk.liu@amd.com>
      Signed-off-by: NTianci.Yin <tianci.yin@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      194bcf35
    • Y
      drm/amdgpu: clean wptr on wb when gpu recovery · 2ab7e274
      Yintian Tao 提交于
      The TDR will be randomly failed due to compute ring
      test failure. If the compute ring wptr & 0x7ff(ring_buf_mask)
      is 0x100 then after map mqd the compute ring rptr will be
      synced with 0x100. And the ring test packet size is also 0x100.
      Then after invocation of amdgpu_ring_commit, the cp will not
      really handle the packet on the ring buffer because rptr is equal to wptr.
      Signed-off-by: NYintian Tao <yttao@amd.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMonk Liu <Monk.Liu@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      2ab7e274
  4. 04 3月, 2020 6 次提交
  5. 03 3月, 2020 1 次提交
  6. 02 3月, 2020 11 次提交
  7. 27 2月, 2020 5 次提交
  8. 26 2月, 2020 2 次提交
    • A
      drm/ttm: fix leaking fences via ttm_buffer_object_transfer · 8c8c0620
      Ahzo 提交于
      Set the drm_device to NULL, so that the newly created buffer object
      doesn't appear to use the embedded gem object.
      
      This is necessary, because otherwise no corresponding dma_resv_fini for
      the dma_resv_init is called, resulting in a memory leak.
      
      The dma_resv_fini in ttm_bo_release_list is only called if the embedded
      gem object is not used, which is determined by checking if the
      drm_device is NULL.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/issues/958
      Fixes: 1e053b10 ("drm/ttm: use gem reservation object")
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAhzo <Ahzo@tutanota.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/355089/
      8c8c0620
    • C
      drm/i915: Avoid recursing onto active vma from the shrinker · 23873426
      Chris Wilson 提交于
      We mark the vma as active while binding it in order to protect outselves
      from being shrunk under mempressure. This only works if we are strict in
      not attempting to shrink active objects.
      
      <6> [472.618968] Workqueue: events_unbound fence_work [i915]
      <4> [472.618970] Call Trace:
      <4> [472.618974]  ? __schedule+0x2e5/0x810
      <4> [472.618978]  schedule+0x37/0xe0
      <4> [472.618982]  schedule_preempt_disabled+0xf/0x20
      <4> [472.618984]  __mutex_lock+0x281/0x9c0
      <4> [472.618987]  ? mark_held_locks+0x49/0x70
      <4> [472.618989]  ? _raw_spin_unlock_irqrestore+0x47/0x60
      <4> [472.619038]  ? i915_vma_unbind+0xae/0x110 [i915]
      <4> [472.619084]  ? i915_vma_unbind+0xae/0x110 [i915]
      <4> [472.619122]  i915_vma_unbind+0xae/0x110 [i915]
      <4> [472.619165]  i915_gem_object_unbind+0x1dc/0x400 [i915]
      <4> [472.619208]  i915_gem_shrink+0x328/0x660 [i915]
      <4> [472.619250]  ? i915_gem_shrink_all+0x38/0x60 [i915]
      <4> [472.619282]  i915_gem_shrink_all+0x38/0x60 [i915]
      <4> [472.619325]  vm_alloc_page.constprop.25+0x1aa/0x240 [i915]
      <4> [472.619330]  ? rcu_read_lock_sched_held+0x4d/0x80
      <4> [472.619363]  ? __alloc_pd+0xb/0x30 [i915]
      <4> [472.619366]  ? module_assert_mutex_or_preempt+0xf/0x30
      <4> [472.619368]  ? __module_address+0x23/0xe0
      <4> [472.619371]  ? is_module_address+0x26/0x40
      <4> [472.619374]  ? static_obj+0x34/0x50
      <4> [472.619376]  ? lockdep_init_map+0x4d/0x1e0
      <4> [472.619407]  setup_page_dma+0xd/0x90 [i915]
      <4> [472.619437]  alloc_pd+0x29/0x50 [i915]
      <4> [472.619470]  __gen8_ppgtt_alloc+0x443/0x6b0 [i915]
      <4> [472.619503]  gen8_ppgtt_alloc+0xd7/0x300 [i915]
      <4> [472.619535]  ppgtt_bind_vma+0x2a/0xe0 [i915]
      <4> [472.619577]  __vma_bind+0x26/0x40 [i915]
      <4> [472.619611]  fence_work+0x1c/0x90 [i915]
      <4> [472.619617]  process_one_work+0x26a/0x620
      
      Fixes: 2850748e ("drm/i915: Pull i915_vma_pin under the vm->mutex")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200221221818.2861432-1-chris@chris-wilson.co.uk
      (cherry picked from commit 6f24e410)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      23873426