drm/i915/dp: debug log max vswing and pre-emphasis
diff mbox series

Message ID 20200117150235.22471-1-jani.nikula@intel.com
State New
Headers show
Series
  • drm/i915/dp: debug log max vswing and pre-emphasis
Related show

Commit Message

Jani Nikula Jan. 17, 2020, 3:02 p.m. UTC
Provide slightly more debugging help.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Comments

Ville Syrjälä Jan. 21, 2020, 2:32 p.m. UTC | #1
On Fri, Jan 17, 2020 at 05:02:35PM +0200, Jani Nikula wrote:
> Provide slightly more debugging help.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 4074d83b1a5f..c26be4421f01 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -4142,11 +4142,14 @@ intel_dp_set_signal_levels(struct intel_dp *intel_dp)
>  	if (mask)
>  		DRM_DEBUG_KMS("Using signal levels %08x\n", signal_levels);
>  
> -	DRM_DEBUG_KMS("Using vswing level %d\n",
> -		train_set & DP_TRAIN_VOLTAGE_SWING_MASK);
> -	DRM_DEBUG_KMS("Using pre-emphasis level %d\n",
> -		(train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
> -			DP_TRAIN_PRE_EMPHASIS_SHIFT);
> +	DRM_DEBUG_KMS("Using vswing level %d%s\n",
> +		      train_set & DP_TRAIN_VOLTAGE_SWING_MASK,
> +		      train_set & DP_TRAIN_MAX_SWING_REACHED ? " (max)" : "");
> +	DRM_DEBUG_KMS("Using pre-emphasis level %d%s\n",
> +		      (train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
> +		      DP_TRAIN_PRE_EMPHASIS_SHIFT,
> +		      train_set & DP_TRAIN_MAX_PRE_EMPHASIS_REACHED ?
> +		      " (max)" : "");
>  
>  	intel_dp->DP = (intel_dp->DP & ~mask) | signal_levels;
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Jan. 21, 2020, 3:49 p.m. UTC | #2
On Tue, 21 Jan 2020, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Fri, Jan 17, 2020 at 05:02:35PM +0200, Jani Nikula wrote:
>> Provide slightly more debugging help.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Pushed to dinq, thanks for the review.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dp.c | 13 ++++++++-----
>>  1 file changed, 8 insertions(+), 5 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 4074d83b1a5f..c26be4421f01 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -4142,11 +4142,14 @@ intel_dp_set_signal_levels(struct intel_dp *intel_dp)
>>  	if (mask)
>>  		DRM_DEBUG_KMS("Using signal levels %08x\n", signal_levels);
>>  
>> -	DRM_DEBUG_KMS("Using vswing level %d\n",
>> -		train_set & DP_TRAIN_VOLTAGE_SWING_MASK);
>> -	DRM_DEBUG_KMS("Using pre-emphasis level %d\n",
>> -		(train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
>> -			DP_TRAIN_PRE_EMPHASIS_SHIFT);
>> +	DRM_DEBUG_KMS("Using vswing level %d%s\n",
>> +		      train_set & DP_TRAIN_VOLTAGE_SWING_MASK,
>> +		      train_set & DP_TRAIN_MAX_SWING_REACHED ? " (max)" : "");
>> +	DRM_DEBUG_KMS("Using pre-emphasis level %d%s\n",
>> +		      (train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
>> +		      DP_TRAIN_PRE_EMPHASIS_SHIFT,
>> +		      train_set & DP_TRAIN_MAX_PRE_EMPHASIS_REACHED ?
>> +		      " (max)" : "");
>>  
>>  	intel_dp->DP = (intel_dp->DP & ~mask) | signal_levels;
>>  
>> -- 
>> 2.20.1
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 4074d83b1a5f..c26be4421f01 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4142,11 +4142,14 @@  intel_dp_set_signal_levels(struct intel_dp *intel_dp)
 	if (mask)
 		DRM_DEBUG_KMS("Using signal levels %08x\n", signal_levels);
 
-	DRM_DEBUG_KMS("Using vswing level %d\n",
-		train_set & DP_TRAIN_VOLTAGE_SWING_MASK);
-	DRM_DEBUG_KMS("Using pre-emphasis level %d\n",
-		(train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
-			DP_TRAIN_PRE_EMPHASIS_SHIFT);
+	DRM_DEBUG_KMS("Using vswing level %d%s\n",
+		      train_set & DP_TRAIN_VOLTAGE_SWING_MASK,
+		      train_set & DP_TRAIN_MAX_SWING_REACHED ? " (max)" : "");
+	DRM_DEBUG_KMS("Using pre-emphasis level %d%s\n",
+		      (train_set & DP_TRAIN_PRE_EMPHASIS_MASK) >>
+		      DP_TRAIN_PRE_EMPHASIS_SHIFT,
+		      train_set & DP_TRAIN_MAX_PRE_EMPHASIS_REACHED ?
+		      " (max)" : "");
 
 	intel_dp->DP = (intel_dp->DP & ~mask) | signal_levels;