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

Commit b7ddeee5 authored by Dave Airlie's avatar Dave Airlie
Browse files

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

One more drm-misc pull for 4.2. The important one is the fix from Laurent
for Daniel Stone's mode_blob work.

* tag 'topic/drm-misc-2015-06-22' of git://anongit.freedesktop.org/drm-intel:
  drm/atomic: Don't set crtc_state->enable manually
  drm: prime: Document gem_prime_mmap
  drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range()
  drm/atomic: Extract needs_modeset function
  drm/cma: Fix 64-bit size_t build warnings
  Documentation/drm: Update rotation property
parents 26093813 c30f55a7
Loading
Loading
Loading
Loading
+18 −23
Original line number Diff line number Diff line
@@ -2585,7 +2585,22 @@ void intel_crt_init(struct drm_device *dev)
	<td valign="top" >Description/Restrictions</td>
	</tr>
	<tr>
	<td rowspan="36" valign="top" >DRM</td>
	<td rowspan="37" valign="top" >DRM</td>
	<td valign="top" >Generic</td>
	<td valign="top" >“rotation”</td>
	<td valign="top" >BITMASK</td>
	<td valign="top" >{ 0, "rotate-0" },
	{ 1, "rotate-90" },
	{ 2, "rotate-180" },
	{ 3, "rotate-270" },
	{ 4, "reflect-x" },
	{ 5, "reflect-y" }</td>
	<td valign="top" >CRTC, Plane</td>
	<td valign="top" >rotate-(degrees) rotates the image by the specified amount in degrees
	in counter clockwise direction. reflect-x and reflect-y reflects the
	image along the specified axis prior to rotation</td>
	</tr>
	<tr>
	<td rowspan="5" valign="top" >Connector</td>
	<td valign="top" >“EDID”</td>
	<td valign="top" >BLOB | IMMUTABLE</td>
@@ -2846,7 +2861,7 @@ void intel_crt_init(struct drm_device *dev)
	<td valign="top" >TBD</td>
	</tr>
	<tr>
	<td rowspan="21" valign="top" >i915</td>
	<td rowspan="20" valign="top" >i915</td>
	<td rowspan="2" valign="top" >Generic</td>
	<td valign="top" >"Broadcast RGB"</td>
	<td valign="top" >ENUM</td>
@@ -2862,14 +2877,6 @@ void intel_crt_init(struct drm_device *dev)
	<td valign="top" >TBD</td>
	</tr>
	<tr>
	<td rowspan="1" valign="top" >Plane</td>
	<td valign="top" >“rotation”</td>
	<td valign="top" >BITMASK</td>
	<td valign="top" >{ 0, "rotate-0" }, { 2, "rotate-180" }</td>
	<td valign="top" >Plane</td>
	<td valign="top" >TBD</td>
	</tr>
	<tr>
	<td rowspan="17" valign="top" >SDVO-TV</td>
	<td valign="top" >“mode”</td>
	<td valign="top" >ENUM</td>
@@ -3377,19 +3384,7 @@ void intel_crt_init(struct drm_device *dev)
	</tr>
	<tr>
	<td rowspan="2" valign="top" >omap</td>
	<td rowspan="2" valign="top" >Generic</td>
	<td valign="top" >“rotation”</td>
	<td valign="top" >BITMASK</td>
	<td valign="top" >{ 0, "rotate-0" },
	{ 1, "rotate-90" },
	{ 2, "rotate-180" },
	{ 3, "rotate-270" },
	{ 4, "reflect-x" },
	{ 5, "reflect-y" }</td>
	<td valign="top" >CRTC, Plane</td>
	<td valign="top" >TBD</td>
	</tr>
	<tr>
	<td valign="top" >Generic</td>
	<td valign="top" >“zorder”</td>
	<td valign="top" >RANGE</td>
	<td valign="top" >Min=0, Max=3</td>
