Skip to content

Commit

Permalink
Disable Gen8 driver code when -DGEN8=OFF
Browse files Browse the repository at this point in the history
Currently Gen8 is the only Gen that can be fully disabled
(thanks to PR 1302).

Allowing the driver code to be disabled for Gen8 further reduces the
binary size by 277 KiB, or ~11% of the Gen8 media kernels:

    text     data   bss       dec      hex  filename
30821215  1990352  9600  32821167  1f4cfaf  iHD_drv_video.so # -DGEN8=ON
28224191  1990384  9632  30224207  1cd2f4f  iHD_drv_video.so # -DGEN8=OFF before this patch
27950563  1980440  9600  29940603  1c8db7b  iHD_drv_video.so # -DGEN8=OFF after this patch
  • Loading branch information
mattst88 committed Jan 27, 2022
1 parent e26ed1b commit 4bb9cb0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions media_driver/agnostic/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ endif()

media_include_subdirectory(common)

if(ENABLE_REQUIRED_GEN_CODE OR GEN8)
if(GEN8)
media_include_subdirectory(gen8)
endif()

if(ENABLE_REQUIRED_GEN_CODE OR GEN8_BDW)
if(GEN8_BDW)
media_include_subdirectory(gen8_bdw)
endif()

Expand Down
2 changes: 1 addition & 1 deletion media_driver/cmake/linux/media_gen_flags_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# TODO: Remove this option when all Gen options can successfully disable
# driver code.
# Status:
# GEN8: TODO
# GEN8: Done
# GEN9: TODO
# GEN10: TODO (Remove)
# GEN11: TODO
Expand Down
2 changes: 1 addition & 1 deletion media_driver/linux/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

media_include_subdirectory(common)

if(ENABLE_REQUIRED_GEN_CODE OR GEN8)
if(GEN8)
media_include_subdirectory(gen8)
endif()

Expand Down
2 changes: 1 addition & 1 deletion media_driver/media_interface/media_srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# OTHER DEALINGS IN THE SOFTWARE.


if(ENABLE_REQUIRED_GEN_CODE OR GEN8_BDW)
if(GEN8_BDW)
media_include_subdirectory(media_interfaces_m8_bdw)
endif()

Expand Down

0 comments on commit 4bb9cb0

Please sign in to comment.