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

Commit 316e376b authored by Dave Airlie's avatar Dave Airlie
Browse files

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

First drm-misc pull req for 4.6. Big one is the drm_event cleanup, which
is also prep work for adding android fence support to kms (Gustavo is
planning to do that). Otherwise random small bits all over.

* tag 'topic/drm-misc-2016-02-08' of git://anongit.freedesktop.org/drm-intel: (33 commits)
  gma500: clean up an excessive and confusing helper
  drm/gma500: remove helper function
  drm/vmwgfx: Nuke preclose hook
  drm/vc4: Nuke preclose hook
  drm/tilcdc: Nuke preclose hook
  drm/tegra: Stop cancelling page flip events
  drm/shmob: Nuke preclose hook
  drm/rcar: Nuke preclose hook
  drm/omap: Nuke close hooks
  drm/msm: Nuke preclose hooks
  drm/imx: Unconfuse preclose logic
  drm/exynos: Remove event cancelling from postclose
  drm/atmel: Nuke preclose
  drm/i915: Nuke intel_modeset_preclose
  drm: Nuke vblank event file cleanup code
  drm: Clean up pending events in the core
  drm/vblank: Use drm_event_reserve_init
  drm/vmwgfx: fix a NULL dereference
  drm/crtc-helper: Add caveat to disable_unused_functions doc
  drm/gma500: Remove empty preclose hook
  ...
parents b039d6d0 13619ce5
Loading
Loading
Loading
Loading
+2 −46
Original line number Diff line number Diff line
@@ -2886,52 +2886,8 @@ void (*postclose) (struct drm_device *, struct drm_file *);</synopsis>
    </sect2>
    <sect2>
      <title>File Operations</title>
      <synopsis>const struct file_operations *fops</synopsis>
      <abstract>File operations for the DRM device node.</abstract>
      <para>
        Drivers must define the file operations structure that forms the DRM
	userspace API entry point, even though most of those operations are
	implemented in the DRM core. The <methodname>open</methodname>,
	<methodname>release</methodname> and <methodname>ioctl</methodname>
	operations are handled by
	<programlisting>
	.owner = THIS_MODULE,
	.open = drm_open,
	.release = drm_release,
	.unlocked_ioctl = drm_ioctl,
  #ifdef CONFIG_COMPAT
	.compat_ioctl = drm_compat_ioctl,
  #endif
        </programlisting>
      </para>
      <para>
        Drivers that implement private ioctls that requires 32/64bit
	compatibility support must provide their own
	<methodname>compat_ioctl</methodname> handler that processes private
	ioctls and calls <function>drm_compat_ioctl</function> for core ioctls.
      </para>
      <para>
        The <methodname>read</methodname> and <methodname>poll</methodname>
	operations provide support for reading DRM events and polling them. They
	are implemented by
	<programlisting>
	.poll = drm_poll,
	.read = drm_read,
	.llseek = no_llseek,
	</programlisting>
      </para>
      <para>
        The memory mapping implementation varies depending on how the driver
	manages memory. Pre-GEM drivers will use <function>drm_mmap</function>,
	while GEM-aware drivers will use <function>drm_gem_mmap</function>. See
	<xref linkend="drm-gem"/>.
	<programlisting>
	.mmap = drm_gem_mmap,
	</programlisting>
      </para>
      <para>
        No other file operation is supported by the DRM API.
      </para>
!Pdrivers/gpu/drm/drm_fops.c file operations
!Edrivers/gpu/drm/drm_fops.c
    </sect2>
    <sect2>
      <title>IOCTLs</title>
+0 −3
Original line number Diff line number Diff line
@@ -188,9 +188,6 @@ static const struct file_operations armada_drm_fops = {

static struct drm_driver armada_drm_driver = {
	.load			= armada_drm_load,
	.open			= NULL,
	.preclose		= NULL,
	.postclose		= NULL,
	.lastclose		= armada_drm_lastclose,
	.unload			= armada_drm_unload,
	.set_busid		= drm_platform_set_busid,
+0 −18
Original line number Diff line number Diff line
@@ -280,24 +280,6 @@ static void atmel_hlcdc_crtc_destroy(struct drm_crtc *c)
	kfree(crtc);
}

void atmel_hlcdc_crtc_cancel_page_flip(struct drm_crtc *c,
				       struct drm_file *file)
{
	struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c);
	struct drm_pending_vblank_event *event;
	struct drm_device *dev = c->dev;
	unsigned long flags;

	spin_lock_irqsave(&dev->event_lock, flags);
	event = crtc->event;
	if (event && event->base.file_priv == file) {
		event->base.destroy(&event->base);
		drm_vblank_put(dev, crtc->id);
		crtc->event = NULL;
	}
	spin_unlock_irqrestore(&dev->event_lock, flags);
}

static void atmel_hlcdc_crtc_finish_page_flip(struct atmel_hlcdc_crtc *crtc)
{
	struct drm_device *dev = crtc->base.dev;
+0 −10
Original line number Diff line number Diff line
@@ -619,15 +619,6 @@ static void atmel_hlcdc_dc_connector_unplug_all(struct drm_device *dev)
	mutex_unlock(&dev->mode_config.mutex);
}

static void atmel_hlcdc_dc_preclose(struct drm_device *dev,
				    struct drm_file *file)
{
	struct drm_crtc *crtc;

	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
		atmel_hlcdc_crtc_cancel_page_flip(crtc, file);
}

static void atmel_hlcdc_dc_lastclose(struct drm_device *dev)
{
	struct atmel_hlcdc_dc *dc = dev->dev_private;
@@ -698,7 +689,6 @@ static struct drm_driver atmel_hlcdc_dc_driver = {
	.driver_features = DRIVER_HAVE_IRQ | DRIVER_GEM |
			   DRIVER_MODESET | DRIVER_PRIME |
			   DRIVER_ATOMIC,
	.preclose = atmel_hlcdc_dc_preclose,
	.lastclose = atmel_hlcdc_dc_lastclose,
	.irq_handler = atmel_hlcdc_dc_irq_handler,
	.irq_preinstall = atmel_hlcdc_dc_irq_uninstall,
+0 −3
Original line number Diff line number Diff line
@@ -152,9 +152,6 @@ int atmel_hlcdc_plane_prepare_disc_area(struct drm_crtc_state *c_state);

void atmel_hlcdc_crtc_irq(struct drm_crtc *c);

void atmel_hlcdc_crtc_cancel_page_flip(struct drm_crtc *crtc,
				       struct drm_file *file);

void atmel_hlcdc_crtc_suspend(struct drm_crtc *crtc);
void atmel_hlcdc_crtc_resume(struct drm_crtc *crtc);

Loading