[PATCH] drm/amd/display: Add all planes on CRTC to state for overlay cursor

2024-09-11 Thread sunpeng.li
From: Leo Li [Why] DC has a special commit path for native cursor, which use the built-in cursor pipe within DCN planes. This update path does not require all enabled planes to be added to the list of surface updates sent to DC. This is not the case for overlay cursor; it uses the same path as

[PATCH] drm/amd/display: Do not reset planes based on crtc zpos_changed

2024-09-06 Thread sunpeng.li
From: Leo Li [Why] drm_normalize_zpos will set the crtc_state->zpos_changed to 1 if any of it's assigned planes changes zpos, or is removed/added from it. To have amdgpu_dm request a plane reset on this is too broad. For example, if only the cursor plane was moved from one crtc to another, the

[PATCH] drm/amd/display: Determine IPS mode by ASIC and PMFW versions

2024-08-27 Thread sunpeng.li
From: Leo Li [Why] DCN IPS interoperates with other system idle power features, such as Zstates. On DCN35, there is a known issue where system Z8 + DCN IPS2 causes a hard hang. We observe this on systems where the SBIOS allows Z8. Though there is a SBIOS fix, there's no guarantee that users wi

[PATCH v2 5/5] drm/amd/display: Default to DMUB_IPS_DISABLE_DYNAMIC

2024-08-19 Thread sunpeng.li
From: Leo Li [Why] There are currently known backlight and abm issues when IPS is enabled on DCN35. While the issues are being ironed out, let's default to IPS_DISABLE_DYNAMIC so users will not experience hangs. When the issues are resolved, this patch should be reverted. [How] Set the defaul

[PATCH v2 3/5] drm/amd/display: Go through dm for exit_ips_for_hw_access

2024-08-19 Thread sunpeng.li
From: Leo Li [Why] dc_exit_ips_for_hw_access() is the same as dc_allow_idle_optimizations(), but with a check on whether IPS is supported by the ASIC. [How] Let's also pipe it through the dm function introduced by the previous change. No functional changes are intended. Signed-off-by: Leo Li

[PATCH v2 4/5] drm/amd/display: Implement DMUB_IPS_DISABLE_DYNAMIC

2024-08-19 Thread sunpeng.li
From: Leo Li [Why] The IPS_DISABLE_DYNAMIC configuration disables IPS in all cases except for when the driver is put into d3 for s0ix. [How] Now that we have a common entry point into dc_allow_idle_optimizations from dm, implement said configuration there. Signed-off-by: Leo Li --- .../gpu/

[PATCH v2 2/5] drm/amd/display: Go through dm for allow_idle_optimizations

2024-08-19 Thread sunpeng.li
From: Leo Li [Why] In preparation for enabling IPS debug flags that require DM changes, a common entry point for allowing DC idle optimisations is needed. [How] Create an alias in DM for dc_allow_idle_optimizations(). Change all calls to it into dm_allow_idle_optimizations(). No functional ch

[PATCH v2 1/5] drm/amd: Introduce additional IPS debug flags

2024-08-19 Thread sunpeng.li
From: Leo Li [Why] Idle power states (IPS) describe levels of power-gating within DCN. DM and DC is responsible for ensuring that we are out of IPS before any DCN programming happens. Any DCN programming while we're in IPS leads to undefined behavior (mostly hangs). Because IPS intersects with

[PATCH 4/5] drm/amd/display: Implement DMUB_IPS_DISABLE_DYNAMIC

2024-08-16 Thread sunpeng.li
From: Leo Li [Why] The IPS_DISABLE_DYNAMIC configuration disables IPS in all cases except for when the driver is put into d3 for s0ix. [How] Now that we have a common entry point into dc_allow_idle_optimizations from dm, implement said configuration there. Signed-off-by: Leo Li --- .../gpu/

[PATCH 5/5] drm/amd/display: Default to DMUB_IPS_DISABLE_DYNAMIC

2024-08-16 Thread sunpeng.li
From: Leo Li [Why] There are currently known backlight and abm issues when IPS is enabled on DCN35. While the issues are being ironed out, let's default to IPS_DISABLE_DYNAMIC so users will not experience hangs. When the issues are resolved, this patch should be reverted. [How] Set the defaul

[PATCH 2/5] drm/amd/display: Go through dm for allow_idle_optimizations

2024-08-16 Thread sunpeng.li
From: Leo Li [Why] In preparation for enabling IPS debug flags that require DM changes, a common entry point for allowing DC idle optimisations is needed. [How] Create an alias in DM for dc_allow_idle_optimizations(). Change all calls to it into dm_allow_idle_optimizations(). No functional ch

[PATCH 3/5] drm/amd/display: Go through dm for exit_ips_for_hw_access

2024-08-16 Thread sunpeng.li
From: Leo Li [Why] dc_exit_ips_for_hw_access() is the same as dc_allow_idle_optimizations(), but with a check on whether IPS is supported by the ASIC. [How] Let's also pipe it through the dm function introduced by the previous change. No functional changes are intended. Signed-off-by: Leo Li

[PATCH 1/5] drm/amd: Introduce additional IPS debug flags

2024-08-16 Thread sunpeng.li
From: Leo Li [Why] Idle power states (IPS) describe levels of power-gating within DCN. DM and DC is responsible for ensuring that we are out of IPS before any DCN programming happens. Any DCN programming while we're in IPS leads to undefined behavior (mostly hangs). Because IPS intersects with

[PATCH] Revert "drm/amd/display: Reset freesync config before update new state"

2024-07-11 Thread sunpeng.li
From: Leo Li This change caused PSR SU panels to not read from their remote fb, preventing us from entering self-refresh. It is a regression. This reverts commit f8ebe6341a6a3745ef02648b4b5c2c89fa4a9ace. Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file

[PATCH v2] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread sunpeng.li
From: Leo Li To fix CONFIG_ACPI disabled build error. v2: Instead of ifdef-ing inside function, define a no-op stub for amdgpu_acpi_get_backlight_caps when CONFIG_ACPI=n Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li --- drivers/gpu/dr

[PATCH] drm/amd/display: Guard ACPI calls with CONFIG_ACPI

2024-06-10 Thread sunpeng.li
From: Leo Li To fix CONFIG_ACPI disabled build error. Fixes: ec6f30c776ad ("drm/amd/display: Set default brightness according to ACPI") Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/dis

[PATCH v2 2/2] drm/amd/display: Move PRIMARY plane zpos higher

2024-04-29 Thread sunpeng.li
From: Leo Li [Why] Compositors have different ways of assigning surfaces to DRM planes for render offloading. It may decide between various strategies: overlay, underlay, or a mix of both (see here for more info: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/76) One way for compos

[PATCH v2 1/2] drm/amd/display: Introduce overlay cursor mode

2024-04-29 Thread sunpeng.li
From: Leo Li [Why] DCN is the display hardware for amdgpu. DRM planes are backed by DCN hardware pipes, which carry pixel data from one end (memory), to the other (output encoder). Each DCN pipe has the ability to blend in a cursor early on in the pipeline. In other words, there are no dedicate

[PATCH 2/2] drm/amd/display: Move PRIMARY plane zpos higher

2024-03-15 Thread sunpeng.li
From: Leo Li [Why] Compositors have different ways of assigning surfaces to DRM planes for render offloading. It may decide between various strategies: overlay, underlay, or a mix of both One way for compositors to implement the underlay strategy is to assign a higher zpos to the DRM_PRIMARY pl

[PATCH 1/2] drm/amd/display: Introduce overlay cursor mode

2024-03-15 Thread sunpeng.li
From: Leo Li [Why] DCN is the display hardware for amdgpu. DRM planes are backed by DCN hardware pipes, which carry pixel data from one end (memory), to the other (output encoder). Each DCN pipe has the ability to blend in a cursor early on in the pipeline. In other words, there are no dedicate

[PATCH 0/2] drm/amdgpu/display: Make multi-plane configurations more flexible

2024-03-15 Thread sunpeng.li
From: Leo Li These patches aim to make the amdgpgu KMS driver play nicer with compositors when building multi-plane scanout configurations. They do so by: 1. Making cursor behavior more sensible. 2. Allowing placement of DRM OVERLAY planes underneath the PRIMARY plane for 'underlay' configura

[PATCH] drm/amd/display: Fail atomic_check early on normalize_zpos error

2023-02-13 Thread sunpeng.li
From: Leo Li [Why] drm_atomic_normalize_zpos() can return an error code when there's modeset lock contention. This was being ignored. [How] Bail out of atomic check if normalize_zpos() returns an error. Fixes: b261509952bc ("drm/amd/display: Fix double cursor on non-video RGB MPO") Signed-off

[PATCH v2] drm/amd/display: Prevent OTG shutdown during PSR SU

2022-09-28 Thread sunpeng.li
From: Leo Li [Why] Enabling Z10 optimizations allows DMUB to disable the OTG during PSR link-off. This theoretically saves power by putting more of the display hardware to sleep. However, we observe that with PSR SU, it causes visual artifacts, higher power usage, and potential system hang. Thi

[PATCH] drm/amdgpu: Fix mc_umc_status used uninitialized warning

2022-09-28 Thread sunpeng.li
From: Leo Li On ChromeOS clang build, the following warning is seen: /mnt/host/source/src/third_party/kernel/v5.15/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c:463:6: error: variable 'mc_umc_status' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if

[PATCH] drm/amd/display: Prevent OTG shutdown during PSR SU

2022-09-27 Thread sunpeng.li
From: Leo Li [Why] Enabling Z10 optimizations allows DMUB to disable the OTG during PSR link-off. This theoretically saves power by putting more of the display hardware to sleep. However, we observe that with PSR SU, it causes visual artifacts, higher power usage, and potential system hang. Thi

[PATCH v2] drm/amdgpu: Check BO's requested pinning domains against its preferred_domains

2022-07-12 Thread sunpeng.li
From: Leo Li When pinning a buffer, we should check to see if there are any additional restrictions imposed by bo->preferred_domains. This will prevent the BO from being moved to an invalid domain when pinning. For example, this can happen if the user requests to create a BO in GTT domain for di

[PATCH] drm/amdgpu: Check BO's requested pinning domains against its preferred_domains

2022-07-11 Thread sunpeng.li
From: Leo Li When pinning a buffer, we should check to see if there are any additional restrictions imposed by bo->preferred_domains. This will prevent the BO from being moved to an invalid domain when pinning. For example, this can happen if the user requests to create a BO in GTT domain for di

[PATCH 2/2] drm/amd/display: Add dcdebugmask option for disabling MPO

2022-07-07 Thread sunpeng.li
From: Leo Li [Why & How] It's useful to disable MPO when debugging or testing. Therefore, add a dcdebugmask option to disable MPO. Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 5

[PATCH 1/2] drm/amd/display: Add visualconfirm module parameter

2022-07-07 Thread sunpeng.li
From: Leo Li [Why] Being able to configure visual confirm at boot or in cmdline is helpful when debugging. [How] Add a module parameter to configure DC visual confirm, which works the same way as the equivalent debugfs entry. Signed-off-by: Leo Li --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH] drm/amd/display: Use pre-allocated temp struct for bounding box update

2022-06-08 Thread sunpeng.li
From: Leo Li [Why] There is a theoretical problem in prior patches for reducing the stack size of *update_bw_bounding_box() functions. By modifying the soc.clock_limits[n] struct directly, this can cause unintended behavior as the for loop attempts to swap rows in clock_limits[n]. A temporary s

[PATCH v2 3/4] drm/amd/display: pass panel instance in DMUB dirty rect command

2022-06-03 Thread sunpeng.li
From: David Zhang [Why] In cases where there are multiple eDP instances, DMUB needs to know which instance the command is for. Today, the field for specifying the panel_inst exists in both dmub_cmd_update_dirty_rect_data and dmub_cmd_update_cursor_info_data. For cursor updates, we already speci

[PATCH 4/4] drm/amd/display: refactor dirty rect dmub command decision

2022-06-02 Thread sunpeng.li
From: Robin Chen [Why] To wrap the decision logic of sending dirty rect dmub command for both frame update and cursor update path. Signed-off-by: Robin Chen Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 24

[PATCH 2/4] drm/amd/display: Add PSR-SU-RC support in DC

2022-06-02 Thread sunpeng.li
From: David Zhang [Why] PSR-SU Rate Control - or PSR-SU-RC - enables PSR-SU panels to work with variable refresh rate to allow for more power savings. Lowering the refresh rate can increase PSR residency by expanding the eDP main link shut down duration. It can also lower panel power consumption

[PATCH 3/4] drm/amd/display: pass panel instance in dirty rect message

2022-06-02 Thread sunpeng.li
From: David Zhang [why] DMUB FW uses OTG instance to get eDP panel instance. But in case of MPO multiple pipe indexes are passed to updated the same panel. The other OTG instance passed would be ignored causing in DMUB not acknowledging the messages. [how] Add panel instance to dirty rectangle d

[PATCH 0/4] PSR-SU-RC DC support and some PSR-SU fixes

2022-06-02 Thread sunpeng.li
From: Leo Li The first two patches here add PSR SU Rate Control support to DC. Support in amdgpu_dm is still pending to enable this fully. The last two patches are some fixes for PSR SU. David Zhang (3): drm/amd/display: expose AMD specific DPCD for PSR-SU-RC support drm/amd/display: Add PS

[PATCH 1/4] drm/amd/display: expose AMD specific DPCD for PSR-SU-RC support

2022-06-02 Thread sunpeng.li
From: David Zhang [why & how] Expose vendor specific DPCD registers for rate controlling the eDP sink TCON's refresh rate during PSR active. When used in combination with PSR-SU and Freesync, it is called PSR-SU Rate Contorol, or PSR-SU-RC for short. v2: Add all DPCD registers required Signed-

[PATCH] drm/amd/display: Fix DC definition of PMFW Pstate table for DCN316

2022-02-24 Thread sunpeng.li
From: Leo Li [Why] During DC init, we read power management tables from PMFW. This info is exchanged in the form of a binary blob inside gpu memory. In order to parse the binary blob, the correct struct needs to be used. [How] Fix dcn316's definition of the DfPstateTable_t struct to align with

[PATCH] drm/amd/display: Fix DC_FP_START/END use on non-DCN builds

2022-02-17 Thread sunpeng.li
From: Leo Li DC_FP_START/END is only defined for CONFIG_DRM_AMD_DC_DCN enabled builds, and update_bw_bounding_box() is only valid for DCN ASICs. Therefore, wrap the entire thing in the ifdef guard. Acked-by: Alex Deucher Signed-off-by: Leo Li --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2

[PATCH] drm: Add PSR version 4 macro

2022-01-17 Thread sunpeng.li
From: Leo Li eDP 1.5 specification defines PSR version 4. It defines PSR1 and PSR2 support with selective-update (SU) capabilities, with additional support for Y-coordinate and Early Transport of the selective-update region. This differs from PSR version 3 in that early transport is supported f

[PATCH v4] drm/amd/display: Disable VUpdate interrupt for DCN hardware

2019-11-05 Thread sunpeng.li
From: Leo Li [Why] On DCN hardware, the crtc_high_irq handler makes vupdate_high_irq handler redundant. All the vupdate handler does is handle vblank events, and update vrr for DCE hw (excluding VEGA, more on that later). As far as usermode is concerned. vstartup happens close enough to vupdate

[PATCH v3] drm/amd/display: Disable VUpdate interrupt for DCN hardware

2019-11-05 Thread sunpeng.li
From: Leo Li [Why] On DCN hardware, the crtc_high_irq handler makes vupdate_high_irq handler redundant. All the vupdate handler does is handle vblank events, and update vrr for DCE hw (excluding VEGA, more on that later). As far as usermode is concerned. vstartup happens close enough to vupdate

[PATCH 2/2 v2] drm/amd/display: Disable VUpdate interrupt for DCN hardware

2019-11-05 Thread sunpeng.li
From: Leo Li [Why] On DCN hardware, the crtc_high_irq handler makes vupdate_high_irq handler redundant. All the vupdate handler does is handle vblank events, and update vrr for DCE hw (excluding VEGA, more on that later). As far as usermode is concerned. vstartup happens close enough to vupdate

[PATCH 2/2] drm/amd/display: Disable VUpdate interrupt for DCN hardware

2019-11-05 Thread sunpeng.li
From: Leo Li [Why] On DCN hardware, the crtc_high_irq handler makes vupdate_high_irq handler redundant. All the vupdate handler does is handle vblank events, and update vrr for DCE hw (excluding VEGA, more on that later). As far as usermode is concerned. vstartup happens close enough to vupdate

[PATCH 1/2] drm/amd/display: Send vblank and user events at vsartup for DCN

2019-11-05 Thread sunpeng.li
From: Leo Li [Why] For DCN hardware, the crtc_high_irq handler is assigned to the vstartup interrupt. This is different from DCE, which has it assigned to vblank start. We'd like to send vblank and user events at vstartup because: * It happens close enough to vupdate - the point of no return f

[PATCH v2] drm/amdgpu: Add DC feature mask to disable fractional pwm

2019-10-21 Thread sunpeng.li
From: Leo Li [Why] Some LED panel drivers might not like fractional PWM. In such cases, backlight flickering may be observed. [How] Add a DC feature mask to disable fractional PWM, and associate it with the preexisting dc_config flag. The flag is only plumbed through the dmcu firmware, so plu

[PATCH] drm/amdgpu: Add DC feature mask to disable fractional pwm

2019-10-21 Thread sunpeng.li
From: Leo Li [Why] Some LED panel drivers might not like fractional PWM. In such cases, backlight flickering may be observed. [How] Add a DC feature mask to disable fractional PWM, and associate it with the preexisting dc_config flag. The flag is only plumbed through the dmcu firmware, so plu

[PATCH 37/37] drm/amd/display: Apply vactive dram clock change workaround to dcn2 DMLv2

2019-10-17 Thread sunpeng.li
From: Joshua Aberback [Why] This workaround was put in dcn2 DMLv1, and now we need it in DMLv2. Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Leo Li --- .../gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) dif

[PATCH 29/37] drm/amd/display: Only use EETF when maxCL > max display

2019-10-17 Thread sunpeng.li
From: Krunoslav Kovac [Why&How] BT.2390 EETF is used for tone mapping/range reduction. Say display is 0.1 - 500 nits. The problematic case is when content is 0-400. We apply EETF because 0<0.1 so we need to reduce the range by 0.1. In the commit, we ignore the bottom range. Most displays map 0 t

[PATCH 27/37] drm/amd/display: do not synchronize "drr" displays

2019-10-17 Thread sunpeng.li
From: Jun Lei [why] A display that supports DRR can never really be considered "synchronized" with any other display because we can dynamically enable DRR (i.e. without modeset). this will cause their relative CRTC positions to drift and lose sync. this will disrupt features such as MCLK switch

[PATCH 16/37] drm/amd/display: audio endpoint cannot switch

2019-10-17 Thread sunpeng.li
From: Paul Hsieh [Why] On some systems, we need to check the dcn version in runtime system, not in compile time. [How] Stub in dcn version parameter to find_first_free_audio Signed-off-by: Paul Hsieh Reviewed-by: Charlene Liu Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/core/dc_resou

[PATCH 11/37] drm/amd/display: split dcn20 fast validate into more functions

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin Split a large function into smaller, reusable chunks. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nevenko Stupar Acked-by: Leo Li --- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 182 ++ .../drm/amd/display/dc/dcn20/dcn20_resource.h | 31 +++ .

[PATCH 15/37] drm/amd/display: Fix MPO & pipe split on 3-pipe dcn2x

2019-10-17 Thread sunpeng.li
From: Michael Strauss [WHY] DML is incorrectly initialized with 4 pipes on 3 pipe configs RequiredDPPCLK is halved on unsplit pipe due to an incorrectly handled 3 pipe case, causing underflow with 2 planes & pipe split (MPO, 8K + 2nd display) [HOW] Set correct number of DPP/OTGs for dml init to

[PATCH 26/37] drm/amd/display: Proper return of result when aux engine acquire fails

2019-10-17 Thread sunpeng.li
From: Anthony Koo [Why] When aux engine acquire fails, we missed populating the operation_result that describes the failure reason. [How] Set operation_result to new type: AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE in the case aux engine acquire has failed. Signed-off-by: Anthony Koo Reviewed

[PATCH 09/37] drm/amd/display: Enable PSR

2019-10-17 Thread sunpeng.li
From: Roman Li [Why] PSR (Panel Self-Refresh) is a power-saving feature for eDP panels. The feature has support in DMCU (Display MicroController Unit). DMCU/driver communication is implemented in DC. DM can use existing DC PSR interface to use PSR feature. [How] - Read psr caps via dpcd - Send v

[PATCH 06/37] drm/amd/display: remove unused code

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin Commit hints are unnecessary after front end programming redesign. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c |

[PATCH 31/37] drm/amd/display: 3.2.56

2019-10-17 Thread sunpeng.li
From: Aric Cyr Signed-off-by: Aric Cyr Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index b578b2148e45..0416a17b0897 100644 --- a/drivers/g

[PATCH 12/37] drm/amd/display: correctly initialize dml odm variables

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin One of odm variables was not initialized in dml. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li Acked-by: Tony Cheng --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h |

[PATCH 34/37] drm/amd/display: Do not call update bounding box on dc create

2019-10-17 Thread sunpeng.li
From: Sung Lee [Why] In Hybrid Graphics, dcn2_1_soc struct stays alive through PnP. This causes an issue on dc init where dcn2_1_soc which has been updated by update_bw_bounding_box gets put into dml->soc. As update_bw_bounding_box is currently incorrect for dcn2.1, this makes dml calculations fa

[PATCH 36/37] drm/amd/display: fix hubbub deadline programing

2019-10-17 Thread sunpeng.li
From: Eric Yang [Why] Fix the programming of DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_A. Was not filled in. Signed-off-by: Eric Yang Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn21/dcn21_reso

[PATCH 35/37] drm/amd/display: fix avoid_split for dcn2+ validation

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin We are currently incorrectly processing avoid split at highest voltage level. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 11 +++ 1 file changed, 7 insertions(+), 4

[PATCH 07/37] drm/amd/display: 3.2.55

2019-10-17 Thread sunpeng.li
From: Aric Cyr Signed-off-by: Aric Cyr Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 2e1d34882684..a86dad3808b6 100644 --- a/drivers/g

[PATCH 21/37] drm/amd/display: add embedded flag to dml

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h

[PATCH 32/37] drm/amd/display: take signal type from link

2019-10-17 Thread sunpeng.li
From: Lewis Huang [Why] Signal is update to EDP when driver disable first encoder. The following encoder using SIGNAL_TYPE_EDP to handle other device. When encoder signal is HDMI, driver will detect it is dp and release phy. It cause hw hang. [How] Take signal type from link->connector_signal.

[PATCH 33/37] drm/amd/display: Add center mode for integer scaling in DC

2019-10-17 Thread sunpeng.li
From: Reza Amini [why] We want to use maximum space on display to show source [how] For Centered Mode: Replicate source as many times as possible to use maximum of display active space add borders. Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Leo Li --- .../gpu/drm/amd/displ

[PATCH 28/37] drm/amd/display: move wm ranges reporting to end of init hw

2019-10-17 Thread sunpeng.li
From: Eric Yang [Why] SMU does not keep the wm table across S3, S4, need to re-send the table. Also defer sending the cable to after DCN bave initialized [How] Send table at end of init hw Signed-off-by: Eric Yang Reviewed-by: Yongqiang Sun Acked-by: Leo Li --- .../amd/display/dc/clk_mgr/dc

[PATCH 30/37] drm/amd/display: Make clk mgr the only dto update point

2019-10-17 Thread sunpeng.li
From: Noah Abradjian [Why] * Clk Mgr DTO update point did not cover all needed updates, as it included a check for plane_state which does not exist yet when the updater is called on driver startup * This resulted in another update path in the pipe programming sequence, based on a dppclk up

[PATCH 25/37] drm/amd/display: Disable force_single_disp_pipe_split on DCN2+

2019-10-17 Thread sunpeng.li
From: Michael Strauss [WHY] force_single_disp_pipe_split is a debug flag for use on DCN1 but isn't necessary otherwise as DCN2+ splits by default Signed-off-by: Michael Strauss Reviewed-by: Tony Cheng Acked-by: Charlene Liu Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_res

[PATCH 24/37] drm/amd/display: Passive DP->HDMI dongle detection fix

2019-10-17 Thread sunpeng.li
From: Michael Strauss [WHY] i2c_read is called to differentiate passive DP->HDMI and DP->DVI-D dongles The call is expected to fail in DVI-D case but pass in HDMI case Some HDMI dongles have a chance to fail as well, causing misdetection as DVI-D [HOW] Retry i2c_read to ensure failed result is v

[PATCH 22/37] drm/amd/display: add flag to allow diag to force enumerate edp

2019-10-17 Thread sunpeng.li
From: Jun Lei [why] SLT tests require that diag can drive eDP even if nothing is connected, this is not typical production use case, so we need to add flag [how] add flag, and this flag supercedes "should destroy" logic Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Leo Li --- driv

[PATCH 20/37] drm/amd/display: fix number of dcn21 dpm clock levels

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin These are specific to dcn21 and should not be increased for reuse on other asics. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 17/37] drm/amd/display: Update min dcfclk

2019-10-17 Thread sunpeng.li
From: Alvin Lee [Why] NV12 has lower min dcfclk [How] Add update in update_bounding_box Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Leo Li --- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c| 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH 23/37] drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x

2019-10-17 Thread sunpeng.li
From: Yogesh Mohan Marimuthu [Why] The enum value for TRANSMITTER_UNIPHY_G is 9. In resource dc_xx_resource file structure link_enc_regs[], the TRANSMITTER_UNIPHY_G registers are initialized at index 6. Due to this mismatch, if monitor is attached to port using TRANSMITTER_UNIPHY_G then the monit

[PATCH 04/37] drm/amd/display: Don't use optimized gamma22 with eetf

2019-10-17 Thread sunpeng.li
From: Aidan Yang [why] Optimized gamma22 assumes fixed point distribution which is not true for eetf true. [how] Use long calculation for eetf. Signed-off-by: Aidan Yang Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Acked-by: Reza Amini --- .../amd/display/modules/color/color_gamma.c | 4

[PATCH 13/37] drm/amd/display: move dispclk vco freq to clk mgr base

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin This value will be needed by dml and therefore should be externally accessible. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nevenko Stupar Acked-by: Leo Li --- .../amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c| 14 +++--- .../amd/display/dc/clk_mgr/dce11

[PATCH 05/37] drm/amd/display: Remove superfluous assert

2019-10-17 Thread sunpeng.li
From: Jordan Lazare [Why] For loop below the assert already checks for the number of instances to create. ASSERT is meaningless and causing spam. [How] dd Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2

[PATCH 08/37] drm/amd/display: Add debugfs entry for reading psr state

2019-10-17 Thread sunpeng.li
From: Roman Li [Why] For upcoming PSR stupport it's useful to have debug entry to verify psr state. [How] - Enable psr dc api for Linux - Add psr_state file to eDP connector debugfs usage e.g.: cat /sys/kernel/debug/dri/0/DP-1/psr_state Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauska

[PATCH 18/37] drm/amd/display: Allow inverted gamma

2019-10-17 Thread sunpeng.li
From: Aidan Yang [why] There's a use case for inverted gamma and it's been confirmed that negative slopes are ok. [how] Remove code for blocking non-monotonically increasing gamma Signed-off-by: Aidan Yang Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Acked-by: Reza Amini --- .../amd/displ

[PATCH 03/37] drm/amd/display: Add unknown clk state.

2019-10-17 Thread sunpeng.li
From: Yongqiang Sun [Why] System hang during S0i3 if DP only connected due to clk is disabled when doing link training. During S0i3, clk is disabled while the clk state is updated when ini_hw called, and at the moment clk is still disabled which indicating a wrong state for next time trying to en

[PATCH 10/37] drm/amd/display: correctly populate dpp refclk in fpga

2019-10-17 Thread sunpeng.li
From: Anthony Koo [Why] In diags environment we are not programming the DPP DTO correctly. [How] Populate the dpp refclk in dccg so it can be used to correctly program DPP DTO. Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li --- .../drm/amd/display/dc/clk_mgr/dcn20/dcn20

[PATCH 19/37] drm/amd/display: enable vm by default for rn.

2019-10-17 Thread sunpeng.li
From: Yongqiang Sun [Why & How] vm should be enabled by default for rn to get right dml. Signed-off-by: Yongqiang Sun Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li --- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 29 --- 1 file changed, 25 inser

[PATCH 14/37] drm/amd/display: remove unnecessary assert

2019-10-17 Thread sunpeng.li
From: Dmytro Laktyushkin Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drive

[PATCH 01/37] drm/amd/display: add 50us buffer as WA for pstate switch in active

2019-10-17 Thread sunpeng.li
From: Jun Lei Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c b/drivers/gpu/dr

[PATCH 02/37] drm/amd/display: add odm visual confirm

2019-10-17 Thread sunpeng.li
From: Jun Lei [why] Hard to determine if pipe combine is done with MPC or ODM [how] Add new visual confirm type, this will mark each MPCC tree with a different color Signed-off-by: Jun Lei Reviewed-by: Yongqiang Sun Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 1 +

[PATCH 00/37] DC Patches 17 Oct 2019

2019-10-17 Thread sunpeng.li
From: Leo Li This series has dependencies on the recent Renoir series: https://patchwork.freedesktop.org/series/67803/#rev2 Summary of changes: * Enable PSR on supported eDP panels * Allow programming of negative gamma slope Aidan Yang (2): drm/amd/display: Don't use optimized gamma22 with e

[PATCH 08/25] drm/amd/display: add vtg update after global sync update

2019-09-10 Thread sunpeng.li
From: Dmytro Laktyushkin Global sync update was missing vtg update resulting in underflow if vstartup decreased a significant amount. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jaehyun Chung Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 +- 1 file change

[PATCH 20/25] drm/amd/display: 3.4.51

2019-09-10 Thread sunpeng.li
From: Aric Cyr Signed-off-by: Aric Cyr Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index c65f34aa2523..7c19ac71b424 100644 --- a/drivers/g

[PATCH 24/25] drm/amd/display: Add detile buffer size for DCN20

2019-09-10 Thread sunpeng.li
From: Dmytro Laktyushkin Detile buffer size affects dcc caps and therefore needs to be corrected for each ip. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 7 --- drivers/gpu/drm/amd/display/dc/dcn20/d

[PATCH 05/25] drm/amd/display: Replace for loop w/ function call

2019-09-10 Thread sunpeng.li
From: Wesley Chalmers [WHY] A function to adjust DPP clocks with DTO already exists; function code is identical to the code replaced here Signed-off-by: Wesley Chalmers Reviewed-by: Charlene Liu Acked-by: Leo Li --- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 25 ++- 1 fi

[PATCH 25/25] drm/amd/display: Improve LFC behaviour

2019-09-10 Thread sunpeng.li
From: Aric Cyr [Why] There can be some unsynchronized frames when entering/exiting LFC. This may cause tearing or stuttering at such transitions. [How] Add a enter/exit margin to algorithm to smoothly transition into and out of LFC without desynchronizing frames. Signed-off-by: Aric Cyr Revie

[PATCH 00/25] DC Patches 09 Sep 2019

2019-09-10 Thread sunpeng.li
From: Leo Li Summary of change: * Fix pipe split with DSC on high bandwidth timings (8k@60, 4k@144) * Improve freesync low frame rate compensation (frame doubling) behavior * Update ABM parameters, limit minimum adjustment * Misc. refactors and fixes Anthony Koo (1): drm/amd/display: set min

[PATCH 19/25] drm/amd/display: enable single dp seamless boot

2019-09-10 Thread sunpeng.li
From: Martin Leung [why] seamless boot didn't work for non edp's before [how] removed edp-specific code, made dp read uefi-set link settings. Also fixed a hubbub code line to be consistent with usage of function. Signed-off-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Anthony Koo Acked-by

[PATCH 18/25] drm/amd/display: update odm mode validation to be in line with policy

2019-09-10 Thread sunpeng.li
From: Dmytro Laktyushkin Previously 8k30 worked with dsc and odm combine due to a workaround that ran the formula a second time with dsc support enable should dsc validation fail. This worked when clocks were low enough for formula to enable odm to lower voltage, however now broke due to increase

[PATCH 17/25] drm/amd/display: Optimize clocks on clock change

2019-09-10 Thread sunpeng.li
From: Wesley Chalmers [WHY] Presently, there is no way for clocks to be lowered, only raised. [HOW] Compare clock status against previous known clock status, and optimize if different. This requires re-ordering the layout of the dc_clocks structure, as the current ordering allows identical clock

[PATCH 21/25] drm/amd/display: Add missing HBM support and raise Vega20's uclk.

2019-09-10 Thread sunpeng.li
From: Zhan Liu [Why] When more than 2 displays are connected to the graphics card, only the minimum memory clock is needed. However, when more displays are connected, the minimum memory clock is not sufficient enough to support the overwhelming bandwidth. System will hang under this circumstance.

[PATCH 22/25] drm/amd/display: 3.4.51.1

2019-09-10 Thread sunpeng.li
From: Aric Cyr Signed-off-by: Aric Cyr Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 7c19ac71b424..3ecc42987b05 100644 --- a/drivers/g

[PATCH 12/25] drm/amd/display: Separate hardware initialization from creation

2019-09-10 Thread sunpeng.li
From: Julian Parkin [Why] Separating the hardware initialization from the creation of the dc structures gives greater flexibility to the dm to override options for debugging. [How] Move the hardware initialization call to a new function, dc_hardware_init. No functional change is intended. Signe

[PATCH 14/25] drm/amd/display: Revert fixup DPP programming sequence

2019-09-10 Thread sunpeng.li
From: Wesley Chalmers [WHY] This change was made because DTO programming was double-buffered, which is itself an issue. After deactivating the DTO double buffer, this change becomes unnecessary. This reverts commit 79a0feda4306a2e46872fffd1e5507b8e1785244 Signed-off-by: Wesley Chalmers Reviewe

[PATCH 23/25] drm/amd/display: fix use of uninitialized variable

2019-09-10 Thread sunpeng.li
From: Martin Leung tg_inst may be used uninitialized, so initialize it to 0. Signed-off-by: Martin Leung Reviewed-by: Jaehyun Chung Acked-by: Leo Li --- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 2 files changed, 2 inse

[PATCH 10/25] drm/amd/display: Handle virtual signal type in disable_link()

2019-09-10 Thread sunpeng.li
From: Martin Tsai [Why] The new implementation changed the behavior to allow process setMode to DAL when DAL returns empty mode query for unplugged display. This will trigger additional disable_link(). When unplug HDMI from MST dock, driver will update stream->signal to "Virtual". disable_link()

[PATCH 11/25] drm/amd/display: fix i2c wtire mot incorrect issue

2019-09-10 Thread sunpeng.li
From: Lewis Huang [Why] I2C write command always send mot = true will cause sink state incorrect. [How] 1. Remove default i2c write mot = true. 2. Deciding mot flag by is_end_of_payload flag. Signed-off-by: Lewis Huang Reviewed-by: Charlene Liu Acked-by: Leo Li --- drivers/gpu/drm/amd/displ

  1   2   3   4   5   6   7   8   >