mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drm/tegra: Fix build for Linux v6.5
In Linux v6.5, commit 62aeaeaa1b26 ("drm/aperture: Remove primary
argument") removed the 'primary' argument from the function
drm_aperture_remove_framebuffers(). Update the test in conftest script
for drm_aperture_remove_framebuffers() to test for this and use the
generated definition accordlingly in the Tegra DRM driver to fix the
build for Linux v6.5.
Bug 4221847
Change-Id: I7a7bb3a029b236e0ce42c1a404085757d95374d1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990528
This commit is contained in:
committed by
mobile promotions
parent
f926a58dd1
commit
413055df75
@@ -93,7 +93,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_create_has_no_owner_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_struct_devnode_has_const_dev_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_thermal_of_zone_register
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_framebuffers_has_drm_driver_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_framebuffers
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_driver_struct_has_irq_enabled_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fb_helper_alloc_info
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fb_helper_prepare_has_preferred_bpp_arg
|
||||
|
||||
@@ -6419,24 +6419,38 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_DEVM_THERMAL_OF_ZONE_REGISTER_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
drm_aperture_remove_framebuffers_has_drm_driver_arg)
|
||||
drm_aperture_remove_framebuffers)
|
||||
#
|
||||
# Determine if the function 'drm_aperture_remove_framebuffers'
|
||||
# has the 'struct drm_driver' argument.
|
||||
#
|
||||
# Commit 97c9bfe3f660 ("drm/aperture: Pass DRM driver structure
|
||||
# instead of driver name") updated the arguments for the function
|
||||
# drm_aperture_remove_framebuffers to pass 'struct drm_driver' in
|
||||
# Linux v5.15.
|
||||
# Conftest #1: In Linux v5.15, commit 97c9bfe3f660 ("drm/aperture:
|
||||
# Pass DRM driver structure instead of driver name") updated the
|
||||
# arguments for the function drm_aperture_remove_framebuffers to
|
||||
# pass 'struct drm_driver'.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_aperture.h>
|
||||
int conftest_drm_aperture_remove_framebuffers_has_drm_driver_arg(
|
||||
int conftest_drm_aperture_remove_framebuffers(
|
||||
bool primary, const struct drm_driver *req_driver) {
|
||||
return drm_aperture_remove_framebuffers(primary, req_driver);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_APERTURE_REMOVE_FRAMEBUFFERS_HAS_DRM_DRIVER_ARG" "" "types"
|
||||
|
||||
#
|
||||
# Conftest #2: In Linux v6.5, commit 62aeaeaa1b26 ("drm/aperture:
|
||||
# Remove primary argument") removed the 'primary' argument from the
|
||||
# function drm_aperture_remove_framebuffers().
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_aperture.h>
|
||||
int conftest_drm_aperture_remove_framebuffers(
|
||||
const struct drm_driver *req_driver) {
|
||||
return drm_aperture_remove_framebuffers(req_driver);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_APERTURE_REMOVE_FRAMEBUFFERS_HAS_NO_PRIMARY_ARG" "" "types"
|
||||
;;
|
||||
|
||||
drm_driver_struct_has_irq_enabled_arg)
|
||||
|
||||
Reference in New Issue
Block a user