mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
conftest: Add devm_tegra_core_dev_init_opp_table_common
Add a test to the conftest script to check if the function
devm_tegra_core_dev_init_opp_table_common() is present in the kernel and
use the definition generated in the host1x driver.
Bug 3820317
Change-Id: Id04da12c8ced7129141036aaa26375113c544374
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026923
(cherry picked from commit 732a0db90e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3029981
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
60adf47e0f
commit
daec781815
@@ -10,7 +10,6 @@
|
|||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/reset.h>
|
#include <linux/reset.h>
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
#include <soc/tegra/common.h>
|
#include <soc/tegra/common.h>
|
||||||
|
|
||||||
@@ -272,7 +271,7 @@ static int gr2d_probe(struct platform_device *pdev)
|
|||||||
gr2d->client.version = gr2d->soc->version;
|
gr2d->client.version = gr2d->soc->version;
|
||||||
gr2d->client.ops = &gr2d_ops;
|
gr2d->client.ops = &gr2d_ops;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
#if defined(NV_DEVM_TEGRA_CORE_DEV_INIT_OPP_TABLE_COMMON_PRESENT) /* Linux v5.17 */
|
||||||
err = devm_tegra_core_dev_init_opp_table_common(dev);
|
err = devm_tegra_core_dev_init_opp_table_common(dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ static int gr3d_probe(struct platform_device *pdev)
|
|||||||
gr3d->client.version = gr3d->soc->version;
|
gr3d->client.version = gr3d->soc->version;
|
||||||
gr3d->client.ops = &gr3d_ops;
|
gr3d->client.ops = &gr3d_ops;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
#if defined(NV_DEVM_TEGRA_CORE_DEV_INIT_OPP_TABLE_COMMON_PRESENT) /* Linux v5.17 */
|
||||||
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
|
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -1868,7 +1868,7 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
#if defined(NV_DEVM_TEGRA_CORE_DEV_INIT_OPP_TABLE_COMMON_PRESENT) /* Linux v5.17 */
|
||||||
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
|
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
* Copyright (c) 2010-2023, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
|
* Copyright (c) 2010-2023, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
@@ -15,7 +17,6 @@
|
|||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
#include <soc/tegra/common.h>
|
#include <soc/tegra/common.h>
|
||||||
|
|
||||||
@@ -950,7 +951,7 @@ static int host1x_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
pm_runtime_enable(&pdev->dev);
|
pm_runtime_enable(&pdev->dev);
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
#if defined(NV_DEVM_TEGRA_CORE_DEV_INIT_OPP_TABLE_COMMON_PRESENT) /* Linux v5.17 */
|
||||||
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
|
err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev);
|
||||||
if (err)
|
if (err)
|
||||||
goto pm_disable;
|
goto pm_disable;
|
||||||
|
|||||||
@@ -100,6 +100,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 += class_struct_devnode_has_const_dev_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type
|
||||||
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_tegra_core_dev_init_opp_table_common
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_thermal_of_zone_register
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_thermal_of_zone_register
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += disk_check_media_change
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += disk_check_media_change
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_slave_config_struct_has_slave_id
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += dma_slave_config_struct_has_slave_id
|
||||||
|
|||||||
@@ -6553,6 +6553,24 @@ compile_test() {
|
|||||||
compile_check_conftest "$CODE" "NV_DEVICE_ADD_DISK_HAS_INT_RETURN_TYPE" "" "types"
|
compile_check_conftest "$CODE" "NV_DEVICE_ADD_DISK_HAS_INT_RETURN_TYPE" "" "types"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
devm_tegra_core_dev_init_opp_table_common)
|
||||||
|
#
|
||||||
|
# Determine whether devm_tegra_core_dev_init_opp_table_common is
|
||||||
|
# present.
|
||||||
|
#
|
||||||
|
# devm_tegra_core_dev_init_opp_table_common was added in commit
|
||||||
|
# 9131c6331726 ("soc/tegra: Add devm_tegra_core_dev_init_opp_table_common()")
|
||||||
|
# in Linux v5.17.
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
#include <linux/thermal.h>
|
||||||
|
void conftest_devm_tegra_core_dev_init_opp_table_common(void) {
|
||||||
|
devm_tegra_core_dev_init_opp_table_common();
|
||||||
|
}"
|
||||||
|
|
||||||
|
compile_check_conftest "$CODE" "NV_DEVM_TEGRA_CORE_DEV_INIT_OPP_TABLE_COMMON_PRESENT" "" "functions"
|
||||||
|
;;
|
||||||
|
|
||||||
devm_thermal_of_zone_register)
|
devm_thermal_of_zone_register)
|
||||||
#
|
#
|
||||||
# Determine whether devm_thermal_of_zone_register is present.
|
# Determine whether devm_thermal_of_zone_register is present.
|
||||||
|
|||||||
Reference in New Issue
Block a user