]> git.hungrycats.org Git - linux/commit
drm/amd/display: program dither on all OPP heads under ODM combine
authorJames Lin <PingLei.Lin@amd.com>
Mon, 22 Jun 2026 05:38:02 +0000 (13:38 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jul 2026 23:12:35 +0000 (19:12 -0400)
commit2a5810782369b2128394e783d30728393c7bd62d
tree01fac8c61656a0338e05d397f0fa223ca1e1a503
parentc96d79332efa760fd18d9be90b9162fb6acfac89
drm/amd/display: program dither on all OPP heads under ODM combine

[why]
The IGT test kms_plane_alpha_blend@coverage-vs-premult-vs-constant
failed on DCN with ODM 2:1 combine enabled. The test compares the CRC
of a coverage-blended plane against a premultiplied-blended plane and
expects them to be identical. With ODM combine the whole-frame CRC
mismatched (left segment matched, right segment differed).

Root cause: dc_stream_set_dither_option() iterated the pipe_ctx array
and broke out at the first pipe matching the stream (the OTG master /
OPP instance 0), then programmed bit-depth reduction (dither) on that
single OPP only. Under ODM combine there is more than one OPP head, so
the secondary ODM segment (OPP instance 1) was never reprogrammed. When
CRC capture requested dither off, only the left OPP got updated while
the right OPP kept its previous dither setting, producing a different
CRC for the right segment and thus a whole-frame CRC mismatch.

[how]
Use resource_get_otg_master_for_stream() and
resource_get_opp_heads_for_otg_master() to retrieve every OPP head of
the stream, then loop over all of them and call
transform_set_pixel_storage_depth() and opp_program_bit_depth_reduction()
on each. This keeps all OPP heads in sync under ODM combine, so dither is
applied (or cleared) identically across every segment and the CRCs match.

Reviewed-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: James Lin <PingLei.Lin@amd.com>
Signed-off-by: George Zhang <george.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c