linux/drivers/gpu/drm/amd/display/dc
Krunoslav Kovac 0975780913 drm/amd/display: Set gamma not working on MPO planes
[Why]
Set gamma not working on certain planes in MPO configuration
Root cause is that video format (YUV-420) isn't allowed for IGAM where
gamma is applied.
Fix is not easy though:
1. allowing will not work because IGAM is before ICSC so RGB gamma would
be applied on YUV pixels.
2. Moving OS gamma to DGAM or RGAM resulted in weird artifacts.

Ultimately the root cause for these artifacts was due to handling end
points and the fact that YUV->RGB conversion will frequently "overshoot"
FP 1.0 value. DCE  has a single end point and slope, so we would take max.
In nightlight mode, blue channel is reduced, sometimes to flat 0 line,
but red is virtually unchanged. Any "overshot" in blue will be clipped
to 1 (max R,G,B) instead of max blue value.

[How]
Fortunately, this can be fixed on DCN where we have end point and slope
for all three color channels. We cannot fix this problem on DCE.

Other things fixed:
- switch (back) to using RGAM for OS gamma instead of IGAM
- add coeffs for 709 YUV->RGB (we used RGB->YUV for both conversions)
- switch color temperature method to scaled bradford - otherwise we would
have clipping problems that caused us to switch to IGAM for OS gamma
in the first place.
- comments and some minor improvements - there are some more issues but
they will be addressed in separate commits.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-11-05 14:21:31 -05:00
..
basics drm/amd/display: Convert remaining loggers off dc_logger 2018-07-13 14:48:42 -05:00
bios drm/amd/display: Add Raven2 definitions in dc 2018-09-14 09:36:47 -05:00
calcs drm/amd/display: program v_update and v_ready with proper field 2018-09-26 21:09:06 -05:00
core drm/amd/display: Remove stream_res tg null check in commit planes 2018-11-05 14:21:10 -05:00
dce drm/amd/display: add dccg block 2018-11-05 14:20:48 -05:00
dce80 drm/amd/display: rename dccg to clk_mgr 2018-11-05 14:20:48 -05:00
dce100 drm/amd/display: rename dccg to clk_mgr 2018-11-05 14:20:48 -05:00
dce110 drm/amd/display: rename dccg to clk_mgr 2018-11-05 14:20:48 -05:00
dce112 drm/amd/display: rename dccg to clk_mgr 2018-11-05 14:20:48 -05:00
dce120 drm/amd/display: rename dccg to clk_mgr 2018-11-05 14:20:48 -05:00
dcn10 drm/amd/display: Set gamma not working on MPO planes 2018-11-05 14:21:31 -05:00
dml drm/amd/display: fix dml handling of mono8/16 pixel formats 2018-08-27 11:10:15 -05:00
gpio drm/amd/display: Add Raven2 definitions in dc 2018-09-14 09:36:47 -05:00
i2caux drm/amd/display: Use proper enums in process_channel_reply 2018-10-09 17:04:22 -05:00
inc drm/amd/display: Set gamma not working on MPO planes 2018-11-05 14:21:31 -05:00
irq Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00
virtual drm/amd/display: Pass signal directly to enable_tmds_output 2018-03-07 16:27:20 -05:00
dc.h drm/amd/display: dc 3.2.02 2018-11-05 14:20:49 -05:00
dc_bios_types.h drm/amd/display: remove dead dc vbios code 2018-09-10 22:42:46 -05:00
dc_ddc_types.h drm/amd/display: Move i2c and aux structs into dc_ddc_types.h 2018-06-15 12:23:38 -05:00
dc_dp_types.h drm/amd/display: Write TEST_EDID_CHECKSUM_WRITE for EDID tests 2018-06-15 12:22:09 -05:00
dc_helper.c drm/amd/display: eliminate long wait between register polls on Maximus 2018-08-27 15:20:24 -05:00
dc_hw_types.h drm/amd/display: Calculate swizzle mode using bpp during validation 2018-10-09 17:01:55 -05:00
dc_link.h This is the 4.19-rc6 release 2018-10-04 11:03:34 +10:00
dc_stream.h drm/amd/display: move edp fast boot optimization flag to stream 2018-08-27 11:11:07 -05:00
dc_types.h drm/amd/display: Add function to fetch clock requirements 2018-10-09 17:02:02 -05:00
dm_event_log.h drm/amd/display: add aux i2c event log. 2018-09-14 15:47:30 -05:00
dm_helpers.h drm/amd/display: Add hook for MST root branch info 2018-07-16 16:11:49 -05:00
dm_pp_smu.h drm/amd/display: Retiring set_display_requirements in dm_pp_smu.h - part3 2018-11-05 14:21:11 -05:00
dm_services.h drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -05:00
dm_services_types.h drm/amd/display: Fix a typo in wm_min_memg_clk_in_khz 2018-07-05 16:38:51 -05:00
irq_types.h drm/amd/display: get rid of 32.32 unsigned fixed point 2018-05-18 16:08:21 -05:00
Makefile Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00
os_types.h amd-gpu: Don't undefine READ and WRITE 2018-10-24 00:36:12 +01:00