diff mbox

drm/i915: Moving scaler numbers to runtime init

Message ID 1479812178-22687-1-git-send-email-nabendu.bikash.maiti@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nabendu Maiti Nov. 22, 2016, 10:56 a.m. UTC
Numbers of scalers initialization is moved to runtime init for platform
specific initialization.

Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c      |  2 +-
 drivers/gpu/drm/i915/i915_drv.h          |  1 +
 drivers/gpu/drm/i915/intel_device_info.c |  3 +++
 drivers/gpu/drm/i915/intel_display.c     | 10 ++--------
 drivers/gpu/drm/i915/intel_drv.h         |  4 ++--
 5 files changed, 9 insertions(+), 11 deletions(-)

Comments

Chris Wilson Nov. 22, 2016, 10:52 a.m. UTC | #1
On Tue, Nov 22, 2016 at 04:26:18PM +0530, Nabendu Maiti wrote:
> Numbers of scalers initialization is moved to runtime init for platform
> specific initialization.
> 
> Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c      |  2 +-
>  drivers/gpu/drm/i915/i915_drv.h          |  1 +
>  drivers/gpu/drm/i915/intel_device_info.c |  3 +++
>  drivers/gpu/drm/i915/intel_display.c     | 10 ++--------
>  drivers/gpu/drm/i915/intel_drv.h         |  4 ++--
>  5 files changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index b7f42c4..8349abe 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -3080,7 +3080,7 @@ static void intel_scaler_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  			   pipe_config->scaler_state.scaler_users,
>  			   pipe_config->scaler_state.scaler_id);
>  
> -		for (i = 0; i < SKL_NUM_SCALERS; i++) {
> +		for (i = 0; i < num_scalers; i++) {
>  			struct intel_scaler *sc =
>  					&pipe_config->scaler_state.scalers[i];
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index be67aee..6eed9c2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -731,6 +731,7 @@ struct intel_device_info {
>  	u16 device_id;
>  	u8 num_pipes;
>  	u8 num_sprites[I915_MAX_PIPES];
> +	u8 num_scalers[I915_MAX_PIPES];
>  	u8 gen;
>  	u16 gen_mask;
>  	u8 ring_mask; /* Rings supported by the HW */
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 185e3bb..9b8dc71 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -282,6 +282,9 @@ 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_sprites[PIPE_C] = 1;

Since this contains a cut-n-paste typo that wasn't picked up by BAT,
please fix both.
-Chris
Saarinen, Jani Nov. 29, 2016, 9:26 a.m. UTC | #2
> == Series Details ==

> 

> Series: drm/i915: Moving scaler numbers to runtime init (rev5)

> URL   : https://patchwork.freedesktop.org/series/15726/

> State : warning

> 

> == Summary ==

> 

> Series 15726v5 drm/i915: Moving scaler numbers to runtime init

> https://patchwork.freedesktop.org/api/1.0/series/15726/revisions/5/mbo

> x/

> 

> Test kms_pipe_crc_basic:

>         Subgroup nonblocking-crc-pipe-a:

>                 pass       -> DMESG-WARN (fi-ilk-650)

Still there:
https://bugs.freedesktop.org/show_bug.cgi?id=98251 
Note this was re-run due to some CI issues not run on all systems.

> fi-bdw-5557u     total:245  pass:230  dwarn:0   dfail:0   fail:0   skip:15

> fi-bsw-n3050     total:245  pass:205  dwarn:0   dfail:0   fail:0   skip:40

> fi-bxt-t5700     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28

> fi-byt-j1900     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28

> fi-byt-n2820     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32

> fi-hsw-4770      total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20

> fi-hsw-4770r     total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20

> fi-ilk-650       total:245  pass:191  dwarn:1   dfail:0   fail:0   skip:53

> fi-ivb-3520m     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22

> fi-ivb-3770      total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22

> fi-kbl-7500u     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22

> fi-skl-6260u     total:245  pass:231  dwarn:0   dfail:0   fail:0   skip:14

> fi-skl-6700hq    total:245  pass:224  dwarn:0   dfail:0   fail:0   skip:21

> fi-skl-6700k     total:245  pass:223  dwarn:1   dfail:0   fail:0   skip:21

> fi-snb-2520m     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32

> fi-snb-2600      total:245  pass:212  dwarn:0   dfail:0   fail:0   skip:33

> 

> e9e1f8451437763fddfc9e53d008dcacd3ca2ad1 drm-tip: 2016y-11m-29d-

> 04h-19m-22s UTC integration manifest

> 0ffa6c6 drm/i915: Move number of scalers initialization to runtime init

> 

> == Logs ==

> 

> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3133/


Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
Nabendu Maiti Nov. 29, 2016, 10:10 a.m. UTC | #3
Its probably false alarm. Fifo underrun is not related to this patch.

On 11/29/2016 2:56 PM, Saarinen, Jani wrote:
>> == Series Details ==
>>
>> Series: drm/i915: Moving scaler numbers to runtime init (rev5)
>> URL   : https://patchwork.freedesktop.org/series/15726/
>> State : warning
>>
>> == Summary ==
>>
>> Series 15726v5 drm/i915: Moving scaler numbers to runtime init
>> https://patchwork.freedesktop.org/api/1.0/series/15726/revisions/5/mbo
>> x/
>>
>> Test kms_pipe_crc_basic:
>>         Subgroup nonblocking-crc-pipe-a:
>>                 pass       -> DMESG-WARN (fi-ilk-650)
> Still there:
> https://bugs.freedesktop.org/show_bug.cgi?id=98251
> Note this was re-run due to some CI issues not run on all systems.
>
>> fi-bdw-5557u     total:245  pass:230  dwarn:0   dfail:0   fail:0   skip:15
>> fi-bsw-n3050     total:245  pass:205  dwarn:0   dfail:0   fail:0   skip:40
>> fi-bxt-t5700     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28
>> fi-byt-j1900     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28
>> fi-byt-n2820     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32
>> fi-hsw-4770      total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20
>> fi-hsw-4770r     total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20
>> fi-ilk-650       total:245  pass:191  dwarn:1   dfail:0   fail:0   skip:53
>> fi-ivb-3520m     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22
>> fi-ivb-3770      total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22
>> fi-kbl-7500u     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22
>> fi-skl-6260u     total:245  pass:231  dwarn:0   dfail:0   fail:0   skip:14
>> fi-skl-6700hq    total:245  pass:224  dwarn:0   dfail:0   fail:0   skip:21
>> fi-skl-6700k     total:245  pass:223  dwarn:1   dfail:0   fail:0   skip:21
>> fi-snb-2520m     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32
>> fi-snb-2600      total:245  pass:212  dwarn:0   dfail:0   fail:0   skip:33
>>
>> e9e1f8451437763fddfc9e53d008dcacd3ca2ad1 drm-tip: 2016y-11m-29d-
>> 04h-19m-22s UTC integration manifest
>> 0ffa6c6 drm/i915: Move number of scalers initialization to runtime init
>>
>> == Logs ==
>>
>> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3133/
>
> Jani Saarinen
> Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
>
>
Saarinen, Jani Nov. 29, 2016, 10:14 a.m. UTC | #4
Hi, 
> -----Original Message-----

> From: Maiti, Nabendu Bikash

> Sent: Tuesday, November 29, 2016 12:10 PM

> To: Saarinen, Jani <jani.saarinen@intel.com>; intel-

> gfx@lists.freedesktop.org

> Subject: Re: [Intel-gfx] ✗ Fi.CI.BAT: warning for drm/i915: Moving scaler

> numbers to runtime init (rev5)

> 

> Its probably false alarm. Fifo underrun is not related to this patch.

Yes, This was meant to say known issue and not related to this patch series.

> 

> On 11/29/2016 2:56 PM, Saarinen, Jani wrote:

> >> == Series Details ==

> >>

> >> Series: drm/i915: Moving scaler numbers to runtime init (rev5)

> >> URL   : https://patchwork.freedesktop.org/series/15726/

> >> State : warning

> >>

> >> == Summary ==

> >>

> >> Series 15726v5 drm/i915: Moving scaler numbers to runtime init

> >>

> https://patchwork.freedesktop.org/api/1.0/series/15726/revisions/5/mb

> >> o

> >> x/

> >>

> >> Test kms_pipe_crc_basic:

> >>         Subgroup nonblocking-crc-pipe-a:

> >>                 pass       -> DMESG-WARN (fi-ilk-650)

> > Still there:

> > https://bugs.freedesktop.org/show_bug.cgi?id=98251

> > Note this was re-run due to some CI issues not run on all systems.

> >

> >> fi-bdw-5557u     total:245  pass:230  dwarn:0   dfail:0   fail:0   skip:15

> >> fi-bsw-n3050     total:245  pass:205  dwarn:0   dfail:0   fail:0   skip:40

> >> fi-bxt-t5700     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28

> >> fi-byt-j1900     total:245  pass:217  dwarn:0   dfail:0   fail:0   skip:28

> >> fi-byt-n2820     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32

> >> fi-hsw-4770      total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20

> >> fi-hsw-4770r     total:245  pass:225  dwarn:0   dfail:0   fail:0   skip:20

> >> fi-ilk-650       total:245  pass:191  dwarn:1   dfail:0   fail:0   skip:53

> >> fi-ivb-3520m     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22

> >> fi-ivb-3770      total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22

> >> fi-kbl-7500u     total:245  pass:223  dwarn:0   dfail:0   fail:0   skip:22

> >> fi-skl-6260u     total:245  pass:231  dwarn:0   dfail:0   fail:0   skip:14

> >> fi-skl-6700hq    total:245  pass:224  dwarn:0   dfail:0   fail:0   skip:21

> >> fi-skl-6700k     total:245  pass:223  dwarn:1   dfail:0   fail:0   skip:21

> >> fi-snb-2520m     total:245  pass:213  dwarn:0   dfail:0   fail:0   skip:32

> >> fi-snb-2600      total:245  pass:212  dwarn:0   dfail:0   fail:0   skip:33

> >>

> >> e9e1f8451437763fddfc9e53d008dcacd3ca2ad1 drm-tip: 2016y-11m-

> 29d-

> >> 04h-19m-22s UTC integration manifest

> >> 0ffa6c6 drm/i915: Move number of scalers initialization to runtime

> >> init

> >>

> >> == Logs ==

> >>

> >> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3133/

> >

> > Jani Saarinen

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

> >

> >

> 

> --

> Regards,

> Nabendu
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index b7f42c4..8349abe 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3080,7 +3080,7 @@  static void intel_scaler_info(struct seq_file *m, struct intel_crtc *intel_crtc)
 			   pipe_config->scaler_state.scaler_users,
 			   pipe_config->scaler_state.scaler_id);
 
-		for (i = 0; i < SKL_NUM_SCALERS; i++) {
+		for (i = 0; i < num_scalers; i++) {
 			struct intel_scaler *sc =
 					&pipe_config->scaler_state.scalers[i];
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index be67aee..6eed9c2 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -731,6 +731,7 @@  struct intel_device_info {
 	u16 device_id;
 	u8 num_pipes;
 	u8 num_sprites[I915_MAX_PIPES];
+	u8 num_scalers[I915_MAX_PIPES];
 	u8 gen;
 	u16 gen_mask;
 	u8 ring_mask; /* Rings supported by the HW */
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 185e3bb..9b8dc71 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -282,6 +282,9 @@  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_sprites[PIPE_C] = 1;
 	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
 		for_each_pipe(dev_priv, pipe)
 			info->num_sprites[pipe] = 2;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bd2c99e..d2023c4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15269,14 +15269,8 @@  static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
 	crtc_state->base.crtc = &intel_crtc->base;
 
 	/* initialize shared scalers */
-	if (INTEL_GEN(dev_priv) >= 9) {
-		if (pipe == PIPE_C)
-			intel_crtc->num_scalers = 1;
-		else
-			intel_crtc->num_scalers = SKL_NUM_SCALERS;
-
-		skl_init_scalers(dev_priv, intel_crtc, crtc_state);
-	}
+	intel_crtc->num_scalers =  dev_priv->info.num_scalers[pipe];
+	skl_init_scalers(dev_priv, intel_crtc, crtc_state);
 
 	primary = intel_primary_plane_create(dev_priv, pipe);
 	if (IS_ERR(primary)) {
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index cd132c2..3f89607 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -430,8 +430,8 @@  struct intel_scaler {
 };
 
 struct intel_crtc_scaler_state {
-#define SKL_NUM_SCALERS 2
-	struct intel_scaler scalers[SKL_NUM_SCALERS];
+#define MAX_NUM_SCALERS 2
+	struct intel_scaler scalers[MAX_NUM_SCALERS];
 
 	/*
 	 * scaler_users: keeps track of users requesting scalers on this crtc.