[Intel-gfx] [PATCH 1/6] drm/i915/psr: Avoid DPCD reads when panel does not support PSR

Jani Nikula jani.nikula at linux.intel.com
Thu May 24 13:29:16 UTC 2018


On Thu, 17 May 2018, Tarun Vyas <tarun.vyas at intel.com> wrote:
> On Fri, May 11, 2018 at 12:51:40PM -0700, Dhinakaran Pandiyan wrote:
>> Ville noticed that we are unncessarily reading DPCD's after knowing
>> panel did not support PSR. Looks like this check that was present
>> earlier got removed unintentionally, let's put it back.
>> 
>> While we do this, add the PSR version number in the debug print.
>> 
>> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
>> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++------
>>  1 file changed, 8 insertions(+), 6 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
>> index db27f2faa1de..8fe6d2f9ab2b 100644
>> --- a/drivers/gpu/drm/i915/intel_psr.c
>> +++ b/drivers/gpu/drm/i915/intel_psr.c
>> @@ -250,10 +250,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
>>  	drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd,
>>  			 sizeof(intel_dp->psr_dpcd));
>>  
>> -	if (intel_dp->psr_dpcd[0]) {
>> -		dev_priv->psr.sink_support = true;
>> -		DRM_DEBUG_KMS("Detected EDP PSR Panel.\n");
>> -	}
>> +	if (!intel_dp->psr_dpcd[0])
>> +		return;
>> +
>> +	DRM_DEBUG_KMS("eDP panel supports PSR version %x\n",
>> +		      intel_dp->psr_dpcd[0]);
>> +	dev_priv->psr.sink_support = true;
>>  
>>  	if (INTEL_GEN(dev_priv) >= 9 &&
>>  	    (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) {
>> @@ -270,8 +272,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
>>  		 */
>>  		dev_priv->psr.sink_psr2_support =
>>  				intel_dp_get_y_coord_required(intel_dp);
>> -		DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv->psr.sink_psr2_support
>> -			      ? "supported" : "not supported");
>> +		DRM_DEBUG_KMS("PSR2 %ssupported\n",
>> +			      dev_priv->psr.sink_psr2_support ? "" : "not ");
> Would it make sense to make it clearer that PSR2 is not supported b/c of lack of y-coordinate support on the sink ?
>
> Reviewed-by: Tarun Vyas <tarun.vyas at intel.com>

Pushed to dinq, thanks for the patch and review.

BR,
Jani.


>>  
>>  		if (dev_priv->psr.sink_psr2_support) {
>>  			dev_priv->psr.colorimetry_support =
>> -- 
>> 2.14.1
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list