intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915: Add wait_for_us
@ 2016-02-01 16:27 Tvrtko Ursulin
  2016-02-01 16:27 ` [PATCH 2/6] drm/i915: Do not wait atomically for display clocks Tvrtko Ursulin
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-01 16:27 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

This is for callers who want micro-second precision but are not
waiting from the atomic context.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c  | 3 +--
 drivers/gpu/drm/i915/intel_drv.h | 9 +++++----
 drivers/gpu/drm/i915/intel_psr.c | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e2bea710614f..fb8a76ec6ade 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1788,11 +1788,10 @@ static void wait_panel_status(struct intel_dp *intel_dp,
 			I915_READ(pp_stat_reg),
 			I915_READ(pp_ctrl_reg));
 
-	if (_wait_for((I915_READ(pp_stat_reg) & mask) == value, 5000, 10)) {
+	if (_wait_for((I915_READ(pp_stat_reg) & mask) == value, 5000000, 10000))
 		DRM_ERROR("Panel status timeout: status %08x control %08x\n",
 				I915_READ(pp_stat_reg),
 				I915_READ(pp_ctrl_reg));
-	}
 
 	DRM_DEBUG_KMS("Wait complete\n");
 }
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f620023ed134..779d17a9fcce 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -45,8 +45,8 @@
  * having timed out, since the timeout could be due to preemption or similar and
  * we've never had a chance to check the condition before the timeout.
  */
-#define _wait_for(COND, MS, W) ({ \
-	unsigned long timeout__ = jiffies + msecs_to_jiffies(MS) + 1;	\
+#define _wait_for(COND, US, W) ({ \
+	unsigned long timeout__ = jiffies + usecs_to_jiffies(US) + 1;	\
 	int ret__ = 0;							\
 	while (!(COND)) {						\
 		if (time_after(jiffies, timeout__)) {			\
@@ -55,7 +55,7 @@
 			break;						\
 		}							\
 		if ((W) && drm_can_sleep()) {				\
-			usleep_range((W)*1000, (W)*2000);		\
+			usleep_range((W), (W)*2);			\
 		} else {						\
 			cpu_relax();					\
 		}							\
@@ -63,7 +63,8 @@
 	ret__;								\
 })
 
-#define wait_for(COND, MS) _wait_for(COND, MS, 1)
+#define wait_for(COND, MS) _wait_for(COND, (MS) * 1000, 1000)
+#define wait_for_us(COND, US) _wait_for(COND, US, 1)
 #define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0)
 #define wait_for_atomic_us(COND, US) _wait_for((COND), \
 					       DIV_ROUND_UP((US), 1000), 0)
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 9ccff3011523..e12377963839 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -492,7 +492,7 @@ static void hsw_psr_disable(struct intel_dp *intel_dp)
 
 		/* Wait till PSR is idle */
 		if (_wait_for((I915_READ(EDP_PSR_STATUS_CTL) &
-			       EDP_PSR_STATUS_STATE_MASK) == 0, 2000, 10))
+			       EDP_PSR_STATUS_STATE_MASK) == 0, 2000000, 10000))
 			DRM_ERROR("Timed out waiting for PSR Idle State\n");
 
 		dev_priv->psr.active = false;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/6] drm/i915: Do not wait atomically for display clocks
  2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
@ 2016-02-01 16:27 ` Tvrtko Ursulin
  2016-02-01 16:58   ` Ville Syrjälä
  2016-02-01 16:27 ` [PATCH 3/6] drm/i915/guc: Do not wait for firmware load atomically Tvrtko Ursulin
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-01 16:27 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Looks like this code does not need to wait atomically since it
otherwise takes the mutex. But did it rely on on the requested
1us wait actually being up to 1ms?

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 304fc9637026..a7530cf612d7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9753,8 +9753,8 @@ static void broadwell_set_cdclk(struct drm_device *dev, int cdclk)
 	val |= LCPLL_CD_SOURCE_FCLK;
 	I915_WRITE(LCPLL_CTL, val);
 
