All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  8:50 [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" deepak.s
@ 2016-08-12  5:32 ` Chris Wilson
  2016-08-12 11:22   ` [PATCH v2] " deepak.s
  2016-08-12  6:03 ` ✗ Fi.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2) Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Chris Wilson @ 2016-08-12  5:32 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

On Fri, Aug 12, 2016 at 02:20:34PM +0530, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
> 
> With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
> So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]
> 
> This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
> 
> commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
> Author: Deepak S <deepak.s@linux.intel.com>
> Date:   Sat May 9 18:15:46 2015 +0530
> 
>     drm/i915/chv: Set min freq to efficient frequency on chv
> 
> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 81ab119..e59799a 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  	return rp1;
>  }
>  
> +static int cherryview_rps_min_freq(struct drm_i915_private *dev_priv)

Return int, but compute a u32? Just inconsistent.

> +{
> +	struct drm_device *dev = &dev_priv->drm;

struct pci_device *pdev = dev_priv->drm.pdev;

> +	u32 val, rpn;
> +
> +	if (dev->pdev->revision >= 0x20) {
> +		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
> +		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
> +		       FB_GFX_FREQ_FUSE_MASK);
> +	} else { /* For pre-production hardware */

	} else { /* For pre-production hardware use RPe instead */

> +		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
> +		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
> +		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
> +	}

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✗ Fi.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2)
  2016-08-12  8:50 [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" deepak.s
  2016-08-12  5:32 ` Chris Wilson
@ 2016-08-12  6:03 ` Patchwork
  2016-08-12  6:11 ` ✗ Ro.CI.BAT: " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2016-08-12  6:03 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

== Series Details ==

Series: Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2)
URL   : https://patchwork.freedesktop.org/series/10998/
State : failure

== Summary ==

  CC      drivers/pci/pcie/aer/aerdrv_acpi.o
  CC [M]  drivers/net/ethernet/intel/igb/e1000_mac.o
  CC      drivers/pci/pcie/aer/ecrc.o
  LD      drivers/pci/pcie/pcieportdrv.o
  CC [M]  drivers/net/ethernet/intel/igb/e1000_nvm.o
  CC [M]  drivers/net/ethernet/realtek/8139too.o
  CC [M]  drivers/net/ethernet/intel/igb/e1000_phy.o
  CC [M]  drivers/net/ethernet/realtek/r8169.o
  CC [M]  drivers/net/ethernet/intel/igb/e1000_mbx.o
  CC [M]  drivers/net/ethernet/intel/igb/e1000_i210.o
  LD      drivers/mmc/built-in.o
  LD      drivers/net/ethernet/intel/igbvf/built-in.o
  CC [M]  drivers/net/ethernet/intel/igbvf/vf.o
  CC [M]  drivers/net/ethernet/intel/igb/igb_ptp.o
  CC [M]  drivers/net/ethernet/intel/igbvf/mbx.o
  CC [M]  drivers/net/ethernet/intel/igb/igb_hwmon.o
  CC [M]  drivers/net/ethernet/intel/igbvf/ethtool.o
  LD      drivers/pci/pcie/aer/aerdriver.o
  LD      drivers/pci/pcie/aer/built-in.o
  CC [M]  drivers/net/ethernet/intel/igbvf/netdev.o
  LD      drivers/pci/pcie/built-in.o
  LD      drivers/pci/built-in.o
  LD [M]  drivers/net/ethernet/intel/e1000/e1000.o
  LD [M]  drivers/net/ethernet/intel/igb/igb.o
  LD [M]  drivers/net/ethernet/intel/igbvf/igbvf.o
  LD [M]  drivers/net/ethernet/intel/e1000e/e1000e.o
  LD      drivers/net/ethernet/built-in.o
  LD      drivers/net/built-in.o
Makefile:975: recipe for target 'drivers' failed
make: *** [drivers] Error 2

Full logs at /archive/deploy/logs/CI_Patchwork_build_2301

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✗ Ro.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2)
  2016-08-12  8:50 [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" deepak.s
  2016-08-12  5:32 ` Chris Wilson
  2016-08-12  6:03 ` ✗ Fi.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2) Patchwork
