diff mbox series

drm/i915: Fix the state checker for ICL Y planes

Message ID 20190304131217.4338-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix the state checker for ICL Y planes | expand

Commit Message

Ville Syrjälä March 4, 2019, 1:12 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The plane used to scan out NV12 luma on ICL is logically
off but actually on. Fix the state checker to account for this.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109457
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Imre Deak March 4, 2019, 2:45 p.m. UTC | #1
On Mon, Mar 04, 2019 at 03:12:17PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The plane used to scan out NV12 luma on ICL is logically
> off but actually on. Fix the state checker to account for this.
> 
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109457
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 7c5e84ef5171..b49e789b747e 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12589,7 +12589,8 @@ intel_verify_planes(struct intel_atomic_state *state)
>  
>  	for_each_new_intel_plane_in_state(state, plane,
>  					  plane_state, i)
> -		assert_plane(plane, plane_state->base.visible);
> +		assert_plane(plane, plane_state->slave ||
> +			     plane_state->base.visible);

Looks like we don't have proper readout for such linked planes either,
but that's a separate issue. The change looks ok:

Reviewed-by: Imre Deak <imre.deak@intel.com>

>  }
>  
>  static void
> -- 
> 2.19.2
>
Maarten Lankhorst March 4, 2019, 2:52 p.m. UTC | #2
Op 04-03-2019 om 15:45 schreef Imre Deak:
> On Mon, Mar 04, 2019 at 03:12:17PM +0200, Ville Syrjala wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> The plane used to scan out NV12 luma on ICL is logically
>> off but actually on. Fix the state checker to account for this.
>>
>> Cc: Imre Deak <imre.deak@intel.com>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109457
>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_display.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 7c5e84ef5171..b49e789b747e 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -12589,7 +12589,8 @@ intel_verify_planes(struct intel_atomic_state *state)
>>  
>>  	for_each_new_intel_plane_in_state(state, plane,
>>  					  plane_state, i)
>> -		assert_plane(plane, plane_state->base.visible);
>> +		assert_plane(plane, plane_state->slave ||
>> +			     plane_state->base.visible);
> Looks like we don't have proper readout for such linked planes either,
> but that's a separate issue. The change looks ok:
>
> Reviewed-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

The lack of readout was intentional, I don't think we will ever be able to inherit nv12 planes from the bios. :)

But if we ever implement full plane validation, yeah that will be missing..

~Maarten
Ville Syrjälä March 4, 2019, 2:55 p.m. UTC | #3
On Mon, Mar 04, 2019 at 04:45:28PM +0200, Imre Deak wrote:
> On Mon, Mar 04, 2019 at 03:12:17PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The plane used to scan out NV12 luma on ICL is logically
> > off but actually on. Fix the state checker to account for this.
> > 
> > Cc: Imre Deak <imre.deak@intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109457
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 7c5e84ef5171..b49e789b747e 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -12589,7 +12589,8 @@ intel_verify_planes(struct intel_atomic_state *state)
> >  
> >  	for_each_new_intel_plane_in_state(state, plane,
> >  					  plane_state, i)
> > -		assert_plane(plane, plane_state->base.visible);
> > +		assert_plane(plane, plane_state->slave ||
> > +			     plane_state->base.visible);
> 
> Looks like we don't have proper readout for such linked planes either,
> but that's a separate issue.

We have no real plane state readout for any plane. The only slight
exception is the initial_plane_config() stuff.

> The change looks ok:
> 
> Reviewed-by: Imre Deak <imre.deak@intel.com>
> 
> >  }
> >  
> >  static void
> > -- 
> > 2.19.2
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7c5e84ef5171..b49e789b747e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12589,7 +12589,8 @@  intel_verify_planes(struct intel_atomic_state *state)
 
 	for_each_new_intel_plane_in_state(state, plane,
 					  plane_state, i)
-		assert_plane(plane, plane_state->base.visible);
+		assert_plane(plane, plane_state->slave ||
+			     plane_state->base.visible);
 }
 
 static void