Age | Commit message (Collapse) | Author |
|
When fbcon is enabled, PSR will be active between cursor blinks so
what it should really use to test PSR is psr_wait_entry(), so a new
feature callback was added.
But the fbcon cursor blinks at 5hz what give us 200ms between each
screen update what make psr_wait_update() prone to fail the test
because it timed out before a blink could happen, so here adding and
using psr_long_wait_update() that have a longer timeout.
v3:
- 3 previous patches squashed in this one (Maarten)
- Back to !feature->wait_until_enabled() to test feature state when
all CRTCS are disabled(Dhinakaran)
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Dhinkaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
This tests checks if hardware is able to do selective update when
screen changes.
PSR2 don't trigger interruptions and the 'PSR2 SU status' register
is not kept loaded all the times, so it is necessary keep polling
PSR status debugfs until those values are loaded.
Also from DEEP_SLEEP state HW will not do a seletive update, as
most of the memory/context is lost in deep sleep state hardware will
need to exit PSR mode then wait a configured number of frames to
activate PSR again to then start doing seletive updates, that is why
just one screen change is not enough to pass this tests.
When a selective update happens and the values are loaded and read
from debugfs it is compared with the expected value of seletive
update blocks, if matches the polling is stopped and the test passed
otherwise it will wait until it reachs a maximum number o screen
changes to fail the test.
v2: Using new SU blocks debugfs output
v3:
- removed the timerfd to fail the test, now failing based in a
maximum number of screen changes
- removing thread to read debugfs, read from main thread is enough
- improved commit message
v4:
- getting cairo context for frontbuffer test in prepare()
- droppoing poll(), using blocking timerfd instead
v5:
- Doing a modeset before trying to enable PSR2
v6:
- doing atomic commits to fix(legacy commit is taking more time in
recent kernels causing us to miss the SU when reading debugfs) and
speedup test
- fixed code to skip test when PSR2 is not possile
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Tested-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Add the mode parameter to psr_enable() and psr_sink_support() so PSR1
and PSR2 can be tested separated.
For now all PSR tests will run only with PSR1 and the tests for PSR2
will come in the future.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
This way we can test both PSR version separated.
v4: Dropping psr_state_check() to psr_active_check()
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
This is a initial preparation for PSR2 test support, as in PSR2 a
update to screen could mean that PSR is still active and the screen
will be update by a selective update this renamed is necessary.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
The same code checking if sink supports PSR was spread into 3 tests,
better move it to lib and reuse.
v2: splitted previous patch into this one and the next one(Dhinakaran)
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
So every function reading i915_edp_psr_status can allocate a buffer
long enough.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
PSR appears to not exit immediately after the test commits a page flip,
give some leeway for PSR to idle. Let's set the timeout at 40 ms with a
5 ms interval between each status read.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Let's rename to debugfs_fd all the parameters of the functions that
expect debugfs fd to avoid call one those functions with the wrong
file descriptor.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
It's harmful to write to enable_psr at runtime, and the patch that allows
us to change i915_edp_psr_debug with the panel running will require us
to abandon the module parameter. Hence the userspace change needs to be
put in IGT first before we can change it at kernel time.
Toggling it to debugfs will mean we can skip a modeset when changing our
feature set.
Changes since v1:
- Rebase with the previous patches dropped.
Changes since v2:
- Rebase on top of new api in i915_edp_psr_debug.
Changes since v3:
- Enable IRQ debugging for extra logging.
- Force PSR1 mode. (dhnkrn)
- Move PSR enable/disable functions to lib/igt_psr. (dhnkrn)
Changes since v4:
- Redisable irqs right away when debugfs api doesn't work. (dhnkrn)
- Use hex everywhere. (dhnkrn)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Fix -ENODEV explanation in has_psr_debugfs (dhnkrn)]
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
|
|
kms_frontbuffer_tracking and kms_psr test PSR in different ways, let'
fix that by creating common library functions.
v2: Include the new file in meson.build
v3: Leave --no-psr intact (Rodrigo)
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|