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
(cherry picked from commit 54ce334474)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2946966
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
d69752c349
commit
971645b49c
@@ -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