@ 2016-08-12  6:11 ` Patchwork
  2016-08-12  7:34 ` [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" Jani Nikula
  2016-08-12  8:12 ` ✗ Ro.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev3) Patchwork
  4 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2016-08-12  6:11 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

== Series Details ==

Series: Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2)
URL   : https://patchwork.freedesktop.org/series/10998/
State : failure

== Summary ==

  SHIPPED drivers/tty/vt/defkeymap.c
  CC [M]  drivers/ssb/driver_chipcommon.o
  CC      drivers/tty/serial/8250/8250_pnp.o
  CC      drivers/tty/vt/consolemap_deftbl.o
  CC      drivers/acpi/acpica/utxface.o
  CC [M]  drivers/ssb/driver_chipcommon_pmu.o
  CC [M]  drivers/ssb/driver_pcicore.o
  CC      drivers/tty/vt/defkeymap.o
  CC      drivers/tty/serial/8250/8250_port.o
  CC      drivers/acpi/acpica/utxfinit.o
  CC      drivers/acpi/acpica/utxferror.o
  CC      drivers/tty/serial/8250/8250_pci.o
  LD      drivers/scsi/scsi_mod.o
  CC      drivers/tty/serial/8250/8250_early.o
  CC      drivers/acpi/acpica/utxfmutex.o
  CC      drivers/tty/serial/8250/8250_mid.o
  LD      drivers/scsi/sd_mod.o
  LD      drivers/scsi/built-in.o
  LD      drivers/tty/vt/built-in.o
  LD      drivers/tty/serial/8250/8250.o
  LD      drivers/acpi/acpica/acpi.o
  LD [M]  drivers/ssb/ssb.o
  LD      drivers/tty/serial/8250/8250_base.o
  LD      drivers/tty/serial/8250/built-in.o
  LD      drivers/tty/serial/built-in.o
  LD      drivers/tty/built-in.o
  LD      drivers/acpi/acpica/built-in.o
  LD      drivers/acpi/built-in.o
Makefile:975: recipe for target 'drivers' failed
make: *** [drivers] Error 2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12 11:22   ` [PATCH v2] " deepak.s
@ 2016-08-12  6:12     ` kbuild test robot
  2016-08-12  6:23       ` Chris Wilson
  2016-08-12  6:14     ` kbuild test robot
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: kbuild test robot @ 2016-08-12  6:12 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]

Hi Deepak,

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.8-rc1 next-20160811]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/deepak-s-linux-intel-com/Revert-drm-i915-chv-Set-min-freq-to-efficient-frequency-on-chv/20160812-135320
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x012-201632 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_pm.c: In function 'cherryview_rps_min_freq':
>> drivers/gpu/drm/i915/intel_pm.c:5610:28: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     struct pci_device *pdev = dev_priv->drm.pdev;
                               ^~~~~~~~
>> drivers/gpu/drm/i915/intel_pm.c:5613:10: error: dereferencing pointer to incomplete type 'struct pci_device'
     if (pdev->revision >= 0x20) {
             ^~
   cc1: some warnings being treated as errors

vim +5610 drivers/gpu/drm/i915/intel_pm.c

  5604	
  5605		return rp1;
  5606	}
  5607	
  5608	static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
  5609	{
> 5610		struct pci_device *pdev = dev_priv->drm.pdev;
  5611		u32 val, rpn;
  5612	
> 5613		if (pdev->revision >= 0x20) {
  5614			val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
  5615			rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
  5616			       FB_GFX_FREQ_FUSE_MASK);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 22536 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12 11:22   ` [PATCH v2] " deepak.s
  2016-08-12  6:12     ` kbuild test robot
@ 2016-08-12  6:14     ` kbuild test robot
  2016-08-12  6:35     ` Ville Syrjälä
  2016-08-12  7:00     ` [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" kbuild test robot
  3 siblings, 0 replies; 17+ messages in thread
From: kbuild test robot @ 2016-08-12  6:14 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]

Hi Deepak,

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.8-rc1 next-20160811]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/deepak-s-linux-intel-com/Revert-drm-i915-chv-Set-min-freq-to-efficient-frequency-on-chv/20160812-135320
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x019-201632 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_pm.c: In function 'cherryview_rps_min_freq':
   drivers/gpu/drm/i915/intel_pm.c:5610:28: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     struct pci_device *pdev = dev_priv->drm.pdev;
                               ^~~~~~~~
   In file included from include/linux/err.h:4:0,
                    from include/linux/clk.h:15,
                    from include/linux/cpufreq.h:14,
                    from drivers/gpu/drm/i915/intel_pm.c:28:
   drivers/gpu/drm/i915/intel_pm.c:5613:10: error: dereferencing pointer to incomplete type 'struct pci_device'
     if (pdev->revision >= 0x20) {
             ^
   include/linux/compiler.h:151:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_pm.c:5613:2: note: in expansion of macro 'if'
     if (pdev->revision >= 0x20) {
     ^~
   cc1: some warnings being treated as errors

vim +/if +5613 drivers/gpu/drm/i915/intel_pm.c

  5597	
  5598	static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
  5599	{
  5600		u32 val, rp1;
  5601	
  5602		val = vlv_punit_read(dev_priv, FB_GFX_FMAX_AT_VMAX_FUSE);
  5603		rp1 = (val & FB_GFX_FREQ_FUSE_MASK);
  5604	
  5605		return rp1;
  5606	}
  5607	
  5608	static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
  5609	{
  5610		struct pci_device *pdev = dev_priv->drm.pdev;
  5611		u32 val, rpn;
  5612	
> 5613		if (pdev->revision >= 0x20) {
  5614			val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
  5615			rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
  5616			       FB_GFX_FREQ_FUSE_MASK);
  5617		} else { /* For pre-production hardware */
  5618			val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
  5619			rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
  5620			       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
  5621		}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 25980 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  6:12     ` kbuild test robot
@ 2016-08-12  6:23       ` Chris Wilson
  2016-08-12  7:35         ` Deepak S
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Wilson @ 2016-08-12  6:23 UTC (permalink / raw)
  To: kbuild test robot; +Cc: intel-gfx, kbuild-all

On Fri, Aug 12, 2016 at 02:12:42PM +0800, kbuild test robot wrote:
> Hi Deepak,
> 
> [auto build test ERROR on drm-intel/for-linux-next]
> [also build test ERROR on v4.8-rc1 next-20160811]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/deepak-s-linux-intel-com/Revert-drm-i915-chv-Set-min-freq-to-efficient-frequency-on-chv/20160812-135320
> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
> config: x86_64-randconfig-x012-201632 (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/gpu/drm/i915/intel_pm.c: In function 'cherryview_rps_min_freq':
> >> drivers/gpu/drm/i915/intel_pm.c:5610:28: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      struct pci_device *pdev = dev_priv->drm.pdev;

My bad, it's struct pci_dev.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12 11:22   ` [PATCH v2] " deepak.s
  2016-08-12  6:12     ` kbuild test robot
  2016-08-12  6:14     ` kbuild test robot
@ 2016-08-12  6:35     ` Ville Syrjälä
  2016-08-12  6:37       ` Ville Syrjälä
  2016-08-12  7:00     ` [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" kbuild test robot
  3 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjälä @ 2016-08-12  6:35 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

On Fri, Aug 12, 2016 at 04:52:15PM +0530, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
> 
> With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
> So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]
> 
> This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
> 
> commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
> Author: Deepak S <deepak.s@linux.intel.com>
> Date:   Sat May 9 18:15:46 2015 +0530
> 
>     drm/i915/chv: Set min freq to efficient frequency on chv
> 
> v2: Fix inconsistent return type. (Chris)
> 
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 81ab119..7844bf5 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  	return rp1;
>  }
>  
> +static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
> +{
> +	struct pci_device *pdev = dev_priv->drm.pdev;
> +	u32 val, rpn;
> +
> +	if (pdev->revision >= 0x20) {
> +		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
> +		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
> +		       FB_GFX_FREQ_FUSE_MASK);
> +	} else { /* For pre-production hardware */
> +		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
> +		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
> +		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);

Please drop the pre-production hw case. We got rid of all pre-production
junk long ago.

> +	}
> +
> +	return rpn;
> +}
> +
>  static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  {
>  	u32 val, rp1;
> @@ -5818,8 +5836,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
>  			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
>  			 dev_priv->rps.rp1_freq);
>  
> -	/* PUnit validated range is only [RPe, RP0] */
> -	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
> +	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
>  	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
>  			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
>  			 dev_priv->rps.min_freq);
> -- 
> 1.9.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  6:35     ` Ville Syrjälä
@ 2016-08-12  6:37       ` Ville Syrjälä
  2016-08-12 13:16         ` [PATCH v3] drm/i915/chv: Set min freq to RPn on CHV deepak.s
  0 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjälä @ 2016-08-12  6:37 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

On Fri, Aug 12, 2016 at 09:35:00AM +0300, Ville Syrjälä wrote:
> On Fri, Aug 12, 2016 at 04:52:15PM +0530, deepak.s@linux.intel.com wrote:
> > From: Deepak S <deepak.s@linux.intel.com>
> > 
> > With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
> > So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]
> > 
> > This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
> > 
> > commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
> > Author: Deepak S <deepak.s@linux.intel.com>
> > Date:   Sat May 9 18:15:46 2015 +0530
> > 
> >     drm/i915/chv: Set min freq to efficient frequency on chv
> > 
> > v2: Fix inconsistent return type. (Chris)
> > 
> > Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
> >  1 file changed, 19 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index 81ab119..7844bf5 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
> >  	return rp1;
> >  }
> >  
> > +static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
> > +{
> > +	struct pci_device *pdev = dev_priv->drm.pdev;
> > +	u32 val, rpn;
> > +
> > +	if (pdev->revision >= 0x20) {
> > +		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
> > +		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
> > +		       FB_GFX_FREQ_FUSE_MASK);
> > +	} else { /* For pre-production hardware */
> > +		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
> > +		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
> > +		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
> 
> Please drop the pre-production hw case. We got rid of all pre-production
> junk long ago.

Oh and maybe add a note to the commit message explaining why it's not a
1:1 revert. You can refer to commit 5b5929cbe3f7 ("drm/i915/chv: remove
pre-production hardware workarounds") as the reason for the discrepancy.

> 
> > +	}
> > +
> > +	return rpn;
> > +}
> > +
> >  static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
> >  {
> >  	u32 val, rp1;
> > @@ -5818,8 +5836,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
> >  			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
> >  			 dev_priv->rps.rp1_freq);
> >  
> > -	/* PUnit validated range is only [RPe, RP0] */
> > -	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
> > +	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
> >  	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
> >  			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
> >  			 dev_priv->rps.min_freq);
> > -- 
> > 1.9.1
> 
> -- 
> Ville Syrjälä
> Intel OTC

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12 11:22   ` [PATCH v2] " deepak.s
                       ` (2 preceding siblings ...)
  2016-08-12  6:35     ` Ville Syrjälä
@ 2016-08-12  7:00     ` kbuild test robot
  3 siblings, 0 replies; 17+ messages in thread
From: kbuild test robot @ 2016-08-12  7:00 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]

Hi Deepak,

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.8-rc1 next-20160811]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/deepak-s-linux-intel-com/Revert-drm-i915-chv-Set-min-freq-to-efficient-frequency-on-chv/20160812-135320
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-i0-201632 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.3-14) 4.9.3
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_pm.c: In function 'cherryview_rps_min_freq':
>> drivers/gpu/drm/i915/intel_pm.c:5610:28: warning: initialization from incompatible pointer type
     struct pci_device *pdev = dev_priv->drm.pdev;
                               ^
>> drivers/gpu/drm/i915/intel_pm.c:5613:10: error: dereferencing pointer to incomplete type
     if (pdev->revision >= 0x20) {
             ^

vim +5613 drivers/gpu/drm/i915/intel_pm.c

  5604	
  5605		return rp1;
  5606	}
  5607	
  5608	static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
  5609	{
> 5610		struct pci_device *pdev = dev_priv->drm.pdev;
  5611		u32 val, rpn;
  5612	
> 5613		if (pdev->revision >= 0x20) {
  5614			val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
  5615			rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
  5616			       FB_GFX_FREQ_FUSE_MASK);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 26295 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  8:50 [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" deepak.s
                   ` (2 preceding siblings ...)
  2016-08-12  6:11 ` ✗ Ro.CI.BAT: " Patchwork
@ 2016-08-12  7:34 ` Jani Nikula
  2016-08-12 10:33   ` Deepak S
  2016-08-12  8:12 ` ✗ Ro.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev3) Patchwork
  4 siblings, 1 reply; 17+ messages in thread
From: Jani Nikula @ 2016-08-12  7:34 UTC (permalink / raw)
  To: deepak.s, intel-gfx

On Fri, 12 Aug 2016, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
>
> With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
> So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]

IOW, this patch will regress for anyone who does *not* have the latest
Punit firmware. Can we check for the firmware version, and act
accordingly? How does one go about updating the firmware, if at all?

Definitely NAK until the above is cleared.

BR,
Jani.


>
> This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
>
> commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
> Author: Deepak S <deepak.s@linux.intel.com>
> Date:   Sat May 9 18:15:46 2015 +0530
>
>     drm/i915/chv: Set min freq to efficient frequency on chv
>
> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 81ab119..e59799a 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  	return rp1;
>  }
>  
> +static int cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
> +{
> +	struct drm_device *dev = &dev_priv->drm;
> +	u32 val, rpn;
> +
> +	if (dev->pdev->revision >= 0x20) {
> +		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
> +		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
> +		       FB_GFX_FREQ_FUSE_MASK);
> +	} else { /* For pre-production hardware */
> +		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
> +		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
> +		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
> +	}
> +
> +	return rpn;
> +}
> +
>  static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  {
>  	u32 val, rp1;
> @@ -5818,8 +5836,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
>  			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
>  			 dev_priv->rps.rp1_freq);
>  
> -	/* PUnit validated range is only [RPe, RP0] */
> -	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
> +	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
>  	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
>  			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
>  			 dev_priv->rps.min_freq);

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  6:23       ` Chris Wilson
@ 2016-08-12  7:35         ` Deepak S
  0 siblings, 0 replies; 17+ messages in thread
From: Deepak S @ 2016-08-12  7:35 UTC (permalink / raw)
  To: Chris Wilson, kbuild test robot, intel-gfx, kbuild-all



On 12/08/16 11:53 AM, Chris Wilson wrote:
> On Fri, Aug 12, 2016 at 02:12:42PM +0800, kbuild test robot wrote:
>> Hi Deepak,
>>
>> [auto build test ERROR on drm-intel/for-linux-next]
>> [also build test ERROR on v4.8-rc1 next-20160811]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>
>> url:    https://github.com/0day-ci/linux/commits/deepak-s-linux-intel-com/Revert-drm-i915-chv-Set-min-freq-to-efficient-frequency-on-chv/20160812-135320
>> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
>> config: x86_64-randconfig-x012-201632 (attached as .config)
>> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
>> reproduce:
>>          # save the attached .config to linux build tree
>>          make ARCH=x86_64
>>
>> All errors (new ones prefixed by >>):
>>
>>     drivers/gpu/drm/i915/intel_pm.c: In function 'cherryview_rps_min_freq':
>>>> drivers/gpu/drm/i915/intel_pm.c:5610:28: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       struct pci_device *pdev = dev_priv->drm.pdev;
> My bad, it's struct pci_dev.
> -Chris
Oops sorry. I made the changes and tested the code. But forgot to amend 
and send it :(
Let me re-send the code.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✗ Ro.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev3)
  2016-08-12  8:50 [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" deepak.s
                   ` (3 preceding siblings ...)
  2016-08-12  7:34 ` [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" Jani Nikula
@ 2016-08-12  8:12 ` Patchwork
  4 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2016-08-12  8:12 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

== Series Details ==

Series: Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev3)
URL   : https://patchwork.freedesktop.org/series/10998/
State : failure

== Summary ==

Series 10998v3 Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
http://patchwork.freedesktop.org/api/1.0/series/10998/revisions/3/mbox

Test drv_module_reload_basic:
                pass       -> SKIP       (ro-ivb-i7-3770)
Test gem_exec_suspend:
        Subgroup basic-s3:
                dmesg-warn -> PASS       (ro-bdw-i7-5600u)
Test kms_cursor_legacy:
        Subgroup basic-cursor-vs-flip-varying-size:
                pass       -> FAIL       (ro-ilk1-i5-650)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-b-frame-sequence:
                fail       -> PASS       (ro-ivb2-i7-3770)
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> INCOMPLETE (fi-skl-i7-6700k)
                skip       -> DMESG-WARN (ro-bdw-i5-5250u)
                pass       -> INCOMPLETE (fi-snb-i7-2600)
        Subgroup suspend-read-crc-pipe-c:
                skip       -> DMESG-WARN (ro-bdw-i5-5250u)

fi-hsw-i7-4770k  total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-qkkr      total:244  pass:185  dwarn:28  dfail:1   fail:3   skip:27 
fi-skl-i7-6700k  total:207  pass:176  dwarn:2   dfail:2   fail:0   skip:26 
fi-snb-i7-2600   total:207  pass:172  dwarn:0   dfail:0   fail:0   skip:34 
ro-bdw-i5-5250u  total:240  pass:218  dwarn:4   dfail:0   fail:2   skip:16 
ro-bdw-i7-5600u  total:240  pass:207  dwarn:0   dfail:0   fail:1   skip:32 
ro-bsw-n3050     total:240  pass:194  dwarn:0   dfail:0   fail:4   skip:42 
ro-byt-n2820     total:240  pass:197  dwarn:0   dfail:0   fail:3   skip:40 
ro-hsw-i3-4010u  total:240  pass:214  dwarn:0   dfail:0   fail:0   skip:26 
ro-hsw-i7-4770r  total:240  pass:185  dwarn:0   dfail:0   fail:0   skip:55 
ro-ilk1-i5-650   total:235  pass:173  dwarn:0   dfail:0   fail:2   skip:60 
ro-ivb-i7-3770   total:240  pass:204  dwarn:0   dfail:0   fail:0   skip:36 
ro-ivb2-i7-3770  total:240  pass:209  dwarn:0   dfail:0   fail:0   skip:31 
ro-skl3-i5-6260u total:240  pass:222  dwarn:0   dfail:0   fail:4   skip:14 

Results at /archive/results/CI_IGT_test/RO_Patchwork_1850/

4a26251 drm-intel-nightly: 2016y-08m-11d-16h-12m-42s UTC integration manifest
2fd0810 drm/i915/chv: Set min freq to RPn on CHV.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
@ 2016-08-12  8:50 deepak.s
  2016-08-12  5:32 ` Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: deepak.s @ 2016-08-12  8:50 UTC (permalink / raw)
  To: intel-gfx

From: Deepak S <deepak.s@linux.intel.com>

With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]

This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.

commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
Author: Deepak S <deepak.s@linux.intel.com>
Date:   Sat May 9 18:15:46 2015 +0530

    drm/i915/chv: Set min freq to efficient frequency on chv

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 81ab119..e59799a 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
 	return rp1;
 }
 
+static int cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
+{
+	struct drm_device *dev = &dev_priv->drm;
+	u32 val, rpn;
+
+	if (dev->pdev->revision >= 0x20) {
+		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
+		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
+		       FB_GFX_FREQ_FUSE_MASK);
+	} else { /* For pre-production hardware */
+		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
+		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
+		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
+	}
+
+	return rpn;
+}
+
 static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
 {
 	u32 val, rp1;
@@ -5818,8 +5836,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
 			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
 			 dev_priv->rps.rp1_freq);
 
-	/* PUnit validated range is only [RPe, RP0] */
-	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
+	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
 	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
 			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
 			 dev_priv->rps.min_freq);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  7:34 ` [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" Jani Nikula
@ 2016-08-12 10:33   ` Deepak S
  0 siblings, 0 replies; 17+ messages in thread
From: Deepak S @ 2016-08-12 10:33 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx



On 12/08/16 1:04 PM, Jani Nikula wrote:
> On Fri, 12 Aug 2016, deepak.s@linux.intel.com wrote:
>> From: Deepak S <deepak.s@linux.intel.com>
>>
>> With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
>> So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]
> IOW, this patch will regress for anyone who does *not* have the latest
> Punit firmware. Can we check for the firmware version, and act
> accordingly? How does one go about updating the firmware, if at all?
>
> Definitely NAK until the above is cleared.
>
> BR,
> Jani.

I will check with the firmware team when this was released.
I think the fix was added long back, I will confirm.

>
>> This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
>>
>> commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
>> Author: Deepak S <deepak.s@linux.intel.com>
>> Date:   Sat May 9 18:15:46 2015 +0530
>>
>>      drm/i915/chv: Set min freq to efficient frequency on chv
>>
>> Signed-off-by: Deepak S <deepak.s@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
>>   1 file changed, 19 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index 81ab119..e59799a 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
>>   	return rp1;
>>   }
>>   
>> +static int cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
>> +{
>> +	struct drm_device *dev = &dev_priv->drm;
>> +	u32 val, rpn;
>> +
>> +	if (dev->pdev->revision >= 0x20) {
>> +		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
>> +		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
>> +		       FB_GFX_FREQ_FUSE_MASK);
>> +	} else { /* For pre-production hardware */
>> +		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
>> +		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
>> +		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
>> +	}
>> +
>> +	return rpn;
>> +}
>> +
>>   static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
>>   {
>>   	u32 val, rp1;
>> @@ -5818,8 +5836,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
>>   			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
>>   			 dev_priv->rps.rp1_freq);
>>   
>> -	/* PUnit validated range is only [RPe, RP0] */
>> -	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
>> +	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
>>   	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
>>   			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
>>   			 dev_priv->rps.min_freq);

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv"
  2016-08-12  5:32 ` Chris Wilson
@ 2016-08-12 11:22   ` deepak.s
  2016-08-12  6:12     ` kbuild test robot
                       ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: deepak.s @ 2016-08-12 11:22 UTC (permalink / raw)
  To: intel-gfx

From: Deepak S <deepak.s@linux.intel.com>

With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]

This reverts commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.

commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
Author: Deepak S <deepak.s@linux.intel.com>
Date:   Sat May 9 18:15:46 2015 +0530

    drm/i915/chv: Set min freq to efficient frequency on chv

v2: Fix inconsistent return type. (Chris)

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 81ab119..7844bf5 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5579,6 +5579,24 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
 	return rp1;
 }
 
+static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
+{
+	struct pci_device *pdev = dev_priv->drm.pdev;
+	u32 val, rpn;
+
+	if (pdev->revision >= 0x20) {
+		val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
+		rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
+		       FB_GFX_FREQ_FUSE_MASK);
+	} else { /* For pre-production hardware */
+		val = vlv_punit_read(dev_priv, PUNIT_GPU_STATUS_REG);
+		rpn = ((val >> PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT) &
+		       PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK);
+	}
+
+	return rpn;
+}
+
 static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
 {
 	u32 val, rp1;
@@ -5818,8 +5836,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
 			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
 			 dev_priv->rps.rp1_freq);
 
-	/* PUnit validated range is only [RPe, RP0] */
-	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
+	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
 	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
 			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
 			 dev_priv->rps.min_freq);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v3] drm/i915/chv: Set min freq to RPn on CHV.
  2016-08-12  6:37       ` Ville Syrjälä
@ 2016-08-12 13:16         ` deepak.s
  2017-02-14 21:28           ` Ville Syrjälä
  0 siblings, 1 reply; 17+ messages in thread
From: deepak.s @ 2016-08-12 13:16 UTC (permalink / raw)
  To: intel-gfx

From: Deepak S <deepak.s@linux.intel.com>

With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]

This is not a 1:1 revert of the commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
You can refer to commit 5b5929cbe3f7 ("drm/i915/chv: remove
pre-production hardware workarounds") as the reason for the discrepancy

commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
Author: Deepak S <deepak.s@linux.intel.com>
Date:   Sat May 9 18:15:46 2015 +0530

    drm/i915/chv: Set min freq to efficient frequency on chv

v2: Fix inconsistent return type. (Chris)
v3: drop pre-production hw case (Ville)

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 81ab119..fa80881 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5579,6 +5579,17 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
 	return rp1;
 }
 
+static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
+{
+	u32 val, rpn;
+
+	val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
+	rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
+		       FB_GFX_FREQ_FUSE_MASK);
+
+	return rpn;
+}
+
 static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
 {
 	u32 val, rp1;
@@ -5818,8 +5829,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
 			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
 			 dev_priv->rps.rp1_freq);
 
-	/* PUnit validated range is only [RPe, RP0] */
-	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
+	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
 	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
 			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
 			 dev_priv->rps.min_freq);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v3] drm/i915/chv: Set min freq to RPn on CHV.
  2016-08-12 13:16         ` [PATCH v3] drm/i915/chv: Set min freq to RPn on CHV deepak.s
