drm/vc4: false-positive negative cursor position warning

Eric Anholt eric at anholt.net
Mon Apr 9 20:17:47 UTC 2018


Daniel J Blueman <daniel at quora.org> writes:

> Hi Eric et al,
>
> In a number of windowing environments (eg GNOME 3) on Raspberry Pi 3B
> on 4.16.0 arm64, the mouse cursor top-left gets down to x,y -4,-4,
> tripping WARN_ON_ONCE(plane->state->crtc_x < 0 || plane->state->crtc_y
> < 0) [1], which therefore seems false-positive.
>
> Git history doesn't turn up any reason, eg it could cause undefined
> hardware behaviour, which it doesn't appear to, so would it be better
> to drop the warning, or adjust it to trip on x or y < -4 or so? If so,
> I'll prepare a patch to adjust it.

Ccing Boris, who's been doing work on the async update path.

Take a look at vc4_plane_setup_clipping_and_scaling(state) -- that has
the corrections necessary for negative x/y.  We're calling that too late
(through the avc4_plane_atomic_check() path) for this function's usage
of the offsets[].

Since it affects the computed src_w/h, we'd have to update those as well
in our async update.  Our async update is racy in a way that makes me
uncomfortable -- the HVS could process our display list at any point in
our writel() sequence, which is not very atomic.  Maybe we should be
using a double-buffered HVS display list per element, and then have the
main display list jump into each element's current display list and back
out, so that we can do async flips to new plane state by just commiting
a single writel() to the new HVS display element list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180409/724f36b5/attachment.sig>


More information about the dri-devel mailing list