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

Commit 3154b133 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2017-08-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next

UAPI Changes:
- vc4: Allow userspace to dictate rendering order in submit_cl ioctl (Eric)

Cross-subsystem Changes:
- vboxvideo: One of Cihangir's patches applies to vboxvideo which is maintained
	     in staging

Core Changes:
- atomic_legacy_backoff is officially killed (Daniel)
- Extract drm_device.h (Daniel)
- Unregister drm device on unplug (Daniel)
- Rename deprecated drm_*_(un)?reference functions to drm_*_{get|put} (Cihangir)

Driver Changes:
- vc4: Error/destroy path cleanups, log level demotion, edid leak (Eric)
- various: Make various drm_*_funcs structs const (Bhumika)
- tinydrm: add support for LEGO MINDSTORMS EV3 LCD (David)
- various: Second half of .dumb_{map_offset|destroy} defaults set (Noralf)

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Eric Anholt <eric@anholt.net>
Cc: Bhumika Goyal <bhumirks@gmail.com>
Cc: Cihangir Akturk <cakturk@gmail.com>
Cc: David Lechner <david@lechnology.com>
Cc: Noralf Trønnes <noralf@tronnes.org>

* tag 'drm-misc-next-2017-08-16' of git://anongit.freedesktop.org/git/drm-misc: (50 commits)
  drm/gem-cma-helper: Remove drm_gem_cma_dumb_map_offset()
  drm/virtio: Use the drm_driver.dumb_destroy default
  drm/bochs: Use the drm_driver.dumb_destroy default
  drm/mgag200: Use the drm_driver.dumb_destroy default
  drm/exynos: Use .dumb_map_offset and .dumb_destroy defaults
  drm/msm: Use the drm_driver.dumb_destroy default
  drm/ast: Use the drm_driver.dumb_destroy default
  drm/qxl: Use the drm_driver.dumb_destroy default
  drm/udl: Use the drm_driver.dumb_destroy default
  drm/cirrus: Use the drm_driver.dumb_destroy default
  drm/tegra: Use .dumb_map_offset and .dumb_destroy defaults
  drm/gma500: Use .dumb_map_offset and .dumb_destroy defaults
  drm/mxsfb: Use .dumb_map_offset and .dumb_destroy defaults
  drm/meson: Use .dumb_map_offset and .dumb_destroy defaults
  drm/kirin: Use .dumb_map_offset and .dumb_destroy defaults
  drm/vc4: Continue the switch to drm_*_put() helpers
  drm/vc4: Fix leak of HDMI EDID
  dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly v2
  dma-buf: add reservation_object_copy_fences (v2)
  drm/tinydrm: add support for LEGO MINDSTORMS EV3 LCD
  ...
parents efa47935 d956e129
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
Sitronix ST7586 display panel

Required properties:
- compatible:	"lego,ev3-lcd".
- a0-gpios:	The A0 signal (since this binding is for serial mode, this is
                the pin labeled D1 on the controller, not the pin labeled A0)
- reset-gpios:	Reset pin

The node for this driver must be a child node of a SPI controller, hence
all mandatory properties described in ../spi/spi-bus.txt must be specified.

Optional properties:
- rotation:	panel rotation in degrees counter clockwise (0,90,180,270)

Example:
	display@0{
		compatible = "lego,ev3-lcd";
		reg = <0>;
		spi-max-frequency = <10000000>;
		a0-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>;
	};
+6 −0
Original line number Diff line number Diff line
@@ -4380,6 +4380,12 @@ S: Orphan / Obsolete
F:	drivers/gpu/drm/sis/
F:	include/uapi/drm/sis_drm.h

DRM DRIVER FOR SITRONIX ST7586 PANELS
M:	David Lechner <david@lechnology.com>
S:	Maintained
F:	drivers/gpu/drm/tinydrm/st7586.c
F:	Documentation/devicetree/bindings/display/st7586.txt

DRM DRIVER FOR TDFX VIDEO CARDS
S:	Orphan / Obsolete
F:	drivers/gpu/drm/tdfx/
+77 −22
Original line number Diff line number Diff line
@@ -195,7 +195,6 @@ reservation_object_add_shared_replace(struct reservation_object *obj,
	if (old)
		kfree_rcu(old, rcu);

	if (old_fence)
	dma_fence_put(old_fence);
}