@ 2017-02-14 21:28           ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2017-02-14 21:28 UTC (permalink / raw)
  To: deepak.s; +Cc: intel-gfx

On Fri, Aug 12, 2016 at 06:46:41PM +0530, deepak.s@linux.intel.com wrote:
> From: Deepak S <deepak.s@linux.intel.com>
> 
> With latest Punit FW, vgg input voltag drop falling to minimum is fixed.
> So reverting the WA patch & moving to turbo freq opreation range to [RPn -> RP0]
> 
> This is not a 1:1 revert of the commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44.
> You can refer to commit 5b5929cbe3f7 ("drm/i915/chv: remove
> pre-production hardware workarounds") as the reason for the discrepancy
> 
> commit 5b7c91b78b1ce6663e0f1f037f6cb4d7c9537d44
> Author: Deepak S <deepak.s@linux.intel.com>
> Date:   Sat May 9 18:15:46 2015 +0530
> 
>     drm/i915/chv: Set min freq to efficient frequency on chv
> 
> v2: Fix inconsistent return type. (Chris)
> v3: drop pre-production hw case (Ville)
> 
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Deepak S <deepak.s@linux.intel.com>

I was never able to reproduce the supposed Punit problems with <RPe
frequencies. In fact what I always observed was that the voltage did end
up lower at RPn than at RPe. IIRC it might have been lower even while
we were in RC6. I can't actually double check that right now since they
made SVID inaccessible via sideband on CHV and I'm too lazy to set up
the extra equipment for it now.

What I can say is that RAPL is reporting ~10 mW lower power consumption
with vsynced glxgears running when we're running at 200 MHz rather than
at 400 MHz. So I'm going to decalare this patch good.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
and pushed to dinq. Thanks for the patch.

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 81ab119..fa80881 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5579,6 +5579,17 @@ static int cherryview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  	return rp1;
>  }
>  
> +static u32 cherryview_rps_min_freq(struct drm_i915_private *dev_priv)
> +{
> +	u32 val, rpn;
> +
> +	val = vlv_punit_read(dev_priv, FB_GFX_FMIN_AT_VMIN_FUSE);
> +	rpn = ((val >> FB_GFX_FMIN_AT_VMIN_FUSE_SHIFT) &
> +		       FB_GFX_FREQ_FUSE_MASK);
> +
> +	return rpn;
> +}
> +
>  static int valleyview_rps_guar_freq(struct drm_i915_private *dev_priv)
>  {
>  	u32 val, rp1;
> @@ -5818,8 +5829,7 @@ static void cherryview_init_gt_powersave(struct drm_i915_private *dev_priv)
>  			 intel_gpu_freq(dev_priv, dev_priv->rps.rp1_freq),
>  			 dev_priv->rps.rp1_freq);
>  
> -	/* PUnit validated range is only [RPe, RP0] */
> -	dev_priv->rps.min_freq = dev_priv->rps.efficient_freq;
> +	dev_priv->rps.min_freq = cherryview_rps_min_freq(dev_priv);
>  	DRM_DEBUG_DRIVER("min GPU freq: %d MHz (%u)\n",
>  			 intel_gpu_freq(dev_priv, dev_priv->rps.min_freq),
>  			 dev_priv->rps.min_freq);
> -- 
> 1.9.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-02-14 21:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-12  8:50 [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" deepak.s
2016-08-12  5:32 ` Chris Wilson
2016-08-12 11:22   ` [PATCH v2] " deepak.s
2016-08-12  6:12     ` kbuild test robot
2016-08-12  6:23       ` Chris Wilson
2016-08-12  7:35         ` Deepak S
2016-08-12  6:14     ` kbuild test robot
2016-08-12  6:35     ` Ville Syrjälä
2016-08-12  6:37       ` Ville Syrjälä
2016-08-12 13:16         ` [PATCH v3] drm/i915/chv: Set min freq to RPn on CHV deepak.s
2017-02-14 21:28           ` Ville Syrjälä
2016-08-12  7:00     ` [PATCH v2] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" kbuild test robot
2016-08-12  6:03 ` ✗ Fi.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev2) Patchwork
2016-08-12  6:11 ` ✗ Ro.CI.BAT: " Patchwork
2016-08-12  7:34 ` [PATCH] Revert "drm/i915/chv: Set min freq to efficient frequency on chv" Jani Nikula
2016-08-12 10:33   ` Deepak S
2016-08-12  8:12 ` ✗ Ro.CI.BAT: failure for Revert "drm/i915/chv: Set min freq to efficient frequency on chv" (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.