linux/drivers/gpu/drm/amd/display/dc/bios
Arnd Bergmann ac5d44fbf3 drm/amd/display: fix incompatible structure layouts
Building the amd display driver with link-time optimizations revealed a bug
that caused dal_cmd_tbl_helper_dce80_get_table() and
dal_cmd_tbl_helper_dce110_get_table() get called with an incompatible
return type between the two callers in command_table_helper.c and
command_table_helper2.c:

drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce80/command_table_helper_dce80.h:31: error: type of 'dal_cmd_tbl_helper_dce80_get_table' does not match original declaration [-Werror=lto-type-mismatch]
 const struct command_table_helper *dal_cmd_tbl_helper_dce80_get_table(void);

drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce80/command_table_helper_dce80.c:351: note: 'dal_cmd_tbl_helper_dce80_get_table' was previously declared here
 const struct command_table_helper *dal_cmd_tbl_helper_dce80_get_table(void)

drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce110/command_table_helper_dce110.h:32: error: type of 'dal_cmd_tbl_helper_dce110_get_table' does not match original declaration [-Werror=lto-type-mismatch]
 const struct command_table_helper *dal_cmd_tbl_helper_dce110_get_table(void);

drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce110/command_table_helper_dce110.c:361: note: 'dal_cmd_tbl_helper_dce110_get_table' was previously declared here
 const struct command_table_helper *dal_cmd_tbl_helper_dce110_get_table(void)

The two versions of the structure are obviously derived from the same
one, but have diverged over time, before they got added to the kernel.

This moves the structure to a new shared header file and uses the superset
of the members, to ensure the interfaces are all compatible.

Fixes: ae79c310b1 ("drm/amd/display: Add DCE12 bios parser support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2018-02-19 14:19:18 -05:00
..
dce80 amdgpu/dc: fix non-ansi function decls. 2017-11-07 16:21:59 -05:00
dce110 amdgpu/dc: fix non-ansi function decls. 2017-11-07 16:21:59 -05:00
dce112 amdgpu/dc: fix non-ansi function decls. 2017-11-07 16:21:59 -05:00
bios_parser.c drm/amd/display: Print type if we get wrong ObjectID from bios 2017-12-20 14:45:40 -05:00
bios_parser.h
bios_parser2.c amdgpu/dc: fix indentation warning from smatch. 2017-11-07 16:22:04 -05:00
bios_parser2.h drm/amd/display: Add DCE12 bios parser support 2017-09-26 17:19:04 -04:00
bios_parser_common.c amdgpu/dc: separate out some common code from bios parsers. 2017-09-28 16:51:56 -04:00
bios_parser_common.h amdgpu/dc: separate out some common code from bios parsers. 2017-09-28 16:51:56 -04:00
bios_parser_helper.c amdgpu/dc: rename bios get_image symbol to something more searchable. 2017-09-29 13:04:10 -04:00
bios_parser_helper.h amdgpu/dc: rename bios get_image symbol to something more searchable. 2017-09-29 13:04:10 -04:00
bios_parser_interface.c drm/amd/display: Remove DCE12 guards 2017-09-26 17:19:36 -04:00
bios_parser_types_internal.h
bios_parser_types_internal2.h drm/amd/display: Add DCE12 bios parser support 2017-09-26 17:19:04 -04:00
command_table.c drm/amd/display: Demote error print to debug print when ATOM impl missing 2018-01-24 15:47:25 -05:00
command_table.h drm/amd/display: remove dead code 2017-09-26 17:10:34 -04:00
command_table2.c drm/amd/display: Demote error print to debug print when ATOM impl missing 2018-01-24 15:47:25 -05:00
command_table2.h drm/amd/display: Add DCE12 bios parser support 2017-09-26 17:19:04 -04:00
command_table_helper.c drm/amd/display/dc: add DCE_VERSION for DCE8 APUs 2017-09-26 18:16:32 -04:00
command_table_helper.h drm/amd/display: fix incompatible structure layouts 2018-02-19 14:19:18 -05:00
command_table_helper2.c drm/amd/display: Stop including atomfimrwareid.h directly 2017-09-26 18:17:03 -04:00
command_table_helper2.h drm/amd/display: fix incompatible structure layouts 2018-02-19 14:19:18 -05:00
command_table_helper_struct.h drm/amd/display: fix incompatible structure layouts 2018-02-19 14:19:18 -05:00
Makefile drm/amdgpu: add license to Makefiles 2017-12-07 11:51:10 -05:00