public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: add psr toggle to debugfs
@ 2015-03-13 18:10 Eric Caruso
  2015-03-13 19:01 ` Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Caruso @ 2015-03-13 18:10 UTC (permalink / raw)
  To: intel-gfx

This patch allows userspace to toggle PSR through a debugfs interface.
It adds functionality to write 0 or 1 to the existing
i915_edp_psr_status file in order to change the relevant module
parameter and enable/disable PSR.

Previous upstream feedback did not like making it a connector property
or putting it in sysfs because that would require API stability going
forward. debugfs interfaces do not have this restriction.

Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 67 ++++++++++++++++++++++++++++++++++---
 1 file changed, 63 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 74bc89b..c3d9c89 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2224,10 +2224,9 @@ static int i915_llc(struct seq_file *m, void *data)
 	return 0;
 }
 
-static int i915_edp_psr_status(struct seq_file *m, void *data)
+static int i915_edp_psr_status_show(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = m->private;
-	struct drm_device *dev = node->minor->dev;
+	struct drm_device *dev = m->private;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	u32 psrperf = 0;
 	u32 stat[3];
@@ -2288,6 +2287,66 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
 	return 0;
 }
 
+static int i915_edp_psr_status_open(struct inode *inode, struct file *file)
+{
+	struct drm_device *dev = inode->i_private;
+
+	return single_open(file, i915_edp_psr_status_show, dev);
+}
+
+static ssize_t i915_edp_psr_status_write(struct file *file,
+					 const char __user *ubuf,
+					 size_t len, loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	struct drm_device *dev = m->private;
+	struct intel_encoder *encoder;
+	struct intel_dp *intel_dp = NULL;
+	int ret;
+	int enable;
+	char tmp[32];
+
+	if (len >= sizeof(tmp))
+		return -EINVAL;
+
+	if (copy_from_user(tmp, ubuf, len))
+		return -EFAULT;
+
+	tmp[len] = '\0';
+
+	ret = kstrtoint(tmp, 0, &enable);
+	if (ret || (enable != 0 && enable != 1))
+		return -EINVAL;
+
+	i915.enable_psr = enable;
+	ret = -ENODEV;
+
+	drm_modeset_lock_all(dev);
+	for_each_intel_encoder(dev, encoder) {
+		if (encoder->type != INTEL_OUTPUT_EDP)
+			continue;
+
+		ret = len;
+		intel_dp = enc_to_intel_dp(&encoder->base);
+
+		if (enable)
+			intel_psr_enable(intel_dp);
+		else
+			intel_psr_disable(intel_dp);
+	}
+	drm_modeset_unlock_all(dev);
+	return ret;
+}
+
+static const struct file_operations i915_edp_psr_status_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_edp_psr_status_open,
+	.read = seq_read,
+	.llseek = seq_lseek,
+	.release = single_release,
+	.write = i915_edp_psr_status_write
+};
+
 static int i915_sink_crc(struct seq_file *m, void *data)
 {
 	struct drm_info_node *node = m->private;
@@ -4663,7 +4722,6 @@ static const struct drm_info_list i915_debugfs_list[] = {
 	{"i915_swizzle_info", i915_swizzle_info, 0},
 	{"i915_ppgtt_info", i915_ppgtt_info, 0},
 	{"i915_llc", i915_llc, 0},
-	{"i915_edp_psr_status", i915_edp_psr_status, 0},
 	{"i915_sink_crc_eDP1", i915_sink_crc, 0},
 	{"i915_energy_uJ", i915_energy_uJ, 0},
 	{"i915_pc8_status", i915_pc8_status, 0},
@@ -4698,6 +4756,7 @@ static const struct i915_debugfs_files {
 	{"i915_spr_wm_latency", &i915_spr_wm_latency_fops},
 	{"i915_cur_wm_latency", &i915_cur_wm_latency_fops},
 	{"i915_fbc_false_color", &i915_fbc_fc_fops},
+	{"i915_edp_psr_status", &i915_edp_psr_status_fops},
 };
 
 void intel_display_crc_init(struct drm_device *dev)
-- 
2.1.2

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

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-03-13 18:10 [PATCH] drm/i915: add psr toggle to debugfs Eric Caruso
@ 2015-03-13 19:01 ` Daniel Vetter
  2015-03-13 20:14   ` Paulo Zanoni
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2015-03-13 19:01 UTC (permalink / raw)
  To: Eric Caruso; +Cc: intel-gfx

On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
> This patch allows userspace to toggle PSR through a debugfs interface.
> It adds functionality to write 0 or 1 to the existing
> i915_edp_psr_status file in order to change the relevant module
> parameter and enable/disable PSR.
>
> Previous upstream feedback did not like making it a connector property
> or putting it in sysfs because that would require API stability going
> forward. debugfs interfaces do not have this restriction.
>
> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>

What do we need this for? debugfs is generally for debugging (where
the module option should be enough) and for testcases (which doesn't
seem to be the case here).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-03-13 19:01 ` Daniel Vetter
@ 2015-03-13 20:14   ` Paulo Zanoni
  2015-03-13 20:46     ` Eric Caruso
  0 siblings, 1 reply; 10+ messages in thread
From: Paulo Zanoni @ 2015-03-13 20:14 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

2015-03-13 16:01 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
> On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>> This patch allows userspace to toggle PSR through a debugfs interface.
>> It adds functionality to write 0 or 1 to the existing
>> i915_edp_psr_status file in order to change the relevant module
>> parameter and enable/disable PSR.
>>
>> Previous upstream feedback did not like making it a connector property
>> or putting it in sysfs because that would require API stability going
>> forward. debugfs interfaces do not have this restriction.
>>
>> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
>
> What do we need this for? debugfs is generally for debugging (where
> the module option should be enough) and for testcases (which doesn't
> seem to be the case here).

What is wrong with "echo 1 > /sys/module/i915/parameters/enable_psr"?

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



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

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-03-13 20:14   ` Paulo Zanoni
@ 2015-03-13 20:46     ` Eric Caruso
  2015-04-15 21:39       ` Rodrigo Vivi
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Caruso @ 2015-03-13 20:46 UTC (permalink / raw)
  To: Paulo Zanoni; +Cc: intel-gfx

On Fri, Mar 13, 2015 at 1:14 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
> 2015-03-13 16:01 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
>> On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>> This patch allows userspace to toggle PSR through a debugfs interface.
>>> It adds functionality to write 0 or 1 to the existing
>>> i915_edp_psr_status file in order to change the relevant module
>>> parameter and enable/disable PSR.
>>>
>>> Previous upstream feedback did not like making it a connector property
>>> or putting it in sysfs because that would require API stability going
>>> forward. debugfs interfaces do not have this restriction.
>>>
>>> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
>>
>> What do we need this for? debugfs is generally for debugging (where
>> the module option should be enough) and for testcases (which doesn't
>> seem to be the case here).
>
> What is wrong with "echo 1 > /sys/module/i915/parameters/enable_psr"?
>
>> -Daniel
>> --
>> Daniel Vetter
>> Software Engineer, Intel Corporation
>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni

Forgive me if this is wrong, but updating the module parameter doesn't
change whether or not PSR is enabled immediately. You need to go through
intel_enable_ddi for this to take effect.

We were using something like this for testing on Chromium OS, because
PSR would sometimes cause issues. This allows us to change the module
parameter and enable/disable PSR in one step.

The upstream feedback I mentioned was done about a year ago:
http://lists.freedesktop.org/archives/intel-gfx/2014-March/041896.html
It seemed to favor a debugfs knob for this.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-03-13 20:46     ` Eric Caruso
@ 2015-04-15 21:39       ` Rodrigo Vivi
  2015-04-15 21:51         ` Eric Caruso
  0 siblings, 1 reply; 10+ messages in thread
From: Rodrigo Vivi @ 2015-04-15 21:39 UTC (permalink / raw)
  To: Eric Caruso; +Cc: intel-gfx

On Fri, Mar 13, 2015 at 1:46 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
> On Fri, Mar 13, 2015 at 1:14 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
>> 2015-03-13 16:01 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
>>> On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>>> This patch allows userspace to toggle PSR through a debugfs interface.
>>>> It adds functionality to write 0 or 1 to the existing
>>>> i915_edp_psr_status file in order to change the relevant module
>>>> parameter and enable/disable PSR.
>>>>
>>>> Previous upstream feedback did not like making it a connector property
>>>> or putting it in sysfs because that would require API stability going
>>>> forward. debugfs interfaces do not have this restriction.
>>>>
>>>> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
>>>
>>> What do we need this for? debugfs is generally for debugging (where
>>> the module option should be enough) and for testcases (which doesn't
>>> seem to be the case here).
>>
>> What is wrong with "echo 1 > /sys/module/i915/parameters/enable_psr"?
>>
>>> -Daniel
>>> --
>>> Daniel Vetter
>>> Software Engineer, Intel Corporation
>>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>>
>>
>> --
>> Paulo Zanoni
>
> Forgive me if this is wrong, but updating the module parameter doesn't
> change whether or not PSR is enabled immediately. You need to go through
> intel_enable_ddi for this to take effect.

indeed.

>
> We were using something like this for testing on Chromium OS, because
> PSR would sometimes cause issues. This allows us to change the module
> parameter and enable/disable PSR in one step.

I like the idea. But I'd prefer a sysfs toggle interface though...

>
> The upstream feedback I mentioned was done about a year ago:
> http://lists.freedesktop.org/archives/intel-gfx/2014-March/041896.html
> It seemed to favor a debugfs knob for this.
> _______________________________________________
> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-04-15 21:39       ` Rodrigo Vivi
@ 2015-04-15 21:51         ` Eric Caruso
  2015-04-16 15:58           ` Rodrigo Vivi
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Caruso @ 2015-04-15 21:51 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

On Wed, Apr 15, 2015 at 2:39 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> On Fri, Mar 13, 2015 at 1:46 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>> On Fri, Mar 13, 2015 at 1:14 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
>>> 2015-03-13 16:01 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
>>>> On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>>>> This patch allows userspace to toggle PSR through a debugfs interface.
>>>>> It adds functionality to write 0 or 1 to the existing
>>>>> i915_edp_psr_status file in order to change the relevant module
>>>>> parameter and enable/disable PSR.
>>>>>
>>>>> Previous upstream feedback did not like making it a connector property
>>>>> or putting it in sysfs because that would require API stability going
>>>>> forward. debugfs interfaces do not have this restriction.
>>>>>
>>>>> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
>>>>
>>>> What do we need this for? debugfs is generally for debugging (where
>>>> the module option should be enough) and for testcases (which doesn't
>>>> seem to be the case here).
>>>
>>> What is wrong with "echo 1 > /sys/module/i915/parameters/enable_psr"?
>>>
>>>> -Daniel
>>>> --
>>>> Daniel Vetter
>>>> Software Engineer, Intel Corporation
>>>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>>>> _______________________________________________
>>>> Intel-gfx mailing list
>>>> Intel-gfx@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>>
>>>
>>>
>>> --
>>> Paulo Zanoni
>>
>> Forgive me if this is wrong, but updating the module parameter doesn't
>> change whether or not PSR is enabled immediately. You need to go through
>> intel_enable_ddi for this to take effect.
>
> indeed.
>
>>
>> We were using something like this for testing on Chromium OS, because
>> PSR would sometimes cause issues. This allows us to change the module
>> parameter and enable/disable PSR in one step.
>
> I like the idea. But I'd prefer a sysfs toggle interface though...

Aren't you adding a connector property at this point? If so, it seems like both
this debugfs knob and a hypothetical sysfs interface would both be unnecessary.
(see: http://lists.freedesktop.org/archives/intel-gfx/2015-March/063074.html)

>
>>
>> The upstream feedback I mentioned was done about a year ago:
>> http://lists.freedesktop.org/archives/intel-gfx/2014-March/041896.html
>> It seemed to favor a debugfs knob for this.
>> _______________________________________________
>> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-04-15 21:51         ` Eric Caruso
@ 2015-04-16 15:58           ` Rodrigo Vivi
  2015-04-16 16:10             ` Eric Caruso
  0 siblings, 1 reply; 10+ messages in thread
From: Rodrigo Vivi @ 2015-04-16 15:58 UTC (permalink / raw)
  To: Eric Caruso; +Cc: intel-gfx

I'm not sure that that property will be accepted...
if so it can be changed to toggle, but for now it is informative only
(DRM_MODE_PROP_IMMUTABLE).


On Wed, Apr 15, 2015 at 2:51 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
> On Wed, Apr 15, 2015 at 2:39 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
>> On Fri, Mar 13, 2015 at 1:46 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>> On Fri, Mar 13, 2015 at 1:14 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
>>>> 2015-03-13 16:01 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
>>>>> On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>>>>> This patch allows userspace to toggle PSR through a debugfs interface.
>>>>>> It adds functionality to write 0 or 1 to the existing
>>>>>> i915_edp_psr_status file in order to change the relevant module
>>>>>> parameter and enable/disable PSR.
>>>>>>
>>>>>> Previous upstream feedback did not like making it a connector property
>>>>>> or putting it in sysfs because that would require API stability going
>>>>>> forward. debugfs interfaces do not have this restriction.
>>>>>>
>>>>>> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
>>>>>
>>>>> What do we need this for? debugfs is generally for debugging (where
>>>>> the module option should be enough) and for testcases (which doesn't
>>>>> seem to be the case here).
>>>>
>>>> What is wrong with "echo 1 > /sys/module/i915/parameters/enable_psr"?
>>>>
>>>>> -Daniel
>>>>> --
>>>>> Daniel Vetter
>>>>> Software Engineer, Intel Corporation
>>>>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>>>>> _______________________________________________
>>>>> Intel-gfx mailing list
>>>>> Intel-gfx@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>>>
>>>>
>>>>
>>>> --
>>>> Paulo Zanoni
>>>
>>> Forgive me if this is wrong, but updating the module parameter doesn't
>>> change whether or not PSR is enabled immediately. You need to go through
>>> intel_enable_ddi for this to take effect.
>>
>> indeed.
>>
>>>
>>> We were using something like this for testing on Chromium OS, because
>>> PSR would sometimes cause issues. This allows us to change the module
>>> parameter and enable/disable PSR in one step.
>>
>> I like the idea. But I'd prefer a sysfs toggle interface though...
>
> Aren't you adding a connector property at this point? If so, it seems like both
> this debugfs knob and a hypothetical sysfs interface would both be unnecessary.
> (see: http://lists.freedesktop.org/archives/intel-gfx/2015-March/063074.html)
>
>>
>>>
>>> The upstream feedback I mentioned was done about a year ago:
>>> http://lists.freedesktop.org/archives/intel-gfx/2014-March/041896.html
>>> It seemed to favor a debugfs knob for this.
>>> _______________________________________________
>>> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-04-16 15:58           ` Rodrigo Vivi
@ 2015-04-16 16:10             ` Eric Caruso
  2015-04-20 15:41               ` Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Caruso @ 2015-04-16 16:10 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

On Thu, Apr 16, 2015 at 8:58 AM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> I'm not sure that that property will be accepted...
> if so it can be changed to toggle, but for now it is informative only
> (DRM_MODE_PROP_IMMUTABLE).
>

Okay, that changes things somewhat. There'll have to be some discussion over
what the sysfs interface would be, then. It's supposed to be stable, if I
understand correctly.

>
> On Wed, Apr 15, 2015 at 2:51 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>> On Wed, Apr 15, 2015 at 2:39 PM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
>>> On Fri, Mar 13, 2015 at 1:46 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>>> On Fri, Mar 13, 2015 at 1:14 PM, Paulo Zanoni <przanoni@gmail.com> wrote:
>>>>> 2015-03-13 16:01 GMT-03:00 Daniel Vetter <daniel@ffwll.ch>:
>>>>>> On Fri, Mar 13, 2015 at 7:10 PM, Eric Caruso <ejcaruso@chromium.org> wrote:
>>>>>>> This patch allows userspace to toggle PSR through a debugfs interface.
>>>>>>> It adds functionality to write 0 or 1 to the existing
>>>>>>> i915_edp_psr_status file in order to change the relevant module
>>>>>>> parameter and enable/disable PSR.
>>>>>>>
>>>>>>> Previous upstream feedback did not like making it a connector property
>>>>>>> or putting it in sysfs because that would require API stability going
>>>>>>> forward. debugfs interfaces do not have this restriction.
>>>>>>>
>>>>>>> Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
>>>>>>
>>>>>> What do we need this for? debugfs is generally for debugging (where
>>>>>> the module option should be enough) and for testcases (which doesn't
>>>>>> seem to be the case here).
>>>>>
>>>>> What is wrong with "echo 1 > /sys/module/i915/parameters/enable_psr"?
>>>>>
>>>>>> -Daniel
>>>>>> --
>>>>>> Daniel Vetter
>>>>>> Software Engineer, Intel Corporation
>>>>>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>>>>>> _______________________________________________
>>>>>> Intel-gfx mailing list
>>>>>> Intel-gfx@lists.freedesktop.org
>>>>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Paulo Zanoni
>>>>
>>>> Forgive me if this is wrong, but updating the module parameter doesn't
>>>> change whether or not PSR is enabled immediately. You need to go through
>>>> intel_enable_ddi for this to take effect.
>>>
>>> indeed.
>>>
>>>>
>>>> We were using something like this for testing on Chromium OS, because
>>>> PSR would sometimes cause issues. This allows us to change the module
>>>> parameter and enable/disable PSR in one step.
>>>
>>> I like the idea. But I'd prefer a sysfs toggle interface though...
>>
>> Aren't you adding a connector property at this point? If so, it seems like both
>> this debugfs knob and a hypothetical sysfs interface would both be unnecessary.
>> (see: http://lists.freedesktop.org/archives/intel-gfx/2015-March/063074.html)
>>
>>>
>>>>
>>>> The upstream feedback I mentioned was done about a year ago:
>>>> http://lists.freedesktop.org/archives/intel-gfx/2014-March/041896.html
>>>> It seemed to favor a debugfs knob for this.
>>>> _______________________________________________
>>>> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-04-16 16:10             ` Eric Caruso
@ 2015-04-20 15:41               ` Daniel Vetter
  2015-04-20 20:42                 ` Rodrigo Vivi
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2015-04-20 15:41 UTC (permalink / raw)
  To: Eric Caruso; +Cc: intel-gfx

On Thu, Apr 16, 2015 at 09:10:11AM -0700, Eric Caruso wrote:
> On Thu, Apr 16, 2015 at 8:58 AM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> > I'm not sure that that property will be accepted...
> > if so it can be changed to toggle, but for now it is informative only
> > (DRM_MODE_PROP_IMMUTABLE).
> >
> 
> Okay, that changes things somewhat. There'll have to be some discussion over
> what the sysfs interface would be, then. It's supposed to be stable, if I
> understand correctly.

Imo if it's just for debugging, then debugfs is the correct place. Sysfs
means ABI with all the requirements (igt tests, open-source userspace,
...) that entails.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add psr toggle to debugfs
  2015-04-20 15:41               ` Daniel Vetter
@ 2015-04-20 20:42                 ` Rodrigo Vivi
  0 siblings, 0 replies; 10+ messages in thread
From: Rodrigo Vivi @ 2015-04-20 20:42 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, Pandiyan, Dhinakaran

On Mon, Apr 20, 2015 at 8:41 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Apr 16, 2015 at 09:10:11AM -0700, Eric Caruso wrote:
>> On Thu, Apr 16, 2015 at 8:58 AM, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
>> > I'm not sure that that property will be accepted...
>> > if so it can be changed to toggle, but for now it is informative only
>> > (DRM_MODE_PROP_IMMUTABLE).
>> >
>>
>> Okay, that changes things somewhat. There'll have to be some discussion over
>> what the sysfs interface would be, then. It's supposed to be stable, if I
>> understand correctly.
>
> Imo if it's just for debugging, then debugfs is the correct place. Sysfs
> means ABI with all the requirements (igt tests, open-source userspace,
> ...) that entails.

Good points, so:
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Although "i915.enable_psr = enable;" is useless and change the meaning
of this parameter.
I'd remove this...

And probably check for  pipe_config psr ready if/when merged...

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-04-20 20:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 18:10 [PATCH] drm/i915: add psr toggle to debugfs Eric Caruso
2015-03-13 19:01 ` Daniel Vetter
2015-03-13 20:14   ` Paulo Zanoni
2015-03-13 20:46     ` Eric Caruso
2015-04-15 21:39       ` Rodrigo Vivi
2015-04-15 21:51         ` Eric Caruso
2015-04-16 15:58           ` Rodrigo Vivi
2015-04-16 16:10             ` Eric Caruso
2015-04-20 15:41               ` Daniel Vetter
2015-04-20 20:42                 ` Rodrigo Vivi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox