public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks
@ 2015-03-19  9:44 ville.syrjala
  2015-03-19  9:44 ` [PATCH 2/3] drm/i915: Send out the full AUX address ville.syrjala
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: ville.syrjala @ 2015-03-19  9:44 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

When doing a native or i2c aux write the sink will indicate the number
of bytes written even if it the nacks the transfer. When we receive a
nack we just return an error upwards, but it might still be interesting
to see how many bytes made it before the nack. So include that information
in the debug messages.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index d5368ea..d7c73bd 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -462,7 +462,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 			break;
 
 		case DP_AUX_NATIVE_REPLY_NACK:
-			DRM_DEBUG_KMS("native nack\n");
+			DRM_DEBUG_KMS("native nack (%d)\n", ret);
 			return -EREMOTEIO;
 
 		case DP_AUX_NATIVE_REPLY_DEFER:
@@ -493,7 +493,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 			return ret;
 
 		case DP_AUX_I2C_REPLY_NACK:
-			DRM_DEBUG_KMS("I2C nack\n");
+			DRM_DEBUG_KMS("I2C nack (%d)\n", ret);
 			aux->i2c_nack_count++;
 			return -EREMOTEIO;
 
-- 
2.0.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/3] drm/i915: Send out the full AUX address
  2015-03-19  9:44 [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks ville.syrjala
@ 2015-03-19  9:44 ` ville.syrjala
  2015-03-19 10:20   ` Jani Nikula
  2015-03-19  9:44 ` [PATCH 3/3] drm/radeon: " ville.syrjala
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: ville.syrjala @ 2015-03-19  9:44 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

AUX addresses are 20 bits long. Send out the entire address instead of
just the low 16 bits.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3967af1..637dd53 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -942,8 +942,9 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 	size_t txsize, rxsize;
 	int ret;
 
-	txbuf[0] = msg->request << 4;
-	txbuf[1] = msg->address >> 8;
+	txbuf[0] = (msg->request << 4) |
+		((msg->address >> 16) & 0xf);
+	txbuf[1] = (msg->address >> 8) & 0xff;
 	txbuf[2] = msg->address & 0xff;
 	txbuf[3] = msg->size - 1;
 
-- 
2.0.5

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

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

* [PATCH 3/3] drm/radeon: Send out the full AUX address
  2015-03-19  9:44 [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks ville.syrjala
  2015-03-19  9:44 ` [PATCH 2/3] drm/i915: Send out the full AUX address ville.syrjala
@ 2015-03-19  9:44 ` ville.syrjala
  2015-03-19 17:42   ` shuang.he
  2015-03-19 10:21 ` [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks Jani Nikula
  2015-03-19 11:38 ` [PATCH v2 " ville.syrjala
  3 siblings, 1 reply; 10+ messages in thread
From: ville.syrjala @ 2015-03-19  9:44 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher, intel-gfx, Christian König

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

AUX addresses are 20 bits long. Send out the entire address instead of
just the low 16 bits.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/radeon/atombios_dp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 8d74de8..7a59a41 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -171,8 +171,9 @@ radeon_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 		return -E2BIG;
 
 	tx_buf[0] = msg->address & 0xff;
-	tx_buf[1] = msg->address >> 8;
-	tx_buf[2] = msg->request << 4;
+	tx_buf[1] = (msg->address >> 8) & 0xff;
+	tx_buf[2] = (msg->request << 4) |
+		((msg->address >> 16) & 0xf);
 	tx_buf[3] = msg->size ? (msg->size - 1) : 0;
 
 	switch (msg->request & ~DP_AUX_I2C_MOT) {
-- 
2.0.5

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

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

* Re: [PATCH 2/3] drm/i915: Send out the full AUX address
  2015-03-19  9:44 ` [PATCH 2/3] drm/i915: Send out the full AUX address ville.syrjala
@ 2015-03-19 10:20   ` Jani Nikula
  2015-03-19 14:52     ` [Intel-gfx] " Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2015-03-19 10:20 UTC (permalink / raw)
  To: ville.syrjala, dri-devel; +Cc: intel-gfx

On Thu, 19 Mar 2015, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> AUX addresses are 20 bits long. Send out the entire address instead of
> just the low 16 bits.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 3967af1..637dd53 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -942,8 +942,9 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  	size_t txsize, rxsize;
>  	int ret;
>  
> -	txbuf[0] = msg->request << 4;
> -	txbuf[1] = msg->address >> 8;
> +	txbuf[0] = (msg->request << 4) |
> +		((msg->address >> 16) & 0xf);
> +	txbuf[1] = (msg->address >> 8) & 0xff;
>  	txbuf[2] = msg->address & 0xff;
>  	txbuf[3] = msg->size - 1;
>  
> -- 
> 2.0.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
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] 10+ messages in thread

* Re: [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks
  2015-03-19  9:44 [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks ville.syrjala
  2015-03-19  9:44 ` [PATCH 2/3] drm/i915: Send out the full AUX address ville.syrjala
  2015-03-19  9:44 ` [PATCH 3/3] drm/radeon: " ville.syrjala
@ 2015-03-19 10:21 ` Jani Nikula
  2015-03-19 11:38 ` [PATCH v2 " ville.syrjala
  3 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2015-03-19 10:21 UTC (permalink / raw)
  To: ville.syrjala, dri-devel; +Cc: intel-gfx

On Thu, 19 Mar 2015, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> When doing a native or i2c aux write the sink will indicate the number
> of bytes written even if it the nacks the transfer. When we receive a
> nack we just return an error upwards, but it might still be interesting
> to see how many bytes made it before the nack. So include that information
> in the debug messages.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_dp_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index d5368ea..d7c73bd 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -462,7 +462,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  			break;
>  
>  		case DP_AUX_NATIVE_REPLY_NACK:
> -			DRM_DEBUG_KMS("native nack\n");
> +			DRM_DEBUG_KMS("native nack (%d)\n", ret);

I guess it would be useful to print the full length too, so you know if
it was a short write or not.

BR,
Jani.


>  			return -EREMOTEIO;
>  
>  		case DP_AUX_NATIVE_REPLY_DEFER:
> @@ -493,7 +493,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  			return ret;
>  
>  		case DP_AUX_I2C_REPLY_NACK:
> -			DRM_DEBUG_KMS("I2C nack\n");
> +			DRM_DEBUG_KMS("I2C nack (%d)\n", ret);
>  			aux->i2c_nack_count++;
>  			return -EREMOTEIO;
>  
> -- 
> 2.0.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
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] 10+ messages in thread

* [PATCH v2 1/3] drm/dp: Print the number of bytes processed for aux nacks
  2015-03-19  9:44 [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks ville.syrjala
                   ` (2 preceding siblings ...)
  2015-03-19 10:21 ` [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks Jani Nikula
@ 2015-03-19 11:38 ` ville.syrjala
  2015-03-19 11:48   ` Jani Nikula
  3 siblings, 1 reply; 10+ messages in thread
From: ville.syrjala @ 2015-03-19 11:38 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

When doing a native or i2c aux write the sink will indicate the number
of bytes written even if it the nacks the transfer. When we receive a
nack we just return an error upwards, but it might still be interesting
to see how many bytes made it before the nack. So include that information
in the debug messages.

v2: Also print the message size (Jani)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index d5368ea..71dcbc6 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -462,7 +462,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 			break;
 
 		case DP_AUX_NATIVE_REPLY_NACK:
-			DRM_DEBUG_KMS("native nack\n");
+			DRM_DEBUG_KMS("native nack (result=%d, size=%zu)\n", ret, msg->size);
 			return -EREMOTEIO;
 
 		case DP_AUX_NATIVE_REPLY_DEFER:
@@ -493,7 +493,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 			return ret;
 
 		case DP_AUX_I2C_REPLY_NACK:
-			DRM_DEBUG_KMS("I2C nack\n");
+			DRM_DEBUG_KMS("I2C nack (result=%d, size=%zu\n", ret, msg->size);
 			aux->i2c_nack_count++;
 			return -EREMOTEIO;
 
-- 
2.0.5

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

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

* Re: [PATCH v2 1/3] drm/dp: Print the number of bytes processed for aux nacks
  2015-03-19 11:38 ` [PATCH v2 " ville.syrjala
@ 2015-03-19 11:48   ` Jani Nikula
  2015-03-19 14:51     ` Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2015-03-19 11:48 UTC (permalink / raw)
  To: ville.syrjala, dri-devel; +Cc: intel-gfx

On Thu, 19 Mar 2015, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> When doing a native or i2c aux write the sink will indicate the number
> of bytes written even if it the nacks the transfer. When we receive a
> nack we just return an error upwards, but it might still be interesting
> to see how many bytes made it before the nack. So include that information
> in the debug messages.
>
> v2: Also print the message size (Jani)
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> ---
>  drivers/gpu/drm/drm_dp_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index d5368ea..71dcbc6 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -462,7 +462,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  			break;
>  
>  		case DP_AUX_NATIVE_REPLY_NACK:
> -			DRM_DEBUG_KMS("native nack\n");
> +			DRM_DEBUG_KMS("native nack (result=%d, size=%zu)\n", ret, msg->size);
>  			return -EREMOTEIO;
>  
>  		case DP_AUX_NATIVE_REPLY_DEFER:
> @@ -493,7 +493,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  			return ret;
>  
>  		case DP_AUX_I2C_REPLY_NACK:
> -			DRM_DEBUG_KMS("I2C nack\n");
> +			DRM_DEBUG_KMS("I2C nack (result=%d, size=%zu\n", ret, msg->size);
>  			aux->i2c_nack_count++;
>  			return -EREMOTEIO;
>  
> -- 
> 2.0.5
>

-- 
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] 10+ messages in thread

* Re: [PATCH v2 1/3] drm/dp: Print the number of bytes processed for aux nacks
  2015-03-19 11:48   ` Jani Nikula
@ 2015-03-19 14:51     ` Daniel Vetter
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2015-03-19 14:51 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx, dri-devel

On Thu, Mar 19, 2015 at 01:48:00PM +0200, Jani Nikula wrote:
> On Thu, 19 Mar 2015, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > When doing a native or i2c aux write the sink will indicate the number
> > of bytes written even if it the nacks the transfer. When we receive a
> > nack we just return an error upwards, but it might still be interesting
> > to see how many bytes made it before the nack. So include that information
> > in the debug messages.
> >
> > v2: Also print the message size (Jani)
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Merged to drm-misc, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH 2/3] drm/i915: Send out the full AUX address
  2015-03-19 10:20   ` Jani Nikula
@ 2015-03-19 14:52     ` Daniel Vetter
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2015-03-19 14:52 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx, dri-devel

On Thu, Mar 19, 2015 at 12:20:57PM +0200, Jani Nikula wrote:
> On Thu, 19 Mar 2015, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > AUX addresses are 20 bits long. Send out the entire address instead of
> > just the low 16 bits.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 3/3] drm/radeon: Send out the full AUX address
  2015-03-19  9:44 ` [PATCH 3/3] drm/radeon: " ville.syrjala
@ 2015-03-19 17:42   ` shuang.he
  0 siblings, 0 replies; 10+ messages in thread
From: shuang.he @ 2015-03-19 17:42 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, ville.syrjala

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6003
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                 -2              272/272              270/272
ILK                                  301/301              301/301
SNB                                  303/303              303/303
IVB                                  342/342              342/342
BYT                                  287/287              287/287
HSW                                  362/362              362/362
BDW                                  308/308              308/308
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*PNV  igt_gem_userptr_blits_minor-unsync-interruptible      PASS(2)      DMESG_WARN(1)PASS(1)
*PNV  igt_gem_userptr_blits_minor-unsync-normal      PASS(2)      DMESG_WARN(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-03-19 17:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-19  9:44 [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks ville.syrjala
2015-03-19  9:44 ` [PATCH 2/3] drm/i915: Send out the full AUX address ville.syrjala
2015-03-19 10:20   ` Jani Nikula
2015-03-19 14:52     ` [Intel-gfx] " Daniel Vetter
2015-03-19  9:44 ` [PATCH 3/3] drm/radeon: " ville.syrjala
2015-03-19 17:42   ` shuang.he
2015-03-19 10:21 ` [PATCH 1/3] drm/dp: Print the number of bytes processed for aux nacks Jani Nikula
2015-03-19 11:38 ` [PATCH v2 " ville.syrjala
2015-03-19 11:48   ` Jani Nikula
2015-03-19 14:51     ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox