Skip to contentSkip to conversation

drm-intel-collector - update

PATCH Applied Rodrigo Vivi 6 participants 18 messages Apr 15, 2015 – Apr 23, 2015

Subsystems (3)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

cover drm-intel-collector - update

This is another drm-intel-collector updated notice:
http://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=drm-intel-collector

Here goes the update list in order for better reviewers assignment:

Patch drm/i915: Remove pinned check from madvise_ioctl - Reviewer:
Patch drm/i915/vlv: check port in infoframe_enabled v2 - Reviewer:
Patch drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg - Reviewer:
Patch drm/i915: Remove unused head member in request struct - Reviewer:
Patch drm/i915: Remove unneeded check on execlist ringbuf alloc - Reviewer:
Patch drm/i915: Support for higher DSI clk - Reviewer:
Patch drm/i915: Changes required to enable DSI Video Mode on CHT - Reviewer:
Patch drm/i915: Remove duplicated intel_fbc_update calls. - Reviewer:
Patch drm/i915: Attach a PSR property on eDP - Reviewer:

2 rounds here:

	Feb 27 - Mar 13
	Mar 13 - Mar 27

Thanks,
Rodrigo.

Chris Wilson (1):
drm/i915: Remove pinned check from madvise_ioctl

Gaurav K Singh (2):
drm/i915: Support for higher DSI clk
drm/i915: Changes required to enable DSI Video Mode on CHT

Imre Deak (1):
drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg

Jesse Barnes (1):
drm/i915/vlv: check port in infoframe_enabled v2

Mika Kuoppala (2):
drm/i915: Remove unused head member in request struct drm/i915: Remove unneeded check on execlist ringbuf alloc

Rodrigo Vivi (2):
drm/i915: Remove duplicated intel_fbc_update calls. drm/i915: Attach a PSR property on eDP

 Documentation/DocBook/drm.tmpl       | 10 +++++++-
 drivers/gpu/drm/i915/i915_drv.c      |  4 +--
 drivers/gpu/drm/i915/i915_drv.h      |  4 +--
 drivers/gpu/drm/i915/i915_gem.c      |  9 -------
 drivers/gpu/drm/i915/intel_display.c | 12 ---------
 drivers/gpu/drm/i915/intel_dp.c      |  1 +
 drivers/gpu/drm/i915/intel_drv.h     |  2 +-
 drivers/gpu/drm/i915/intel_dsi_pll.c | 47 +++++++++++++++++++++++++++---------
 drivers/gpu/drm/i915/intel_hdmi.c    |  7 +++++-
 drivers/gpu/drm/i915/intel_lrc.c     | 29 ++++++++++------------
 drivers/gpu/drm/i915/intel_psr.c     | 47 ++++++++++++++++++++++++++++++++++++
 11 files changed, 115 insertions(+), 57 deletions(-)
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#1 lore raw

PATCH 1/9 drm/i915: Remove pinned check from madvise_ioctl

From: Chris Wilson <[email protected]>

We don't need to incur the overhead of checking whether the object is pinned prior to changing its madvise. If the object is pinned, the madvise will not take effect until it is unpinned and so we cannot free the pages being pointed at by hardware. Marking a pinned object with allocated pages as DONTNEED will not trigger any undue warnings. The check is therefore superfluous, and by removing it we can remove a linear walk over all the vma the object has.

---
 drivers/gpu/drm/i915/i915_gem.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +0 -6
index 9fbc355..de6717e 100644
@@ -4371,11 +4371,6 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data,
 		goto unlock;
 	}
 
-	if (i915_gem_obj_is_pinned(obj)) {
-		ret = -EINVAL;
-		goto out;
-	}
-
 	if (obj->pages &&
 	    obj->tiling_mode != I915_TILING_NONE &&
 	    dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES) {
@@ -4394,7 +4389,6 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data,
 
 	args->retained = obj->madv != __I915_MADV_PURGED;
 
-out:
 	drm_gem_object_unreference(&obj->base);
 unlock:
 	mutex_unlock(&dev->struct_mutex);
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#2 lore raw

PATCH 2/9 drm/i915/vlv: check port in infoframe_enabled v2

In reply to Rodrigo Vivi

From: Jesse Barnes <[email protected]>

Same as IBX and G4x, they all share the same genetic material.

v2: we all need a bit more port in our lives

---
 drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hdmi.c +6 -1
index 26222e6..0863f1e 100644
@@ -324,10 +324,15 @@ static bool vlv_infoframe_enabled(struct drm_encoder *encoder)
 	struct drm_device *dev = encoder->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
+	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
 	int reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
 	u32 val = I915_READ(reg);
+	u32 port = intel_dig_port->port;
 
-	return val & VIDEO_DIP_ENABLE;
+	if (port == (val & VIDEO_DIP_PORT_MASK))
+		return val & VIDEO_DIP_ENABLE;
+
+	return false;
 }
 
 static void hsw_write_infoframe(struct drm_encoder *encoder,
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 2/9] drm/i915/vlv: check port in infoframe_enabled v2

Quoted 9 lines · Rodrigo Vivi

From: Jesse Barnes <[email protected]>

Same as IBX and G4x, they all share the same genetic material.

v2: we all need a bit more port in our lives

Queued for -next, thanks for the patch.
-Daniel

Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_hdmi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hdmi.c +6 -1
index 26222e6..0863f1e 100644
@@ -324,10 +324,15 @@ static bool vlv_infoframe_enabled(struct drm_encoder *encoder)
 	struct drm_device *dev = encoder->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
+	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
 	int reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
 	u32 val = I915_READ(reg);
+	u32 port = intel_dig_port->port;
 
-	return val & VIDEO_DIP_ENABLE;
+	if (port == (val & VIDEO_DIP_PORT_MASK))
+		return val & VIDEO_DIP_ENABLE;
+
+	return false;
 }
 
 static void hsw_write_infoframe(struct drm_encoder *encoder,
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#4 lore raw

PATCH 3/9 drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg

In reply to Rodrigo Vivi

From: Imre Deak <[email protected]>

Due this typo we don't save/restore the GFX_MAX_REQ_COUNT register across suspend/resume, so fix this.

This was introduced in

commit ddeea5b0c36f3665446518c609be91f9336ef674

Author: Imre Deak <[email protected]>
Date:   Mon May 5 15:19:56 2014 +0300

drm/i915: vlv: add runtime PM support

I noticed this only by reading the code. To my knowledge it shouldn't cause any real problems at the moment, since the power well backing this register remains on across a runtime s/r. This may change once system-wide s0ix functionality is enabled in the kernel.

v2:
- resend after a missing git add -u :/

---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -2
index c3fdbb0..e179da6 100644
@@ -1051,7 +1051,7 @@ static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		s->lra_limits[i] = I915_READ(GEN7_LRA_LIMITS_BASE + i * 4);
 
 	s->media_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
-	s->gfx_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
+	s->gfx_max_req_count	= I915_READ(GEN7_GFX_MAX_REQ_COUNT);
 
 	s->render_hwsp		= I915_READ(RENDER_HWS_PGA_GEN7);
 	s->ecochk		= I915_READ(GAM_ECOCHK);
@@ -1133,7 +1133,7 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		I915_WRITE(GEN7_LRA_LIMITS_BASE + i * 4, s->lra_limits[i]);
 
 	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->media_max_req_count);
-	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->gfx_max_req_count);
+	I915_WRITE(GEN7_GFX_MAX_REQ_COUNT, s->gfx_max_req_count);
 
 	I915_WRITE(RENDER_HWS_PGA_GEN7,	s->render_hwsp);
 	I915_WRITE(GAM_ECOCHK,		s->ecochk);
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by Mika Kuoppala on v1 3/9
#5 lore raw

Re: [PATCH 3/9] drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg

Quoted 18 lines · Rodrigo Vivi

From: Imre Deak <[email protected]>

Due this typo we don't save/restore the GFX_MAX_REQ_COUNT register across suspend/resume, so fix this.

This was introduced in

commit ddeea5b0c36f3665446518c609be91f9336ef674

Author: Imre Deak <[email protected]>
Date:   Mon May 5 15:19:56 2014 +0300

drm/i915: vlv: add runtime PM support

I noticed this only by reading the code. To my knowledge it shouldn't cause any real problems at the moment, since the power well backing this register remains on across a runtime s/r. This may change once system-wide s0ix functionality is enabled in the kernel.

Quoted 6 lines

v2:
- resend after a missing git add -u :/

[ http://lists.freedesktop.org/archives/intel-gfx/2015-March/062336.html ]
Quoted 18 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -1
index c3fdbb0..e179da6 100644
@@ -1051,7 +1051,7 @@ static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		s->lra_limits[i] = I915_READ(GEN7_LRA_LIMITS_BASE + i * 4);
 
 	s->media_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
-	s->gfx_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
+	s->gfx_max_req_count	= I915_READ(GEN7_GFX_MAX_REQ_COUNT);
 
 	s->render_hwsp		= I915_READ(RENDER_HWS_PGA_GEN7);
 	s->ecochk		= I915_READ(GAM_ECOCHK);

drivers/gpu/drm/i915/i915_drv.c static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv) · line 1139

Quoted 8 lines
drivers/gpu/drm/i915/i915_drv.c +1 -1
@@ -1133,7 +1133,7 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		I915_WRITE(GEN7_LRA_LIMITS_BASE + i * 4, s->lra_limits[i]);
 
 	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->media_max_req_count);
-	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->gfx_max_req_count);
+	I915_WRITE(GEN7_GFX_MAX_REQ_COUNT, s->gfx_max_req_count);
 
 	I915_WRITE(RENDER_HWS_PGA_GEN7,	s->render_hwsp);
 	I915_WRITE(GAM_ECOCHK,		s->ecochk);

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

Re: [PATCH 3/9] drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg

Quoted 22 lines · Imre Deak
Quoted 21 lines · Rodrigo Vivi

From: Imre Deak <[email protected]>

Due this typo we don't save/restore the GFX_MAX_REQ_COUNT register across suspend/resume, so fix this.

This was introduced in

commit ddeea5b0c36f3665446518c609be91f9336ef674

Author: Imre Deak <[email protected]>
Date:   Mon May 5 15:19:56 2014 +0300

drm/i915: vlv: add runtime PM support

I noticed this only by reading the code. To my knowledge it shouldn't cause any real problems at the moment, since the power well backing this register remains on across a runtime s/r. This may change once system-wide s0ix functionality is enabled in the kernel.

v2:
- resend after a missing git add -u :/

Quoted 6 lines
Quoted 3 lines
[ http://lists.freedesktop.org/archives/intel-gfx/2015-March/062336.html ]

Cc: [email protected] I guess plus for Jani.
-Daniel

Quoted 29 lines
Quoted 27 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -2
index c3fdbb0..e179da6 100644
@@ -1051,7 +1051,7 @@ static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		s->lra_limits[i] = I915_READ(GEN7_LRA_LIMITS_BASE + i * 4);
 
 	s->media_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
-	s->gfx_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
+	s->gfx_max_req_count	= I915_READ(GEN7_GFX_MAX_REQ_COUNT);
 
 	s->render_hwsp		= I915_READ(RENDER_HWS_PGA_GEN7);
 	s->ecochk		= I915_READ(GAM_ECOCHK);
@@ -1133,7 +1133,7 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		I915_WRITE(GEN7_LRA_LIMITS_BASE + i * 4, s->lra_limits[i]);
 
 	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->media_max_req_count);
-	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->gfx_max_req_count);
+	I915_WRITE(GEN7_GFX_MAX_REQ_COUNT, s->gfx_max_req_count);
 
 	I915_WRITE(RENDER_HWS_PGA_GEN7,	s->render_hwsp);
 	I915_WRITE(GAM_ECOCHK,		s->ecochk);
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Applied
#7 lore raw

Re: [PATCH 3/9] drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg

Quoted 23 lines · Daniel Vetter
Quoted 22 lines · Imre Deak
Quoted 21 lines · Rodrigo Vivi

From: Imre Deak <[email protected]>

Due this typo we don't save/restore the GFX_MAX_REQ_COUNT register across suspend/resume, so fix this.

This was introduced in

commit ddeea5b0c36f3665446518c609be91f9336ef674

Author: Imre Deak <[email protected]>
Date:   Mon May 5 15:19:56 2014 +0300

drm/i915: vlv: add runtime PM support

I noticed this only by reading the code. To my knowledge it shouldn't cause any real problems at the moment, since the power well backing this register remains on across a runtime s/r. This may change once system-wide s0ix functionality is enabled in the kernel.

v2:
- resend after a missing git add -u :/

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
[ http://lists.freedesktop.org/archives/intel-gfx/2015-March/062336.html ]
Cc [email protected] I guess plus for Jani.

Pushed to drm-intel-next-fixes, thanks for the patch and review.

BR,
Jani.

Quoted 36 lines

-Daniel

Quoted 29 lines
Quoted 27 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +2 -2
index c3fdbb0..e179da6 100644
@@ -1051,7 +1051,7 @@ static void vlv_save_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		s->lra_limits[i] = I915_READ(GEN7_LRA_LIMITS_BASE + i * 4);
 
 	s->media_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
-	s->gfx_max_req_count	= I915_READ(GEN7_MEDIA_MAX_REQ_COUNT);
+	s->gfx_max_req_count	= I915_READ(GEN7_GFX_MAX_REQ_COUNT);
 
 	s->render_hwsp		= I915_READ(RENDER_HWS_PGA_GEN7);
 	s->ecochk		= I915_READ(GAM_ECOCHK);
@@ -1133,7 +1133,7 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *dev_priv)
 		I915_WRITE(GEN7_LRA_LIMITS_BASE + i * 4, s->lra_limits[i]);
 
 	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->media_max_req_count);
