drm/amdgpu: Add DC feature mask to disable fractional pwm
authorLeo Li <sunpeng.li@amd.com>
Mon, 21 Oct 2019 18:58:47 +0000 (14:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Oct 2019 20:50:10 +0000 (16:50 -0400)
commiteaf56410ccb06f4af9475b7018ec46aa022ee99e
tree705819a2b47e610e74e11ba63f7a7017dc6110db
parent9f0256da6ba0fbe05f4e86d5b1153f89b54c5fd4
drm/amdgpu: Add DC feature mask to disable fractional pwm

[Why]

Some LED panel drivers might not like fractional PWM. In such cases,
backlight flickering may be observed.

[How]

Add a DC feature mask to disable fractional PWM, and associate it with
the preexisting dc_config flag.

The flag is only plumbed through the dmcu firmware, so plumb it through
the driver path as well.

To disable, add the following to the linux cmdline:
amdgpu.dcfeaturemask=0x4

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204957
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Tested-by: Lukáš Krejčí <lskrejci@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
drivers/gpu/drm/amd/include/amd_shared.h