mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-10-12 02:07:06 +00:00
615.78.08
This commit is contained in:
+1
-1
@@ -106,7 +106,7 @@ ccflags-y += -I$(src)/common/inc
|
||||
ccflags-y += -I$(src)
|
||||
ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
|
||||
ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
|
||||
ccflags-y += -DNV_VERSION_STRING=\"615.71.09\"
|
||||
ccflags-y += -DNV_VERSION_STRING=\"615.78.08\"
|
||||
|
||||
# Include and link Tegra out-of-tree modules.
|
||||
ifneq ($(wildcard /usr/src/nvidia/nvidia-public),)
|
||||
|
||||
+131
-1
@@ -5367,7 +5367,7 @@ compile_test() {
|
||||
CODE="
|
||||
#include <asm/page.h>
|
||||
int conftest_pfn_is_map_memory(void) {
|
||||
return pfn_is_map_memory();
|
||||
return pfn_is_map_memory(0);
|
||||
}"
|
||||
compile_check_conftest "$CODE" "NV_PFN_IS_MAP_MEMORY_PRESENT" "" "functions"
|
||||
;;
|
||||
@@ -5387,6 +5387,33 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_DMEM_CGROUP_PRESENT" "" "types"
|
||||
;;
|
||||
|
||||
dmem_cgroup_register_region_has_init_arg)
|
||||
#
|
||||
# Determine if dmem_cgroup_register_region() takes a
|
||||
# 'const struct dmem_cgroup_init *' argument.
|
||||
#
|
||||
# Commit e11640b9cea4 ("cgroup/dmem: Introduce struct
|
||||
# dmem_cgroup_init for region initialization") changed the first
|
||||
# argument from 'u64 size' to 'const struct dmem_cgroup_init *'
|
||||
# in Linux 7.3.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/cgroup_dmem.h>
|
||||
|
||||
typeof(dmem_cgroup_register_region)
|
||||
conftest_dmem_cgroup_register_region_has_init_arg;
|
||||
|
||||
struct dmem_cgroup_region *
|
||||
conftest_dmem_cgroup_register_region_has_init_arg(
|
||||
const struct dmem_cgroup_init *init,
|
||||
const char *name_fmt, ...)
|
||||
{
|
||||
return NULL;
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DMEM_CGROUP_REGISTER_REGION_HAS_INIT_ARG" "" "types"
|
||||
;;
|
||||
|
||||
misc_cgrp_id)
|
||||
#
|
||||
# Check to see if the misc cgroup type is available
|
||||
@@ -5462,6 +5489,7 @@ compile_test() {
|
||||
# calls for common alloc/free page calls") in 6.12
|
||||
#
|
||||
CODE="
|
||||
#include <linux/dma-mapping.h>
|
||||
#if defined(NV_LINUX_IOMMU_DMA_H_PRESENT)
|
||||
#include <linux/iommu-dma.h>
|
||||
#endif
|
||||
@@ -5529,6 +5557,108 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_SG_ALLOC_TABLE_FROM_PAGES_SEGMENT_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
drm_atomic_helper_connector_state_init)
|
||||
#
|
||||
# Determine if __drm_atomic_helper_connector_state_init is present.
|
||||
#
|
||||
# Added by commit b74940afe5bc ("drm/atomic-state-helper: Rename
|
||||
# __drm_atomic_helper_connector_state_reset()") in v7.3-rc1.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
|
||||
void conftest_drm_atomic_helper_connector_state_init() {
|
||||
__drm_atomic_helper_connector_state_init();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_ATOMIC_HELPER_CONNECTOR_STATE_INIT" "" "functions"
|
||||
;;
|
||||
|
||||
drm_atomic_helper_crtc_state_init)
|
||||
#
|
||||
# Determine if __drm_atomic_helper_crtc_state_init is present.
|
||||
#
|
||||
# Added by commit 915fdd2c7e87 ("drm/atomic-state-helper: Rename
|
||||
# __drm_atomic_helper_crtc_state_reset()") in v7.3-rc1.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
|
||||
void conftest_drm_atomic_helper_crtc_state_init() {
|
||||
__drm_atomic_helper_crtc_state_init();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_ATOMIC_HELPER_CRTC_STATE_INIT" "" "functions"
|
||||
;;
|
||||
|
||||
drm_atomic_helper_plane_state_init)
|
||||
#
|
||||
# Determine if __drm_atomic_helper_plane_state_init is present.
|
||||
#
|
||||
# Added by commit 3e5656ea5e73 ("drm/atomic-state-helper: Rename
|
||||
# __drm_atomic_helper_plane_state_reset()") in v7.3-rc1.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
|
||||
void conftest_drm_atomic_helper_plane_state_init() {
|
||||
__drm_atomic_helper_plane_state_init();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_ATOMIC_HELPER_PLANE_STATE_INIT" "" "functions"
|
||||
;;
|
||||
|
||||
drm_connector_funcs_has_atomic_create_state)
|
||||
#
|
||||
# Determine if drm_connector_funcs has a 'atomic_create_state' function pointer.
|
||||
#
|
||||
# Added by commit 6db0e11f4806 ("drm/connector: Add new atomic_create_state callback")
|
||||
# in v7.3-rc1.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
|
||||
int conftest_drm_connector_funcs_has_atomic_create_state(void) {
|
||||
return offsetof(struct drm_connector_funcs, atomic_create_state);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_CONNECTOR_FUNCS_HAS_ATOMIC_CREATE_STATE" "" "types"
|
||||
;;
|
||||
|
||||
drm_crtc_funcs_has_atomic_create_state)
|
||||
#
|
||||
# Determine if drm_crtc_funcs has a 'atomic_create_state' function pointer.
|
||||
#
|
||||
# Added by commit 58d426b5ed0d ("drm/crtc: Add new atomic_create_state callback")
|
||||
# in v7.3-rc1.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
|
||||
int conftest_drm_crtc_funcs_has_atomic_create_state(void) {
|
||||
return offsetof(struct drm_crtc_funcs, atomic_create_state);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_CRTC_FUNCS_HAS_ATOMIC_CREATE_STATE" "" "types"
|
||||
;;
|
||||
|
||||
drm_plane_funcs_has_atomic_create_state)
|
||||
#
|
||||
# Determine if drm_plane_funcs has a 'atomic_create_state' function pointer.
|
||||
#
|
||||
# Added by commit 1a185ddecaf9 ("drm/plane: Add new atomic_create_state callback")
|
||||
# in v7.3-rc1.
|
||||
#
|
||||
CODE="
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
|
||||
int conftest_drm_plane_funcs_has_atomic_create_state(void) {
|
||||
return offsetof(struct drm_plane_funcs, atomic_create_state);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DRM_PLANE_FUNCS_HAS_ATOMIC_CREATE_STATE" "" "types"
|
||||
;;
|
||||
|
||||
# When adding a new conftest entry, please use the correct format for
|
||||
# specifying the relevant upstream Linux kernel commit. Please
|
||||
# avoid specifying -rc kernels, and only use SHAs that actually exist
|
||||
|
||||
@@ -266,6 +266,32 @@ done:
|
||||
return status;
|
||||
}
|
||||
|
||||
#if defined(NV_DRM_CONNECTOR_FUNCS_HAS_ATOMIC_CREATE_STATE)
|
||||
/**
|
||||
* nv_drm_connector_atomic_create_state - connector state creation hook
|
||||
* @crtc: DRM connector
|
||||
*
|
||||
* Allocate an empty DRM connector state.
|
||||
*/
|
||||
static struct drm_connector_state *
|
||||
nv_drm_connector_atomic_create_state(struct drm_connector *connector)
|
||||
{
|
||||
struct nv_drm_connector_state *nv_connector_state =
|
||||
nv_drm_calloc(1, sizeof(*nv_connector_state));
|
||||
|
||||
if (!nv_connector_state) {
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
#if defined(NV_DRM_ATOMIC_HELPER_CONNECTOR_STATE_INIT)
|
||||
__drm_atomic_helper_connector_state_init(&nv_connector_state->base, connector);
|
||||
#else
|
||||
__drm_atomic_helper_connector_state_reset(&nv_connector_state->base, connector);
|
||||
#endif
|
||||
|
||||
return &nv_connector_state->base;
|
||||
}
|
||||
#else
|
||||
static void nv_drm_connector_reset(struct drm_connector *connector)
|
||||
{
|
||||
struct nv_drm_connector_state * nv_connector_state =
|
||||
@@ -285,6 +311,7 @@ static void nv_drm_connector_reset(struct drm_connector *connector)
|
||||
|
||||
__drm_atomic_helper_connector_reset(connector, &nv_connector_state->base);
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct drm_connector_state* nv_drm_connector_atomic_duplicate_state(struct drm_connector *connector)
|
||||
{
|
||||
@@ -406,7 +433,11 @@ static int nv_drm_connector_atomic_get_property(
|
||||
|
||||
static struct drm_connector_funcs nv_connector_funcs = {
|
||||
.destroy = nv_drm_connector_destroy,
|
||||
#if defined(NV_DRM_CONNECTOR_FUNCS_HAS_ATOMIC_CREATE_STATE)
|
||||
.atomic_create_state = nv_drm_connector_atomic_create_state,
|
||||
#else
|
||||
.reset = nv_drm_connector_reset,
|
||||
#endif
|
||||
.force = __nv_drm_connector_force,
|
||||
.detect = nv_drm_connector_detect,
|
||||
.fill_modes = drm_helper_probe_single_connector_modes,
|
||||
|
||||
@@ -2193,6 +2193,31 @@ static inline struct nv_drm_plane_state *nv_drm_plane_state_alloc(void)
|
||||
return nv_plane_state;
|
||||
}
|
||||
|
||||
#if defined(NV_DRM_PLANE_FUNCS_HAS_ATOMIC_CREATE_STATE)
|
||||
/**
|
||||
* nv_drm_plane_atomic_create_state - plane state creation hook
|
||||
* @plane: DRM plane
|
||||
*
|
||||
* Allocate an empty DRM plane state.
|
||||
*/
|
||||
static struct drm_plane_state *nv_drm_plane_atomic_create_state(struct drm_plane *plane)
|
||||
{
|
||||
struct nv_drm_plane_state *nv_plane_state =
|
||||
nv_drm_plane_state_alloc();
|
||||
|
||||
if (!nv_plane_state) {
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
#if defined(NV_DRM_ATOMIC_HELPER_PLANE_STATE_INIT)
|
||||
__drm_atomic_helper_plane_state_init(&nv_plane_state->base, plane);
|
||||
#else
|
||||
__drm_atomic_helper_plane_state_reset(&nv_plane_state->base, plane);
|
||||
#endif
|
||||
|
||||
return &nv_plane_state->base;
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* nv_drm_plane_atomic_reset - plane state reset hook
|
||||
* @plane: DRM plane
|
||||
@@ -2223,6 +2248,7 @@ static void nv_drm_plane_atomic_reset(struct drm_plane *plane)
|
||||
kfree(nv_plane_state);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static struct drm_plane_state *
|
||||
@@ -2344,7 +2370,11 @@ static const struct drm_plane_funcs nv_plane_funcs = {
|
||||
.update_plane = drm_atomic_helper_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
.destroy = nv_drm_plane_destroy,
|
||||
#if defined(NV_DRM_PLANE_FUNCS_HAS_ATOMIC_CREATE_STATE)
|
||||
.atomic_create_state = nv_drm_plane_atomic_create_state,
|
||||
#else
|
||||
.reset = nv_drm_plane_atomic_reset,
|
||||
#endif
|
||||
.atomic_get_property = nv_drm_plane_atomic_get_property,
|
||||
.atomic_set_property = nv_drm_plane_atomic_set_property,
|
||||
.atomic_duplicate_state = nv_drm_plane_atomic_duplicate_state,
|
||||
@@ -2408,7 +2438,30 @@ static inline struct nv_drm_crtc_state *nv_drm_crtc_state_alloc(void)
|
||||
return nv_state;
|
||||
}
|
||||
|
||||
#if defined(NV_DRM_CRTC_FUNCS_HAS_ATOMIC_CREATE_STATE)
|
||||
/**
|
||||
* nv_drm_atomic_crtc_atomic_create_state - crtc state creation hook
|
||||
* @crtc: DRM crtc
|
||||
*
|
||||
* Allocate an empty DRM crtc state.
|
||||
*/
|
||||
static struct drm_crtc_state *nv_drm_atomic_crtc_atomic_create_state(struct drm_crtc *crtc)
|
||||
{
|
||||
struct nv_drm_crtc_state *nv_state = nv_drm_crtc_state_alloc();
|
||||
|
||||
if (!nv_state) {
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
#if defined(NV_DRM_ATOMIC_HELPER_CRTC_STATE_INIT)
|
||||
__drm_atomic_helper_crtc_state_init(&nv_state->base, crtc);
|
||||
#else
|
||||
__drm_atomic_helper_crtc_state_reset(&nv_state->base, crtc);
|
||||
#endif
|
||||
|
||||
return &nv_state->base;
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* nv_drm_atomic_crtc_reset - crtc state reset hook
|
||||
* @crtc: DRM crtc
|
||||
@@ -2438,6 +2491,7 @@ static void nv_drm_atomic_crtc_reset(struct drm_crtc *crtc)
|
||||
kfree(nv_state);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* nv_drm_atomic_crtc_duplicate_state - crtc state duplicate hook
|
||||
@@ -2585,7 +2639,11 @@ static bool nv_drm_crtc_get_vblank_timestamp(
|
||||
static struct drm_crtc_funcs nv_crtc_funcs = {
|
||||
.set_config = drm_atomic_helper_set_config,
|
||||
.page_flip = drm_atomic_helper_page_flip,
|
||||
#if defined(NV_DRM_CRTC_FUNCS_HAS_ATOMIC_CREATE_STATE)
|
||||
.atomic_create_state = nv_drm_atomic_crtc_atomic_create_state,
|
||||
#else
|
||||
.reset = nv_drm_atomic_crtc_reset,
|
||||
#endif
|
||||
.destroy = nv_drm_crtc_destroy,
|
||||
.atomic_get_property = nv_drm_atomic_crtc_get_property,
|
||||
.atomic_set_property = nv_drm_atomic_crtc_set_property,
|
||||
|
||||
@@ -118,3 +118,9 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_funcs_has_get_vblank_timestamp
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_color_lut32_present
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_colorop_has_funcs
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_atomic_commit_struct_present
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_atomic_helper_connector_state_init
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_atomic_helper_crtc_state_init
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_atomic_helper_plane_state_init
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_connector_funcs_has_atomic_create_state
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_crtc_funcs_has_atomic_create_state
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += drm_plane_funcs_has_atomic_create_state
|
||||
|
||||
@@ -159,6 +159,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += hv_get_isolation_type
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += seq_read_iter
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += follow_pfn
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ptep_get
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += pfn_is_map_memory
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_gem_object_put_unlocked
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += add_memory_driver_managed
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += of_dma_configure
|
||||
@@ -235,6 +236,7 @@ NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_lockdep_register_ke
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_gpl_pci_find_dvsec_capability
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_wait_for_device_probe
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_gpl_dma_iova_try_alloc
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_shmem_kernel_file_setup
|
||||
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += vmf_insert_pfn_prot
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += sysfs_slab_unlink
|
||||
@@ -264,6 +266,7 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += register_shrinker_has_format_arg
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += nr_kernel_misc_reclaimable
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += pci_resize_resource_has_exclude_bars_arg
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += dmem_cgrp_id
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += dmem_cgroup_register_region_has_init_arg
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += misc_cgrp_id
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += is_vma_write_locked_has_mm_lock_seq_arg
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += percpu_mm_counter
|
||||
|
||||
@@ -1977,6 +1977,13 @@ NV_STATUS NV_API_CALL os_numa_memblock_size
|
||||
return NV_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocates an anonymous file to be used only within the kernel.
|
||||
*
|
||||
* This file may bypass LSM checks such as SELinux, so it is important that this
|
||||
* file never be mapped, linked into the filesystem, or assigned a file
|
||||
* descriptor unless access control is checked by the caller.
|
||||
*/
|
||||
NV_STATUS NV_API_CALL os_allocate_temporary_file
|
||||
(
|
||||
void **ppFile,
|
||||
@@ -1992,9 +1999,15 @@ NV_STATUS NV_API_CALL os_allocate_temporary_file
|
||||
if (!path)
|
||||
{
|
||||
#if defined(mk_vma_flags)
|
||||
file = shmem_file_setup("nvidia-tmp", 0, mk_vma_flags(VMA_NORESERVE_BIT));
|
||||
#define NV_VMA_NORESERVE mk_vma_flags(VMA_NORESERVE_BIT)
|
||||
#else
|
||||
file = shmem_file_setup("nvidia-tmp", 0, VM_NORESERVE);
|
||||
#define NV_VMA_NORESERVE VM_NORESERVE
|
||||
#endif
|
||||
|
||||
#if NV_IS_EXPORT_SYMBOL_PRESENT_shmem_kernel_file_setup
|
||||
file = shmem_kernel_file_setup("nvidia-tmp", 0, NV_VMA_NORESERVE);
|
||||
#else
|
||||
file = shmem_file_setup("nvidia-tmp", 0, NV_VMA_NORESERVE);
|
||||
#endif
|
||||
if (!IS_ERR(file))
|
||||
{
|
||||
@@ -2979,6 +2992,9 @@ NvU32 NV_API_CALL os_cgroup_implementation(void)
|
||||
|
||||
void* NV_API_CALL os_cgroup_for_pid(int pid, void *pidInfo, int impl)
|
||||
{
|
||||
void *cgrp = NULL;
|
||||
|
||||
#if defined(NV_DMEM_CGROUP_PRESENT) || defined(NV_MISC_CGROUP_PRESENT)
|
||||
struct task_struct *task;
|
||||
struct pid *p;
|
||||
int subsys_id;
|
||||
@@ -3010,7 +3026,9 @@ void* NV_API_CALL os_cgroup_for_pid(int pid, void *pidInfo, int impl)
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
return task_cgroup(task, subsys_id);
|
||||
cgrp = task_cgroup(task, subsys_id);
|
||||
#endif
|
||||
return cgrp;
|
||||
}
|
||||
|
||||
#if defined(NV_DMEM_CGROUP_PRESENT) || defined(NV_MISC_CGROUP_PRESENT)
|
||||
@@ -3028,7 +3046,16 @@ void* NV_API_CALL os_cgroup_parent(void *cgroup) { return NULL; }
|
||||
#if defined(NV_DMEM_CGROUP_PRESENT)
|
||||
void* NV_API_CALL os_dmem_cgroup_register_region(const char *name, NvU64 size, NvU64 precharge, void **prechargePool)
|
||||
{
|
||||
void *region = dmem_cgroup_register_region(size, name);
|
||||
void *region;
|
||||
#if defined(NV_DMEM_CGROUP_REGISTER_REGION_HAS_INIT_ARG)
|
||||
const struct dmem_cgroup_init init =
|
||||
{
|
||||
.size = size,
|
||||
};
|
||||
region = dmem_cgroup_register_region(&init, name);
|
||||
#else
|
||||
region = dmem_cgroup_register_region(size, name);
|
||||
#endif
|
||||
if (IS_ERR(region))
|
||||
{
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user