Commit Graph

14 Commits

Author SHA1 Message Date
Dave Stevenson
119a33c9a0 gpu:vc4-fkms: Update driver to not use plane->crtc.
Following on from
commit 2f958af7fc ("drm/vc4: Stop updating plane->fb/crtc")
do the same in the firmwarekms driver and look at plane_state->crtc
instead.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
2019-04-15 10:22:59 +01:00
Dave Stevenson
4c62ab7956 gpu: vc4_firmware_kms: Fix up 64 bit compile warnings.
Resolve two build warnings with regard using incorrectly
sized parameters in logging messages on 64 bit builds.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
2019-04-15 10:22:50 +01:00
popcornmix
50fcc4cec0 vc4_firmware_kms: fix build 2019-04-02 13:07:13 +01:00
Eric Anholt
5fd2fa092a drm/vc4: Remove duplicate primary/cursor fields from FKMS driver.
The CRTC has those fields and we can just use them.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:13 +01:00
Eric Anholt
0ff96947d0 drm/vc4: Skip SET_CURSOR_INFO when the cursor contents didn't change.
Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:13 +01:00
Eric Anholt
8583571035 drm/vc4: Fix warning about vblank interrupts before DRM core is ready.
The SMICS interrupt fires continuously, but since it's 1/100 the rate
of the USB interrupts, we don't really need a way to turn it off.  We
do need to make sure that we don't tell DRM about it until DRM has
asked for the interrupt at least once, because otherwise it will throw
a warning at boot time.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:12 +01:00
popcornmix
309d74bef0 vc4_fkms: Apply firmware overscan offset to hardware cursor 2019-04-02 13:07:12 +01:00
Eric Anholt
e7f821ff3b drm/vc4: Add missing enable/disable vblank handlers in fkms.
Fixes hang at boot in 4.14.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:12 +01:00
Eric Anholt
de5eabd953 drm/vc4: Add FB modifier support to firmwarekms.
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 11752d7348)
2019-04-02 13:07:12 +01:00
Eric Anholt
619fb7469b drm/vc4: Add support for setting DPMS in firmwarekms.
This ensures that the screen goes blank during DPMS (screensaver),
including the cursor.  Planes don't necessarily get disabled during
CRTC disable, so we need to be careful to not leave them on or turn
them back on early.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:12 +01:00
Eric Anholt
8e35063e6d drm/vc4: Fix sending of page flip completion events in FKMS mode.
In the rewrite of vc4_crtc.c for fkms, I dropped the part of the
CRTC's atomic flush handler that moved the completion event from the
proposed atomic state change to the CRTC's current state.  That meant
that when full screen pageflipping happened (glxgears -fullscreen in
X, compton, por weston), the app would end up blocked firever waiting
to draw its next frame.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:11 +01:00
Eric Anholt
e04017711f drm/vc4: Add DRM_DEBUG_ATOMIC for the insides of fkms.
Trying to debug weston on fkms involved figuring out what calls I was
making to the firmware.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:11 +01:00
Eric Anholt
1c7428743f drm/vc4: Name the primary and cursor planes in fkms.
This makes debugging nicer, compared to trying to remember what the
IDs are.

Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:11 +01:00
Eric Anholt
a33f437cf7 drm/vc4: Add a mode for using the closed firmware for display.
Signed-off-by: Eric Anholt <eric@anholt.net>
2019-04-02 13:07:11 +01:00