1. 17 1月, 2020 17 次提交
  2. 14 1月, 2020 4 次提交
  3. 10 1月, 2020 2 次提交
    • D
      drm/amd/display: MST DSC compute fair share · 8c20a1ed
      David Francis 提交于
      If there is limited link bandwidth on a MST network,
      it must be divided fairly between the streams on that network
      
      Implement an algorithm to determine the correct DSC config
      for each stream
      
      The algorithm:
      This
           [                   ]          ( )
      represents the range of bandwidths possible for a given stream.
      The [] area represents the range of DSC configs, and the ()
      represents no DSC. The bandwidth used increases from left to right.
      
      First, try disabling DSC on all streams
           [                  ]          (|)
           [                     ]            (|)
      Check this against the bandwidth limits of the link and each branch
      (including each endpoint). If it passes, the job is done
      
      Second, try maximum DSC compression on all streams
      that support DSC
           [|         ]        ( )
           [|                ]         ( )
      If this does not pass, then enabling this combination of streams
      is impossible
      
      Otherwise, divide the remaining bandwidth evenly amongst the streams
           [        |  ]         ( )
           [        |      ]        ( )
      
      If one or more of the streams reach minimum compression, evenly
      divide the reamining bandwidth amongst the remaining streams
           [    |] ( )
           [       |]   ( )
           [                 |   ]               ( )
           [                 |      ]                  ( )
      
      If all streams can reach minimum compression, disable compression
      greedily
           [      |]  ( )
           [        |]    ( )
           [                 ]                                (|)
      
      Perform this algorithm on each full update, on each MST link
      with at least one DSC stream on it
      
      After the configs are computed, call
      dcn20_add_dsc_to_stream_resource on each stream with DSC enabled.
      It is only after all streams are created that we can know which
      of them will need DSC.
      
      Do all of this at the end of amdgpu atomic check.  If it fails,
      fail check; This combination of timings cannot be supported.
      
      v2: Use drm_dp_mst_atomic_check to validate bw for certain dsc
      configurations
      
      v3: Use dc_dsc_policy structure to get min and max bpp rate
      for DSC configuration
      Acked-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NWenjing Liu <Wenjing.Liu@amd.com>
      Signed-off-by: NDavid Francis <David.Francis@amd.com>
      Signed-off-by: NMikita Lipski <mikita.lipski@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      8c20a1ed
    • D
      drm/amd/display: Initialize DSC PPS variables to 0 · b6adc57c
      David Francis 提交于
      For DSC MST, sometimes monitors would break out
      in full-screen static. The issue traced back to the
      PPS generation code, where these variables were being used
      uninitialized and were picking up garbage.
      
      memset to 0 to avoid this
      Reviewed-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Signed-off-by: NDavid Francis <David.Francis@amd.com>
      Signed-off-by: NMikita Lipski <mikita.lipski@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      b6adc57c
  4. 08 1月, 2020 9 次提交
    • Z
      drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_21.c · 60bd99fd
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:85:6-13: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:88:2-9: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:225:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:226:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:251:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:252:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:256:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:257:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:267:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:269:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:682:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:1013:1-9: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      60bd99fd
    • Z
      drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_20v2.c · d94af04b
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:110:6-13: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:113:2-9: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:243:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:244:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:267:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:268:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:272:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:273:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:283:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:285:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:673:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:962:1-9: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      d94af04b
    • Z
      drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_20.c · b7402f1f
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:110:6-13: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:113:2-9: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:243:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:244:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:267:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:268:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:272:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:273:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:283:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:285:3-11: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:673:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:961:1-9: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      b7402f1f
    • Z
      drm/amd/display: use true, false for bool variable in dce_calcs.c · 45423809
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:157:46-64: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:159:2-20: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:161:46-64: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:163:2-20: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:289:1-12: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:290:1-12: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:341:3-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:343:4-15: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      45423809
    • Z
      drm/amd/display: use true, false for bool variable in display_mode_vba_21.c · edb1a677
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4124:3-28: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4128:5-30: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:5207:3-37: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      edb1a677
    • Z
      drm/amd/display: use true, false for bool variable in dcn20_hwseq.c · 0bb80369
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c:186:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c:189:2-10: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0bb80369
    • Z
      drm/amd/display: use true, false for bool variable in dcn10_hw_sequencer.c · 0ee600a7
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:482:6-14: WARNING: Assignment of 0/1 to bool variable
      drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:485:2-10: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0ee600a7
    • Z
      drm/amd/display: use true, false for bool variable in dc_link_ddc.c · 41ff5e81
      zhengbin 提交于
      Fixes coccicheck warning:
      
      drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:593:6-9: WARNING: Assignment of 0/1 to bool variable
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: Nzhengbin <zhengbin13@huawei.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      41ff5e81
    • X
      drm/amd/display: fix kernel_fpu_begin/_end() warnings · c103c5a3
      Xiaojie Yuan 提交于
      kernel_fpu_begin/_end() are already called inside dcn20_resource_construct,
      and calling kernel_fpu_begin/_end() recursively triggers WARN_ON() when
      CONFIG_X86_DEBUG_FPU is enabled.
      
      [  107.060434] WARNING: CPU: 6 PID: 1370 at arch/x86/kernel/fpu/core.c:90 kernel_fpu_begin+0xbd/0xe0
      <snip>
      [  107.268197] Call Trace:
      [  107.270751]  dcn20_patch_bounding_box+0x17/0x100 [amdgpu]
      [  107.276204]  init_soc_bounding_box+0x1b3/0x5f0 [amdgpu]
      [  107.281536]  ? _cond_resched+0x19/0x30
      [  107.285307]  dcn20_resource_construct+0x3a9/0xa90 [amdgpu]
      [  107.290957]  ? dcn20_resource_construct+0x3a9/0xa90 [amdgpu]
      [  107.296621]  ? __alloc_pages_nodemask+0x16a/0x330
      [  107.301476]  ? _cond_resched+0x19/0x30
      [  107.305284]  ? kmem_cache_alloc_trace+0x197/0x230
      [  107.310063]  ? _cond_resched+0x19/0x30
      [  107.313783]  ? kmem_cache_alloc_trace+0x197/0x230
      [  107.318691]  dcn20_create_resource_pool+0x42/0x70 [amdgpu]
      [  107.324315]  dc_create_resource_pool+0x12d/0x170 [amdgpu]
      [  107.329851]  dc_create+0x1b8/0x6a0 [amdgpu]
      [  107.334013]  ? kmem_cache_alloc_trace+0x1e2/0x230
      [  107.338832]  amdgpu_dm_init+0x13e/0x1c0 [amdgpu]
      <snip>
      Signed-off-by: NXiaojie Yuan <xiaojie.yuan@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      c103c5a3
  5. 19 12月, 2019 8 次提交