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

Commit 3459f620 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes

Daniel writes:
"- some register magic to fix hsw crw (Paulo&Ben)
- fix backlight destruction for cpu edp (Jani)
- fix gen ch7xxx dvo ->get_hw_state
- fixup the plane->pipe fixup code, the broken version massively angers
  the modeset sanity checks
- kill pipe A quirk for i855gm, otherwise I get a black screen with the
  above patch
- fixup for gem_get_page helper (Chris)
- fixup guardband clipping w/a (Ken), without this mesa master can erronously
  drop vertices on snb, mesa 9.0 has the optimization reverted
- another pageflip vs. modeset fix
- kill bogus BUG_ON which broke ums+gem from Willy Tarreau (gasp, people
  are still using this!)"

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: fix non-DP-D eDP backlight cleanup and module reload
  drm/i915: HSW CRW stability magic
  drm/i915/dvo-ch7xxx: fix get_hw_state
  drm/i915: fixup the plane->pipe fixup code
  drm/i915: rip out the pipe A quirk for i855gm
  drm/i915: disable wc gtt pte mappings on gen2
  drm/i915: fixup i915_gem_object_get_page inline helper
  drm/i915: Disallow preallocation of requests
  drm/i915: Set guardband clipping workaround bit in the right register.
  drm/i915: paper over a pipe-enable vs pageflip race
  drm/i915: remove useless BUG_ON which caused a regression in 3.5.
parents ddffeb8c be3cd5e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ static int intel_gtt_init(void)
	gtt_map_size = intel_private.base.gtt_total_entries * 4;

	intel_private.gtt = NULL;
	if (INTEL_GTT_GEN < 6)
	if (INTEL_GTT_GEN < 6 && INTEL_GTT_GEN > 2)
		intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr,
					       gtt_map_size);
	if (intel_private.gtt == NULL)
+3 −3
Original line number Diff line number Diff line
@@ -303,10 +303,10 @@ static bool ch7xxx_get_hw_state(struct intel_dvo_device *dvo)

	ch7xxx_readb(dvo, CH7xxx_PM, &val);

	if (val & CH7xxx_PM_FPD)
		return false;
	else
	if (val & (CH7xxx_PM_DVIL | CH7xxx_PM_DVIP))
		return true;
	else
		return false;
}

static void ch7xxx_dump_regs(struct intel_dvo_device *dvo)
+7 −2
Original line number Diff line number Diff line
@@ -1341,9 +1341,14 @@ int __must_check i915_gem_object_get_pages(struct drm_i915_gem_object *obj);
static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n)
{
	struct scatterlist *sg = obj->pages->sgl;
	while (n >= SG_MAX_SINGLE_ALLOC) {
	int nents = obj->pages->nents;
	while (nents > SG_MAX_SINGLE_ALLOC) {
		if (n < SG_MAX_SINGLE_ALLOC - 1)
			break;

		sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1);
		n -= SG_MAX_SINGLE_ALLOC - 1;
		nents -= SG_MAX_SINGLE_ALLOC - 1;
	}
	return sg_page(sg+n);
}
@@ -1427,7 +1432,7 @@ int __must_check i915_gpu_idle(struct drm_device *dev);
int __must_check i915_gem_idle(struct drm_device *dev);
int i915_add_request(struct intel_ring_buffer *ring,
		     struct drm_file *file,
		     struct drm_i915_gem_request *request);
		     u32 *seqno);
int __must_check i915_wait_seqno(struct intel_ring_buffer *ring,
				 uint32_t seqno);
int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
+11 −8
Original line number Diff line number Diff line
@@ -1955,11 +1955,12 @@ i915_gem_next_request_seqno(struct intel_ring_buffer *ring)
int
i915_add_request(struct intel_ring_buffer *ring,
		 struct drm_file *file,
		 struct drm_i915_gem_request *request)
		 u32 *out_seqno)
{
	drm_i915_private_t *dev_priv = ring->dev->dev_private;
	uint32_t seqno;
	struct drm_i915_gem_request *request;
	u32 request_ring_position;
	u32 seqno;
	int was_empty;
	int ret;

@@ -1974,11 +1975,9 @@ i915_add_request(struct intel_ring_buffer *ring,
	if (ret)
		return ret;

	if (request == NULL) {
	request = kmalloc(sizeof(*request), GFP_KERNEL);
	if (request == NULL)
		return -ENOMEM;
	}

	seqno = i915_gem_next_request_seqno(ring);

@@ -2030,6 +2029,8 @@ i915_add_request(struct intel_ring_buffer *ring,
		}
	}

	if (out_seqno)
		*out_seqno = seqno;
	return 0;
}

@@ -3959,6 +3960,9 @@ i915_gem_init_hw(struct drm_device *dev)
	if (!intel_enable_gtt())
		return -EIO;

	if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1))
		I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000);

	i915_gem_l3_remap(dev);

	i915_gem_init_swizzling(dev);
@@ -4098,7 +4102,6 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data,
	}

	BUG_ON(!list_empty(&dev_priv->mm.active_list));
	BUG_ON(!list_empty(&dev_priv->mm.inactive_list));
	mutex_unlock(&dev->struct_mutex);

	ret = drm_irq_install(dev);
+1 −1
Original line number Diff line number Diff line
@@ -521,7 +521,7 @@
 */
# define _3D_CHICKEN2_WM_READ_PIPELINED			(1 << 14)
#define _3D_CHICKEN3	0x02090
#define  _3D_CHICKEN_SF_DISABLE_FASTCLIP_CULL		(1 << 5)
#define  _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL		(1 << 5)

#define MI_MODE		0x0209c
# define VS_TIMER_DISPATCH				(1 << 6)
Loading