linux_dsm_epyc7002/drivers/gpu/drm/amd/display/dc
David Francis 9bbf6a5341 drm/amd/display: Flatten unnecessary i2c functions
[Why]
The dce_i2c_hw code contained four funtcions that were only
called in one place and did not have a clearly delineated
purpose.

[How]
Inline these functions, keeping the same functionality.

This is not a functional change.

The functions disable_i2c_hw_engine and release_engine_dce_hw were
pulled into their respective callers.

The most interesting part of this change is the acquire functions.
dce_i2c_hw_engine_acquire_engine was pulled into
dce_i2c_engine_acquire_hw, and dce_i2c_engine_acquire_hw was pulled
into acquire_i2c_hw_engine.

Some notes to show that this change is not functional:
-Failure conditions in any function resulted in a cascade of calls that
ended in a 'return NULL'.
Those are replaced with a direct 'return NULL'.

-The variable result is the one from dce_i2c_hw_engine_acquire_engine.
The boolean result used as part of return logic was removed.

-As the second half of dce_i2c_hw_engine_acquire_engine is only executed
if that function is returning true and therefore exiting the do-while
loop in dce_i2c_engine_acquire_hw, those lines were moved outside
of the loop.

Signed-off-by: David Francis <David.Francis@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-08-27 15:21:11 -05:00
..
basics drm/amd/display: Convert remaining loggers off dc_logger 2018-07-13 14:48:42 -05:00
bios drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
calcs drm/amd/display: Move PME to function pointer call semantics 2018-08-27 11:09:48 -05:00
core drm/amd/display: support 48 MHZ refclk off 2018-08-27 15:21:03 -05:00
dce drm/amd/display: Flatten unnecessary i2c functions 2018-08-27 15:21:11 -05:00
dce80 drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
dce100 drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
dce110 drm/amd/display: move edp fast boot optimization flag to stream 2018-08-27 11:11:07 -05:00
dce112 drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
dce120 drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
dcn10 drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -05:00
dml drm/amd/display: fix dml handling of mono8/16 pixel formats 2018-08-27 11:10:15 -05:00
gpio Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00
i2caux Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00
inc drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -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_bios_types.h drm/amd/display: get board layout for edid emulation 2018-07-05 16:38:45 -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: Refactor FreeSync module 2018-08-27 11:10:51 -05:00
dc_link.h drm/amd/display: add vbios table check for enabling dp ss 2018-08-06 15:56:54 -05: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: Refactor FreeSync module 2018-08-27 11:10:51 -05:00
dc.h drm/amd/display: dc 3.1.63 2018-08-27 15:20:04 -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: Move PME to function pointer call semantics 2018-08-27 11:09:48 -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
dm_services.h drm/amd/display: Support reading hw state from debugfs file 2018-08-27 15:20:49 -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 Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00