Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9af07af9 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'topic/drm-misc-2016-07-22' of git://anongit.freedesktop.org/drm-intel into drm-next

Suddenly everyone shows up with their trivial patch series!
- piles of if (!ptr) check removals from Markus Elfring
- more of_node_put fixes from Peter Chen
- make fbdev support really optional in all drivers (except vmwgfx),
  somehow this fell through the cracks when we did all the hard prep work
  a while ago. Patches from Tobias Jakobi.
- leftover patches for the connector reg/unreg cleanup (required that I
  backmerged drm-next) from Chris
- last vgem fence patch from Chris
- fix up warnings in the new sphinx gpu docs build
- misc other small bits

* tag 'topic/drm-misc-2016-07-22' of git://anongit.freedesktop.org/drm-intel: (57 commits)
  GPU-DRM-Exynos: Delete an unnecessary check before the function call "vunmap"
  GPU-DRM-sun4i: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()
  drm/atomic: Delete an unnecessary check before drm_property_unreference_blob()
  drm/rockchip: analogix_dp: add missing clk_disable_unprepare() on error
  drm: drm_connector->s/connector_id/index/ for consistency
  drm/virtio: Fix non static symbol warning
  drm/arc: Remove redundant dev_err call in arcpgu_load()
  drm/arc: Fix some sparse warnings
  drm/vgem: Fix non static symbol warning
  drm/doc: Spinx leftovers
  drm/dp-mst: Missing kernel doc
  drm/dp-mst: Remove tx_down_in_progress
  drm/doc: Fix missing kerneldoc for drm_dp_helper.c
  drm: Extract&Document drm_irq.h
  drm/doc: document all the properties in drm_mode_config
  drm/drm-kms.rst: Remove unused drm_fourcc.h include directive
  drm/doc: Add kerneldoc for @index
  drm: Unexport drm_connector_unregister_all()
  drm/sun4i: Remove redundant call to drm_connector_unregister_all()
  drm/ttm: Delete an unnecessary check before the function call "ttm_tt_destroy"
  ...
parents 5e580523 e8d3ef02
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -188,7 +188,8 @@ Manual IRQ Registration
Drivers that require multiple interrupt handlers can't use the managed
IRQ registration functions. In that case IRQs must be registered and
unregistered manually (usually with the :c:func:`request_irq()` and
:c:func:`free_irq()` functions, or their devm_\* equivalent).
:c:func:`free_irq()` functions, or their :c:func:`devm_request_irq()` and
:c:func:`devm_free_irq()` equivalents).

When manually registering IRQs, drivers must not set the
DRIVER_HAVE_IRQ driver feature flag, and must not provide the
@@ -242,11 +243,13 @@ Open/Close, File Operations and IOCTLs
Open and Close
--------------

int (\*firstopen) (struct drm_device \*); void (\*lastclose) (struct
drm_device \*); int (\*open) (struct drm_device \*, struct drm_file
\*); void (\*preclose) (struct drm_device \*, struct drm_file \*);
void (\*postclose) (struct drm_device \*, struct drm_file \*);
    Open and close handlers. None of those methods are mandatory.
Open and close handlers. None of those methods are mandatory::

    int (*firstopen) (struct drm_device *);
    void (*lastclose) (struct drm_device *);
    int (*open) (struct drm_device *, struct drm_file *);
    void (*preclose) (struct drm_device *, struct drm_file *);
    void (*postclose) (struct drm_device *, struct drm_file *);

The firstopen method is called by the DRM core for legacy UMS (User Mode
Setting) drivers only when an application opens a device that has no
+2 −5
Original line number Diff line number Diff line
@@ -67,9 +67,6 @@ drivers can manually clean up a framebuffer at module unload time with
DRM Format Handling
-------------------

.. kernel-doc:: include/drm/drm_fourcc.h
   :internal:

.. kernel-doc:: drivers/gpu/drm/drm_fourcc.c
   :export:

