Skip to contentSkip to conversation

drm/i915: Initialize num_scalers for skl and glk too

PATCH In review Ander Conselvan de Oliveira 7 participants 11 messages Jan 2, 2017 – Jan 3, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Initialize num_scalers for skl and glk too

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Fixes 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init")
Cc Nabendu Maiti <[email protected]>
Cc Chris Wilson <[email protected]> (v2)
Cc Ander Conselvan de Oliveira <[email protected]>
Cc Ander Conselvan de Oliveira <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/intel_device_info.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_device_info.c +6 -3
index 1b5ffc4..f642f6d 100644
@@ -310,6 +310,12 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 	struct intel_device_info *info = mkwrite_device_info(dev_priv);
 	enum pipe pipe;
 
+	if (INTEL_GEN(dev_priv) >= 9) {
+		info->num_scalers[PIPE_A] = 2;
+		info->num_scalers[PIPE_B] = 2;
+		info->num_scalers[PIPE_C] = 1;
+	}
+
 	/*
 	 * Skylake and Broxton currently don't expose the topmost plane as its
 	 * use is exclusive with the legacy cursor and we only want to expose
@@ -325,9 +331,6 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 		info->num_sprites[PIPE_A] = 2;
 		info->num_sprites[PIPE_B] = 2;
 		info->num_sprites[PIPE_C] = 1;
-		info->num_scalers[PIPE_A] = 2;
-		info->num_scalers[PIPE_B] = 2;
-		info->num_scalers[PIPE_C] = 1;
 	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
 		for_each_pipe(dev_priv, pipe)
 			info->num_sprites[pipe] = 2;
Signature · 6 lines
2.5.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 3 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Next question is why this user visible change is not causing test failures in BAT?
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

I am wondering why the number of sprite initialization is not done in runtime init for skylake/glk similarly.

Quoted 9 lines · Chris Wilson
Quoted 3 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Next question is why this user visible change is not causing test failures in BAT?
-Chris

Signature · 6 lines
Regards,
Nabendu
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 2 lines · Nabendu Bikash

I am wondering why the number of sprite initialization is not done in runtime init for skylake/glk similarly.

It is done in the "else if (INTEL_GEN(dev_priv) >= 5)" branch. The comment explains why the topmost plane is not enabled.

Ander

Quoted 13 lines · Chris Wilson
Quoted 11 lines · Ander Conselvan de Oliveira
Quoted 5 lines

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to
runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Next question is why this user visible change is not causing test failures in BAT?
-Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Chris Wilson
Quoted 8 lines · Chris Wilson
Quoted 5 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to
runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Next question is why this user visible change is not causing test failures in BAT?

There isn't a single test in BAT that tries to setup a plane with scaling. The kms_panel_fitting and kms_plane_scaling tests would have caught the issue, but they are not part of BAT. kms_plane and kms_universal_plane are also not part of BAT, and they also don't test scaling.

Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
Quoted 10 lines · Ander Conselvan De Oliveira
Quoted 9 lines · Chris Wilson
Quoted 7 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization
to
runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Quoted 7 lines
Quoted 2 lines

Next question is why this user visible change is not causing test failures in BAT?

There isn't a single test in BAT that tries to setup a plane with scaling. The kms_panel_fitting and kms_plane_scaling tests would have caught the issue, but they are not part of BAT. kms_plane and kms_universal_plane are also not part of
BAT, and they also don't test scaling.

Is it feasible to add one of those tests to BAT? Would it help with the time constraints if we run it only on gen9+? There's already a test for gen9 specific things in kms_universal_plane, maybe we could use that?

Ander
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw
Quoted 19 lines · Ander Conselvan De Oliveira
Quoted 10 lines · Ander Conselvan De Oliveira
Quoted 9 lines · Chris Wilson
Quoted 7 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization
to
runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Quoted 7 lines
Quoted 2 lines

Next question is why this user visible change is not causing test failures in BAT?

There isn't a single test in BAT that tries to setup a plane with scaling. The kms_panel_fitting and kms_plane_scaling tests would have caught the issue, but they are not part of BAT. kms_plane and kms_universal_plane are also not part of
BAT, and they also don't test scaling.

Quoted 3 lines

Is it feasible to add one of those tests to BAT? Would it help with the time constraints if we run it only on gen9+? There's already a test for gen9 specific things in kms_universal_plane, maybe we could use that?

Yes, it is definitely a hole that needs addressing, and needs to be checked on all gen (some just have more versatile panel fitters than others). The challenge for you is to devise the smallest test with the widest coverage of the scalers - which may just be an existing test. -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
In reply to Ander Conselvan De Oliveira

HI,

Quoted 29 lines

-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Ander Conselvan De Oliveira
Sent: Tuesday, January 3, 2017 3:49 PM
To: Chris Wilson <[email protected]>; Sarvela, Tomi P <[email protected]>; Latvala, Petri <[email protected]>
Cc: Vetter, Daniel <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Initialize num_scalers for skl and glk too

Quoted 3 lines · Ander Conselvan De Oliveira
Quoted 2 lines · Chris Wilson

On Mon, Jan 02, 2017 at 03:54:41PM +0200, Ander Conselvan de Oliveira

Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Quoted 7 lines
Quoted 2 lines

Next question is why this user visible change is not causing test failures in BAT?

There isn't a single test in BAT that tries to setup a plane with scaling. The kms_panel_fitting and kms_plane_scaling tests would have caught the issue, but they are not part of BAT. kms_plane and kms_universal_plane are also not part of BAT, and they also don't test scaling.

Quoted 3 lines

Is it feasible to add one of those tests to BAT? Would it help with the time constraints if we run it only on gen9+? There's already a test for gen9 specific things in kms_universal_plane, maybe we could use that?

We should test drive first how reliable test is and if reliable (not flip-flopping) yes. Petri, proposals?

Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

✓ Fi.CI.BAT: success for drm/i915: Initialize num_scalers for skl and glk too

In reply to Ander Conselvan de Oliveira
== Series Details ==

== Series Details ==

Series: drm/i915: Initialize num_scalers for skl and glk too
URL : https://patchwork.freedesktop.org/series/17372/
State : success

== Summary ==

Series 17372v1 drm/i915: Initialize num_scalers for skl and glk too
https://patchwork.freedesktop.org/api/1.0/series/17372/revisions/1/mbox/

fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:82   pass:69   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

847638b14a477e423033b31d01483bf15e9a8d4f drm-tip: 2017y-01m-02d-13h-23m-55s UTC integration manifest 0b006ba drm/i915: Initialize num_scalers for skl and glk too

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3419/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by Reviewed-by on v1 1/1
#9 lore raw
In reply to Ander Conselvan de Oliveira
Quoted 4 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Quoted 9 lines
Fixes 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to runtime init")
Cc Nabendu Maiti <[email protected]>
Cc Chris Wilson <[email protected]> (v2)
Cc Ander Conselvan de Oliveira <[email protected]>
Cc Ander Conselvan de Oliveira <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>

Fixes my CCS test. What happened was apparently the BIOS leaving the scaler enabled and then when i915 took over all but the preferred mode of the display came out garbled on account of the scaler output not fitting within the h/vactive of the mode.

Quoted 38 lines
---
 drivers/gpu/drm/i915/intel_device_info.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_device_info.c +6 -3
index 1b5ffc4..f642f6d 100644
@@ -310,6 +310,12 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 	struct intel_device_info *info = mkwrite_device_info(dev_priv);
 	enum pipe pipe;
 
+	if (INTEL_GEN(dev_priv) >= 9) {
+		info->num_scalers[PIPE_A] = 2;
+		info->num_scalers[PIPE_B] = 2;
+		info->num_scalers[PIPE_C] = 1;
+	}
+
 	/*
 	 * Skylake and Broxton currently don't expose the topmost plane as its
 	 * use is exclusive with the legacy cursor and we only want to expose
@@ -325,9 +331,6 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 		info->num_sprites[PIPE_A] = 2;
 		info->num_sprites[PIPE_B] = 2;
 		info->num_sprites[PIPE_C] = 1;
-		info->num_scalers[PIPE_A] = 2;
-		info->num_scalers[PIPE_B] = 2;
-		info->num_scalers[PIPE_C] = 1;
 	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
 		for_each_pipe(dev_priv, pipe)
 			info->num_sprites[pipe] = 2;
Signature · 6 lines
2.5.5

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw
Quoted 18 lines · Ville Syrjälä
Quoted 16 lines · Ander Conselvan de Oliveira

After commit 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to
runtime init"), scalers are not initialized properly for skl and glk since num_scalers is left as 0 for those platforms.

Fixes 1c74eeaf16b8 ("drm/i915: Move number of scalers initialization to

runtime init")

Cc Nabendu Maiti <[email protected]>
Cc Chris Wilson <[email protected]> (v2)
Cc Ander Conselvan de Oliveira <[email protected]>
Cc Ander Conselvan de Oliveira <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Jani Nikula <[email protected]>
Quoted 1 line

l.com>

Quoted 7 lines

Fixes my CCS test. What happened was apparently the BIOS leaving the scaler enabled and then when i915 took over all but the preferred mode of the display came out garbled on account of the scaler output not fitting within the h/vactive of the mode.

Pushed. Thanks for reviewing.

Ander

Quoted 41 lines
Quoted 41 lines

---
 drivers/gpu/drm/i915/intel_device_info.c | 9 ++++++---

 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_device_info.c +0 -0
index 1b5ffc4..f642f6d 100644
@@ -310,6 +310,12 @@ void intel_device_info_runtime_init(struct
 drm_i915_private *dev_priv)
  	struct intel_device_info *info = mkwrite_device_info(dev_priv);
  	enum pipe pipe;

drivers/gpu/drm/i915/intel_device_info.c +6 -0
+	if (INTEL_GEN(dev_priv) >= 9) {
+		info->num_scalers[PIPE_A] = 2;
+		info->num_scalers[PIPE_B] = 2;
+		info->num_scalers[PIPE_C] = 1;
+	}
+

  /*
   * Skylake and Broxton currently don't expose the topmost plane as its
   * use is exclusive with the legacy cursor and we only want to expose

drivers/gpu/drm/i915/intel_device_info.c +0 -3
@@ -325,9 +331,6 @@ void intel_device_info_runtime_init(struct
 drm_i915_private *dev_priv)
  		info->num_sprites[PIPE_A] = 2;
  		info->num_sprites[PIPE_B] = 2;
  		info->num_sprites[PIPE_C] = 1;
-		info->num_scalers[PIPE_A] = 2;
-		info->num_scalers[PIPE_B] = 2;
-		info->num_scalers[PIPE_C] = 1;
  	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
  		for_each_pipe(dev_priv, pipe)

  info->num_sprites[pipe] = 2; --
2.5.5

Quoted 4 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx