summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-05-01 13:30:23 +1000
committerJonathan Gray <jsg@jsg.id.au>2013-08-12 10:34:58 +1000
commitec4d74df8aecc67eda7caba247e06f761595bb2b (patch)
treee39ce825c2f03a7fa5bbb3dd59f23892669504d0
parentf13b3828b7f4eb97e80578258ec2850516dffd23 (diff)
kfree -> free
-rw-r--r--sys/dev/pci/drm/radeon/atom.c12
-rw-r--r--sys/dev/pci/drm/radeon/atombios_encoders.c8
-rw-r--r--sys/dev/pci/drm/radeon/evergreen.c2
-rw-r--r--sys/dev/pci/drm/radeon/evergreen_cs.c8
-rw-r--r--sys/dev/pci/drm/radeon/ni.c2
-rw-r--r--sys/dev/pci/drm/radeon/r100.c2
-rw-r--r--sys/dev/pci/drm/radeon/r300.c2
-rw-r--r--sys/dev/pci/drm/radeon/r420.c2
-rw-r--r--sys/dev/pci/drm/radeon/r600.c2
-rw-r--r--sys/dev/pci/drm/radeon/r600_cs.c20
-rw-r--r--sys/dev/pci/drm/radeon/radeon_acpi.c12
-rw-r--r--sys/dev/pci/drm/radeon/radeon_atombios.c6
-rw-r--r--sys/dev/pci/drm/radeon/radeon_bios.c6
-rw-r--r--sys/dev/pci/drm/radeon/radeon_combios.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_connectors.c26
-rw-r--r--sys/dev/pci/drm/radeon/radeon_device.c8
-rw-r--r--sys/dev/pci/drm/radeon/radeon_display.c14
-rw-r--r--sys/dev/pci/drm/radeon/radeon_fb.c6
-rw-r--r--sys/dev/pci/drm/radeon/radeon_fence.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_gart.c6
-rw-r--r--sys/dev/pci/drm/radeon/radeon_i2c.c6
-rw-r--r--sys/dev/pci/drm/radeon/radeon_kms.c6
-rw-r--r--sys/dev/pci/drm/radeon/radeon_legacy_encoders.c12
-rw-r--r--sys/dev/pci/drm/radeon/radeon_object.c4
-rw-r--r--sys/dev/pci/drm/radeon/radeon_pm.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_prime.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_ring.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_sa.c4
-rw-r--r--sys/dev/pci/drm/radeon/radeon_semaphore.c4
-rw-r--r--sys/dev/pci/drm/radeon/radeon_test.c2
-rw-r--r--sys/dev/pci/drm/radeon/radeon_ttm.c4
-rw-r--r--sys/dev/pci/drm/radeon/rs400.c2
-rw-r--r--sys/dev/pci/drm/radeon/rs600.c2
-rw-r--r--sys/dev/pci/drm/radeon/rs690.c2
-rw-r--r--sys/dev/pci/drm/radeon/rv515.c2
-rw-r--r--sys/dev/pci/drm/radeon/rv770.c2
-rw-r--r--sys/dev/pci/drm/radeon/si.c2
37 files changed, 104 insertions, 104 deletions
diff --git a/sys/dev/pci/drm/radeon/atom.c b/sys/dev/pci/drm/radeon/atom.c
index ab51d85fde9..24e6416e866 100644
--- a/sys/dev/pci/drm/radeon/atom.c
+++ b/sys/dev/pci/drm/radeon/atom.c
@@ -1208,7 +1208,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32
free:
if (ws)
- kfree(ectx.ws);
+ free(ectx.ws, M_DRM);
return ret;
}
@@ -1259,14 +1259,14 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
if (CU16(0) != ATOM_BIOS_MAGIC) {
printk(KERN_INFO "Invalid BIOS magic.\n");
- kfree(ctx);
+ free(ctx, M_DRM);
return NULL;
}
if (strncmp
(CSTR(ATOM_ATI_MAGIC_PTR), ATOM_ATI_MAGIC,
strlen(ATOM_ATI_MAGIC))) {
printk(KERN_INFO "Invalid ATI magic.\n");
- kfree(ctx);
+ free(ctx, M_DRM);
return NULL;
}
@@ -1275,7 +1275,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
(CSTR(base + ATOM_ROM_MAGIC_PTR), ATOM_ROM_MAGIC,
strlen(ATOM_ROM_MAGIC))) {
printk(KERN_INFO "Invalid ATOM magic.\n");
- kfree(ctx);
+ free(ctx, M_DRM);
return NULL;
}
@@ -1331,8 +1331,8 @@ int atom_asic_init(struct atom_context *ctx)
void atom_destroy(struct atom_context *ctx)
{
if (ctx->iio)
- kfree(ctx->iio);
- kfree(ctx);
+ free(ctx->iio, M_DRM);
+ free(ctx, M_DRM);
}
bool atom_parse_data_header(struct atom_context *ctx, int index,
diff --git a/sys/dev/pci/drm/radeon/atombios_encoders.c b/sys/dev/pci/drm/radeon/atombios_encoders.c
index e3991940155..a896cd0e1de 100644
--- a/sys/dev/pci/drm/radeon/atombios_encoders.c
+++ b/sys/dev/pci/drm/radeon/atombios_encoders.c
@@ -228,7 +228,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
return;
error:
- kfree(pdata);
+ free(pdata, M_DRM);
return;
}
@@ -257,7 +257,7 @@ static void radeon_atom_backlight_exit(struct radeon_encoder *radeon_encoder)
pdata = bl_get_data(bd);
backlight_device_unregister(bd);
- kfree(pdata);
+ free(pdata, M_DRM);
DRM_INFO("radeon atom LVDS backlight unloaded\n");
}
@@ -2491,9 +2491,9 @@ void radeon_enc_destroy(struct drm_encoder *encoder)
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
radeon_atom_backlight_exit(radeon_encoder);
- kfree(radeon_encoder->enc_priv);
+ free(radeon_encoder->enc_priv, M_DRM);
drm_encoder_cleanup(encoder);
- kfree(radeon_encoder);
+ free(radeon_encoder, M_DRM);
}
static const struct drm_encoder_funcs radeon_atom_enc_funcs = {
diff --git a/sys/dev/pci/drm/radeon/evergreen.c b/sys/dev/pci/drm/radeon/evergreen.c
index 636a135b2a5..44a753d6665 100644
--- a/sys/dev/pci/drm/radeon/evergreen.c
+++ b/sys/dev/pci/drm/radeon/evergreen.c
@@ -3691,7 +3691,7 @@ void evergreen_fini(struct radeon_device *rdev)
radeon_agp_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/evergreen_cs.c b/sys/dev/pci/drm/radeon/evergreen_cs.c
index 80f62959aed..639e0ea0e77 100644
--- a/sys/dev/pci/drm/radeon/evergreen_cs.c
+++ b/sys/dev/pci/drm/radeon/evergreen_cs.c
@@ -2821,7 +2821,7 @@ int evergreen_cs_parse(struct radeon_cs_parser *p)
do {
r = evergreen_cs_packet_parse(p, &pkt, p->idx);
if (r) {
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return r;
}
@@ -2837,12 +2837,12 @@ int evergreen_cs_parse(struct radeon_cs_parser *p)
break;
default:
DRM_ERROR("Unknown packet type %d !\n", pkt.type);
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return -EINVAL;
}
if (r) {
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return r;
}
@@ -2853,7 +2853,7 @@ int evergreen_cs_parse(struct radeon_cs_parser *p)
mdelay(1);
}
#endif
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return 0;
}
diff --git a/sys/dev/pci/drm/radeon/ni.c b/sys/dev/pci/drm/radeon/ni.c
index 5b7d444ceaf..3733b062ff7 100644
--- a/sys/dev/pci/drm/radeon/ni.c
+++ b/sys/dev/pci/drm/radeon/ni.c
@@ -1812,7 +1812,7 @@ void cayman_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/r100.c b/sys/dev/pci/drm/radeon/r100.c
index efaf62e67fc..da03fd9a9a2 100644
--- a/sys/dev/pci/drm/radeon/r100.c
+++ b/sys/dev/pci/drm/radeon/r100.c
@@ -4015,7 +4015,7 @@ void r100_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/r300.c b/sys/dev/pci/drm/radeon/r300.c
index 8badd6f09e7..72a397ffaae 100644
--- a/sys/dev/pci/drm/radeon/r300.c
+++ b/sys/dev/pci/drm/radeon/r300.c
@@ -1457,7 +1457,7 @@ void r300_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/r420.c b/sys/dev/pci/drm/radeon/r420.c
index 5e8c5857973..734eedf9fc6 100644
--- a/sys/dev/pci/drm/radeon/r420.c
+++ b/sys/dev/pci/drm/radeon/r420.c
@@ -350,7 +350,7 @@ void r420_fini(struct radeon_device *rdev)
} else {
radeon_combios_fini(rdev);
}
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/r600.c b/sys/dev/pci/drm/radeon/r600.c
index 83e36692a65..e2d7b6d5db1 100644
--- a/sys/dev/pci/drm/radeon/r600.c
+++ b/sys/dev/pci/drm/radeon/r600.c
@@ -2991,7 +2991,7 @@ void r600_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/r600_cs.c b/sys/dev/pci/drm/radeon/r600_cs.c
index 147db08889c..210d1dc875b 100644
--- a/sys/dev/pci/drm/radeon/r600_cs.c
+++ b/sys/dev/pci/drm/radeon/r600_cs.c
@@ -2411,7 +2411,7 @@ int r600_cs_parse(struct radeon_cs_parser *p)
do {
r = r600_cs_packet_parse(p, &pkt, p->idx);
if (r) {
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return r;
}
@@ -2427,12 +2427,12 @@ int r600_cs_parse(struct radeon_cs_parser *p)
break;
default:
DRM_ERROR("Unknown packet type %d !\n", pkt.type);
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return -EINVAL;
}
if (r) {
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return r;
}
@@ -2443,7 +2443,7 @@ int r600_cs_parse(struct radeon_cs_parser *p)
mdelay(1);
}
#endif
- kfree(p->track);
+ free(p->track, M_DRM);
p->track = NULL;
return 0;
}
@@ -2472,16 +2472,16 @@ static void r600_cs_parser_fini(struct radeon_cs_parser *parser, int error)
{
unsigned i;
- kfree(parser->relocs);
+ free(parser->relocs, M_DRM);
for (i = 0; i < parser->nchunks; i++) {
- kfree(parser->chunks[i].kdata);
+ free(parser->chunks[i].kdata, M_DRM);
if (parser->rdev && (parser->rdev->flags & RADEON_IS_AGP)) {
- kfree(parser->chunks[i].kpage[0]);
- kfree(parser->chunks[i].kpage[1]);
+ free(parser->chunks[i].kpage[0], M_DRM);
+ free(parser->chunks[i].kpage[1], M_DRM);
}
}
- kfree(parser->chunks);
- kfree(parser->chunks_array);
+ free(parser->chunks, M_DRM);
+ free(parser->chunks_array, M_DRM);
}
int r600_cs_legacy(struct drm_device *dev, void *data, struct drm_file *filp,
diff --git a/sys/dev/pci/drm/radeon/radeon_acpi.c b/sys/dev/pci/drm/radeon/radeon_acpi.c
index a1c25724f3d..b75af99b81a 100644
--- a/sys/dev/pci/drm/radeon/radeon_acpi.c
+++ b/sys/dev/pci/drm/radeon/radeon_acpi.c
@@ -110,7 +110,7 @@ static union acpi_object *radeon_atif_call(acpi_handle handle, int function,
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);
+ free(buffer.pointer, M_DRM);
return NULL;
}
@@ -206,7 +206,7 @@ static int radeon_atif_verify_interface(acpi_handle handle,
radeon_atif_parse_functions(&atif->functions, output.function_bits);
out:
- kfree(info);
+ free(info, M_DRM);
return err;
}
@@ -269,7 +269,7 @@ out:
DRM_DEBUG_DRIVER("Notification %s, command code = %#x\n",
(n->enabled ? "enabled" : "disabled"),
n->command_code);
- kfree(info);
+ free(info, M_DRM);
return err;
}
@@ -309,7 +309,7 @@ static int radeon_atif_get_sbios_requests(acpi_handle handle,
count = hweight32(req->pending);
out:
- kfree(info);
+ free(info, M_DRM);
return count;
}
@@ -425,7 +425,7 @@ static union acpi_object *radeon_atcs_call(acpi_handle handle, int function,
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);
+ free(buffer.pointer, M_DRM);
return NULL;
}
@@ -491,7 +491,7 @@ static int radeon_atcs_verify_interface(acpi_handle handle,
radeon_atcs_parse_functions(&atcs->functions, output.function_bits);
out:
- kfree(info);
+ free(info, M_DRM);
return err;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_atombios.c b/sys/dev/pci/drm/radeon/radeon_atombios.c
index 79a5683bf53..1f958461ffb 100644
--- a/sys/dev/pci/drm/radeon/radeon_atombios.c
+++ b/sys/dev/pci/drm/radeon/radeon_atombios.c
@@ -931,7 +931,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
if (!atom_parse_data_header(ctx, index, &size, &frev, &crev,
&data_offset)) {
- kfree(bios_connectors);
+ free(bios_connectors, M_DRM);
return false;
}
@@ -1103,7 +1103,7 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
radeon_link_encoder_connector(dev);
- kfree(bios_connectors);
+ free(bios_connectors, M_DRM);
return true;
}
@@ -1648,7 +1648,7 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
rdev->mode_info.bios_hardcoded_edid = edid;
rdev->mode_info.bios_hardcoded_edid_size = edid_size;
} else
- kfree(edid);
+ free(edid, M_DRM);
}
}
record += sizeof(ATOM_FAKE_EDID_PATCH_RECORD);
diff --git a/sys/dev/pci/drm/radeon/radeon_bios.c b/sys/dev/pci/drm/radeon/radeon_bios.c
index aa2c9c4f4ba..511e1300bcd 100644
--- a/sys/dev/pci/drm/radeon/radeon_bios.c
+++ b/sys/dev/pci/drm/radeon/radeon_bios.c
@@ -140,7 +140,7 @@ static int radeon_atrm_call(acpi_handle atrm_handle, uint8_t *bios,
obj = (union acpi_object *)buffer.pointer;
memcpy(bios+offset, obj->buffer.pointer, obj->buffer.length);
len = obj->buffer.length;
- kfree(buffer.pointer);
+ free(buffer.pointer, M_DRM);
return len;
}
@@ -189,7 +189,7 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
}
if (i == 0 || rdev->bios[0] != 0x55 || rdev->bios[1] != 0xaa) {
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
return false;
}
return true;
@@ -648,7 +648,7 @@ bool radeon_get_bios(struct radeon_device *rdev)
DRM_DEBUG("%sBIOS detected\n", rdev->is_atom_bios ? "ATOM" : "COM");
return true;
free_bios:
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
return false;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_combios.c b/sys/dev/pci/drm/radeon/radeon_combios.c
index 485b68fd8b4..df16b05c635 100644
--- a/sys/dev/pci/drm/radeon/radeon_combios.c
+++ b/sys/dev/pci/drm/radeon/radeon_combios.c
@@ -456,7 +456,7 @@ bool radeon_combios_check_hardcoded_edid(struct radeon_device *rdev)
memcpy((unsigned char *)edid, raw, size);
if (!drm_edid_is_valid(edid)) {
- kfree(edid);
+ free(edid, M_DRM);
return false;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_connectors.c b/sys/dev/pci/drm/radeon/radeon_connectors.c
index 83011301074..8533b71c489 100644
--- a/sys/dev/pci/drm/radeon/radeon_connectors.c
+++ b/sys/dev/pci/drm/radeon/radeon_connectors.c
@@ -644,11 +644,11 @@ static void radeon_connector_destroy(struct drm_connector *connector)
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
if (radeon_connector->edid)
- kfree(radeon_connector->edid);
- kfree(radeon_connector->con_priv);
+ free(radeon_connector->edid, M_DRM);
+ free(radeon_connector->con_priv, M_DRM);
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
- kfree(connector);
+ free(connector, M_DRM);
}
static int radeon_lvds_set_property(struct drm_connector *connector,
@@ -745,7 +745,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
if (dret) {
radeon_connector->detected_by_load = false;
if (radeon_connector->edid) {
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
radeon_connector->edid = NULL;
}
radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter);
@@ -761,7 +761,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
* with a shared ddc line (often vga + hdmi)
*/
if (radeon_connector->use_digital && radeon_connector->shared_ddc) {
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
radeon_connector->edid = NULL;
ret = connector_status_disconnected;
} else
@@ -951,7 +951,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
if (dret) {
radeon_connector->detected_by_load = false;
if (radeon_connector->edid) {
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
radeon_connector->edid = NULL;
}
radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter);
@@ -976,7 +976,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
* with a shared ddc line (often vga + hdmi)
*/
if ((!radeon_connector->use_digital) && radeon_connector->shared_ddc) {
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
radeon_connector->edid = NULL;
ret = connector_status_disconnected;
} else
@@ -1001,7 +1001,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
if (list_connector->connector_type != DRM_MODE_CONNECTOR_VGA) {
/* hpd is our only option in this case */
if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
radeon_connector->edid = NULL;
ret = connector_status_disconnected;
}
@@ -1210,13 +1210,13 @@ static void radeon_dp_connector_destroy(struct drm_connector *connector)
struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
if (radeon_connector->edid)
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
if (radeon_dig_connector->dp_i2c_bus)
radeon_i2c_destroy(radeon_dig_connector->dp_i2c_bus);
- kfree(radeon_connector->con_priv);
+ free(radeon_connector->con_priv, M_DRM);
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
- kfree(connector);
+ free(connector, M_DRM);
}
static int radeon_dp_get_modes(struct drm_connector *connector)
@@ -1367,7 +1367,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
return connector->status;
if (radeon_connector->edid) {
- kfree(radeon_connector->edid);
+ free(radeon_connector->edid, M_DRM);
radeon_connector->edid = NULL;
}
@@ -1873,7 +1873,7 @@ radeon_add_atom_connector(struct drm_device *dev,
failed:
drm_connector_cleanup(connector);
- kfree(connector);
+ free(connector, M_DRM);
}
void
diff --git a/sys/dev/pci/drm/radeon/radeon_device.c b/sys/dev/pci/drm/radeon/radeon_device.c
index 42ac82c2379..0ba9085d774 100644
--- a/sys/dev/pci/drm/radeon/radeon_device.c
+++ b/sys/dev/pci/drm/radeon/radeon_device.c
@@ -771,10 +771,10 @@ int radeon_atombios_init(struct radeon_device *rdev)
void radeon_atombios_fini(struct radeon_device *rdev)
{
if (rdev->mode_info.atom_context) {
- kfree(rdev->mode_info.atom_context->scratch);
- kfree(rdev->mode_info.atom_context);
+ free(rdev->mode_info.atom_context->scratch, M_DRM);
+ free(rdev->mode_info.atom_context, M_DRM);
}
- kfree(rdev->mode_info.atom_card_info);
+ free(rdev->mode_info.atom_card_info, M_DRM);
}
/* COMBIOS */
@@ -1392,7 +1392,7 @@ retry:
} else {
radeon_fence_driver_force_completion(rdev);
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
- kfree(ring_data[i]);
+ free(ring_data[i], M_DRM);
}
}
diff --git a/sys/dev/pci/drm/radeon/radeon_display.c b/sys/dev/pci/drm/radeon/radeon_display.c
index 6c0d145799b..3b0ee819c2a 100644
--- a/sys/dev/pci/drm/radeon/radeon_display.c
+++ b/sys/dev/pci/drm/radeon/radeon_display.c
@@ -239,7 +239,7 @@ static void radeon_crtc_destroy(struct drm_crtc *crtc)
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
drm_crtc_cleanup(crtc);
- kfree(radeon_crtc);
+ free(radeon_crtc, M_DRM);
}
/*
@@ -263,7 +263,7 @@ static void radeon_unpin_work_func(struct work_struct *__work)
DRM_ERROR("failed to reserve buffer after flip\n");
drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base);
- kfree(work);
+ free(work, M_DRM);
}
void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id)
@@ -486,7 +486,7 @@ unlock_free:
mtx_leave(&dev->event_lock);
drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
radeon_fence_unref(&work->fence);
- kfree(work);
+ free(work, M_DRM);
return r;
}
@@ -1062,7 +1062,7 @@ static void radeon_user_framebuffer_destroy(struct drm_framebuffer *fb)
drm_gem_object_unreference_unlocked(radeon_fb->obj);
}
drm_framebuffer_cleanup(fb);
- kfree(radeon_fb);
+ free(radeon_fb, M_DRM);
}
static int radeon_user_framebuffer_create_handle(struct drm_framebuffer *fb,
@@ -1120,7 +1120,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,
ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
if (ret) {
- kfree(radeon_fb);
+ free(radeon_fb, M_DRM);
drm_gem_object_unreference_unlocked(obj);
return ERR_PTR(ret);
}
@@ -1326,7 +1326,7 @@ static void radeon_afmt_fini(struct radeon_device *rdev)
int i;
for (i = 0; i < RADEON_MAX_AFMT_BLOCKS; i++) {
- kfree(rdev->mode_info.afmt[i]);
+ free(rdev->mode_info.afmt[i], M_DRM);
rdev->mode_info.afmt[i] = NULL;
}
}
@@ -1406,7 +1406,7 @@ int radeon_modeset_init(struct radeon_device *rdev)
void radeon_modeset_fini(struct radeon_device *rdev)
{
radeon_fbdev_fini(rdev);
- kfree(rdev->mode_info.bios_hardcoded_edid);
+ free(rdev->mode_info.bios_hardcoded_edid, M_DRM);
radeon_pm_fini(rdev);
if (rdev->mode_info.mode_config_initialized) {
diff --git a/sys/dev/pci/drm/radeon/radeon_fb.c b/sys/dev/pci/drm/radeon/radeon_fb.c
index 859a1299145..9abea4a617f 100644
--- a/sys/dev/pci/drm/radeon/radeon_fb.c
+++ b/sys/dev/pci/drm/radeon/radeon_fb.c
@@ -289,7 +289,7 @@ out_unref:
if (fb && ret) {
drm_gem_object_unreference(gobj);
drm_framebuffer_cleanup(fb);
- kfree(fb);
+ free(fb, M_DRM);
}
return ret;
}
@@ -367,7 +367,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
rdev->num_crtc,
RADEONFB_CONN_LIMIT);
if (ret) {
- kfree(rfbdev);
+ free(rfbdev, M_DRM);
return ret;
}
@@ -382,7 +382,7 @@ void radeon_fbdev_fini(struct radeon_device *rdev)
return;
radeon_fbdev_destroy(rdev->ddev, rdev->mode_info.rfbdev);
- kfree(rdev->mode_info.rfbdev);
+ free(rdev->mode_info.rfbdev, M_DRM);
rdev->mode_info.rfbdev = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_fence.c b/sys/dev/pci/drm/radeon/radeon_fence.c
index 9f3e312b588..b1c725d02c4 100644
--- a/sys/dev/pci/drm/radeon/radeon_fence.c
+++ b/sys/dev/pci/drm/radeon/radeon_fence.c
@@ -196,7 +196,7 @@ static void radeon_fence_destroy(struct kref *kref)
struct radeon_fence *fence;
fence = container_of(kref, struct radeon_fence, kref);
- kfree(fence);
+ free(fence, M_DRM);
}
/**
diff --git a/sys/dev/pci/drm/radeon/radeon_gart.c b/sys/dev/pci/drm/radeon/radeon_gart.c
index 78202dfb2b5..c8bf639e663 100644
--- a/sys/dev/pci/drm/radeon/radeon_gart.c
+++ b/sys/dev/pci/drm/radeon/radeon_gart.c
@@ -529,7 +529,7 @@ static void radeon_vm_free_pt(struct radeon_device *rdev,
for (i = 0; i < radeon_vm_num_pdes(rdev); i++)
radeon_sa_bo_free(rdev, &vm->page_tables[i], vm->fence);
- kfree(vm->page_tables);
+ free(vm->page_tables, M_DRM);
}
/**
@@ -1219,7 +1219,7 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev,
rw_exit_write(&bo_va->vm->rwlock);
list_del(&bo_va->bo_list);
- kfree(bo_va);
+ free(bo_va, M_DRM);
return r;
}
@@ -1287,7 +1287,7 @@ void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm)
if (!r) {
list_del_init(&bo_va->bo_list);
radeon_bo_unreserve(bo_va->bo);
- kfree(bo_va);
+ free(bo_va, M_DRM);
}
}
radeon_fence_unref(&vm->fence);
diff --git a/sys/dev/pci/drm/radeon/radeon_i2c.c b/sys/dev/pci/drm/radeon/radeon_i2c.c
index 6b0fd9dfc99..4747a82457b 100644
--- a/sys/dev/pci/drm/radeon/radeon_i2c.c
+++ b/sys/dev/pci/drm/radeon/radeon_i2c.c
@@ -968,7 +968,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
return i2c;
out_free:
- kfree(i2c);
+ free(i2c, M_DRM);
return NULL;
}
@@ -1003,7 +1003,7 @@ struct radeon_i2c_chan *radeon_i2c_create_dp(struct drm_device *dev,
return i2c;
out_free:
- kfree(i2c);
+ free(i2c, M_DRM);
return NULL;
}
@@ -1013,7 +1013,7 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c)
if (!i2c)
return;
i2c_del_adapter(&i2c->adapter);
- kfree(i2c);
+ free(i2c, M_DRM);
}
/* Add the default buses */
diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c
index 219dbc13852..f8c83049770 100644
--- a/sys/dev/pci/drm/radeon/radeon_kms.c
+++ b/sys/dev/pci/drm/radeon/radeon_kms.c
@@ -50,7 +50,7 @@ int radeon_driver_unload_kms(struct drm_device *dev)
radeon_acpi_fini(rdev);
radeon_modeset_fini(rdev);
radeon_device_fini(rdev);
- kfree(rdev);
+ free(rdev, M_DRM);
dev->dev_private = NULL;
return 0;
}
@@ -451,7 +451,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
RADEON_VM_PAGE_SNOOPED);
if (r) {
radeon_vm_fini(rdev, &fpriv->vm);
- kfree(fpriv);
+ free(fpriv, M_DRM);
return r;
}
@@ -489,7 +489,7 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
}
radeon_vm_fini(rdev, &fpriv->vm);
- kfree(fpriv);
+ free(fpriv, M_DRM);
file_priv->driver_priv = NULL;
}
}
diff --git a/sys/dev/pci/drm/radeon/radeon_legacy_encoders.c b/sys/dev/pci/drm/radeon/radeon_legacy_encoders.c
index e9f54d90d31..f742c5e1573 100644
--- a/sys/dev/pci/drm/radeon/radeon_legacy_encoders.c
+++ b/sys/dev/pci/drm/radeon/radeon_legacy_encoders.c
@@ -441,7 +441,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
return;
error:
- kfree(pdata);
+ free(pdata, M_DRM);
return;
}
@@ -469,7 +469,7 @@ static void radeon_legacy_backlight_exit(struct radeon_encoder *radeon_encoder)
pdata = bl_get_data(bd);
backlight_device_unregister(bd);
- kfree(pdata);
+ free(pdata, M_DRM);
DRM_INFO("radeon legacy LVDS backlight unloaded\n");
}
@@ -494,10 +494,10 @@ static void radeon_lvds_enc_destroy(struct drm_encoder *encoder)
if (radeon_encoder->enc_priv) {
radeon_legacy_backlight_exit(radeon_encoder);
- kfree(radeon_encoder->enc_priv);
+ free(radeon_encoder->enc_priv, M_DRM);
}
drm_encoder_cleanup(encoder);
- kfree(radeon_encoder);
+ free(radeon_encoder, M_DRM);
}
static const struct drm_encoder_funcs radeon_legacy_lvds_enc_funcs = {
@@ -1004,9 +1004,9 @@ static void radeon_ext_tmds_enc_destroy(struct drm_encoder *encoder)
{
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
/* don't destroy the i2c bus record here, this will be done in radeon_i2c_fini */
- kfree(radeon_encoder->enc_priv);
+ free(radeon_encoder->enc_priv, M_DRM);
drm_encoder_cleanup(encoder);
- kfree(radeon_encoder);
+ free(radeon_encoder, M_DRM);
}
static const struct drm_encoder_helper_funcs radeon_legacy_tmds_ext_helper_funcs = {
diff --git a/sys/dev/pci/drm/radeon/radeon_object.c b/sys/dev/pci/drm/radeon/radeon_object.c
index d78b455c2cc..e204a622945 100644
--- a/sys/dev/pci/drm/radeon/radeon_object.c
+++ b/sys/dev/pci/drm/radeon/radeon_object.c
@@ -65,7 +65,7 @@ static void radeon_ttm_bo_destroy(struct ttm_buffer_object *tbo)
radeon_bo_clear_surface_reg(bo);
radeon_bo_clear_va(bo);
drm_gem_object_release(&bo->gem_base);
- kfree(bo);
+ free(bo, M_DRM);
}
bool radeon_ttm_bo_is_radeon_bo(struct ttm_buffer_object *bo)
@@ -136,7 +136,7 @@ int radeon_bo_create(struct radeon_device *rdev,
return -ENOMEM;
r = drm_gem_object_init(rdev->ddev, &bo->gem_base, size);
if (unlikely(r)) {
- kfree(bo);
+ free(bo, M_DRM);
return r;
}
bo->rdev = rdev;
diff --git a/sys/dev/pci/drm/radeon/radeon_pm.c b/sys/dev/pci/drm/radeon/radeon_pm.c
index 020237545ab..4158801124c 100644
--- a/sys/dev/pci/drm/radeon/radeon_pm.c
+++ b/sys/dev/pci/drm/radeon/radeon_pm.c
@@ -660,7 +660,7 @@ void radeon_pm_fini(struct radeon_device *rdev)
}
if (rdev->pm.power_state)
- kfree(rdev->pm.power_state);
+ free(rdev->pm.power_state, M_DRM);
radeon_hwmon_fini(rdev);
}
diff --git a/sys/dev/pci/drm/radeon/radeon_prime.c b/sys/dev/pci/drm/radeon/radeon_prime.c
index 1a576db981e..8d01a230a1d 100644
--- a/sys/dev/pci/drm/radeon/radeon_prime.c
+++ b/sys/dev/pci/drm/radeon/radeon_prime.c
@@ -49,7 +49,7 @@ static void radeon_gem_unmap_dma_buf(struct dma_buf_attachment *attachment,
{
dma_unmap_sg(attachment->dev, sg->sgl, sg->nents, dir);
sg_free_table(sg);
- kfree(sg);
+ free(sg, M_DRM);
}
static void radeon_gem_dmabuf_release(struct dma_buf *dma_buf)
diff --git a/sys/dev/pci/drm/radeon/radeon_ring.c b/sys/dev/pci/drm/radeon/radeon_ring.c
index 6b20eae0409..4847d36f380 100644
--- a/sys/dev/pci/drm/radeon/radeon_ring.c
+++ b/sys/dev/pci/drm/radeon/radeon_ring.c
@@ -653,7 +653,7 @@ int radeon_ring_restore(struct radeon_device *rdev, struct radeon_ring *ring,
}
radeon_ring_unlock_commit(rdev, ring);
- kfree(data);
+ free(data, M_DRM);
return 0;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_sa.c b/sys/dev/pci/drm/radeon/radeon_sa.c
index 5364b3e9dcb..ef8f913fe12 100644
--- a/sys/dev/pci/drm/radeon/radeon_sa.c
+++ b/sys/dev/pci/drm/radeon/radeon_sa.c
@@ -147,7 +147,7 @@ static void radeon_sa_bo_remove_locked(struct radeon_sa_bo *sa_bo)
list_del_init(&sa_bo->olist);
list_del_init(&sa_bo->flist);
radeon_fence_unref(&sa_bo->fence);
- kfree(sa_bo);
+ free(sa_bo, M_DRM);
}
static void radeon_sa_bo_try_free(struct radeon_sa_manager *sa_manager)
@@ -365,7 +365,7 @@ int radeon_sa_bo_new(struct radeon_device *rdev,
} while (!r);
mtx_leave(&sa_manager->wq.lock);
- kfree(*sa_bo);
+ free(*sa_bo, M_DRM);
*sa_bo = NULL;
return r;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_semaphore.c b/sys/dev/pci/drm/radeon/radeon_semaphore.c
index ca015a2495a..b261fa09ff3 100644
--- a/sys/dev/pci/drm/radeon/radeon_semaphore.c
+++ b/sys/dev/pci/drm/radeon/radeon_semaphore.c
@@ -43,7 +43,7 @@ int radeon_semaphore_create(struct radeon_device *rdev,
r = radeon_sa_bo_new(rdev, &rdev->ring_tmp_bo,
&(*semaphore)->sa_bo, 8, 8, true);
if (r) {
- kfree(*semaphore);
+ free(*semaphore, M_DRM);
*semaphore = NULL;
return r;
}
@@ -114,6 +114,6 @@ void radeon_semaphore_free(struct radeon_device *rdev,
" hardware lockup imminent!\n", *semaphore);
}
radeon_sa_bo_free(rdev, &(*semaphore)->sa_bo, fence);
- kfree(*semaphore);
+ free(*semaphore, M_DRM);
*semaphore = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/radeon_test.c b/sys/dev/pci/drm/radeon/radeon_test.c
index 506b02c214b..4b0479f823d 100644
--- a/sys/dev/pci/drm/radeon/radeon_test.c
+++ b/sys/dev/pci/drm/radeon/radeon_test.c
@@ -234,7 +234,7 @@ out_cleanup:
radeon_bo_unref(&gtt_obj[i]);
}
}
- kfree(gtt_obj);
+ free(gtt_obj, M_DRM);
}
if (fence) {
radeon_fence_unref(&fence);
diff --git a/sys/dev/pci/drm/radeon/radeon_ttm.c b/sys/dev/pci/drm/radeon/radeon_ttm.c
index 10dc0ea8ff6..acef231562c 100644
--- a/sys/dev/pci/drm/radeon/radeon_ttm.c
+++ b/sys/dev/pci/drm/radeon/radeon_ttm.c
@@ -538,7 +538,7 @@ static void radeon_ttm_backend_destroy(struct ttm_tt *ttm)
struct radeon_ttm_tt *gtt = (void *)ttm;
ttm_dma_tt_fini(&gtt->ttm);
- kfree(gtt);
+ free(gtt, M_DRM);
}
static struct ttm_backend_func radeon_backend_func = {
@@ -569,7 +569,7 @@ static struct ttm_tt *radeon_ttm_tt_create(struct ttm_bo_device *bdev,
gtt->ttm.ttm.func = &radeon_backend_func;
gtt->rdev = rdev;
if (ttm_dma_tt_init(&gtt->ttm, bdev, size, page_flags, dummy_read_page)) {
- kfree(gtt);
+ free(gtt, M_DRM);
return NULL;
}
return &gtt->ttm.ttm;
diff --git a/sys/dev/pci/drm/radeon/rs400.c b/sys/dev/pci/drm/radeon/rs400.c
index 627ab65dc01..5ae3cde43ee 100644
--- a/sys/dev/pci/drm/radeon/rs400.c
+++ b/sys/dev/pci/drm/radeon/rs400.c
@@ -484,7 +484,7 @@ void rs400_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/rs600.c b/sys/dev/pci/drm/radeon/rs600.c
index cabe6db5324..a69a7513a65 100644
--- a/sys/dev/pci/drm/radeon/rs600.c
+++ b/sys/dev/pci/drm/radeon/rs600.c
@@ -962,7 +962,7 @@ void rs600_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/rs690.c b/sys/dev/pci/drm/radeon/rs690.c
index b0b840ef376..26d89a2b81e 100644
--- a/sys/dev/pci/drm/radeon/rs690.c
+++ b/sys/dev/pci/drm/radeon/rs690.c
@@ -703,7 +703,7 @@ void rs690_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/rv515.c b/sys/dev/pci/drm/radeon/rv515.c
index 7cc1582a892..a9bbe4f8614 100644
--- a/sys/dev/pci/drm/radeon/rv515.c
+++ b/sys/dev/pci/drm/radeon/rv515.c
@@ -552,7 +552,7 @@ void rv515_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/rv770.c b/sys/dev/pci/drm/radeon/rv770.c
index 6c6b81c8145..d9ba61106c5 100644
--- a/sys/dev/pci/drm/radeon/rv770.c
+++ b/sys/dev/pci/drm/radeon/rv770.c
@@ -1202,7 +1202,7 @@ void rv770_fini(struct radeon_device *rdev)
radeon_agp_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}
diff --git a/sys/dev/pci/drm/radeon/si.c b/sys/dev/pci/drm/radeon/si.c
index 11ceb364ff3..ad7157a9d64 100644
--- a/sys/dev/pci/drm/radeon/si.c
+++ b/sys/dev/pci/drm/radeon/si.c
@@ -4370,7 +4370,7 @@ void si_fini(struct radeon_device *rdev)
radeon_fence_driver_fini(rdev);
radeon_bo_fini(rdev);
radeon_atombios_fini(rdev);
- kfree(rdev->bios);
+ free(rdev->bios, M_DRM);
rdev->bios = NULL;
}