linux/drivers/gpu/drm/amd/display/dc
Leo (Sunpeng) Li aed7b06e49 drm/amd/display: When enabling CRC, disable dither & enable truncation
When user-mode is using 8bpc, the hardware represents it internally
using a higher bit depth. This causes problems when comparing CRCs for
color managment tests.

We need to disable dithering as well, since it makes CRC values
non-deterministic.

It's easy to see why dithering needs to be disabled, The reason why
truncation also needs to be enabled is better described with an example.
Consider the folowing which tests the color transform matrix (CTM):

Expected CRC = FB_A -> Degamma (Bypassed) -> CTM (Bypassed)
                                                  |
                                                  v
                            Obtain CRC  <- Regamma(Bypassed)

Actual CRC = FB_B -> Degamma (Bypassed) -> CTM (0.5*Identity)
                                                  |
                                                  v
                            Obtain CRC  <- Regamma(Bypassed)

FB_A contains a solid red color at half intensity (127 @ 8bpc)
FB_B contains a solid red color at full intensity (255 @ 8bpc)

We expect that Expected CRC = Actual CRC, but that's not the case. When
the CTM is applied, the output is at half intensity, but also at a
higher bit depth within hardware. i.e. 255/2 = 127.5: not representable
in 8bpc, but can be at 10bpc. This causes the two CRC's to be different.

The solution is to truncate the output bit depth to the same as input
when enabling CRC capture. Since Linux only supports 8bpc, hard code
that for now.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-02-19 14:20:09 -05:00
..
basics drm/amd/display: WBSCL filter init calculation fixes 2018-02-19 14:19:29 -05:00
bios drm/amd/display: resume from S3 bypass power down HW block. 2018-02-19 14:19:35 -05:00
calcs drm/amd/display: Change blackout time to 0 on CZ/ST 2018-02-19 14:20:00 -05:00
core drm/amd/display: When enabling CRC, disable dither & enable truncation 2018-02-19 14:20:09 -05:00
dce amdgpu/dc: Fix enum mismatch in calls to program_color_matrix() 2018-02-19 14:19:44 -05:00
dce80 drm/amd/display: Make couple functions in DCE80 TG static 2018-02-19 14:20:05 -05:00
dce100 drm/amd/display: Re-use DCE100 display_power_gating for DCE80 2018-02-19 14:20:04 -05:00
dce110 drm/amd/display: Use hardware max low point when sampling OTF 2018-02-19 14:20:05 -05:00
dce112 drm/amd/display: Add timing generator count to resource pool. 2018-02-19 14:18:36 -05:00
dce120 drm/amd/display: Add timing generator count to resource pool. 2018-02-19 14:18:36 -05:00
dcn10 drm/amd/display: add force_trigger even to static screen control 2018-02-19 14:20:00 -05:00
dml drm/amd/display: Remove unused CFLAGS entry in DML Makefile 2018-02-19 14:19:54 -05:00
gpio drm/amd/dc: include new ip and ip_offset headers 2018-02-19 14:18:14 -05:00
i2caux drm/amd/display: Remove unnecessary register programming 2018-02-19 14:18:43 -05:00
inc drm/amd/display: Optimize regamma calculations 2018-02-19 14:19:35 -05:00
irq drm/amd/dc: include new ip and ip_offset headers 2018-02-19 14:18:14 -05:00
virtual drm/amd/display: Pass signal directly to enable_tmds_output 2018-02-19 14:17:24 -05:00
dc_bios_types.h drm/amd/display: resume from S3 bypass power down HW block. 2018-02-19 14:19:35 -05:00
dc_ddc_types.h drm/amd/display: Roll core_link into dc_link 2017-09-26 18:15:36 -04:00
dc_dp_types.h drm/amd/display: get remote dpcd caps for timing validation 2017-12-06 12:47:26 -05:00
dc_helper.c drm/amdgpu: add license to files where it was missing 2017-12-07 11:51:25 -05:00
dc_hw_types.h drm/amd/display: Bypass gamma set if not standard type 2018-02-19 14:19:25 -05:00
dc_link.h drm/amd/display: Rearchitecture HDMI HPD 2018-02-19 14:19:57 -05:00
dc_stream.h drm/amd/display: Expose dither setting functionality to Linux 2018-02-19 14:20:08 -05:00
dc_types.h drm/amd/display: add monitor patch for delay after DP receive power up 2018-02-19 14:20:01 -05:00
dc.h drm/amd/display: Keep eDP stream enabled during boot. 2018-02-19 14:20:03 -05:00
dm_helpers.h drm/amd/display: Implement HDMI retimer settings for RV AM4 support. 2017-09-26 18:16:45 -04:00
dm_pp_smu.h drm/amd/display: PME sw wa to support waking AZ D3 2018-02-19 14:17:17 -05:00
dm_services_types.h drm/amd/display: refactor pplib/smu communication 2017-09-26 18:16:46 -04:00
dm_services.h drm/amd/display: performance profiling instrumentation 2017-12-06 12:48:08 -05:00
irq_types.h drm/amd/display: Add interrupt entries for VBLANK isr. 2017-09-26 17:11:12 -04:00
Makefile drm/amdgpu: add license to Makefiles 2017-12-07 11:51:10 -05:00
os_types.h drm/amd/display: Don't spam debug log on long reg waits 2017-12-20 14:46:06 -05:00