-	if (wait_for_atomic_us(I915_READ(LCPLL_CTL) &
-			       LCPLL_CD_SOURCE_FCLK_DONE, 1))
+	if (wait_for_us(I915_READ(LCPLL_CTL) &
+			LCPLL_CD_SOURCE_FCLK_DONE, 1))
 		DRM_ERROR("Switching to FCLK failed\n");
 
 	val = I915_READ(LCPLL_CTL);
@@ -9788,8 +9788,8 @@ static void broadwell_set_cdclk(struct drm_device *dev, int cdclk)
 	val &= ~LCPLL_CD_SOURCE_FCLK;
 	I915_WRITE(LCPLL_CTL, val);
 
-	if (wait_for_atomic_us((I915_READ(LCPLL_CTL) &
-				LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1))
+	if (wait_for_us((I915_READ(LCPLL_CTL) &
+			LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1))
 		DRM_ERROR("Switching back to LCPLL failed\n");
 
 	mutex_lock(&dev_priv->rps.hw_lock);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/6] drm/i915/guc: Do not wait for firmware load atomically
  2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
  2016-02-01 16:27 ` [PATCH 2/6] drm/i915: Do not wait atomically for display clocks Tvrtko Ursulin
@ 2016-02-01 16:27 ` Tvrtko Ursulin
  2016-02-01 16:27 ` [PATCH 4/6] drm/i915/lrc: Do not wait atomically when stopping engines Tvrtko Ursulin
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-01 16:27 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

It does not look like this code needs to wait atomically?

Higher in the call chain it calls the GEM API and I do
not see that the section is under any spin locks or such.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Alex Dai <yu.dai@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 3accd914490f..82a3c03fbc0e 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -199,7 +199,7 @@ static void set_guc_init_params(struct drm_i915_private *dev_priv)
  * the value matches either of two values representing completion
  * of the GuC boot process.
  *
- * This is used for polling the GuC status in a wait_for_atomic()
+ * This is used for polling the GuC status in a wait_for()
  * loop below.
  */
 static inline bool guc_ucode_response(struct drm_i915_private *dev_priv,
@@ -259,14 +259,14 @@ static int guc_ucode_xfer_dma(struct drm_i915_private *dev_priv)
 	I915_WRITE(DMA_CTRL, _MASKED_BIT_ENABLE(UOS_MOVE | START_DMA));
 
 	/*
-	 * Spin-wait for the DMA to complete & the GuC to start up.
+	 * Wait for the DMA to complete & the GuC to start up.
 	 * NB: Docs recommend not using the interrupt for completion.
 	 * Measurements indicate this should take no more than 20ms, so a
 	 * timeout here indicates that the GuC has failed and is unusable.
 	 * (Higher levels of the driver will attempt to fall back to
 	 * execlist mode if this happens.)
 	 */
-	ret = wait_for_atomic(guc_ucode_response(dev_priv, &status), 100);
+	ret = wait_for(guc_ucode_response(dev_priv, &status), 100);
 
 	DRM_DEBUG_DRIVER("DMA status 0x%x, GuC status 0x%x\n",
 			I915_READ(DMA_CTRL), status);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/6] drm/i915/lrc: Do not wait atomically when stopping engines
  2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
  2016-02-01 16:27 ` [PATCH 2/6] drm/i915: Do not wait atomically for display clocks Tvrtko Ursulin
  2016-02-01 16:27 ` [PATCH 3/6] drm/i915/guc: Do not wait for firmware load atomically Tvrtko Ursulin
@ 2016-02-01 16:27 ` Tvrtko Ursulin
  2016-02-01 16:27 ` [PATCH 5/6] drm/i915: Kconfig for extra driver debugging Tvrtko Ursulin
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-01 16:27 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

I do not see that this needs to be done atomically and up to
one second is quite a long time to busy loop.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 3a03646e343d..3ca7f48a418b 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1049,7 +1049,7 @@ void intel_logical_ring_stop(struct intel_engine_cs *ring)
 
 	/* TODO: Is this correct with Execlists enabled? */
 	I915_WRITE_MODE(ring, _MASKED_BIT_ENABLE(STOP_RING));
-	if (wait_for_atomic((I915_READ_MODE(ring) & MODE_IDLE) != 0, 1000)) {
+	if (wait_for((I915_READ_MODE(ring) & MODE_IDLE) != 0, 1000)) {
 		DRM_ERROR("%s :timed out trying to stop ring\n", ring->name);
 		return;
 	}
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/6] drm/i915: Kconfig for extra driver debugging
  2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
                   ` (2 preceding siblings ...)
  2016-02-01 16:27 ` [PATCH 4/6] drm/i915/lrc: Do not wait atomically when stopping engines Tvrtko Ursulin
@ 2016-02-01 16:27 ` Tvrtko Ursulin
  2016-02-02  9:18   ` Jani Nikula
  2016-02-01 16:27 ` [PATCH 6/6] drm/i915: Do not lie about atomic wait granularity Tvrtko Ursulin
  2016-02-01 16:45 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Add wait_for_us Patchwork
  5 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-01 16:27 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/Kconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 051eab33e4c7..7636bf918d97 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -47,3 +47,15 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
 	  option changes the default for that module option.
 
 	  If in doubt, say "N".
+
+config DRM_I915_DEBUG
+	bool "Enable additional driver debugging"
+	depends on DRM_I915
+	default n
+	help
+	  Choose this option to turn on extra driver debugging that may affect
+	  performance but will catch some internal issues.
+
+	  Recommended for driver developers only.
+
+	  If in doubt, say "N".
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/6] drm/i915: Do not lie about atomic wait granularity
  2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
                   ` (3 preceding siblings ...)
  2016-02-01 16:27 ` [PATCH 5/6] drm/i915: Kconfig for extra driver debugging Tvrtko Ursulin
