mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: Add compilation flag for iosys-map.h
Determining whether the header file iosys-map.h is present in the kernel is currently determine by kernel version. However, for Linux v5.15, iosys-map.h has been backported in order to support simple-framebuffer for early display. Therefore, we cannot rely on the kernel version to indicate whether iosys-map is present. This is also true for 3rd party Linux kernels that backport changes as well. Fix this by adding a compile time flag, that will be set accordingly by the conftest script if this header is present. Bug 4119327 Bug 4228080 Change-Id: I9de07a4615a6c9da504b36750c48e73e200da301 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2974080 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
85732c9084
commit
54ce334474
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Tegra SOC HWPM
|
||||
#
|
||||
@@ -26,6 +26,7 @@ ccflags-y += -DCONFIG_TEGRA_HWPM_OOT
|
||||
CONFIG_TEGRA_FUSE_UPSTREAM := y
|
||||
ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM
|
||||
|
||||
LINUXINCLUDE += -I$(srctree.nvconftest)
|
||||
LINUXINCLUDE += -I$(srctree.hwpm)/include
|
||||
LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
|
||||
LINUXINCLUDE += -I$(srctree.hwpm)/drivers/tegra/hwpm
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
#ifndef TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H
|
||||
#define TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
#if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
|
||||
#include <linux/iosys-map.h>
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
|
||||
@@ -49,7 +51,7 @@ struct tegra_hwpm_mem_mgmt {
|
||||
struct dma_buf *mem_bytes_dma_buf;
|
||||
struct dma_buf_attachment *mem_bytes_attach;
|
||||
void *mem_bytes_kernel;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
#if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
|
||||
struct iosys_map mem_bytes_map;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
|
||||
|
||||
Reference in New Issue
Block a user