1. 23 5月, 2020 1 次提交
  2. 23 4月, 2020 1 次提交
  3. 09 4月, 2020 1 次提交
  4. 19 3月, 2020 1 次提交
  5. 12 2月, 2020 1 次提交
  6. 10 1月, 2020 1 次提交
  7. 19 12月, 2019 1 次提交
  8. 14 11月, 2019 4 次提交
    • B
      drm/amd/display: Drop CONFIG_DRM_AMD_DC_DCN2_0 and DSC_SUPPORTED · 1da37801
      Bhawanpreet Lakha 提交于
      [Why]
      
      DCN2 and DSC are stable enough to be build by default. So drop the flags.
      
      [How]
      
      Remove them using the unifdef tool. The following commands were executed
      in sequence:
      
      $ find -name '*.c' -exec unifdef -m -DCONFIG_DRM_AMD_DC_DSC_SUPPORT -DCONFIG_DRM_AMD_DC_DCN2_0 -UCONFIG_TRIM_DRM_AMD_DC_DCN2_0 '{}' ';'
      $ find -name '*.h' -exec unifdef -m -DCONFIG_DRM_AMD_DC_DSC_SUPPORT -DCONFIG_DRM_AMD_DC_DCN2_0 -UCONFIG_TRIM_DRM_AMD_DC_DCN2_0 '{}' ';'
      
      In addition:
      
      * Remove from kconfig, and replace any dependencies with DCN1_0.
      * Remove from any makefiles.
      * Fix and cleanup NV defninitions in dal_asic_id.h
      * Expand DCN1 ifdef to include DCN2 code in the following files:
          * clk_mgr/clk_mgr.c: dc_clk_mgr_create()
          * core/dc_resources.c: dc_create_resource_pool()
          * dce/dce_dmcu.c: dcn20_*lock_phy()
          * dce/dce_dmcu.c: dcn20_funcs
          * dce/dce_dmcu.c: dcn20_dmcu_create()
          * gpio/hw_factory.c: dal_hw_factory_init()
          * gpio/hw_translate.c: dal_hw_translate_init()
      Signed-off-by: NLeo Li <sunpeng.li@amd.com>
      Signed-off-by: NBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1da37801
    • N
      drm/amd/display: Drop CONFIG_DRM_AMD_DC_DMUB guards · 2200eb9e
      Nicholas Kazlauskas 提交于
      [Why]
      Support for DMUB only depends on support for DC. It doesn't use floating
      point so we don't need to guard it by any specific DCN revision.
      
      [How]
      Drop the guards and cleanup the newlines around each one.
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NHersen Wu <hersenxs.wu@amd.com>
      Acked-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      2200eb9e
    • N
      drm/amd/display: Hook up the DMUB service in DM · 743b9786
      Nicholas Kazlauskas 提交于
      [Why]
      We need DMCUB on Renoir to support DMCU and PHY initialization.
      The DMUB service provides a mechanism to load the DMCUB.
      
      [How]
      Include the DMUB service in amdgpu_dm.
      
      Frontdoor loading of the DMCUB firmware needs to happen via PSP. To
      pass the firmware to PSP we need to hand it off to the firmware list
      in the base driver during software initialization.
      
      Most of the DMUB service can technically be initialized at this point
      in time, but we don't want to be allocating framebuffer memory for
      hardware that doesn't support the DMCUB and in order to check that we
      need to be able to read registers - something DM helpers aren't setup
      to do in software initialization.
      
      So everything but the service creation itself will get deferred to
      hardware initialization.
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NHersen Wu <hersenxs.wu@amd.com>
      Acked-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      743b9786
    • M
      drm/amd/display: Add MST atomic routines · 3261e013
      Mikita Lipski 提交于
      - Adding encoder atomic check to find vcpi slots for a connector
      - Using DRM helper functions to calculate PBN
      - Adding connector atomic check to release vcpi slots if connector
      loses CRTC
      - Calculate  PBN and VCPI slots only once during atomic
      check and store them on crtc_state to eliminate
      redundant calculation
      - Call drm_dp_mst_atomic_check to verify validity of MST topology
      during state atomic check
      
      v2: squashed previous 3 separate patches, removed DSC PBN calculation,
      and added PBN and VCPI slots properties to amdgpu connector
      
      v3:
      - moved vcpi_slots and pbn properties to dm_crtc_state and dc_stream_state
      - updates stream's vcpi_slots and pbn on commit
      - separated patch from the DSC MST series
      
      v4:
      - set vcpi_slots and pbn properties to dm_connector_state
      - copy porperties from connector state on to crtc state
      
      v5:
      - keep the pbn and vcpi values only on connnector state
      - added a void pointer to the stream state instead on two ints,
      because dc_stream_state is OS agnostic. Pointer points to the
      current dm_connector_state.
      
      v6:
      - Remove new param from stream
      
      v7:
      - Fix error with using max capable bpc
      
      v8:
      - squash in fix from Gustavo A. R. Silva
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Signed-off-by: NMikita Lipski <mikita.lipski@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      3261e013
  9. 03 10月, 2019 2 次提交
  10. 17 9月, 2019 1 次提交
  11. 07 8月, 2019 1 次提交
  12. 19 7月, 2019 1 次提交
  13. 12 7月, 2019 1 次提交
    • N
      drm/amd/display: Add drm_audio_component support to amdgpu_dm · 6ce8f316
      Nicholas Kazlauskas 提交于
      [Why]
      The drm_audio_component can be used to give pin ELD notifications
      directly to the sound driver. This fixes audio endpoints disappearing
      due to missing unsolicited notifications.
      
      [How]
      Send the notification via the audio component whenever we enable or
      disable audio state on a stream. This matches what i915 does with
      their drm_audio_component and what Takashi Iwai's proposed hack for
      radeon/amdpgu did.
      
      This is a bit delayed in when the notification actually occurs, however.
      We wait until after all the programming is complete rather than sending
      the notification mid sequence.
      
      Particular care is needed for the get ELD callback since it can happen
      outside the locking and fencing DRM does for atomic commits.
      
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      6ce8f316
  14. 22 6月, 2019 2 次提交
    • N
      drm/amd/display: Rework CRTC color management · cf020d49
      Nicholas Kazlauskas 提交于
      [Why]
      To prepare for the upcoming DRM plane color management properties
      we need to correct a lot of wrong behavior and assumptions made for
      CRTC color management.
      
      The documentation added by this commit in amdgpu_dm_color explains
      how the HW color pipeline works and its limitations with the DRM
      interface.
      
      The current implementation does the following wrong:
      - Implicit sRGB DGM when no CRTC DGM is set
      - Implicit sRGB RGM when no CRTC RGM is set
      - No way to specify a non-linear DGM matrix that produces correct output
      - No way to specify a correct RGM when a linear DGM is used
      
      We had workarounds for passing kms_color tests but not all of the
      behavior we had wrong was covered by these tests (especially when
      it comes to non-linear DGM). Testing both DGM and RGM at the same time
      isn't something kms_color tests well either.
      
      [How]
      The specifics for how color management works in AMDGPU and the new
      behavior can be found by reading the documentation added to
      amdgpu_dm_color.c from this patch.
      
      All of the incorrect cases from the old implementation have been
      addressed for the atomic interface, but there still a few TODOs for
      the legacy one.
      
      Note: this does cause regressions for kms_color@pipe-a-ctm-* over HDMI.
      
      The result looks correct from visual inspection but the CRC no longer
      matches. For reference, the test was previously doing the following:
      
      linear degamma -> CTM -> sRGB regamma -> RGB to YUV (709) -> ...
      
      Now the test is doing:
      
      linear degamma -> CTM -> linear regamma -> RGB to YUV (709) -> ...
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NSun peng Li <Sunpeng.Li@amd.com>
      Acked-by: NBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      cf020d49
    • H
      drm/amd/display: Read soc_bounding_box from gpu_info (v2) · 48321c3d
      Harry Wentland 提交于
      [WHY]
      We don't want to expose sensitive ASIC information before ASIC release.
      
      [HOW]
      Encode the soc_bounding_box in the gpu_info FW (for Linux) and read it
      at driver load.
      
      v2: fix warning when CONFIG_DRM_AMD_DC_DCN2_0 is not set (Alex)
      Signed-off-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      48321c3d
  15. 21 6月, 2019 1 次提交
  16. 12 6月, 2019 1 次提交
    • N
      drm/amd/display: Rework CRTC color management · 7cd4b700
      Nicholas Kazlauskas 提交于
      [Why]
      To prepare for the upcoming DRM plane color management properties
      we need to correct a lot of wrong behavior and assumptions made for
      CRTC color management.
      
      The documentation added by this commit in amdgpu_dm_color explains
      how the HW color pipeline works and its limitations with the DRM
      interface.
      
      The current implementation does the following wrong:
      - Implicit sRGB DGM when no CRTC DGM is set
      - Implicit sRGB RGM when no CRTC RGM is set
      - No way to specify a non-linear DGM matrix that produces correct output
      - No way to specify a correct RGM when a linear DGM is used
      
      We had workarounds for passing kms_color tests but not all of the
      behavior we had wrong was covered by these tests (especially when
      it comes to non-linear DGM). Testing both DGM and RGM at the same time
      isn't something kms_color tests well either.
      
      [How]
      The specifics for how color management works in AMDGPU and the new
      behavior can be found by reading the documentation added to
      amdgpu_dm_color.c from this patch.
      
      All of the incorrect cases from the old implementation have been
      addressed for the atomic interface, but there still a few TODOs for
      the legacy one.
      
      Note: this does cause regressions for kms_color@pipe-a-ctm-* over HDMI.
      
      The result looks correct from visual inspection but the CRC no longer
      matches. For reference, the test was previously doing the following:
      
      linear degamma -> CTM -> sRGB regamma -> RGB to YUV (709) -> ...
      
      Now the test is doing:
      
      linear degamma -> CTM -> linear regamma -> RGB to YUV (709) -> ...
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NSun peng Li <Sunpeng.Li@amd.com>
      Acked-by: NBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7cd4b700
  17. 11 6月, 2019 1 次提交
  18. 25 5月, 2019 1 次提交
  19. 30 4月, 2019 1 次提交
    • N
      drm/amd/display: Refactor CRTC interrupt toggling logic · d6ef9b41
      Nicholas Kazlauskas 提交于
      [Why]
      The vblank and pageflip interrupts should only be enabled for a CRTC
      that's enabled and has active planes.
      
      The current logic takes care of this, but isn't setup to handle the case
      where the active plane count goes to zero but the stream remains
      enabled.
      
      We currently block this case since we don't allow commits that enable a
      CRTC with no active planes, but shouldn't be any reason we can't support
      this from a hardware perspective and many userspace applications expect
      to be able to do it (like IGT).
      
      [How]
      The count_crtc_active_planes function fills in the number of
      "active_planes" on the dm_crtc_state. This should be the same as
      DC's plane_count on the stream_status but easier to access since we
      don't need to lock the private atomic state with the DC context.
      
      Add the "interrupts_enabled" flag to the dm_crtc_state and set it based
      on whether the stream exists and if there are active planes on the
      stream.
      
      Update the disable and enable logic to make use of this new flag.
      
      There shouldn't be any functional change (yet) with this patch.
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NDavid Francis <David.Francis@amd.com>
      Acked-by: NLeo Li <sunpeng.li@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      d6ef9b41
  20. 03 4月, 2019 1 次提交
  21. 21 3月, 2019 1 次提交
  22. 20 3月, 2019 1 次提交
  23. 19 12月, 2018 1 次提交
  24. 13 12月, 2018 1 次提交
  25. 29 11月, 2018 2 次提交
    • N
      drm/amdgpu: Set FreeSync state using drm VRR properties · bb47de73
      Nicholas Kazlauskas 提交于
      Support for AMDGPU specific FreeSync properties and ioctls are dropped
      from amdgpu_dm in favor of supporting drm variable refresh rate
      properties.
      
      The notify_freesync and set_freesync_property functions are dropped
      from amdgpu_display_funcs.
      
      The drm vrr_capable property is now attached to any DP/HDMI connector.
      Its value is updated accordingly to the connector's FreeSync capabiltiy.
      
      The freesync_enable logic and ioctl control has has been dropped in
      favor of utilizing the vrr_enabled on the drm CRTC. This allows for more
      fine grained atomic control over which CRTCs should support variable
      refresh rate.
      
      To handle state changes for vrr_enabled it was easiest to drop the
      forced modeset on freesync_enabled change. This patch now performs the
      required stream updates when planes are flipped.
      
      This is done for a few reasons:
      
      (1) VRR stream updates can be done in the fast update path
      
      (2) amdgpu_dm_atomic_check would need to be hacked apart to check
          desired variable refresh state and capability before the CRTC
          disable pass.
      
      (3) Performing VRR stream updates on-flip is needed for enabling BTR
          support.
      
      VRR packets and timing adjustments are now tracked and compared to
      previous values sent to the hardware.
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      bb47de73
    • N
      drm/amd/display: Use private obj helpers for dm_atomic_state · eb3dc897
      Nicholas Kazlauskas 提交于
      [Why]
      Two non-blocking commits in succession can result in a sequence where
      the same dc->current_state is queried for both commits.
      
      1. 1st commit -> check -> commit -> swaps atomic state -> queues work
      2. 2nd commit -> check -> commit -> swaps atomic state -> queues work
      3. 1st commit work finishes
      
      The issue with this sequence is that the same dc->current_state is
      read in both atomic checks. If the first commit modifies streams or
      planes those will be missing from the dc->current_state for the
      second atomic check. This result in many stream and plane errors in
      atomic commit tail.
      
      [How]
      The driver still needs to track old to new state to determine if the
      commit in its current implementation. Updating the dc_state in
      atomic tail is wrong since the dc_state swap should be happening as
      part of drm_atomic_helper_swap_state *before* the worker queue kicks
      its work off.
      
      The simplest replacement for the subclassing (which doesn't properly
      manage the old to new atomic state swap) is to use the drm private
      object helpers. While some of the dc_state members could be merged
      into dm_crtc_state or dm_plane_state and copied over that way it is
      easier for now to just treat the whole dc_state structure as a single
      private object.
      
      This allows amdgpu_dm to drop the dc->current_state copy from within
      atomic check. It's replaced by a copy from the current atomic state
      which is propagated correctly for the sequence described above.
      
      Since access to the dm_state private object is now locked this should
      also fix issues that could arise if submitting non-blocking commits
      from different threads.
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NLeo Li <sunpeng.li@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      eb3dc897
  26. 27 11月, 2018 2 次提交
    • D
      drm/amd: Query and use ACPI backlight caps · 206bbafe
      David Francis 提交于
      ACPI ATIF has a function called query
      backlight transfer characteristics.  Among the
      information returned by this function is
      the minimum and maximum input signals for the
      backlight
      
      Call that function on ACPI init.  When DM
      backlight device is updated, copy over the
      backlight caps into DM, but only once.  Use
      the backlight caps in the backlight-to-dc
      calculation
      Signed-off-by: NDavid Francis <David.Francis@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      206bbafe
    • D
      drm/amd: Add abm level drm property · c1ee92f9
      David Francis 提交于
      Adaptive Backlight Management (ABM) is a feature
      that reduces backlight level to save power, while
      increasing pixel contrast and pixel luminance
      to maintain readability and image quality.
      
      ABM will adjust in response to the
      pixel luminance of the displayed content.
      
      ABM is made available as a drm property on eDP
      monitors called "abm level", which ranges from 0 to 4.
      When this property is set to 0, ABM is off.  Levels 1
      to 4 represent different ranges of backlight reduction.
      At higher levels both the backlight reduction and pixel
      adjustment will be greater.
      
      ABM requires DMCU firmware, which is currently available for
      Raven ASICs only.  If the feature does not work, please
      ensure your firmware is up to date.
      
      v2:
      Fix commit message, only attach property if DMCU loaded
      v3:
      Store ABM level in crtc state to accommodate dc
      v4:
      Fix ABM saving on dpms cycle
      Signed-off-by: NDavid Francis <David.Francis@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      c1ee92f9
  27. 20 11月, 2018 1 次提交
  28. 16 11月, 2018 1 次提交
  29. 08 11月, 2018 2 次提交
  30. 06 11月, 2018 1 次提交
  31. 27 9月, 2018 1 次提交
  32. 15 9月, 2018 1 次提交