-	I915_WRITE(GEN7_MEDIA_MAX_REQ_COUNT, s->gfx_max_req_count);
+	I915_WRITE(GEN7_GFX_MAX_REQ_COUNT, s->gfx_max_req_count);
 
 	I915_WRITE(RENDER_HWS_PGA_GEN7,	s->render_hwsp);
 	I915_WRITE(GAM_ECOCHK,		s->ecochk);
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#8 lore raw

PATCH 4/9 drm/i915: Remove unused head member in request struct

In reply to Rodrigo Vivi

From: Mika Kuoppala <[email protected]>

commit 939fd762083f988be271da8c96398178daf9baf0

Author: Mika Kuoppala <[email protected]>
Date:   Thu Jan 30 19:04:44 2014 +0200

drm/i915: Get rid of acthd based guilty batch search

Failed to cleanup properly as it made the head obsolete.

---
 drivers/gpu/drm/i915/i915_drv.h | 3 ---
 drivers/gpu/drm/i915/i915_gem.c | 3 ---
 2 files changed, 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -3
index 822f259..1a5e976 100644
@@ -2050,9 +2050,6 @@ struct drm_i915_gem_request {
 	/** GEM sequence number associated with this request. */
 	uint32_t seqno;
 
-	/** Position in the ringbuffer of the start of the request */
-	u32 head;
-
 	/**
 	 * Position in the ringbuffer of the start of the postfix.
 	 * This is required to calculate the maximum available ringbuffer
drivers/gpu/drm/i915/i915_gem.c +0 -3
index de6717e..11dfd49 100644
@@ -2323,7 +2323,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = ring->dev->dev_private;
 	struct drm_i915_gem_request *request;
 	struct intel_ringbuffer *ringbuf;
-	u32 request_start;
 	int ret;
 
 	request = ring->outstanding_lazy_request;
@@ -2335,7 +2334,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
 	} else
 		ringbuf = ring->buffer;
 
-	request_start = intel_ring_get_tail(ringbuf);
 	/*
 	 * Emit any outstanding flushes - execbuf can fail to emit the flush
 	 * after having emitted the batchbuffer command. Hence we need to fix
@@ -2370,7 +2368,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
 			return ret;
 	}
 
-	request->head = request_start;
 	request->tail = intel_ring_get_tail(ringbuf);
 
 	/* Whilst this request exists, batch_obj will be on the
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer Reviewed-by on v1 4/9
#9 lore raw

Re: [PATCH 4/9] drm/i915: Remove unused head member in request struct

Quoted 52 lines · Rodrigo Vivi

From: Mika Kuoppala <[email protected]>

commit 939fd762083f988be271da8c96398178daf9baf0

Author: Mika Kuoppala <[email protected]>
Date:   Thu Jan 30 19:04:44 2014 +0200

drm/i915: Get rid of acthd based guilty batch search

Failed to cleanup properly as it made the head obsolete.

---
 drivers/gpu/drm/i915/i915_drv.h | 3 ---
 drivers/gpu/drm/i915/i915_gem.c | 3 ---
 2 files changed, 6 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -3
index 822f259..1a5e976 100644
@@ -2050,9 +2050,6 @@ struct drm_i915_gem_request {
 	/** GEM sequence number associated with this request. */
 	uint32_t seqno;
 
-	/** Position in the ringbuffer of the start of the request */
-	u32 head;
-
 	/**
 	 * Position in the ringbuffer of the start of the postfix.
 	 * This is required to calculate the maximum available ringbuffer
drivers/gpu/drm/i915/i915_gem.c +0 -2
index de6717e..11dfd49 100644
@@ -2323,7 +2323,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = ring->dev->dev_private;
 	struct drm_i915_gem_request *request;
 	struct intel_ringbuffer *ringbuf;
-	u32 request_start;
 	int ret;
 
 	request = ring->outstanding_lazy_request;
@@ -2335,7 +2334,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
 	} else
 		ringbuf = ring->buffer;
 
-	request_start = intel_ring_get_tail(ringbuf);
 	/*
 	 * Emit any outstanding flushes - execbuf can fail to emit the flush
 	 * after having emitted the batchbuffer command. Hence we need to fix

drivers/gpu/drm/i915/i915_gem.c int __i915_add_request(struct intel_engine_cs *ring, · line 2373

Quoted 7 lines
drivers/gpu/drm/i915/i915_gem.c +0 -1
@@ -2370,7 +2368,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
 			return ret;
 	}
 
-	request->head = request_start;
 	request->tail = intel_ring_get_tail(ringbuf);
 
 	/* Whilst this request exists, batch_obj will be on the

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

Re: [PATCH 4/9] drm/i915: Remove unused head member in request struct

Quoted 1 line · Rodrigo

Nak. Head isn't unused now.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#11 lore raw

PATCH 5/9 drm/i915: Remove unneeded check on execlist ringbuf alloc

In reply to Rodrigo Vivi

From: Mika Kuoppala <[email protected]>

We just allocated the intel_ringbuffer with kzalloc. There is no chance of the ringbuf->obj being other than NULL so remove the redudant check.

---
 drivers/gpu/drm/i915/intel_lrc.c | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +13 -16
index 4373754..dcfd975 100644
@@ -1879,25 +1879,22 @@ int intel_lr_context_deferred_create(struct intel_context *ctx,
 	ringbuf->last_retired_head = -1;
 	intel_ring_update_space(ringbuf);
 
-	if (ringbuf->obj == NULL) {
-		ret = intel_alloc_ringbuffer_obj(dev, ringbuf);
+	ret = intel_alloc_ringbuffer_obj(dev, ringbuf);
+	if (ret) {
+		DRM_DEBUG_DRIVER(
+			"Failed to allocate ringbuffer obj %s: %d\n",
+			ring->name, ret);
+		goto error_free_rbuf;
+	}
+
+	if (is_global_default_ctx) {
+		ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf);
 		if (ret) {
-			DRM_DEBUG_DRIVER(
-				"Failed to allocate ringbuffer obj %s: %d\n",
+			DRM_ERROR(
+				"Failed to pin and map ringbuffer %s: %d\n",
 				ring->name, ret);
-			goto error_free_rbuf;
+			goto error_destroy_rbuf;
 		}
-
-		if (is_global_default_ctx) {
-			ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf);
-			if (ret) {
-				DRM_ERROR(
-					"Failed to pin and map ringbuffer %s: %d\n",
-					ring->name, ret);
-				goto error_destroy_rbuf;
-			}
-		}
-
 	}
 
 	ret = populate_lr_context(ctx, ctx_obj, ring, ringbuf);
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer Reviewed-by on v1 5/9
#12 lore raw

Re: [PATCH 5/9] drm/i915: Remove unneeded check on execlist ringbuf alloc

Quoted 17 lines · Rodrigo Vivi

From: Mika Kuoppala <[email protected]>

We just allocated the intel_ringbuffer with kzalloc. There is no chance of the ringbuf->obj being other than NULL so remove the redudant check.

---
 drivers/gpu/drm/i915/intel_lrc.c | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +0 -0
index 4373754..dcfd975 100644

drivers/gpu/drm/i915/intel_lrc.c int intel_lr_context_deferred_create(struct intel_context *ctx, · line 1882

Quoted 4 lines
drivers/gpu/drm/i915/intel_lrc.c +0 -1
@@ -1879,25 +1879,22 @@ int intel_lr_context_deferred_create(struct intel_context *ctx,
 	ringbuf->last_retired_head = -1;
 	intel_ring_update_space(ringbuf);
 
-	if (ringbuf->obj == NULL) {

I was going to suggest a warn here at least...

drivers/gpu/drm/i915/intel_lrc.c int intel_lr_context_deferred_create(struct intel_context *ctx, · line 1886

Quoted 6 lines
drivers/gpu/drm/i915/intel_lrc.c +5 -1
-		ret = intel_alloc_ringbuffer_obj(dev, ringbuf);
+	ret = intel_alloc_ringbuffer_obj(dev, ringbuf);
+	if (ret) {
+		DRM_DEBUG_DRIVER(
+			"Failed to allocate ringbuffer obj %s: %d\n",
+			ring->name, ret);

but it will probably end op here so nevermind...

Quoted 18 lines
drivers/gpu/drm/i915/intel_lrc.c +8 -7
+		goto error_free_rbuf;
+	}
+
+	if (is_global_default_ctx) {
+		ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf);
 		if (ret) {
-			DRM_DEBUG_DRIVER(
-				"Failed to allocate ringbuffer obj %s: %d\n",
+			DRM_ERROR(
+				"Failed to pin and map ringbuffer %s: %d\n",
 				ring->name, ret);
-			goto error_free_rbuf;
+			goto error_destroy_rbuf;
 		}
-
-		if (is_global_default_ctx) {
-			ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf);
-			if (ret) {

drivers/gpu/drm/i915/intel_lrc.c int intel_lr_context_deferred_create(struct intel_context *ctx, · line 1900

Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +0 -7
-				DRM_ERROR(
-					"Failed to pin and map ringbuffer %s: %d\n",
-					ring->name, ret);
-				goto error_destroy_rbuf;
-			}
-		}
-
 	}
 
 	ret = populate_lr_context(ctx, ctx_obj, ring, ringbuf);

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#13 lore raw

PATCH 6/9 drm/i915: Support for higher DSI clk

In reply to Rodrigo Vivi

From: Gaurav K Singh <[email protected]>

For MIPI panels requiring higher DSI clk, values needs to be added in lfsr_converts table for getting the correct values of pll ctrl and dividor values which gets programmed in cck regs, otherwise DSI PLL does not get locked leading to no display on the MIPI panel.

---
 drivers/gpu/drm/i915/intel_dsi_pll.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_dsi_pll.c +2 -2
index 3622d0b..471336d 100644
@@ -46,8 +46,8 @@ struct dsi_mnp {
 static const u32 lfsr_converts[] = {
 	426, 469, 234, 373, 442, 221, 110, 311, 411,		/* 62 - 70 */
 	461, 486, 243, 377, 188, 350, 175, 343, 427, 213,	/* 71 - 80 */
-	106, 53, 282, 397, 354, 227, 113, 56, 284, 142,		/* 81 - 90 */
-	71, 35							/* 91 - 92 */
+	106, 53, 282, 397, 454, 227, 113, 56, 284, 142,		/* 81 - 90 */
+	71, 35, 273, 136, 324, 418, 465, 488, 500, 506		/* 91 - 100 */
 };
 
 #ifdef DSI_CLK_FROM_RR
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#14 lore raw

