Commit graph

18 commits

Author SHA1 Message Date
Devarsh Thakkar
7d79378895 kmssink: Add "restore-crtc" property
This adds "restore-crtc" property using which one
can restore previous crtc mode.

By default it is enabled, if CRTC was already
active with a valid mode and kmssink set a new mode
on CRTC using force-modesetting.

This helps user restore previous crtc mode and get
the previous session back after running a kmssink
pipeline involving a force-modesetting.

For e.g. When running a kmssink pipeline on rpi
using force-modesetting on tty console, it was giving
a blank screen after pipeline, and now with help of restore-crtc
functionality, CRTC is set with previous crtc mode
previously active on tty console.

Edited-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=797025
2018-08-29 14:17:51 -04:00
Nicolas Dufresne
63dca26fac kmssink: Add 'plane-properties' property
This is similar to 'connector-properties' but will change
selected plane properties instead.

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:57:39 -04:00
Guillaume Desmottes
71ab97cba6 kmssink: add 'connector-properties' prop
Can be used to pass custom connector properties to DRM. Properties can
be enumerated using modetest tool. These properties can then be applied
with the following gst-launch-1.0 syntax. Note that the name of the
structure is ignored.

  ... ! kmssink connector-properties="s,props1=value,props2=value"

https://bugzilla.gnome.org/show_bug.cgi?id=797027
2018-08-29 11:55:19 -04:00
Haihua Hu
b24bb73101 kmssink: support videooverlay interface
Implement videooverlay interface in kmssink, divided into two cases:
when driver supports scale, then we do refresh in show_frame(); if
not, send a reconfigure event to upstream and re-negotiate, using the
new size.

https://bugzilla.gnome.org/show_bug.cgi?id=784599
2017-12-01 09:44:47 -05:00
Nicolas Dufresne
9d5a524547 kmssink: Move the mem cache into the allocator
No functional change, the cache will be later reused by the buffer
pool to keep track of the kmssink memory when exporting dmabuf.

https://bugzilla.gnome.org/show_bug.cgi?id=787593
2017-10-05 16:16:16 -04:00
Nicolas Dufresne
045a91922c kmssink: Check if we can prime export
This will be used later to decide if a DMABuf allocator should be
exposed.

https://bugzilla.gnome.org/show_bug.cgi?id=787593
2017-10-05 16:16:16 -04:00
Nicolas Dufresne
a5229c3098 kmssink: Add bus-id property
https://bugzilla.gnome.org/show_bug.cgi?id=786112
2017-08-11 09:32:08 -04:00
Nicolas Dufresne
1ec081f96d Revert "kmssink: support videooverlay interface"
This is causing hard failure for non-squared pixel. The fix isn't
trivial so taking offline by reverting.

This reverts commit db07f4507d.
2017-08-07 16:00:59 -04:00
Haihua Hu
db07f4507d kmssink: support videooverlay interface
Implement videooverlay interface in kmssink, divided into two cases:
when driver supports scale, then we do refresh in show_frame(); if
not, send a reconfigure event to upstream and re-negotiate, using the
new size.

https://bugzilla.gnome.org/show_bug.cgi?id=784599
2017-07-31 20:04:15 +02:00
Nicolas Dufresne
0a0bc8ab94 kmssink: Track cached kmsmem and clear them on drain
In this patch we keep track of the cached kmsmem in a way
that we can clear the cache during the drain process. This
release the framebuffer before waiting for the next vblank,
hence add support for DRM driver (like Intel one) that release
the associated DMABuf reference asynchronously.

https://bugzilla.gnome.org/show_bug.cgi?id=782774
2017-07-07 14:36:38 -04:00
Philipp Zabel
9ed9c14eb5 kmssink: if the plane can not scale, retry without scaling and remember
Retry the drmModeSetPlane call without scaling if the first try fails,
and remember not to scale anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=781188
2017-04-12 19:31:47 +02:00
Michael Tretter
649364b923 kmssink: configure display mode during set_caps
Configure the display mode when setting the negotiated caps instead of
during showing the first frame.

A framebuffer is required to set the mode. Allocate a buffer object
according to the negotiated caps and use it to set the mode. This buffer
object cannot be freed until another page flip happened on the crtc
(i.e., until the first frame is rendered).

https://bugzilla.gnome.org/show_bug.cgi?id=773473

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2016-11-30 20:13:55 +01:00
Michael Tretter
f52baadd1e kmssink: add mode setting and base plane rendering
The kmssink assumed that the mode was already set by another application
and used an overlay plane for displaying the frames.

Use the preferred mode of the monitor and render to the base plane if
the crtc does not have a valid mode.

https://bugzilla.gnome.org/show_bug.cgi?id=773473

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2016-11-30 20:13:55 +01:00
Philipp Zabel
b2c58d3bc5 kmssink: add sync support for secondary pipes
The vblank event request must specify the crtc for which to request
the event. This fixes kmssink synchronisation for crtcs other than
the first.

https://bugzilla.gnome.org/show_bug.cgi?id=765064
2016-04-19 11:10:49 +02:00
Víctor Manuel Jáquez Leal
7d06cf3297 kmssink: keep last rendered buffer in memory
https://bugzilla.gnome.org/show_bug.cgi?id=761059
2016-04-11 19:57:48 +02:00
Víctor Manuel Jáquez Leal
b29f7d048c kmssink: wait for page flip or vblank
This patch requests for drmModePageFlip() for the used CRTC, if the kernel
module suppports async page flip. If it does not, the element requests for a
vblank event. A GstPoll waits for the event to happen.

https://bugzilla.gnome.org/show_bug.cgi?id=761059
2016-04-11 19:57:48 +02:00
Víctor Manuel Jáquez Leal
c419d17dbf kmssink: add dmabuf support
This patch will enable the import of dmabufs into a KMS buffer using
the PRIME kernel interface.

If the driver does not support prime import, the method is skipped.

It has been tested with a Freescale I.MX6 board.

https://bugzilla.gnome.org/show_bug.cgi?id=761059
2016-04-11 19:57:48 +02:00
Víctor Manuel Jáquez Leal
620e1d2fcd kmssink: add plugin and sink element
This is simple video sink that use libdrm/libkms API to render frames.

The element uses planes to render through drmModeSetPlane().

It has been tested in an Exynos4412 board and in a Freescale I.MX6 board.

https://bugzilla.gnome.org/show_bug.cgi?id=761059
2016-04-11 19:57:48 +02:00