All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: implement IPS feature
@ 2013-05-31 19:33 Paulo Zanoni
  2013-05-31 19:33 ` [PATCH 2/3] drm/i915: add enable_ips module option Paulo Zanoni
  2013-05-31 19:33 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
  0 siblings, 2 replies; 8+ messages in thread
From: Paulo Zanoni @ 2013-05-31 19:33 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Intermediate Pixel Storage is a feature that should reduce the number
of times the display engine wakes up memory to read pixels, so it
should allow deeper PC states. IPS can only be enabled on ULT pipe A
with 8:8:8 pipe pixel formats.

With eDP 1920x1080 and correct watermarks but without FBC this moves
my PC7 residency from 2.5% to around 38%.

v2: - It's tied to pipe A, not port A
    - Add pipe_config support (Chris)
    - Add some assertions (Chris)
    - Rebase against latest dinq
v3: - Don't ever set ips_enabled to false (Daniel)
    - Only check for ips_enabled at hsw_disable_ips (Daniel)
v4: - Add hsw_compute_ips_config (Daniel)
    - Use the new dump_pipe_config (Daniel)

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h      | 11 +++++
 drivers/gpu/drm/i915/intel_display.c | 78 ++++++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/intel_drv.h     |  2 +
 3 files changed, 88 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index e004221..5ab0e31 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1020,6 +1020,8 @@
 /* Framebuffer compression for Ivybridge */
 #define IVB_FBC_RT_BASE			0x7020
 
+#define IPS_CTL		0x43408
+#define   IPS_ENABLE	(1 << 31)
 
 #define _HSW_PIPE_SLICE_CHICKEN_1_A	0x420B0
 #define _HSW_PIPE_SLICE_CHICKEN_1_B	0x420B4
@@ -3663,6 +3665,15 @@
 #define _LGC_PALETTE_B           0x4a800
 #define LGC_PALETTE(pipe) _PIPE(pipe, _LGC_PALETTE_A, _LGC_PALETTE_B)
 
+#define _GAMMA_MODE_A		0x4a480
+#define _GAMMA_MODE_B		0x4ac80
+#define GAMMA_MODE(pipe) _PIPE(pipe, _GAMMA_MODE_A, _GAMMA_MODE_B)
+#define GAMMA_MODE_MODE_MASK	(3 << 0)
+#define GAMMA_MODE_MODE_8bit	(0 << 0)
+#define GAMMA_MODE_MODE_10bit	(1 << 0)
+#define GAMMA_MODE_MODE_12bit	(2 << 0)
+#define GAMMA_MODE_MODE_SPLIT	(3 << 0)
+
 /* interrupts */
 #define DE_MASTER_IRQ_CONTROL   (1 << 31)
 #define DE_SPRITEB_FLIP_DONE    (1 << 29)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 648049a..5ca8fe8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3247,6 +3247,42 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
 	intel_wait_for_vblank(dev, intel_crtc->pipe);
 }
 
+/* IPS only exists on ULT machines and is tied to pipe A. */
+static bool hsw_crtc_supports_ips(struct intel_crtc *crtc)
+{
+	return IS_ULT(crtc->base.dev) && crtc->pipe == PIPE_A;
+}
+
+static void hsw_enable_ips(struct intel_crtc *crtc)
+{
+	struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
+
+	if (!crtc->config.ips_enabled)
+		return;
+
+	/* We can only enable IPS after we enable a plane and wait for a vblank.
+	 * We guarantee that the plane is enabled by calling intel_enable_ips
+	 * only after intel_enable_plane. And intel_enable_plane already waits
+	 * for a vblank, so all we need to do here is to enable the IPS bit. */
+	assert_plane_enabled(dev_priv, crtc->plane);
+	I915_WRITE(IPS_CTL, IPS_ENABLE);
+}
+
+static void hsw_disable_ips(struct intel_crtc *crtc)
+{
+	struct drm_device *dev = crtc->base.dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	if (!crtc->config.ips_enabled)
+		return;
+
+	assert_plane_enabled(dev_priv, crtc->plane);
+	I915_WRITE(IPS_CTL, 0);
+
+	/* We need to wait for a vblank before we can disable the plane. */
+	intel_wait_for_vblank(dev, crtc->pipe);
+}
+
 static void haswell_crtc_enable(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
@@ -3294,6 +3330,8 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
 			  intel_crtc->config.has_pch_encoder);
 	intel_enable_plane(dev_priv, plane, pipe);
 
+	hsw_enable_ips(intel_crtc);
+
 	if (intel_crtc->config.has_pch_encoder)
 		lpt_pch_enable(crtc);
 
@@ -3436,6 +3474,8 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
 	if (dev_priv->cfb_plane == plane)
 		intel_disable_fbc(dev);
 
+	hsw_disable_ips(intel_crtc);
+
 	intel_disable_plane(dev_priv, plane, pipe);
 
 	if (intel_crtc->config.has_pch_encoder)
@@ -3996,11 +4036,19 @@ retry:
 	return setup_ok ? 0 : -EINVAL;
 }
 
+static void hsw_compute_ips_config(struct intel_crtc *crtc,
+				   struct intel_crtc_config *pipe_config)
+{
+	pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) &&
+				   pipe_config->pipe_bpp == 24;
+}
+
 static int intel_crtc_compute_config(struct drm_crtc *crtc,
 				     struct intel_crtc_config *pipe_config)
 {
 	struct drm_device *dev = crtc->dev;
 	struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode;
+	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 
 	if (HAS_PCH_SPLIT(dev)) {
 		/* FDI link clock is fixed at 2.7G */
@@ -4030,8 +4078,11 @@ static int intel_crtc_compute_config(struct drm_crtc *crtc,
 		pipe_config->pipe_bpp = 8*3;
 	}
 
+	if (IS_HASWELL(dev))
+		hsw_compute_ips_config(intel_crtc, pipe_config);
+
 	if (pipe_config->has_pch_encoder)
-		return ironlake_fdi_compute_config(to_intel_crtc(crtc), pipe_config);
+		return ironlake_fdi_compute_config(intel_crtc, pipe_config);
 
 	return 0;
 }
@@ -5937,6 +5988,9 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
 	if (intel_display_power_enabled(dev, pfit_domain))
 		ironlake_get_pfit_config(crtc, pipe_config);
 
+	pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) &&
+				   (I915_READ(IPS_CTL) & IPS_ENABLE);
+
 	return true;
 }
 
@@ -6241,8 +6295,10 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-	int palreg = PALETTE(intel_crtc->pipe);
+	enum pipe pipe = intel_crtc->pipe;
+	int palreg = PALETTE(pipe);
 	int i;
+	bool reenable_ips = false;
 
 	/* The clocks have to be on to load the palette. */
 	if (!crtc->enabled || !intel_crtc->active)
@@ -6250,7 +6306,17 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)
 
 	/* use legacy palette for Ironlake */
 	if (HAS_PCH_SPLIT(dev))
-		palreg = LGC_PALETTE(intel_crtc->pipe);
+		palreg = LGC_PALETTE(pipe);
+
+	/* Workaround : Do not read or write the pipe palette/gamma data while
+	 * GAMMA_MODE is configured for split gamma and IPS_CTL has IPS enabled.
+	 */
+	if (intel_crtc->config.ips_enabled &&
+	    ((I915_READ(GAMMA_MODE(pipe)) & GAMMA_MODE_MODE_MASK) ==
+	     GAMMA_MODE_MODE_SPLIT)) {
+		hsw_disable_ips(intel_crtc);
+		reenable_ips = true;
+	}
 
 	for (i = 0; i < 256; i++) {
 		I915_WRITE(palreg + 4 * i,
@@ -6258,6 +6324,9 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)
 			   (intel_crtc->lut_g[i] << 8) |
 			   intel_crtc->lut_b[i]);
 	}
+
+	if (reenable_ips)
+		hsw_enable_ips(intel_crtc);
 }
 
 static void i845_update_cursor(struct drm_crtc *crtc, u32 base)
@@ -7685,6 +7754,7 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
 	DRM_DEBUG_KMS("pch pfit: pos: 0x%08x, size: 0x%08x\n",
 		      pipe_config->pch_pfit.pos,
 		      pipe_config->pch_pfit.size);
+	DRM_DEBUG_KMS("ips: %i\n", pipe_config->ips_enabled);
 }
 
 static struct intel_crtc_config *
@@ -8001,6 +8071,8 @@ intel_pipe_config_compare(struct drm_device *dev,
 	PIPE_CONF_CHECK_I(pch_pfit.pos);
 	PIPE_CONF_CHECK_I(pch_pfit.size);
 
+	PIPE_CONF_CHECK_I(ips_enabled);
+
 #undef PIPE_CONF_CHECK_I
 #undef PIPE_CONF_CHECK_FLAGS
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index bb4c50b..fdf6303 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -268,6 +268,8 @@ struct intel_crtc_config {
 	/* FDI configuration, only valid if has_pch_encoder is set. */
 	int fdi_lanes;
 	struct intel_link_m_n fdi_m_n;
+
+	bool ips_enabled;
 };
 
 struct intel_crtc {
-- 
1.8.1.2

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

* [PATCH 2/3] drm/i915: add enable_ips module option
  2013-05-31 19:33 [PATCH 1/3] drm/i915: implement IPS feature Paulo Zanoni
@ 2013-05-31 19:33 ` Paulo Zanoni
  2013-05-31 19:33 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
  1 sibling, 0 replies; 8+ messages in thread
From: Paulo Zanoni @ 2013-05-31 19:33 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

IPS is still enabled by default. Feature requested by the power
management team.

This should also help testing the feature on some early pre-production
hardware where there were relationship problems between IPS and PSR.

v2: Rebase on top of the newest IPS implementation.
v3: Check i915_enable_ips at compute_config, not supports_ips, so the
    kernel parameter will be ignored at haswell_get_pipe_config.

Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c      | 4 ++++
 drivers/gpu/drm/i915/i915_drv.h      | 1 +
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a4e8f16..b23cd63 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -128,6 +128,10 @@ module_param_named(disable_power_well, i915_disable_power_well, int, 0600);
 MODULE_PARM_DESC(disable_power_well,
 		 "Disable the power well when possible (default: false)");
 
+int i915_enable_ips __read_mostly = 1;
+module_param_named(enable_ips, i915_enable_ips, int, 0600);
+MODULE_PARM_DESC(enable_ips, "Enable IPS (default: true)");
+
 static struct drm_driver driver;
 extern int intel_agp_enabled;
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a18da3c..be869f2 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1470,6 +1470,7 @@ extern bool i915_enable_hangcheck __read_mostly;
 extern int i915_enable_ppgtt __read_mostly;
 extern unsigned int i915_preliminary_hw_support __read_mostly;
 extern int i915_disable_power_well __read_mostly;
+extern int i915_enable_ips __read_mostly;
 
 extern int i915_suspend(struct drm_device *dev, pm_message_t state);
 extern int i915_resume(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5ca8fe8..c2c55ac 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4039,7 +4039,8 @@ retry:
 static void hsw_compute_ips_config(struct intel_crtc *crtc,
 				   struct intel_crtc_config *pipe_config)
 {
-	pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) &&
+	pipe_config->ips_enabled = i915_enable_ips &&
+				   hsw_crtc_supports_ips(crtc) &&
 				   pipe_config->pipe_bpp == 24;
 }
 
-- 
1.8.1.2

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

* [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry
  2013-05-31 19:33 [PATCH 1/3] drm/i915: implement IPS feature Paulo Zanoni
  2013-05-31 19:33 ` [PATCH 2/3] drm/i915: add enable_ips module option Paulo Zanoni
@ 2013-05-31 19:33 ` Paulo Zanoni
  2013-05-31 19:42   ` Daniel Vetter
  1 sibling, 1 reply; 8+ messages in thread
From: Paulo Zanoni @ 2013-05-31 19:33 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

It just prints whether it's supported/enabled/disabled. Feature
requested by the power management team.

v2: Checkpatch started complaining about seq_printf with 1 argument.

Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2eb572a..f5c6917 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1434,6 +1434,25 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
 	return 0;
 }
 
+static int i915_ips_status(struct seq_file *m, void *unused)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	if (!IS_ULT(dev)) {
+		seq_puts(m, "not supported\n");
+		return 0;
+	}
+
+	if (I915_READ(IPS_CTL) & IPS_ENABLE)
+		seq_puts(m, "enabled\n");
+	else
+		seq_puts(m, "disabled\n");
+
+	return 0;
+}
+
 static int i915_sr_status(struct seq_file *m, void *unused)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -2231,6 +2250,7 @@ static struct drm_info_list i915_debugfs_list[] = {
 	{"i915_ring_freq_table", i915_ring_freq_table, 0},
 	{"i915_gfxec", i915_gfxec, 0},
 	{"i915_fbc_status", i915_fbc_status, 0},
+	{"i915_ips_status", i915_ips_status, 0},
 	{"i915_sr_status", i915_sr_status, 0},
 	{"i915_opregion", i915_opregion, 0},
 	{"i915_gem_framebuffer", i915_gem_framebuffer_info, 0},
-- 
1.8.1.2

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

* Re: [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry
  2013-05-31 19:33 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
@ 2013-05-31 19:42   ` Daniel Vetter
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2013-05-31 19:42 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni

On Fri, May 31, 2013 at 04:33:24PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> It just prints whether it's supported/enabled/disabled. Feature
> requested by the power management team.
> 
> v2: Checkpatch started complaining about seq_printf with 1 argument.
> 
> Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

All three merged into dinq, thanks.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 2eb572a..f5c6917 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1434,6 +1434,25 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
>  	return 0;
>  }
>  
> +static int i915_ips_status(struct seq_file *m, void *unused)
> +{
> +	struct drm_info_node *node = (struct drm_info_node *) m->private;
> +	struct drm_device *dev = node->minor->dev;
> +	struct drm_i915_private *dev_priv = dev->dev_private;
> +
> +	if (!IS_ULT(dev)) {
> +		seq_puts(m, "not supported\n");
> +		return 0;
> +	}
> +
> +	if (I915_READ(IPS_CTL) & IPS_ENABLE)
> +		seq_puts(m, "enabled\n");
> +	else
> +		seq_puts(m, "disabled\n");
> +
> +	return 0;
> +}
> +
>  static int i915_sr_status(struct seq_file *m, void *unused)
>  {
>  	struct drm_info_node *node = (struct drm_info_node *) m->private;
> @@ -2231,6 +2250,7 @@ static struct drm_info_list i915_debugfs_list[] = {
>  	{"i915_ring_freq_table", i915_ring_freq_table, 0},
>  	{"i915_gfxec", i915_gfxec, 0},
>  	{"i915_fbc_status", i915_fbc_status, 0},
> +	{"i915_ips_status", i915_ips_status, 0},
>  	{"i915_sr_status", i915_sr_status, 0},
>  	{"i915_opregion", i915_opregion, 0},
>  	{"i915_gem_framebuffer", i915_gem_framebuffer_info, 0},
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

* Re: [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry
  2013-05-13 19:00 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
  2013-05-14 17:59   ` Rodrigo Vivi
@ 2013-05-31 16:08   ` Rodrigo Vivi
  1 sibling, 0 replies; 8+ messages in thread
From: Rodrigo Vivi @ 2013-05-31 16:08 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

On Mon, May 13, 2013 at 4:00 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> It just prints whether it's supported/enabled/disabled. Feature
> requested by the power management team.
>
> Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index a55630a..382ba64 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1311,6 +1311,25 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
>         return 0;
>  }
>
> +static int i915_ips_status(struct seq_file *m, void *unused)
> +{
> +       struct drm_info_node *node = (struct drm_info_node *) m->private;
> +       struct drm_device *dev = node->minor->dev;
> +       struct drm_i915_private *dev_priv = dev->dev_private;
> +
> +       if (!IS_ULT(dev)) {
> +               seq_printf(m, "not supported\n");
> +               return 0;
> +       }
> +
> +       if (I915_READ(IPS_CTL) & IPS_ENABLE)
> +               seq_printf(m, "enabled\n");
> +       else
> +               seq_printf(m, "disabled\n");
> +
> +       return 0;
> +}
> +
>  static int i915_sr_status(struct seq_file *m, void *unused)
>  {
>         struct drm_info_node *node = (struct drm_info_node *) m->private;
> @@ -2108,6 +2127,7 @@ static struct drm_info_list i915_debugfs_list[] = {
>         {"i915_ring_freq_table", i915_ring_freq_table, 0},
>         {"i915_gfxec", i915_gfxec, 0},
>         {"i915_fbc_status", i915_fbc_status, 0},
> +       {"i915_ips_status", i915_ips_status, 0},
>         {"i915_sr_status", i915_sr_status, 0},
>         {"i915_opregion", i915_opregion, 0},
>         {"i915_gem_framebuffer", i915_gem_framebuffer_info, 0},
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br

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

* Re: [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry
  2013-05-14 17:59   ` Rodrigo Vivi
@ 2013-05-14 17:59     ` Rodrigo Vivi
  0 siblings, 0 replies; 8+ messages in thread
From: Rodrigo Vivi @ 2013-05-14 17:59 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> for the entire series


On Tue, May 14, 2013 at 2:59 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> Feel free to use: Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>
> On Mon, May 13, 2013 at 4:00 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
>> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>>
>> It just prints whether it's supported/enabled/disabled. Feature
>> requested by the power management team.
>>
>> Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
>> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_debugfs.c |   20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>> index a55630a..382ba64 100644
>> --- a/drivers/gpu/drm/i915/i915_debugfs.c
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>> @@ -1311,6 +1311,25 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
>>         return 0;
>>  }
>>
>> +static int i915_ips_status(struct seq_file *m, void *unused)
>> +{
>> +       struct drm_info_node *node = (struct drm_info_node *) m->private;
>> +       struct drm_device *dev = node->minor->dev;
>> +       struct drm_i915_private *dev_priv = dev->dev_private;
>> +
>> +       if (!IS_ULT(dev)) {
>> +               seq_printf(m, "not supported\n");
>> +               return 0;
>> +       }
>> +
>> +       if (I915_READ(IPS_CTL) & IPS_ENABLE)
>> +               seq_printf(m, "enabled\n");
>> +       else
>> +               seq_printf(m, "disabled\n");
>> +
>> +       return 0;
>> +}
>> +
>>  static int i915_sr_status(struct seq_file *m, void *unused)
>>  {
>>         struct drm_info_node *node = (struct drm_info_node *) m->private;
>> @@ -2108,6 +2127,7 @@ static struct drm_info_list i915_debugfs_list[] = {
>>         {"i915_ring_freq_table", i915_ring_freq_table, 0},
>>         {"i915_gfxec", i915_gfxec, 0},
>>         {"i915_fbc_status", i915_fbc_status, 0},
>> +       {"i915_ips_status", i915_ips_status, 0},
>>         {"i915_sr_status", i915_sr_status, 0},
>>         {"i915_opregion", i915_opregion, 0},
>>         {"i915_gem_framebuffer", i915_gem_framebuffer_info, 0},
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br

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

* Re: [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry
  2013-05-13 19:00 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
@ 2013-05-14 17:59   ` Rodrigo Vivi
  2013-05-14 17:59     ` Rodrigo Vivi
  2013-05-31 16:08   ` Rodrigo Vivi
  1 sibling, 1 reply; 8+ messages in thread
From: Rodrigo Vivi @ 2013-05-14 17:59 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni

Feel free to use: Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>

On Mon, May 13, 2013 at 4:00 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> It just prints whether it's supported/enabled/disabled. Feature
> requested by the power management team.
>
> Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index a55630a..382ba64 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1311,6 +1311,25 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
>         return 0;
>  }
>
> +static int i915_ips_status(struct seq_file *m, void *unused)
> +{
> +       struct drm_info_node *node = (struct drm_info_node *) m->private;
> +       struct drm_device *dev = node->minor->dev;
> +       struct drm_i915_private *dev_priv = dev->dev_private;
> +
> +       if (!IS_ULT(dev)) {
> +               seq_printf(m, "not supported\n");
> +               return 0;
> +       }
> +
> +       if (I915_READ(IPS_CTL) & IPS_ENABLE)
> +               seq_printf(m, "enabled\n");
> +       else
> +               seq_printf(m, "disabled\n");
> +
> +       return 0;
> +}
> +
>  static int i915_sr_status(struct seq_file *m, void *unused)
>  {
>         struct drm_info_node *node = (struct drm_info_node *) m->private;
> @@ -2108,6 +2127,7 @@ static struct drm_info_list i915_debugfs_list[] = {
>         {"i915_ring_freq_table", i915_ring_freq_table, 0},
>         {"i915_gfxec", i915_gfxec, 0},
>         {"i915_fbc_status", i915_fbc_status, 0},
> +       {"i915_ips_status", i915_ips_status, 0},
>         {"i915_sr_status", i915_sr_status, 0},
>         {"i915_opregion", i915_opregion, 0},
>         {"i915_gem_framebuffer", i915_gem_framebuffer_info, 0},
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br

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

* [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry
  2013-05-13 19:00 [PATCH 1/3] drm/i915: implement IPS feature Paulo Zanoni
@ 2013-05-13 19:00 ` Paulo Zanoni
  2013-05-14 17:59   ` Rodrigo Vivi
  2013-05-31 16:08   ` Rodrigo Vivi
  0 siblings, 2 replies; 8+ messages in thread
From: Paulo Zanoni @ 2013-05-13 19:00 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

It just prints whether it's supported/enabled/disabled. Feature
requested by the power management team.

Requested-by: Kristen Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index a55630a..382ba64 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1311,6 +1311,25 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
 	return 0;
 }
 
+static int i915_ips_status(struct seq_file *m, void *unused)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	if (!IS_ULT(dev)) {
+		seq_printf(m, "not supported\n");
+		return 0;
+	}
+
+	if (I915_READ(IPS_CTL) & IPS_ENABLE)
+		seq_printf(m, "enabled\n");
+	else
+		seq_printf(m, "disabled\n");
+
+	return 0;
+}
+
 static int i915_sr_status(struct seq_file *m, void *unused)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -2108,6 +2127,7 @@ static struct drm_info_list i915_debugfs_list[] = {
 	{"i915_ring_freq_table", i915_ring_freq_table, 0},
 	{"i915_gfxec", i915_gfxec, 0},
 	{"i915_fbc_status", i915_fbc_status, 0},
+	{"i915_ips_status", i915_ips_status, 0},
 	{"i915_sr_status", i915_sr_status, 0},
 	{"i915_opregion", i915_opregion, 0},
 	{"i915_gem_framebuffer", i915_gem_framebuffer_info, 0},
-- 
1.7.10.4

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

end of thread, other threads:[~2013-05-31 19:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 19:33 [PATCH 1/3] drm/i915: implement IPS feature Paulo Zanoni
2013-05-31 19:33 ` [PATCH 2/3] drm/i915: add enable_ips module option Paulo Zanoni
2013-05-31 19:33 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
2013-05-31 19:42   ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2013-05-13 19:00 [PATCH 1/3] drm/i915: implement IPS feature Paulo Zanoni
2013-05-13 19:00 ` [PATCH 3/3] drm/i915: add i915_ips_status debugfs entry Paulo Zanoni
2013-05-14 17:59   ` Rodrigo Vivi
2013-05-14 17:59     ` Rodrigo Vivi
2013-05-31 16:08   ` Rodrigo Vivi

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.