diff options
| author | Wayne Lin <Wayne.Lin@amd.com> | 2026-10-08 10:55:03 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-11-04 12:21:47 -0500 |
| commit | f18c112edb600398b3dbd28a455e17cf945d6d91 (patch) | |
| tree | d19e8c820b51a768658bb4cab11f0d55ddc4deda /include/linux/debugobjects.h | |
| parent | ce5f2a25bdf6b2bccfc4ffb5e4c5f12e97eeace1 (diff) | |
drm/amd/display: add missing CRC engine 1 registers
[why]
Opening the CRTC CRC debugfs file programs every CRC engine. On
several generations the engine 1 window and data entries were missing,
so configure hits a zero field mask and WARNs. DCN4.2, DCN4.2B, and
DCN6.0 already had those entries, but configure still writes
OTG_CRC1_SELECT with no mask check. DCN6.0 also lacks OTG_CRC1_EN, so
optc1_configure_crc() writes OTG_CRC_EN instead. The ASIC headers
already define the addresses and fields. The driver tables did not
list them.
[how]
How the missing entries are filled in:
1. DCN3.0 through DCN3.0.3 use OPTC_COMMON_*_DCN3_BASE. Add the six
engine 1 addresses and the window, data, and OTG_CRC1_SELECT masks.
These headers have no OTG_CRC1_EN bit, so that field is not added.
2. DCN3.1 uses OPTC_COMMON_*_DCN3_1. Add the same addresses and masks,
including OTG_CRC1_EN. dcn_3_1_2 defines that bit. DCN3.1.5
and DCN3.1.6 expand DCN3_1 through DCN31X. DCN3.1.4 has its own
list. OTG_CRC1_EN was already on it, so only addresses, SELECT,
window, and data are added.
3. DCN3.2 and DCN3.2.1 already had OTG_CRC1_EN and OTG_CRC1_SELECT.
Add the window and data masks in the OPTC header and the addresses
in the resource header. DCN3.2 fills addresses at init from
ctx->dcn_reg_offsets[].
4. DCN4.0.1 also uses optc1_configure_crc() and was missing SELECT,
window, and data. Add those masks and the six addresses.
OTG_CRC1_EN was already present.
5. DCN3.5, DCN3.5.1, and DCN3.6 already have the addresses and program
engine 1 through optc35_configure_crc(). Their mask list included
DCN3.2 and then repeated the CRC1 window and data fields. Drop the
duplicates.
6. DCN2.0, DCN2.0.1, and DCN2.1 are left unchanged. They inherit the
DCN1.0 lists, which already name engine 1 window, data, and
OTG_CRC1_SELECT. Their headers have no OTG_CRC1_EN bit.
7. DCN4.2 and DCN4.2B use optc35_configure_crc(). Window, data, and
OTG_CRC1_EN were already present. Add OTG_CRC1_SELECT. DCN6.0 uses
optc1_configure_crc(). Window and data were already present. Add
OTG_CRC1_SELECT and OTG_CRC1_EN.
Fixes: ef45aaf73717 ("drm/amd/display: Configure all CRC engines in pipe CRC source path")
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Closes: https://lore.kernel.org/all/20260829085941.106318-1-mikhail.v.gavrilov@gmail.com/
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Assisted-by: Cursor:Grok 4.7
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> # Navi 31 (DCN3.2)
Reviewed-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Cc: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f42edf63ba4456fa7a02e81a3aa7f2d410a28921)
Cc: stable@vger.kernel.org
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
