[Intel-gfx] [PATCH] drm/i915: check the power wells on assert_{cursor, plane}

Paulo Zanoni przanoni at gmail.com
Thu Jul 17 15:29:26 CEST 2014


2014-07-17 10:23 GMT-03:00 Daniel Vetter <daniel at ffwll.ch>:
> On Thu, Jul 17, 2014 at 2:53 PM, Paulo Zanoni <przanoni at gmail.com> wrote:
>> 2014-07-17 5:38 GMT-03:00 Daniel Vetter <daniel at ffwll.ch>:
>>> On Wed, Jul 16, 2014 at 05:06:34PM -0300, Paulo Zanoni wrote:
>>>> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
>>>>
>>>> Since we merged runtime PM support for DPMS, it is possible that these
>>>> functions will be called when the power wells are disabled but a mode
>>>> is "set", resulting in "failed assertion" and "device suspended while
>>>> reading register" WARNs.
>>>>
>>>> To reproduce the bug: disable all screens using mode unset, do a
>>>> modeset on one screen, disable it using DPMS, then try to do a mode
>>>> unset on it again to see the WARNs.
>>>>
>>>> Testcase: igt/rpm_rpm/dpms-mode-unset-lpsp
>>>> Testcase: igt/rpm_rpm/dpms-mode-unset-non-lpsp
>>>> Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
>>>
>>> Hm, where do we call these asserts while the pipe is off? Do you have some
>>> example backtraces at hand?
>>
>> Function __intel_set_mode() directly calls intel_crtc_disable(), which
>> calls both assert_plane_disabled() and assert_cursor_disabled().
>
> Hm, I think it makes more sense to drop the three asserts in there.
> The modeset state checker will already notice when we've failed to
> turn off the pipe. And we check cursors and plane state in the enable
> sequence, too.
>
> Since we use these asserts a lot to lock down the precise modeset
> sequence I actually prefer if they're a bit dumb and don't check the
> power wells.

I can do this, but please notice that we already have
power-well-checking code in many of the other assertions on our
driver... And it will probably be just a matter of time since someone
starts using the assertions again on a place where the power well can
be disabled :)

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



-- 
Paulo Zanoni



More information about the Intel-gfx mailing list