+1 −2
Original line number Diff line number Diff line
@@ -1216,8 +1216,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)

	if (!state->allow_modeset) {
		for_each_crtc_in_state(state, crtc, crtc_state, i) {
			if (crtc_state->mode_changed ||
			    crtc_state->active_changed) {
			if (drm_atomic_crtc_needs_modeset(crtc_state)) {
				DRM_DEBUG_ATOMIC("[CRTC:%d] requires full modeset\n",
						 crtc->base.id);
				return -EINVAL;
+12 −14
Original line number Diff line number Diff line
@@ -331,12 +331,6 @@ mode_fixup(struct drm_atomic_state *state)
	return 0;
}

static bool
needs_modeset(struct drm_crtc_state *state)
{
	return state->mode_changed || state->active_changed;
}

/**
 * drm_atomic_helper_check_modeset - validate state object for modeset changes
 * @dev: DRM device
@@ -414,7 +408,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
			crtc_state->active_changed = true;
		}

		if (!needs_modeset(crtc_state))
		if (!drm_atomic_crtc_needs_modeset(crtc_state))
			continue;

		DRM_DEBUG_ATOMIC("[CRTC:%d] needs all connectors, enable: %c, active: %c\n",
@@ -564,7 +558,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
		old_crtc_state = old_state->crtc_states[drm_crtc_index(old_conn_state->crtc)];

		if (!old_crtc_state->active ||
		    !needs_modeset(old_conn_state->crtc->state))
		    !drm_atomic_crtc_needs_modeset(old_conn_state->crtc->state))
			continue;

		encoder = old_conn_state->best_encoder;
@@ -601,7 +595,7 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
		const struct drm_crtc_helper_funcs *funcs;

		/* Shut down everything that needs a full modeset. */
		if (!needs_modeset(crtc->state))
		if (!drm_atomic_crtc_needs_modeset(crtc->state))
			continue;

		if (!old_crtc_state->active)
@@ -792,7 +786,7 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
		const struct drm_crtc_helper_funcs *funcs;

		/* Need to filter out CRTCs where only planes change. */
		if (!needs_modeset(crtc->state))
		if (!drm_atomic_crtc_needs_modeset(crtc->state))
			continue;

		if (!crtc->state->active)
@@ -819,7 +813,7 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
			continue;

		if (!connector->state->crtc->state->active ||
		    !needs_modeset(connector->state->crtc->state))
		    !drm_atomic_crtc_needs_modeset(connector->state->crtc->state))
			continue;

		encoder = connector->state->best_encoder;
@@ -1561,11 +1555,15 @@ static int update_output_state(struct drm_atomic_state *state,
		if (crtc == set->crtc)
			continue;

		crtc_state->enable =
			drm_atomic_connectors_for_crtc(state, crtc);
		if (!crtc_state->enable)
		if (!drm_atomic_connectors_for_crtc(state, crtc)) {
			ret = drm_atomic_set_mode_prop_for_crtc(crtc_state,
								NULL);
			if (ret < 0)
				return ret;

			crtc_state->active = false;
		}
	}

	return 0;
}
+3 −2
Original line number Diff line number Diff line
@@ -130,11 +130,12 @@ drm_clflush_virt_range(void *addr, unsigned long length)
{
#if defined(CONFIG_X86)
	if (cpu_has_clflush) {
		const int size = boot_cpu_data.x86_clflush_size;
		void *end = addr + length;
		addr = (void *)(((unsigned long)addr) & -size);
		mb();
		for (; addr < end; addr += boot_cpu_data.x86_clflush_size)
		for (; addr < end; addr += size)
			clflushopt(addr);
		clflushopt(end - 1);
		mb();
		return;
	}
+2 −2
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
	cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size,
			&cma_obj->paddr, GFP_KERNEL | __GFP_NOWARN);
	if (!cma_obj->vaddr) {
		dev_err(drm->dev, "failed to allocate buffer with size %d\n",
		dev_err(drm->dev, "failed to allocate buffer with size %zu\n",
			size);
		ret = -ENOMEM;
		goto error;
@@ -388,7 +388,7 @@ void drm_gem_cma_describe(struct drm_gem_cma_object *cma_obj,

	off = drm_vma_node_start(&obj->vma_node);

	seq_printf(m, "%2d (%2d) %08llx %pad %p %d",
	seq_printf(m, "%2d (%2d) %08llx %pad %p %zu",
			obj->name, obj->refcount.refcount.counter,
			off, &cma_obj->paddr, cma_obj->vaddr, obj->size);

Loading