linux/drivers/gpu/drm/amd/display/dc/dce
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
..
dce_abm.c drm/amd/display: get rid of 32.32 unsigned fixed point 2018-05-18 16:08:21 -05:00
dce_abm.h
dce_audio.c drm/amd/display: Add Dynamic debug prints 2018-04-11 13:08:05 -05:00
dce_audio.h
dce_aux.c drm/amd/display: flatten aux_engine and engine 2018-07-27 09:07:42 -05:00
dce_aux.h drm/amd/display: flatten aux_engine and engine 2018-07-27 09:07:42 -05:00
dce_clock_source.c drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
dce_clock_source.h drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
dce_clocks.c drm/amd/display: Add dprefclk value to dce_dccg 2018-08-27 11:10:14 -05:00
dce_clocks.h drm/amd/display: Add dprefclk value to dce_dccg 2018-08-27 11:10:14 -05:00
dce_dmcu.c Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00
dce_dmcu.h drm/amd/display: Enable backlight support for pre-DCE11 ASICs 2018-03-14 15:08:46 -05:00
dce_hwseq.c drm/amd/display: remove dummy is_blanked() to optimise boot time 2018-05-15 13:43:07 -05:00
dce_hwseq.h drm/amd/display: add missing mask for dcn 2018-07-13 14:49:52 -05:00
dce_i2c_hw.c drm/amd/display: Flatten unnecessary i2c functions 2018-08-27 15:21:11 -05:00
dce_i2c_hw.h drm/amd/display: Remove redundant i2c structs 2018-08-27 15:20:56 -05:00
dce_i2c_sw.c drm/amd/display: Remove redundant i2c structs 2018-08-27 15:20:56 -05:00
dce_i2c_sw.h drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
dce_i2c.c drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00
dce_i2c.h drm/amd/display: Remove redundant i2c structs 2018-08-27 15:20:56 -05:00
dce_ipp.c drm/amd/display: get rid of 32.32 unsigned fixed point 2018-05-18 16:08:21 -05:00
dce_ipp.h
dce_link_encoder.c drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
dce_link_encoder.h drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
dce_mem_input.c drm/amd/display: make function tables const 2018-07-10 14:17:11 -05:00
dce_mem_input.h drm/amd/display: Separate mem input constuctors for dce 112 and 120 2018-04-11 13:07:42 -05:00
dce_opp.c drm/amd/display: Fix FMT truncation programming 2018-03-21 00:22:35 -05:00
dce_opp.h
dce_scl_filters.c drm/amd/display: get rid of 32.32 unsigned fixed point 2018-05-18 16:08:21 -05:00
dce_stream_encoder.c drm/amdgpu/display: add support for LVDS (v5) 2018-08-27 11:11:15 -05:00
dce_stream_encoder.h
dce_transform.c drm/amd/display: add HDR visual confirm 2018-07-16 16:11:49 -05:00
dce_transform.h
Makefile drm/amd/display: Create new i2c resource 2018-08-27 11:11:05 -05:00