@@ -258,11 +257,70 @@ void reservation_object_add_excl_fence(struct reservation_object *obj,
		dma_fence_put(rcu_dereference_protected(old->shared[i],
						reservation_object_held(obj)));

	if (old_fence)
	dma_fence_put(old_fence);
}
EXPORT_SYMBOL(reservation_object_add_excl_fence);

/**
* reservation_object_copy_fences - Copy all fences from src to dst.
* @dst: the destination reservation object
* @src: the source reservation object
*
* Copy all fences from src to dst. Both src->lock as well as dst-lock must be
* held.
*/
int reservation_object_copy_fences(struct reservation_object *dst,
				   struct reservation_object *src)
{
	struct reservation_object_list *src_list, *dst_list;
	struct dma_fence *old, *new;
	size_t size;
	unsigned i;

	src_list = reservation_object_get_list(src);

	if (src_list) {
		size = offsetof(typeof(*src_list),
				shared[src_list->shared_count]);
		dst_list = kmalloc(size, GFP_KERNEL);
		if (!dst_list)
			return -ENOMEM;

		dst_list->shared_count = src_list->shared_count;
		dst_list->shared_max = src_list->shared_count;
		for (i = 0; i < src_list->shared_count; ++i)
			dst_list->shared[i] =
				dma_fence_get(src_list->shared[i]);
	} else {
		dst_list = NULL;
	}

	kfree(dst->staged);
	dst->staged = NULL;

	src_list = reservation_object_get_list(dst);

	old = reservation_object_get_excl(dst);
	new = reservation_object_get_excl(src);

	dma_fence_get(new);

	preempt_disable();
	write_seqcount_begin(&dst->seq);
	/* write_seqcount_begin provides the necessary memory barrier */
	RCU_INIT_POINTER(dst->fence_excl, new);
	RCU_INIT_POINTER(dst->fence, dst_list);
	write_seqcount_end(&dst->seq);
	preempt_enable();

	if (src_list)
		kfree_rcu(src_list, rcu);
	dma_fence_put(old);

	return 0;
}
EXPORT_SYMBOL(reservation_object_copy_fences);

/**
 * reservation_object_get_fences_rcu - Get an object's shared and exclusive
 * fences without update side lock held
@@ -373,12 +431,25 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
	long ret = timeout ? timeout : 1;

retry:
	fence = NULL;
	shared_count = 0;
	seq = read_seqcount_begin(&obj->seq);
	rcu_read_lock();

	if (wait_all) {
	fence = rcu_dereference(obj->fence_excl);
	if (fence && !test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags)) {
		if (!dma_fence_get_rcu(fence))
			goto unlock_retry;

		if (dma_fence_is_signaled(fence)) {
			dma_fence_put(fence);
			fence = NULL;
		}

	} else {
		fence = NULL;
	}

	if (!fence && wait_all) {
		struct reservation_object_list *fobj =
						rcu_dereference(obj->fence);

@@ -405,22 +476,6 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
		}
	}

	if (!shared_count) {
		struct dma_fence *fence_excl = rcu_dereference(obj->fence_excl);

		if (fence_excl &&
		    !test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
			      &fence_excl->flags)) {
			if (!dma_fence_get_rcu(fence_excl))
				goto unlock_retry;

			if (dma_fence_is_signaled(fence_excl))
				dma_fence_put(fence_excl);
			else
				fence = fence_excl;
		}
	}

	rcu_read_unlock();
	if (fence) {
		if (read_seqcount_retry(&obj->seq, seq)) {
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static void arcpgu_fb_output_poll_changed(struct drm_device *dev)
	drm_fbdev_cma_hotplug_event(arcpgu->fbdev);
}

static struct drm_mode_config_funcs arcpgu_drm_modecfg_funcs = {
static const struct drm_mode_config_funcs arcpgu_drm_modecfg_funcs = {
	.fb_create  = drm_fb_cma_create,
	.output_poll_changed = arcpgu_fb_output_poll_changed,
	.atomic_check = drm_atomic_helper_check,
+0 −1
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ static struct drm_driver driver = {
	.gem_free_object_unlocked = ast_gem_free_object,
	.dumb_create = ast_dumb_create,
	.dumb_map_offset = ast_dumb_mmap_offset,
	.dumb_destroy = drm_gem_dumb_destroy,

};

Loading