Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon drm: Use ACPI_FREE, no...
details: https://anonhg.NetBSD.org/src/rev/295d79a43b99
branches: trunk
changeset: 362446:295d79a43b99
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 27 14:24:26 2022 +0000
description:
drm: Use ACPI_FREE, not kfree, for ACPI_ALLOCATE_BUFFER result.
Most of this code is not currently enabled, but it might be enabled
soon.
diffstat:
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c | 24 +++++-----
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.c | 6 +-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mxm/nouveau_nvkm_subdev_mxm_base.c | 8 +-
sys/external/bsd/drm2/dist/drm/radeon/radeon_acpi.c | 22 ++++----
sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c | 6 +-
5 files changed, 33 insertions(+), 33 deletions(-)
diffs (291 lines):
diff -r c836a65972f1 -r 295d79a43b99 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c Sun Feb 27 14:24:11 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c Sun Feb 27 14:24:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_acpi.c,v 1.4 2021/12/18 23:44:58 riastradh Exp $ */
+/* $NetBSD: amdgpu_acpi.c,v 1.5 2022/02/27 14:24:26 riastradh Exp $ */
/*
* Copyright 2012 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_acpi.c,v 1.4 2021/12/18 23:44:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_acpi.c,v 1.5 2022/02/27 14:24:26 riastradh Exp $");
#include <linux/pci.h>
#include <linux/acpi.h>
@@ -117,7 +117,7 @@
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
acpi_format_exception(status));
- kfree(buffer.pointer);
+ ACPI_FREE(buffer.pointer);
return NULL;
}
@@ -206,7 +206,7 @@
amdgpu_atif_parse_functions(&atif->functions, output.function_bits);
out:
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -299,7 +299,7 @@
DRM_DEBUG_DRIVER("Notification %s, command code = %#x\n",
(n->enabled ? "enabled" : "disabled"),
n->command_code);
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -358,7 +358,7 @@
atif->backlight_caps.max_input_signal =
characteristics.max_input_signal;
out:
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -399,7 +399,7 @@
count = hweight32(req->pending);
out:
- kfree(info);
+ ACPI_FREE(info);
return count;
}
@@ -530,7 +530,7 @@
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
DRM_DEBUG_DRIVER("failed to evaluate ATCS got %s\n",
acpi_format_exception(status));
- kfree(buffer.pointer);
+ ACPI_FREE(buffer.pointer);
return NULL;
}
@@ -596,7 +596,7 @@
amdgpu_atcs_parse_functions(&atcs->functions, output.function_bits);
out:
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -646,7 +646,7 @@
if (!info)
return -EIO;
- kfree(info);
+ ACPI_FREE(info);
return 0;
}
@@ -708,14 +708,14 @@
size = *(u16 *) info->buffer.pointer;
if (size < 3) {
DRM_INFO("ATCS buffer is too small: %zu\n", size);
- kfree(info);
+ ACPI_FREE(info);
return -EINVAL;
}
size = min(sizeof(atcs_output), size);
memcpy(&atcs_output, info->buffer.pointer, size);
- kfree(info);
+ ACPI_FREE(info);
switch (atcs_output.ret_val) {
case ATCS_REQUEST_REFUSED:
diff -r c836a65972f1 -r 295d79a43b99 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.c Sun Feb 27 14:24:11 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.c Sun Feb 27 14:24:26 2022 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: nouveau_acpi.c,v 1.3 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_acpi.c,v 1.4 2022/02/27 14:24:27 riastradh Exp $ */
// SPDX-License-Identifier: MIT
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_acpi.c,v 1.3 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_acpi.c,v 1.4 2022/02/27 14:24:27 riastradh Exp $");
#include <linux/pci.h>
#include <linux/acpi.h>
@@ -417,7 +417,7 @@
obj = (union acpi_object *)buffer.pointer;
len = min(len, (int)obj->buffer.length);
memcpy(bios+offset, obj->buffer.pointer, len);
- kfree(buffer.pointer);
+ ACPI_FREE(buffer.pointer);
return len;
}
diff -r c836a65972f1 -r 295d79a43b99 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mxm/nouveau_nvkm_subdev_mxm_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mxm/nouveau_nvkm_subdev_mxm_base.c Sun Feb 27 14:24:11 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mxm/nouveau_nvkm_subdev_mxm_base.c Sun Feb 27 14:24:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_subdev_mxm_base.c,v 1.3 2021/12/18 23:45:41 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_subdev_mxm_base.c,v 1.4 2022/02/27 14:24:27 riastradh Exp $ */
/*
* Copyright 2011 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_mxm_base.c,v 1.3 2021/12/18 23:45:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_mxm_base.c,v 1.4 2022/02/27 14:24:27 riastradh Exp $");
#include "mxms.h"
@@ -158,7 +158,7 @@
nvkm_debug(subdev, "WMMX MXMI returned non-integer\n");
}
- kfree(obj);
+ ACPI_FREE(obj);
return version;
}
@@ -195,7 +195,7 @@
obj->buffer.length, GFP_KERNEL);
}
- kfree(obj);
+ ACPI_FREE(obj);
return mxm->mxms != NULL;
}
#endif
diff -r c836a65972f1 -r 295d79a43b99 sys/external/bsd/drm2/dist/drm/radeon/radeon_acpi.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_acpi.c Sun Feb 27 14:24:11 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_acpi.c Sun Feb 27 14:24:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_acpi.c,v 1.3 2021/12/18 23:45:43 riastradh Exp $ */
+/* $NetBSD: radeon_acpi.c,v 1.4 2022/02/27 14:24:27 riastradh Exp $ */
/*
* Copyright 2012 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_acpi.c,v 1.3 2021/12/18 23:45:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_acpi.c,v 1.4 2022/02/27 14:24:27 riastradh Exp $");
#include <linux/acpi.h>
#include <linux/pci.h>
@@ -147,7 +147,7 @@
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
acpi_format_exception(status));
- kfree(buffer.pointer);
+ ACPI_FREE(buffer.pointer);
return NULL;
}
@@ -243,7 +243,7 @@
radeon_atif_parse_functions(&atif->functions, output.function_bits);
out:
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -306,7 +306,7 @@
DRM_DEBUG_DRIVER("Notification %s, command code = %#x\n",
(n->enabled ? "enabled" : "disabled"),
n->command_code);
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -346,7 +346,7 @@
count = hweight32(req->pending);
out:
- kfree(info);
+ ACPI_FREE(info);
return count;
}
@@ -472,7 +472,7 @@
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
DRM_DEBUG_DRIVER("failed to evaluate ATCS got %s\n",
acpi_format_exception(status));
- kfree(buffer.pointer);
+ ACPI_FREE(buffer.pointer);
return NULL;
}
@@ -538,7 +538,7 @@
radeon_atcs_parse_functions(&atcs->functions, output.function_bits);
out:
- kfree(info);
+ ACPI_FREE(info);
return err;
}
@@ -588,7 +588,7 @@
if (!info)
return -EIO;
- kfree(info);
+ ACPI_FREE(info);
return 0;
}
@@ -647,14 +647,14 @@
size = *(u16 *) info->buffer.pointer;
if (size < 3) {
DRM_INFO("ATCS buffer is too small: %zu\n", size);
- kfree(info);
+ ACPI_FREE(info);
return -EINVAL;
}
size = min(sizeof(atcs_output), size);
memcpy(&atcs_output, info->buffer.pointer, size);
- kfree(info);
+ ACPI_FREE(info);
switch (atcs_output.ret_val) {
case ATCS_REQUEST_REFUSED:
diff -r c836a65972f1 -r 295d79a43b99 sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c Sun Feb 27 14:24:11 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c Sun Feb 27 14:24:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_bios.c,v 1.9 2022/02/27 14:23:16 riastradh Exp $ */
+/* $NetBSD: radeon_bios.c,v 1.10 2022/02/27 14:24:27 riastradh Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_bios.c,v 1.9 2022/02/27 14:23:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_bios.c,v 1.10 2022/02/27 14:24:27 riastradh Exp $");
#include <linux/acpi.h>
#include <linux/pci.h>
@@ -229,7 +229,7 @@
obj = (union acpi_object *)buffer.pointer;
memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length);
len = obj->buffer.length;
- kfree(buffer.pointer);
+ ACPI_FREE(buffer.pointer);
return len;
}
Home |
Main Index |
Thread Index |
Old Index