aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-10-04 07:45:36 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-10-04 07:45:36 +0000
commit280bcab3d0b462d230b3129ca3e3d4bf2d6f59ab (patch)
tree87c1942bf24a957c46e7c666f3ec5b23bca341f5
parent06a60e4bb0d7183c914cc4688b639093b0ba4457 (diff)
downloadsrc-280bcab3d0b462d230b3129ca3e3d4bf2d6f59ab.tar.gz
src-280bcab3d0b462d230b3129ca3e3d4bf2d6f59ab.zip
Notes
-rw-r--r--sys/dev/drm2/drmP.h6
-rw-r--r--sys/dev/drm2/drm_crtc.c20
-rw-r--r--sys/dev/drm2/drm_fops.c2
-rw-r--r--sys/dev/drm2/drm_pci.c2
-rw-r--r--sys/dev/drm2/drm_stub.c6
-rw-r--r--sys/dev/drm2/i915/i915_dma.c2
-rw-r--r--sys/dev/drm2/i915/i915_drv.c1
-rw-r--r--sys/dev/drm2/i915/intel_opregion.c4
8 files changed, 19 insertions, 24 deletions
diff --git a/sys/dev/drm2/drmP.h b/sys/dev/drm2/drmP.h
index 32c3fcdb995c..b3633c364913 100644
--- a/sys/dev/drm2/drmP.h
+++ b/sys/dev/drm2/drmP.h
@@ -1782,12 +1782,6 @@ void drm_driver_irq_preinstall(struct drm_device *dev);
void drm_driver_irq_postinstall(struct drm_device *dev);
void drm_driver_irq_uninstall(struct drm_device *dev);
-/* AGP/PCI Express/GART support (drm_agpsupport.c) */
-void *drm_agp_allocate_memory(size_t pages, u32 type);
-int drm_agp_free_memory(void *handle);
-int drm_agp_bind_memory(void *handle, off_t start);
-int drm_agp_unbind_memory(void *handle);
-
/* sysctl support (drm_sysctl.h) */
extern int drm_sysctl_init(struct drm_device *dev);
extern int drm_sysctl_cleanup(struct drm_device *dev);
diff --git a/sys/dev/drm2/drm_crtc.c b/sys/dev/drm2/drm_crtc.c
index 318a764805cb..79f66aafc549 100644
--- a/sys/dev/drm2/drm_crtc.c
+++ b/sys/dev/drm2/drm_crtc.c
@@ -663,7 +663,7 @@ int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
plane->dev = dev;
plane->funcs = funcs;
plane->format_types = malloc(sizeof(uint32_t) * format_count,
- DRM_MEM_KMS, M_WAITOK);
+ DRM_MEM_KMS, M_NOWAIT);
if (!plane->format_types) {
DRM_DEBUG_KMS("out of memory when allocating plane\n");
drm_mode_object_put(dev, &plane->base);
@@ -1010,7 +1010,7 @@ int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group)
total_objects += dev->mode_config.num_encoder;
group->id_list = malloc(total_objects * sizeof(uint32_t),
- DRM_MEM_KMS, M_WAITOK | M_ZERO);
+ DRM_MEM_KMS, M_NOWAIT | M_ZERO);
if (!group->id_list)
return -ENOMEM;
@@ -1998,7 +1998,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
connector_set = malloc(crtc_req->count_connectors *
sizeof(struct drm_connector *),
- DRM_MEM_KMS, M_WAITOK);
+ DRM_MEM_KMS, M_NOWAIT);
if (!connector_set) {
ret = -ENOMEM;
goto out;
@@ -2523,7 +2523,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
goto out_err1;
}
clips = malloc(num_clips * sizeof(*clips), DRM_MEM_KMS,
- M_WAITOK | M_ZERO);
+ M_NOWAIT | M_ZERO);
if (!clips) {
ret = -ENOMEM;
goto out_err1;
@@ -2774,13 +2774,13 @@ struct drm_property *drm_property_create(struct drm_device *dev, int flags,
int ret;
property = malloc(sizeof(struct drm_property), DRM_MEM_KMS,
- M_WAITOK | M_ZERO);
+ M_NOWAIT | M_ZERO);
if (!property)
return NULL;
if (num_values) {
property->values = malloc(sizeof(uint64_t)*num_values, DRM_MEM_KMS,
- M_WAITOK | M_ZERO);
+ M_NOWAIT | M_ZERO);
if (!property->values)
goto fail;
}
@@ -2908,7 +2908,7 @@ int drm_property_add_enum(struct drm_property *property, int index,
}
prop_enum = malloc(sizeof(struct drm_property_enum), DRM_MEM_KMS,
- M_WAITOK | M_ZERO);
+ M_NOWAIT | M_ZERO);
if (!prop_enum)
return -ENOMEM;
@@ -3104,7 +3104,7 @@ static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev
return NULL;
blob = malloc(sizeof(struct drm_property_blob)+length, DRM_MEM_KMS,
- M_WAITOK | M_ZERO);
+ M_NOWAIT | M_ZERO);
if (!blob)
return NULL;
@@ -3434,7 +3434,7 @@ int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
crtc->gamma_size = gamma_size;
crtc->gamma_store = malloc(gamma_size * sizeof(uint16_t) * 3,
- DRM_MEM_KMS, M_WAITOK | M_ZERO);
+ DRM_MEM_KMS, M_NOWAIT | M_ZERO);
if (!crtc->gamma_store) {
crtc->gamma_size = 0;
return -ENOMEM;
@@ -3632,7 +3632,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
file_priv->event_space -= sizeof e->event;
mtx_unlock(&dev->event_lock);
- e = malloc(sizeof *e, DRM_MEM_KMS, M_WAITOK | M_ZERO);
+ e = malloc(sizeof *e, DRM_MEM_KMS, M_NOWAIT | M_ZERO);
if (e == NULL) {
mtx_lock(&dev->event_lock);
file_priv->event_space += sizeof e->event;
diff --git a/sys/dev/drm2/drm_fops.c b/sys/dev/drm2/drm_fops.c
index b73cec63d3b7..3b3be06345e5 100644
--- a/sys/dev/drm2/drm_fops.c
+++ b/sys/dev/drm2/drm_fops.c
@@ -136,7 +136,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
sx_xlock(&drm_global_mutex);
/*
- * FIXME Linux<->FreeBSD: On Linux, counter updated outisde
+ * FIXME Linux<->FreeBSD: On Linux, counter updated outside
* global mutex.
*/
if (!dev->open_count++)
diff --git a/sys/dev/drm2/drm_pci.c b/sys/dev/drm2/drm_pci.c
index f2c5bbd2dc5e..ecbfcb7c7df3 100644
--- a/sys/dev/drm2/drm_pci.c
+++ b/sys/dev/drm2/drm_pci.c
@@ -225,7 +225,7 @@ int drm_pci_set_unique(struct drm_device *dev,
master->unique_len = u->unique_len;
master->unique_size = u->unique_len + 1;
- master->unique = malloc(master->unique_size, DRM_MEM_DRIVER, M_WAITOK);
+ master->unique = malloc(master->unique_size, DRM_MEM_DRIVER, M_NOWAIT);
if (!master->unique) {
ret = -ENOMEM;
goto err;
diff --git a/sys/dev/drm2/drm_stub.c b/sys/dev/drm2/drm_stub.c
index d7ec6cb31e0e..06663ac8ef70 100644
--- a/sys/dev/drm2/drm_stub.c
+++ b/sys/dev/drm2/drm_stub.c
@@ -94,9 +94,9 @@ static int drm_minor_get_id(struct drm_device *dev, int type)
if (type == DRM_MINOR_CONTROL) {
new_id += 64;
- } else if (type == DRM_MINOR_RENDER) {
- new_id += 128;
- }
+ } else if (type == DRM_MINOR_RENDER) {
+ new_id += 128;
+ }
return new_id;
}
diff --git a/sys/dev/drm2/i915/i915_dma.c b/sys/dev/drm2/i915/i915_dma.c
index 2265ac05060f..dddc03e8154c 100644
--- a/sys/dev/drm2/i915/i915_dma.c
+++ b/sys/dev/drm2/i915/i915_dma.c
@@ -1452,6 +1452,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
}
}
+ pci_enable_busmaster(dev->dev);
+
intel_opregion_init(dev);
callout_init(&dev_priv->hangcheck_timer, 1);
diff --git a/sys/dev/drm2/i915/i915_drv.c b/sys/dev/drm2/i915/i915_drv.c
index 3109827a8096..e9cf3a45aec9 100644
--- a/sys/dev/drm2/i915/i915_drv.c
+++ b/sys/dev/drm2/i915/i915_drv.c
@@ -894,6 +894,7 @@ int intel_gpu_reset(struct drm_device *dev)
case 4:
ret = i965_do_reset(dev);
break;
+ case 3:
case 2:
ret = i8xx_do_reset(dev);
break;
diff --git a/sys/dev/drm2/i915/intel_opregion.c b/sys/dev/drm2/i915/intel_opregion.c
index 411e530da9ec..397c559305f4 100644
--- a/sys/dev/drm2/i915/intel_opregion.c
+++ b/sys/dev/drm2/i915/intel_opregion.c
@@ -533,11 +533,9 @@ void intel_opregion_fini(struct drm_device *dev)
opregion->vbt = NULL;
}
#else
-int
+void
intel_opregion_init(struct drm_device *dev)
{
-
- return (0);
}
void