diff mbox series

[3/7] drm/i915: Fix broken transcoder err state

Message ID 20200204112927.17391-4-anshuman.gupta@intel.com (mailing list archive)
State New, archived
Headers show
Series 3 display pipes combination system support | expand

Commit Message

Gupta, Anshuman Feb. 4, 2020, 11:29 a.m. UTC
Skip the trascoder whose pipe is disabled while
initializing trascoder error state in 3 display
pipe syatem.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ville Syrjälä Feb. 4, 2020, 2:28 p.m. UTC | #1
On Tue, Feb 04, 2020 at 04:59:23PM +0530, Anshuman Gupta wrote:
> Skip the trascoder whose pipe is disabled while
> initializing trascoder error state in 3 display
> pipe syatem.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 5709e672151a..cf36c3d0f8fc 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -18607,8 +18607,10 @@ intel_display_capture_error_state(struct drm_i915_private *dev_priv)
>  
>  	for (i = 0; i < ARRAY_SIZE(error->transcoder); i++) {
>  		enum transcoder cpu_transcoder = transcoders[i];
> +		enum pipe pipe = (enum pipe)cpu_transcoder;

Not correct for EDP transcoder.

>  
> -		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder])
> +		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder] &&
> +		    !(INTEL_INFO(dev_priv)->pipe_mask & BIT(pipe)))
>  			continue;
>  
>  		error->transcoder[i].available = true;
> -- 
> 2.24.0
Jani Nikula Feb. 4, 2020, 4:37 p.m. UTC | #2
On Tue, 04 Feb 2020, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Feb 04, 2020 at 04:59:23PM +0530, Anshuman Gupta wrote:
>> Skip the trascoder whose pipe is disabled while
>> initializing trascoder error state in 3 display
>> pipe syatem.
>> 
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
>> index 5709e672151a..cf36c3d0f8fc 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> @@ -18607,8 +18607,10 @@ intel_display_capture_error_state(struct drm_i915_private *dev_priv)
>>  
>>  	for (i = 0; i < ARRAY_SIZE(error->transcoder); i++) {
>>  		enum transcoder cpu_transcoder = transcoders[i];
>> +		enum pipe pipe = (enum pipe)cpu_transcoder;
>
> Not correct for EDP transcoder.

Nor DSI?

BR,
Jani.

>
>>  
>> -		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder])
>> +		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder] &&
>> +		    !(INTEL_INFO(dev_priv)->pipe_mask & BIT(pipe)))
>>  			continue;
>>  
>>  		error->transcoder[i].available = true;
>> -- 
>> 2.24.0
Gupta, Anshuman Feb. 6, 2020, 10:23 a.m. UTC | #3
On 2020-02-04 at 18:37:26 +0200, Jani Nikula wrote:
> On Tue, 04 Feb 2020, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> > On Tue, Feb 04, 2020 at 04:59:23PM +0530, Anshuman Gupta wrote:
> >> Skip the trascoder whose pipe is disabled while
> >> initializing trascoder error state in 3 display
> >> pipe syatem.
> >> 
> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/display/intel_display.c | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> >> index 5709e672151a..cf36c3d0f8fc 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> >> @@ -18607,8 +18607,10 @@ intel_display_capture_error_state(struct drm_i915_private *dev_priv)
> >>  
> >>  	for (i = 0; i < ARRAY_SIZE(error->transcoder); i++) {
> >>  		enum transcoder cpu_transcoder = transcoders[i];
> >> +		enum pipe pipe = (enum pipe)cpu_transcoder;
> >
> > Not correct for EDP transcoder.
> 
> Nor DSI?
> 
> BR,
> Jani.
> 
> >
> >>  
> >> -		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder])
Is it ok to make trans_offsets[] NULL for disabled pipe as an another approach?
Thanks,
Anshuman Gupta.
> >> +		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder] &&
> >> +		    !(INTEL_INFO(dev_priv)->pipe_mask & BIT(pipe)))
> >>  			continue;
> >>  
> >>  		error->transcoder[i].available = true;
> >> -- 
> >> 2.24.0
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 5709e672151a..cf36c3d0f8fc 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -18607,8 +18607,10 @@  intel_display_capture_error_state(struct drm_i915_private *dev_priv)
 
 	for (i = 0; i < ARRAY_SIZE(error->transcoder); i++) {
 		enum transcoder cpu_transcoder = transcoders[i];
+		enum pipe pipe = (enum pipe)cpu_transcoder;
 
-		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder])
+		if (!INTEL_INFO(dev_priv)->trans_offsets[cpu_transcoder] &&
+		    !(INTEL_INFO(dev_priv)->pipe_mask & BIT(pipe)))
 			continue;
 
 		error->transcoder[i].available = true;