@ 2016-02-01 16:27 ` Tvrtko Ursulin
  2016-02-01 16:45 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Add wait_for_us Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-01 16:27 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Currently the wait_for_atomic_us only allows for a millisecond
granularity which is not nice towards callers requesting small
micro-second waits.

Re-implement it so micro-second granularity is really supported
and not just in the name of the macro.

v2:
  * Warn when used from non-atomic context (if possible).
  * Warn on too long atomic waits.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_drv.h | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 779d17a9fcce..af6c1539106f 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -63,11 +63,32 @@
 	ret__;								\
 })
 
+#if defined(CONFIG_DRM_I915_DEBUG) && defined(CONFIG_PREEMPT_COUNT)
+  #define _WAIT_FOR_ATOMIC_CHECK WARN_ON_ONCE(!in_atomic())
+#else
+  #define _WAIT_FOR_ATOMIC_CHECK do { } while(0)
+#endif
+
+#define _wait_for_atomic(COND, US) ({ \
+	unsigned long end__; \
+	int ret__ = 0; \
+	_WAIT_FOR_ATOMIC_CHECK; \
+	BUILD_BUG_ON((US) > 50000); \
+	end__ = (local_clock() >> 10) + (US) + 1; \
+	while (!(COND)) { \
+		if (time_after((unsigned long)(local_clock() >> 10), end__)) { \
+			ret__ = -ETIMEDOUT; \
+			break; \
+		} \
+		cpu_relax(); \
+	} \
+	ret__; \
+})
+
 #define wait_for(COND, MS) _wait_for(COND, (MS) * 1000, 1000)
 #define wait_for_us(COND, US) _wait_for(COND, US, 1)
-#define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0)
-#define wait_for_atomic_us(COND, US) _wait_for((COND), \
-					       DIV_ROUND_UP((US), 1000), 0)
+#define wait_for_atomic(COND, MS) _wait_for_atomic(COND, (MS) * 1000)
+#define wait_for_atomic_us(COND, US) _wait_for_atomic((COND), (US))
 
 #define KHz(x) (1000 * (x))
 #define MHz(x) KHz(1000 * (x))
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Add wait_for_us
  2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
                   ` (4 preceding siblings ...)
  2016-02-01 16:27 ` [PATCH 6/6] drm/i915: Do not lie about atomic wait granularity Tvrtko Ursulin
@ 2016-02-01 16:45 ` Patchwork
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2016-02-01 16:45 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== Summary ==

Series 2990v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/2990/revisions/1/mbox/

Test kms_force_connector_basic:
        Subgroup force-edid:
                pass       -> SKIP       (snb-dellxps)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                incomplete -> PASS       (hsw-gt2)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)

bdw-nuci7        total:156  pass:147  dwarn:0   dfail:0   fail:0   skip:9  
bdw-ultra        total:159  pass:147  dwarn:0   dfail:0   fail:0   skip:12 
bsw-nuc-2        total:159  pass:129  dwarn:0   dfail:0   fail:0   skip:30 
byt-nuc          total:159  pass:136  dwarn:0   dfail:0   fail:0   skip:23 
hsw-brixbox      total:159  pass:146  dwarn:0   dfail:0   fail:0   skip:13 
hsw-gt2          total:159  pass:149  dwarn:0   dfail:0   fail:0   skip:10 
ilk-hp8440p      total:159  pass:111  dwarn:0   dfail:0   fail:0   skip:48 
ivb-t430s        total:159  pass:145  dwarn:0   dfail:0   fail:0   skip:14 
skl-i5k-2        total:159  pass:144  dwarn:1   dfail:0   fail:0   skip:14 
snb-dellxps      total:159  pass:136  dwarn:0   dfail:0   fail:0   skip:23 

Results at /archive/results/CI_IGT_test/Patchwork_1338/

6b1049b84dcd979f631d15b2ada325d8e5b2c4e1 drm-intel-nightly: 2016y-01m-29d-22h-50m-57s UTC integration manifest
c43605cbd64f5215a1b798aff7c461948d441d41 drm/i915: Do not lie about atomic wait granularity
852c8518cbcdf79c1d8da52674aee2f5fe83ef15 drm/i915: Kconfig for extra driver debugging
ea7e006468a761cbfaa6834c5c4d58b17ca4d95c drm/i915/lrc: Do not wait atomically when stopping engines
90e7d18b84392d5f3f496c36a53a7570c7e0629c drm/i915/guc: Do not wait for firmware load atomically
92267a75b4c54df08f02597944425442cd5d7e9f drm/i915: Do not wait atomically for display clocks
b5d8c277bffd039047bce76754500a41bc1a9cf2 drm/i915: Add wait_for_us

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/6] drm/i915: Do not wait atomically for display clocks
  2016-02-01 16:27 ` [PATCH 2/6] drm/i915: Do not wait atomically for display clocks Tvrtko Ursulin
@ 2016-02-01 16:58   ` Ville Syrjälä
  0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2016-02-01 16:58 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

On Mon, Feb 01, 2016 at 04:27:47PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Looks like this code does not need to wait atomically since it
> otherwise takes the mutex. But did it rely on on the requested
> 1us wait actually being up to 1ms?

Bspec says 1 us, so it *should* be fine.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 304fc9637026..a7530cf612d7 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9753,8 +9753,8 @@ static void broadwell_set_cdclk(struct drm_device *dev, int cdclk)
>  	val |= LCPLL_CD_SOURCE_FCLK;
>  	I915_WRITE(LCPLL_CTL, val);
>  
> -	if (wait_for_atomic_us(I915_READ(LCPLL_CTL) &
> -			       LCPLL_CD_SOURCE_FCLK_DONE, 1))
> +	if (wait_for_us(I915_READ(LCPLL_CTL) &
> +			LCPLL_CD_SOURCE_FCLK_DONE, 1))
>  		DRM_ERROR("Switching to FCLK failed\n");
>  
>  	val = I915_READ(LCPLL_CTL);
> @@ -9788,8 +9788,8 @@ static void broadwell_set_cdclk(struct drm_device *dev, int cdclk)
>  	val &= ~LCPLL_CD_SOURCE_FCLK;
>  	I915_WRITE(LCPLL_CTL, val);
>  
> -	if (wait_for_atomic_us((I915_READ(LCPLL_CTL) &
> -				LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1))
> +	if (wait_for_us((I915_READ(LCPLL_CTL) &
> +			LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1))
>  		DRM_ERROR("Switching back to LCPLL failed\n");
>  
>  	mutex_lock(&dev_priv->rps.hw_lock);
> -- 
> 1.9.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/6] drm/i915: Kconfig for extra driver debugging
  2016-02-01 16:27 ` [PATCH 5/6] drm/i915: Kconfig for extra driver debugging Tvrtko Ursulin
@ 2016-02-02  9:18   ` Jani Nikula
  2016-02-02  9:32     ` Tvrtko Ursulin
  0 siblings, 1 reply; 12+ messages in thread
From: Jani Nikula @ 2016-02-02  9:18 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx

On Mon, 01 Feb 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/Kconfig | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
> index 051eab33e4c7..7636bf918d97 100644
> --- a/drivers/gpu/drm/i915/Kconfig
> +++ b/drivers/gpu/drm/i915/Kconfig
> @@ -47,3 +47,15 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
>  	  option changes the default for that module option.
>  
>  	  If in doubt, say "N".
> +
> +config DRM_I915_DEBUG
> +	bool "Enable additional driver debugging"
> +	depends on DRM_I915
> +	default n
> +	help
> +	  Choose this option to turn on extra driver debugging that may affect
> +	  performance but will catch some internal issues.
> +
> +	  Recommended for driver developers only.
> +
> +	  If in doubt, say "N".

I kind of liked Chris' approach of adding a submenu
http://patchwork.freedesktop.org/patch/msgid/1451902412-25459-1-git-send-email-chris@chris-wilson.co.uk

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/6] drm/i915: Kconfig for extra driver debugging
  2016-02-02  9:18   ` Jani Nikula
@ 2016-02-02  9:32     ` Tvrtko Ursulin
  2016-02-02  9:40       ` Jani Nikula
  0 siblings, 1 reply; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-02  9:32 UTC (permalink / raw)
  To: Jani Nikula, Intel-gfx


On 02/02/16 09:18, Jani Nikula wrote:
> On Mon, 01 Feb 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/Kconfig | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
>> index 051eab33e4c7..7636bf918d97 100644
>> --- a/drivers/gpu/drm/i915/Kconfig
>> +++ b/drivers/gpu/drm/i915/Kconfig
>> @@ -47,3 +47,15 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
>>   	  option changes the default for that module option.
>>
>>   	  If in doubt, say "N".
>> +
>> +config DRM_I915_DEBUG
>> +	bool "Enable additional driver debugging"
>> +	depends on DRM_I915
>> +	default n
>> +	help
>> +	  Choose this option to turn on extra driver debugging that may affect
>> +	  performance but will catch some internal issues.
>> +
>> +	  Recommended for driver developers only.
>> +
>> +	  If in doubt, say "N".
>
> I kind of liked Chris' approach of adding a submenu
> http://patchwork.freedesktop.org/patch/msgid/1451902412-25459-1-git-send-email-chris@chris-wilson.co.uk

I don't mind either way - what was decided for that patch - is it going in?

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/6] drm/i915: Kconfig for extra driver debugging
  2016-02-02  9:32     ` Tvrtko Ursulin
@ 2016-02-02  9:40       ` Jani Nikula
  2016-02-02 11:09         ` Tvrtko Ursulin
  0 siblings, 1 reply; 12+ messages in thread
From: Jani Nikula @ 2016-02-02  9:40 UTC (permalink / raw)
  To: Tvrtko Ursulin, Intel-gfx

On Tue, 02 Feb 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> On 02/02/16 09:18, Jani Nikula wrote:
>> On Mon, 01 Feb 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/Kconfig | 12 ++++++++++++
>>>   1 file changed, 12 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
>>> index 051eab33e4c7..7636bf918d97 100644
>>> --- a/drivers/gpu/drm/i915/Kconfig
>>> +++ b/drivers/gpu/drm/i915/Kconfig
>>> @@ -47,3 +47,15 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
>>>   	  option changes the default for that module option.
>>>
>>>   	  If in doubt, say "N".
>>> +
>>> +config DRM_I915_DEBUG
>>> +	bool "Enable additional driver debugging"
>>> +	depends on DRM_I915
>>> +	default n
>>> +	help
>>> +	  Choose this option to turn on extra driver debugging that may affect
>>> +	  performance but will catch some internal issues.
>>> +
>>> +	  Recommended for driver developers only.
>>> +
>>> +	  If in doubt, say "N".
>>
>> I kind of liked Chris' approach of adding a submenu
>> http://patchwork.freedesktop.org/patch/msgid/1451902412-25459-1-git-send-email-chris@chris-wilson.co.uk
>
> I don't mind either way - what was decided for that patch - is it
> going in?

I think we'd like to have it, but last time it blew up on
randconfig. Chris, do we avoid that now?

Tvrtko, in any case, you could pick up the submenu part from there.

BR,
Jani.




>
> Regards,
>
> Tvrtko
>

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/6] drm/i915: Kconfig for extra driver debugging
  2016-02-02  9:40       ` Jani Nikula
@ 2016-02-02 11:09         ` Tvrtko Ursulin
  0 siblings, 0 replies; 12+ messages in thread
From: Tvrtko Ursulin @ 2016-02-02 11:09 UTC (permalink / raw)
  To: Jani Nikula, Intel-gfx


On 02/02/16 09:40, Jani Nikula wrote:
> On Tue, 02 Feb 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>> On 02/02/16 09:18, Jani Nikula wrote:
>>> On Mon, 01 Feb 2016, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
>>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>>
>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>> ---
>>>>    drivers/gpu/drm/i915/Kconfig | 12 ++++++++++++
>>>>    1 file changed, 12 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
>>>> index 051eab33e4c7..7636bf918d97 100644
>>>> --- a/drivers/gpu/drm/i915/Kconfig
>>>> +++ b/drivers/gpu/drm/i915/Kconfig
>>>> @@ -47,3 +47,15 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
>>>>    	  option changes the default for that module option.
>>>>
>>>>    	  If in doubt, say "N".
>>>> +
>>>> +config DRM_I915_DEBUG
>>>> +	bool "Enable additional driver debugging"
>>>> +	depends on DRM_I915
>>>> +	default n
>>>> +	help
>>>> +	  Choose this option to turn on extra driver debugging that may affect
>>>> +	  performance but will catch some internal issues.
>>>> +
>>>> +	  Recommended for driver developers only.
>>>> +
>>>> +	  If in doubt, say "N".
>>>
>>> I kind of liked Chris' approach of adding a submenu
>>> http://patchwork.freedesktop.org/patch/msgid/1451902412-25459-1-git-send-email-chris@chris-wilson.co.uk
>>
>> I don't mind either way - what was decided for that patch - is it
>> going in?
>
> I think we'd like to have it, but last time it blew up on
> randconfig. Chris, do we avoid that now?
>
> Tvrtko, in any case, you could pick up the submenu part from there.

I have - and also respun the enlarged series of misc fixes and debugging 
infrastructure. Reviewers welcome. :)

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-02-02 11:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 16:27 [PATCH 1/6] drm/i915: Add wait_for_us Tvrtko Ursulin
2016-02-01 16:27 ` [PATCH 2/6] drm/i915: Do not wait atomically for display clocks Tvrtko Ursulin
2016-02-01 16:58   ` Ville Syrjälä
2016-02-01 16:27 ` [PATCH 3/6] drm/i915/guc: Do not wait for firmware load atomically Tvrtko Ursulin
2016-02-01 16:27 ` [PATCH 4/6] drm/i915/lrc: Do not wait atomically when stopping engines Tvrtko Ursulin
2016-02-01 16:27 ` [PATCH 5/6] drm/i915: Kconfig for extra driver debugging Tvrtko Ursulin
2016-02-02  9:18   ` Jani Nikula
2016-02-02  9:32     ` Tvrtko Ursulin
2016-02-02  9:40       ` Jani Nikula
2016-02-02 11:09         ` Tvrtko Ursulin
2016-02-01 16:27 ` [PATCH 6/6] drm/i915: Do not lie about atomic wait granularity Tvrtko Ursulin
2016-02-01 16:45 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Add wait_for_us Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).