History log of /linux-master/drivers/gpu/drm/amd/display/dc/dm_services.h
Revision Date Author Comments
# bf7fda0b 25-Apr-2023 Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

drm/amd/display: Show the DCN/DCE version in the log

Some times people send their dmesg log for debugging, and one common
task is to check the modesetting line to catch which DCN/DCE we need to
debug. This commit introduces a simple conversion from the DCN/DCE
version to a string shown in the dmesg log.

Reviewed-by: Hamza Mahfooz <Hamza.Mahfooz@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# e97cc04f 15-Feb-2023 Josip Pavic <Josip.Pavic@amd.com>

drm/amd/display: refactor dmub commands into single function

[Why & How]
Consolidate dmub access to a single interface. This makes it easier to
add code in the future that needs to run every time a dmub command is
requested (e.g. instrumentation, locking etc).

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 9d83722d 14-Sep-2020 Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

drm/amd/display: Decouple amdgpu_dm_trace from service

Our DC currently uses some of the tracepoint function inside a DC
header, which means that many other files implicitly include part of the
trace function. This situation limits how we can expand this feature for
other parts of the driver by generating multiple compilation errors when
we try to reuse some of the existing structures. This commit decouples
part of the amdgpu_dm_trace from DC core to simplify the trace
enlargement in future changes.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 1810f441 27-Apr-2020 Jaehyun Chung <jaehyun.chung@amd.com>

drm/amd/display: Handle persistence in DM

[Why]
Remove dm_write_persistent_data and dm_read_persistent_data as
persistence should be handled in DM.

[How]
Remove functions. Move read/write calls into DM layer while maintaining
logic.

Signed-off-by: Jaehyun Chung <jaehyun.chung@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 2200eb9e 28-Oct-2019 Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

drm/amd/display: Drop CONFIG_DRM_AMD_DC_DMUB guards

[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: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 3a1627b0 25-Oct-2019 Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

drm/amd/display: Add DMUB support to DC

DC will use DMUB for command submission and flow control during
initialization.

Register offloading as well as submitting some BIOS commands are part
of the DC internal interface but are guarded behind debug options.

It won't be functional in amdgpu_dm yet since we don't pass the
DMUB service to DC for use.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# c1f2e015 22-May-2019 Su Sung Chung <Su.Chung@amd.com>

drm/amd/display: refactor dump_clk_registers

[why]
for 2 purposes:

1. get raw register value dumped on the log, which will make it easier
to talk to other team who only knows about the register

2. enable other HW to be able to use the same interface as raven to log
clock register data

Signed-off-by: Su Sung Chung <Su.Chung@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 901f4f97 28-Feb-2019 Yongqiang Sun <yongqiang.sun@amd.com>

drm/amd/display: Move dm_read_reg_func to dc_helper.

Move out of header to dc_helper.c, in preparation for future
implementations.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 335d5d7b 26-Feb-2019 Yongqiang Sun <yongqiang.sun@amd.com>

drm/amd/display: change generic_reg_wait to void.

we were only checking the return value in one place, thus changing
generic_reg_wait from int to void and reading the register instead of
getting it from generic_reg_wait, when we need the return value.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 148cccf2 13-Feb-2019 Yongqiang Sun <yongqiang.sun@amd.com>

drm/amd/display: Refactor reg_set and reg_update.

[Why]
Current reg update and reg set use same functions and
only delta is update reads reg value and call update function.

[How]
Refactor reg update and reg set functions.
1.Implement different functions for reg update and reg set.
2.Wrap same process to a help function, both reg update and
reg set will call it.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 0f1a6ad7 15-Jan-2019 Jun Lei <Jun.Lei@amd.com>

drm/amd/display: PPLIB Hookup

[Why]
Make dml and integration with pplib clearer.

[How]
Change the way the dml formula is initialized to make its values more
clear. Restructure DC interface with pplib into rv_funcs.
Cap clocks received from pplib.

Signed-off-by: Jun Lei <Jun.Lei@amd.com>
Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 0cf5eb76 30-Nov-2018 David Francis <David.Francis@amd.com>

drm/amd/display: Add tracing to dc

[Why]
Tracing is a useful and cheap debug functionality

[How]
This creates a new trace system amdgpu_dm, currently with
three trace events

amdgpu_dc_rreg and amdgpu_dc_wreg report the address and value
of any dc register reads and writes

amdgpu_dc_performance requires at least one of those two to be
enabled. It counts the register reads and writes since the
last entry

v2: Don't check for NULL before kfree

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 46659a83 14-Aug-2018 Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

drm/amd/display: Support reading hw state from debugfs file

[Why]

Logging hardware state can be done by triggering a write to the
debugfs file. It would also be useful to be able to read the hardware
state from the debugfs file to be able to generate a clean log without
timestamps.

[How]

Usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dtn_log

Threading is an obvious concern when dealing with multiple debugfs
operations and blocking on global state in dm or dc seems unfavorable.

Adding an extra parameter for the debugfs log context state is the
implementation done here. Existing code that made use of DTN_INFO
and its associated macros needed to be refactored to support this.

We don't know the size of the log in advance so it reallocates the
log string dynamically. Once the log has been generated it's copied
into the user supplied buffer for the debugfs. This allows for seeking
support but it's worth nothing that unlike triggering output via
dmesg the hardware state might change in-between reads if your buffer
size is too small.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# eeb2c3c2 18-Jun-2018 Arnd Bergmann <arnd@arndb.de>

amdgpu: display: use modern ktime accessors

getrawmonotonic64() is deprecated because of the nonstandard naming.

The replacement functions ktime_get_raw_ns() also simplifies the callers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 66dec27a 24-Apr-2018 Anthony Koo <Anthony.Koo@amd.com>

drm/amd/display: Fix up dm logging functionality

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 78d5d04d 20-Mar-2018 Charlene Liu <charlene.liu@amd.com>

drm/amd/display: add delay between panel pwr off to on.

As per eDP 1.4 spec, there must be at least 500ms delay
between eDP power off and on.
This change added time stamp when edp power off, which can
be used to calculate duration time when edp power on.
If duration less than 500ms, add a wait.

Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 627c9a0a 05-Feb-2018 Harry Wentland <harry.wentland@amd.com>

drm/amd/display: Remove unused dm_pp_ interfaces

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# dce46c53 08-Nov-2017 Tony Cheng <tony.cheng@amd.com>

drm/amd/display: performance profiling instrumentation

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# d8d46ae9 01-Nov-2017 Arnd Bergmann <arnd@arndb.de>

drm/amdgpu/display: remove unused REG_OFFSET macro

The name conflicts with another macro of the same name on the ARM ixp4xx
platform, leading to build errors.
Neither of the users actually should use a name that generic, but the
other one was here first and the dc driver doesn't actually use it.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 75e68891 11-Oct-2017 Harry Wentland <harry.wentland@amd.com>

drm/amd/display: Move OS types to os_types.h

Some of this stuff is not really dm_services

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 215a6f05 06-Oct-2017 Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>

drm/amd/display: add performance trace macro to dc

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 4770b184 10-Oct-2017 Alex Deucher <alexander.deucher@amd.com>

drm/amd/display/dc: drop dm_delay_in_microseconds

Use udelay directly.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 29656a36 27-Sep-2017 Dave Airlie <airlied@redhat.com>

amdgpu/dc: remove wait_reg/wait_reg_func interfaces.

These aren't used in the tree anywhere, and there is a TODO.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# e9d7dc62 27-Sep-2017 Dave Airlie <airlied@redhat.com>

amdgpu/dc: don't check for 0 on register read/writes always.

This adds ~50k to the driver text segment, and 10k to data segment.

text data bss dec hex filename
2385556 39681 1045 2426282 2505aa drivers/gpu/drm/amd/amdgpu/amdgpu.o
text data bss dec hex filename
2336593 28857 1045 2366495 241c1f drivers/gpu/drm/amd/amdgpu/amdgpu.o

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# a185048c 13-Aug-2017 Tony Cheng <tony.cheng@amd.com>

drm/amd/display: refactor pplib/smu communication

new per SoC interface instead legacy interface with lots of un-used
field that only cause confusion

model pp_smu like one of our HW objects with func_ptr interface
to call into it. struct pp_smu as handle to call pp/smu

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# b4c8e6da 10-Aug-2017 Harry Wentland <harry.wentland@amd.com>

drm/amd/display: Leave DCN config guard around fpu header

See
https://lists.freedesktop.org/archives/dri-devel/2017-August/149938.html

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 43193c79 30-Jul-2017 AMD\ktsao <kenny.tsao@amd.com>

drm/amd/display: remove DCN1 guard as DCN1 is already open sourced.

Signed-off-by: Kenny Tsao <kenny.tsao@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 2248eb6b 25-Jul-2017 Tony Cheng <tony.cheng@amd.com>

drm/amd/display: log HUBP using DTN logging

also simplify DTN INFO. all we need is a way to have DC log register states
some where we can compare with golden. going through connectivity is overkill.

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# daf6b57d 11-Jul-2017 Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>

drm/amd/display: add line number to reg_wait timeout print

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# ff5ef992 15-Jun-2017 Alex Deucher <alexander.deucher@amd.com>

drm/amdgpu/display: Enable DCN in DC

Enable DCN in DC.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 8fa9ca2e 15-Jun-2017 Alex Deucher <alexander.deucher@amd.com>

drm/amd/display: Remove DCE12 guards

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 2c8ad2d5 15-Jun-2017 Alex Deucher <alexander.deucher@amd.com>

drm/amd/display: Enable DCE12 support

This wires DCE12 support into DC and enables it.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 871ffb60 06-Feb-2017 Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>

drm/amd/display: fix psr status wait

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eagle Yeh <eagle.yeh@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# bf727263 13-Jan-2017 Tony Cheng <tony.cheng@amd.com>

drm/amd/display: assert if mask is 0 in set_reg_field_value_ex

- mask = 0 means something is wrong in caller and no register field will be updated

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# e2859170 12-Dec-2016 Dave Airlie <airlied@redhat.com>

drm/amd/display: drop get platform info

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 2a099884 12-Dec-2016 Dave Airlie <airlied@redhat.com>

drm/amd/display: drop register logger and pid/tgid getters

While I'm sure this is useful I think we should bring it back later.

It's usage of pid/tgid is incorrect, you have to get/put
pid/tgids not store them away.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 4562236b 12-Sep-2017 Harry Wentland <harry.wentland@amd.com>

drm/amd/dc: Add dc display driver (v2)

Supported DCE versions: 8.0, 10.0, 11.0, 11.2

v2: rebase against 4.11

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>