@@ -652,5 +649,5 @@ Vertical Blanking and Interrupt Handling Functions Reference
.. kernel-doc:: drivers/gpu/drm/drm_irq.c
   :export:

.. kernel-doc:: include/drm/drmP.h
   :functions: drm_crtc_vblank_waitqueue
.. kernel-doc:: include/drm/drm_irq.h
   :internal:
+11 −4
Original line number Diff line number Diff line
@@ -334,6 +334,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
	struct reservation_object *resv = exp_info->resv;
	struct file *file;
	size_t alloc_size = sizeof(struct dma_buf);
	int ret;

	if (!exp_info->resv)
		alloc_size += sizeof(struct reservation_object);
@@ -357,8 +358,8 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)

	dmabuf = kzalloc(alloc_size, GFP_KERNEL);
	if (!dmabuf) {
		module_put(exp_info->owner);
		return ERR_PTR(-ENOMEM);
		ret = -ENOMEM;
		goto err_module;
	}

	dmabuf->priv = exp_info->priv;
@@ -379,8 +380,8 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
	file = anon_inode_getfile("dmabuf", &dma_buf_fops, dmabuf,
					exp_info->flags);
	if (IS_ERR(file)) {
		kfree(dmabuf);
		return ERR_CAST(file);
		ret = PTR_ERR(file);
		goto err_dmabuf;
	}

	file->f_mode |= FMODE_LSEEK;
@@ -394,6 +395,12 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
	mutex_unlock(&db_list.lock);

	return dmabuf;

err_dmabuf:
	kfree(dmabuf);
err_module:
	module_put(exp_info->owner);
	return ERR_PTR(ret);
}
EXPORT_SYMBOL_GPL(dma_buf_export);

+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ config DRM_ARCPGU
	tristate "ARC PGU"
	depends on DRM && OF
	select DRM_KMS_CMA_HELPER
	select DRM_KMS_FB_HELPER
	select DRM_KMS_HELPER
	help
	  Choose this option if you have an ARC PGU controller.
+6 −8
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ static void arcpgu_fb_output_poll_changed(struct drm_device *dev)
{
	struct arcpgu_drm_private *arcpgu = dev->dev_private;

	if (arcpgu->fbdev)
	drm_fbdev_cma_hotplug_event(arcpgu->fbdev);
}

@@ -49,7 +48,7 @@ static void arcpgu_setup_mode_config(struct drm_device *drm)
	drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs;
}

int arcpgu_gem_mmap(struct file *filp, struct vm_area_struct *vma)
static int arcpgu_gem_mmap(struct file *filp, struct vm_area_struct *vma)
{
	int ret;

@@ -104,10 +103,8 @@ static int arcpgu_load(struct drm_device *drm)

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	arcpgu->regs = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(arcpgu->regs)) {
		dev_err(drm->dev, "Could not remap IO mem\n");
	if (IS_ERR(arcpgu->regs))
		return PTR_ERR(arcpgu->regs);
	}

	dev_info(drm->dev, "arc_pgu ID: 0x%x\n",
		 arc_pgu_read(arcpgu, ARCPGU_REG_ID));
@@ -127,10 +124,11 @@ static int arcpgu_load(struct drm_device *drm)
	encoder_node = of_parse_phandle(drm->dev->of_node, "encoder-slave", 0);
	if (encoder_node) {
		ret = arcpgu_drm_hdmi_init(drm, encoder_node);
		of_node_put(encoder_node);
		if (ret < 0)
			return ret;
	} else {
		ret = arcpgu_drm_sim_init(drm, 0);
		ret = arcpgu_drm_sim_init(drm, NULL);
		if (ret < 0)
			return ret;
	}
@@ -151,7 +149,7 @@ static int arcpgu_load(struct drm_device *drm)
	return 0;
}

int arcpgu_unload(struct drm_device *drm)
static int arcpgu_unload(struct drm_device *drm)
{
	struct arcpgu_drm_private *arcpgu = drm->dev_private;

Loading