PATCH 7/9 drm/i915: Changes required to enable DSI Video Mode on CHT

In reply to Rodrigo Vivi

From: Gaurav K Singh <[email protected]>

On CHT, changes are required for calculating the correct m,n & p with minimal error +/- for the required DSI clock, so that the correct dividor & ctrl values are written in cck regs for DSI. This patch has been tested on CHT RVP with 1200 x 1920 panel.

---
 drivers/gpu/drm/i915/intel_dsi_pll.c | 43 +++++++++++++++++++++++++++---------
 1 file changed, 33 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_dsi_pll.c +33 -10
index 471336d..5e44c9b 100644
@@ -162,7 +162,8 @@ static u32 dsi_clk_from_pclk(u32 pclk, int pixel_format, int lane_count)
 
 #endif
 
-static int dsi_calc_mnp(u32 dsi_clk, struct dsi_mnp *dsi_mnp)
+static int dsi_calc_mnp(struct drm_i915_private *dev_priv,
+			u32 dsi_clk, struct dsi_mnp *dsi_mnp)
 {
 	u32 m, n, p;
 	u32 ref_clk;
@@ -173,6 +174,10 @@ static int dsi_calc_mnp(u32 dsi_clk, struct dsi_mnp *dsi_mnp)
 	u32 calc_m;
 	u32 calc_p;
 	u32 m_seed;
+	u32 m_start;
+	u32 m_limit;
+	u32 n_limit;
+	u32 p_limit;
 
 	/* dsi_clk is expected in KHZ */
 	if (dsi_clk < 300000 || dsi_clk > 1150000) {
@@ -180,18 +185,33 @@ static int dsi_calc_mnp(u32 dsi_clk, struct dsi_mnp *dsi_mnp)
 		return -ECHRNG;
 	}
 
-	ref_clk = 25000;
+	if (IS_CHERRYVIEW(dev_priv->dev)) {
+		ref_clk = 100000;
+		m_start = 70;
+		m_limit = 96;
+		n_limit = 4;
+		p_limit = 6;
+	} else if (IS_VALLEYVIEW(dev_priv->dev)) {
+		ref_clk = 25000;
+		m_start = 62;
+		m_limit = 92;
+		n_limit = 1;
+		p_limit = 6;
+	} else {
+		DRM_ERROR("Unsupported device\n");
+		return -ENODEV;
+	}
 	target_dsi_clk = dsi_clk;
 	error = 0xFFFFFFFF;
 	tmp_error = 0xFFFFFFFF;
 	calc_m = 0;
 	calc_p = 0;
 
-	for (m = 62; m <= 92; m++) {
-		for (p = 2; p <= 6; p++) {
+	for (m = m_start; m <= m_limit; m++) {
+		for (p = 2; p <= p_limit; p++) {
 			/* Find the optimal m and p divisors
 			   with minimal error +/- the required clock */
-			calc_dsi_clk = (m * ref_clk) / p;
+			calc_dsi_clk = (m * ref_clk) / (p * n_limit);
 			if (calc_dsi_clk == target_dsi_clk) {
 				calc_m = m;
 				calc_p = p;
@@ -212,11 +232,14 @@ static int dsi_calc_mnp(u32 dsi_clk, struct dsi_mnp *dsi_mnp)
 	}
 
 	m_seed = lfsr_converts[calc_m - 62];
-	n = 1;
+	n = n_limit;
 	dsi_mnp->dsi_pll_ctrl = 1 << (DSI_PLL_P1_POST_DIV_SHIFT + calc_p - 2);
-	dsi_mnp->dsi_pll_div = (n - 1) << DSI_PLL_N1_DIV_SHIFT |
-		m_seed << DSI_PLL_M1_DIV_SHIFT;
-
+	if (IS_CHERRYVIEW(dev_priv->dev))
+		dsi_mnp->dsi_pll_div = (n/2) << DSI_PLL_N1_DIV_SHIFT |
+				m_seed << DSI_PLL_M1_DIV_SHIFT;
+	else
+		dsi_mnp->dsi_pll_div = (n - 1) << DSI_PLL_N1_DIV_SHIFT |
+				m_seed << DSI_PLL_M1_DIV_SHIFT;
 	return 0;
 }
 
@@ -235,7 +258,7 @@ static void vlv_configure_dsi_pll(struct intel_encoder *encoder)
 	dsi_clk = dsi_clk_from_pclk(intel_dsi->pclk, intel_dsi->pixel_format,
 				    intel_dsi->lane_count);
 
-	ret = dsi_calc_mnp(dsi_clk, &dsi_mnp);
+	ret = dsi_calc_mnp(dev_priv, dsi_clk, &dsi_mnp);
 	if (ret) {
 		DRM_DEBUG_KMS("dsi_calc_mnp failed\n");
 		return;
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#15 lore raw

PATCH 8/9 drm/i915: Remove duplicated intel_fbc_update calls.

In reply to Rodrigo Vivi

With frontbuffer tracking taking care of fbc
we were duplicating fbc update call on these cases here.

---
 drivers/gpu/drm/i915/intel_display.c | 12 ------------
 drivers/gpu/drm/i915/intel_drv.h     |  1 -
 2 files changed, 13 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -12
index 7bfe2af..1de6fda 100644
@@ -4467,10 +4467,6 @@ static void intel_crtc_enable_planes(struct drm_crtc *crtc)
 
 	hsw_enable_ips(intel_crtc);
 
-	mutex_lock(&dev->struct_mutex);
-	intel_fbc_update(dev);
-	mutex_unlock(&dev->struct_mutex);
-
 	/*
 	 * FIXME: Once we grow proper nuclear flip support out of this we need
 	 * to compute the mask of flip planes precisely. For the time being
@@ -12620,8 +12616,6 @@ intel_check_primary_plane(struct drm_plane *plane,
 		intel_crtc->atomic.fb_bits |=
 			INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
 
-		intel_crtc->atomic.update_fbc = true;
-
 		if (intel_wm_need_update(plane, &state->base))
 			intel_crtc->atomic.update_wm = true;
 	}
@@ -12741,12 +12735,6 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc)
 
 	intel_frontbuffer_flip(dev, intel_crtc->atomic.fb_bits);
 
-	if (intel_crtc->atomic.update_fbc) {
-		mutex_lock(&dev->struct_mutex);
-		intel_fbc_update(dev);
-		mutex_unlock(&dev->struct_mutex);
-	}
-
 	if (intel_crtc->atomic.post_enable_primary)
 		intel_post_enable_primary(crtc);
 
drivers/gpu/drm/i915/intel_drv.h +0 -1
index efa53d5..6e34978 100644
@@ -434,7 +434,6 @@ struct intel_crtc_atomic_commit {
 	/* Sleepable operations to perform after commit */
 	unsigned fb_bits;
 	bool wait_vblank;
-	bool update_fbc;
 	bool post_enable_primary;
 	unsigned update_sprite_watermarks;
 };
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
author maintainer
#16 lore raw

PATCH 9/9 drm/i915: Attach a PSR property on eDP

In reply to Rodrigo Vivi

Let userspace know the status of Panel Self-Refresh by virtue of a property on the appropriate connector.

v2: Only attach the property if the driver is capable of PSR.
v3: Add docbook courtesy of Damien.
v4: Mark the initial value as 'unsupported' - it will be determined
correctly when we later read the DCPD from the panel.
v5: Done by Rodrigo:
- Add disabled state to match all cases
- Attach it anyway to eDP since it is started as unsupported
- Change prop name to PSR
- Add enum to make states more clear
- Rebased on intel_psr.c changing func name and fixing states
v6: Done by Rodrigo:
- Revert name to Panel Self-Refresh
- Only report Enable/Disable since Active/Exit change so rapidily triggering many uevents as Chris pointed out.

---
 Documentation/DocBook/drm.tmpl   | 10 ++++++++-
 drivers/gpu/drm/i915/i915_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_dp.c  |  1 +
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 drivers/gpu/drm/i915/intel_psr.c | 47 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+), 1 deletion(-)
Documentation/DocBook/drm.tmpl +9 -1
index f4976cd..bda3948 100644
@@ -2834,7 +2834,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="22" valign="top" >i915</td>
 	<td rowspan="2" valign="top" >Generic</td>
 	<td valign="top" >"Broadcast RGB"</td>
 	<td valign="top" >ENUM</td>
@@ -2986,6 +2986,14 @@ void intel_crt_init(struct drm_device *dev)
 	<td valign="top" >TBD</td>
 	</tr>
 	<tr>
+	<td valign="top" >eDP</td>
+	<td valign="top" >“Panel Self-Refresh”</td>
+	<td valign="top" >ENUM | IMMUTABLE</td>
+	<td valign="top" >{ "Unsupported", "Idle", "Active" }</td>
+	<td valign="top" >Connector</td>
+	<td valign="top" >Whether the eDP panel supports using self-refresh, which is a power saving mode for static displays as the panel is able to read from its own buffer rather than require the host to send the same frame on every vertical refresh, and whether it is idle or active</td>
+	</tr>
+	<tr>
 	<td rowspan="2" valign="top" >CDV gma-500</td>
 	<td rowspan="2" valign="top" >Generic</td>
 	<td valign="top" >"Broadcast RGB"</td>
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 1a5e976..48e35a8 100644
@@ -884,6 +884,7 @@ struct i915_psr {
 	bool link_standby;
 	bool psr2_support;
 	bool aux_frame_sync;
+	struct drm_property *property;
 };
 
 enum intel_pch {
drivers/gpu/drm/i915/intel_dp.c +1 -0
index 1b87969..325805d 100644
@@ -4788,6 +4788,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
 	intel_dp->color_range_auto = true;
 
 	if (is_edp(intel_dp)) {
+		intel_attach_psr_property(connector);
 		drm_mode_create_scaling_mode_property(connector->dev);
 		drm_object_attach_property(
 			&connector->base,
drivers/gpu/drm/i915/intel_drv.h +1 -0
index 6e34978..f6297d4 100644
@@ -1206,6 +1206,7 @@ void intel_backlight_unregister(struct drm_device *dev);
 
 
 /* intel_psr.c */
+void intel_attach_psr_property(struct drm_connector *connector);
 void intel_psr_enable(struct intel_dp *intel_dp);
 void intel_psr_disable(struct intel_dp *intel_dp);
 void intel_psr_invalidate(struct drm_device *dev,
drivers/gpu/drm/i915/intel_psr.c +47 -0

65 lines not on this page · raw message

Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 9/9
#17 lore raw

Re: [PATCH 9/9] drm/i915: Attach a PSR property on eDP

Task id: 6209 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  276/276              276/276
ILK                                  302/302              302/302
SNB                                  318/318              318/318
IVB                                  341/341              341/341
BYT                 -2              287/287              285/287
HSW                 -1              395/395              394/395
BDW                 -1              318/318              317/318

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
BYT igt@kms_setmode@clone-exclusive-crtc DMESG_WARN(1)PASS(2) DMESG_WARN(2)
(dmesg patch applied)drm:check_crtc_state[i915]]*ERROR*mismatch_in_has_infoframe(expected#,found#)@mismatch in has_infoframe .* found WARNING:at_drivers/gpu/drm/i915/intel_display.c:#check_crtc_state[i915]()@WARNING:.* at .* check_crtc_state+0x
BYT igt@kms_setmode@clone-single-crtc DMESG_WARN(1)PASS(2) DMESG_WARN(2)
(dmesg patch applied)drm:check_crtc_state[i915]]*ERROR*mismatch_in_has_infoframe(expected#,found#)@mismatch in has_infoframe .* found WARNING:at_drivers/gpu/drm/i915/intel_display.c:#check_crtc_state[i915]()@WARNING:.* at .* check_crtc_state+0x
*HSW igt@gem_caching@writes PASS(2) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:i915_hangcheck_elapsed[i915]]*ERROR*Hangcheck_timer_elapsed...blitter_ring_idle@Hangcheck timer elapsed... blitter ring idle
*BDW igt@gem_userptr_blits@forked-sync-multifd-mempressure-normal PASS(2) TIMEOUT(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx