From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/psr: Execute the default PSR code path when setting i915_edp_psr_debug
Date: Fri, 21 Dec 2018 14:54:36 +0100 [thread overview]
Message-ID: <e45bcdc5-6500-bd43-a503-fefe91b9c897@linux.intel.com> (raw)
In-Reply-To: <f0b2ade5-d22f-55b9-d750-08cf197abc5f@linux.intel.com>
Op 17-12-2018 om 12:16 schreef Maarten Lankhorst:
> Op 11-12-2018 om 19:16 schreef Souza, Jose:
>> On Tue, 2018-12-04 at 13:23 -0800, Dhinakaran Pandiyan wrote:
>>> On Tue, 2018-12-04 at 10:52 -0800, Souza, Jose wrote:
>>>> On Mon, 2018-12-03 at 18:58 -0800, Dhinakaran Pandiyan wrote:
>>>>> On Mon, 2018-12-03 at 17:54 -0800, Souza, Jose wrote:
>>>>>> On Mon, 2018-12-03 at 17:33 -0800, Dhinakaran Pandiyan wrote:
>>>>>>> On Thu, 2018-11-29 at 18:31 -0800, José Roberto de Souza
>>>>>>> wrote:
>>>>>>>> Changing the i915_edp_psr_debug was enabling, disabling or
>>>>>>>> switching
>>>>>>>> PSR version by directly calling intel_psr_disable_locked()
>>>>>>>> and
>>>>>>>> intel_psr_enable_locked(), what is not the default PSR path
>>>>>>>> that
>>>>>>>> is
>>>>>>>> executed in a regular modesets.
>>>>>>>>
>>>>>>>> So lets force a modeset in the PSR CRTC to trigger the
>>>>>>>> requested
>>>>>>>> PSR
>>>>>>>> state change and really stress the code path that matters
>>>>>>>> for
>>>>>>>> the
>>>>>>>> regular user.
>>>>>>>>
>>>>>>>> Also by doing this way it fixes the issue below, were DRRS
>>>>>>>> was
>>>>>>>> left
>>>>>>>> enabled together with PSR when enabling PSR from debugfs.
>>>>>>> While this patch does fix the issue, psr_compute_config() not
>>>>>>> checking
>>>>>>> crtc_state->has_drrs seems odd. We should change it to not
>>>>>>> set
>>>>>>> crtc_state->has_psr if crtc_state->has_drrs happens to be
>>>>>>> set.
>>>>>>> Or
>>>>>>> do
>>>>>>> it
>>>>>>> the other way around.
>>>>>> psr_compute_config() is not called when enabling PSR from
>>>>>> debugfs,
>>>>>> this
>>>>> Right. My suggestion is to allow either ->has_drrs or ->has_psr
>>>>> being
>>>>> set (not both) in the kernel and disable DRRS in the IGT before
>>>>> starting the test.
>>>> So in case were PSR is disabled by parameter and DRRS is supported
>>>> we
>>>> would not enable DRRS? Because has_psr is set even if PSR is
>>>> disabled.
>>> Set ->has_psr = true in psr_compute_config() only if the module
>>> parameter and debugfs mode allow it. That is how the code worked
>>> earlier. Given that this patch duplicates the atomic state and runs
>>> through all state checks, we can move back to the earlier way of
>>> completing all checks in psr_compute_config().
>>>
>>>> Disabling DRRS from IGT is duplicating the code that already do
>>>> that
>>>> and also not validating the default code path.
>>> Call drrs_compute_config() after psr_compute_config(), don't set
>>> has_drrs if has_psr is set.
>> What about add a flag to skip modeset so when running IGT tests we set
>> that flag and PSR mode will be changed in the next modeset, what is
>> already done after every write to i915_edp_psr_debug in IGT tests? This
>> way we remove the code duplication and only stress the default code
>> path.
>>
>> Also plus the changes in has_drrs that you mentioned but in other
>> patch.
> Well the reason we set both is because kernel should decide which one to enable. The
> only way we can have both active is if we mess with debugfs.
>
> I see the fact you're trying to enable both as a failure from the user. Anything in
> debugfs can be used for advanced debugging, and can possibly brick your system. If
> we really care, then we should disable DRRS when enabling PSR, and the same when
> enabling DRRS, that we disable PSR.
>
> There's no need to restore it afterwards, because it's debugfs api.
>
> ~Maarten
>
.. or we could stop messing around, make a commit which sets crtc_state->mode_changed,
it will degrade the modeset to a fastset, and then we can use update_pipe() to make
the new settings active:
https://patchwork.freedesktop.org/series/54339/
And then only set enable_psr enable_drrs in crtc_state when we plan to use
it. This removes the need for separate settings..
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-12-21 13:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 2:31 [PATCH 1/2] drm/i915: Check if PSR is globally enabled before change PSR variables José Roberto de Souza
2018-11-30 2:31 ` [PATCH 2/2] drm/i915/psr: Execute the default PSR code path when setting i915_edp_psr_debug José Roberto de Souza
2018-12-04 1:33 ` Dhinakaran Pandiyan
2018-12-04 1:54 ` Souza, Jose
2018-12-04 2:58 ` Dhinakaran Pandiyan
2018-12-04 18:52 ` Souza, Jose
2018-12-04 21:23 ` Dhinakaran Pandiyan
2018-12-11 18:16 ` Souza, Jose
2018-12-17 11:16 ` Maarten Lankhorst
2018-12-21 13:54 ` Maarten Lankhorst [this message]
2018-11-30 2:58 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Check if PSR is globally enabled before change PSR variables Patchwork
2018-11-30 3:16 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-30 5:56 ` [PATCH 1/2] " Rodrigo Vivi
2018-12-04 0:58 ` Dhinakaran Pandiyan
2018-12-04 1:09 ` Souza, Jose
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e45bcdc5-6500-bd43-a503-fefe91b9c897@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=dhinakaran.pandiyan@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox