[PATCH 2/2] drm/amd/display: Set default ABM level to module parameter

Francis, David David.Francis at amd.com
Thu Jun 6 15:46:36 UTC 2019

Series is

Reviewed-by: David Francis <David.Francis at amd.com>

From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
Sent: June 6, 2019 9:02:13 AM
To: amd-gfx at lists.freedesktop.org
Cc: Francis, David; Wentland, Harry; Kazlauskas, Nicholas
Subject: [PATCH 2/2] drm/amd/display: Set default ABM level to module parameter

The module parameter to specify the default ABM level is now defined,
so hook it up in DM.

On connector reset specify the default level. DC will program this as
part of the modeset since it gets passed onto the stream in

It's only set for eDP connectors, but it doesn't matter if this is
specified for connectors or hardware that doesn't support ABM.

It's DC's responsibility to check that ABM can be set or adjusted, and
DC does check that the DMCU firmware is running and if there's backlight
control available.

Cc: Harry Wentland <harry.wentland at amd.com>
Cc: David Francis <david.francis at amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a698c8f272ed..f0c216d78a07 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3821,6 +3821,9 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
                 state->underscan_hborder = 0;
                 state->underscan_vborder = 0;

+               if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
+                       state->abm_level = amdgpu_dm_abm_level;
                 __drm_atomic_helper_connector_reset(connector, &state->base);

amd-gfx mailing list
amd-gfx at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190606/187990d9/attachment-0001.html>

More information about the amd-gfx mailing list