Commit graph

10 commits

Author SHA1 Message Date
Marius Vlad 3b13f56a1d backend-drm: Place pixel format checks for the cursor plane in its own
function

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-11-11 16:51:48 +00:00
Marius Vlad 4eeb402553 backend-drm: Place pixel format checks for the overlay plane in its own
function

The idea is to place pixel the format checks in a common part and until
then, to make it available as a function so we can re-use easily.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-11-11 16:51:48 +00:00
Marius Vlad 2538aaccc7 backend-drm: Construct a zpos candidate list of planes
In order to better optimize view assignment to HW planes, we construct
an intermediary zpos candidate list which is used aggregate all suitable
planes for handling scan-out capable client buffers.

We go over it twice: once to construct it and once to pick-and-choose a
suitable plane based its highest zpos position.

In order to maintain the view order correctly we track current zpos
value being applied to the plane state and use it when trying to place
a view into a plane.

Pass the computed zpos value to be applied to the plane state.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Daniel Stone <daniel.stone@collabora.com>
2019-11-11 16:51:48 +00:00
Marius Vlad 47e3d1e481 libweston: Add a new helper to check if the view spawns the entire
output

Helpful to determine if the view can go through the scanout or not.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-11-11 16:51:48 +00:00
Marius Vlad 5f6bee49ed libweston: Add a new helper weston_view_has_valid_buffer
Helper to determine if the buffer attached to the view is valid.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2019-11-11 16:51:48 +00:00
Daniel Stone 2cb926c558 Revert "backend-drm: Teach drm_property_info_populate() to retrieve range values"
Due to an error in driving GitLab, this commit erroneously contained the
entirety of !267 (zpos support in the KMS backend) squashed into one
single commit, pushed into master.

In order to keep the history clean, this is being reverted; a rebased
version of !267 with the clear individual commits which were already
present will be applied in its place.

This reverts commit 95e3b0deae.
2019-11-11 16:48:54 +00:00
Marius Vlad 95e3b0deae backend-drm: Teach drm_property_info_populate() to retrieve range values
Useful for zpos range values.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Daniel Stone <daniel.stone@collabora.com>
2019-11-11 15:24:25 +00:00
Stefan Agner ccf24076dd backend-drm: make GBM optional
Make GBM optional in case GL renderer is disabled. This allows to
build Weston with DRM backend without Mesa dependencies.

Signed-off-by: Stefan Agner <stefan@agner.ch>
2019-10-25 15:32:07 +02:00
Ankit Nautiyal a344fe3245 backend-drm: Add support for content-protection
Currently drm-layer supports HDCP1.4 using connector property:
Content Protection. This property if available for a platform, can be
read and set for requesting content-protection.
Also, the patch series [1] adds HDCP2.2 support in drm, and patch [2]
adds support to send udev events for change in connector properties,
made by the kernel.

This patch adds these HDCP connector properties in weston, and exposes
the content-protection support to the client for drm-backend.

It adds the enums to represent 'Content Protection' and 'Content Type'
connector properties exposed by drm layer. It adds a member
'protection' in drm_output_state, to store the desired protection
from the weston_output in the drm-backend output-repaint cycle. This
is then used to write the HDCP connector properties for the drm_heads
attached to the drm_output.

The kernel sends uevents to the user-space for any change made by it
in the "Content Protection" connector property. No event is sent in
case of change in the property made by the user-space.
It means, when there is a change of the property value from "DESIRED"
to "ENABLE" i.e. successful authentication by the kernel, a uevent
will be generated, but in case of userspace requesting for disabling
the protection by writing "UNDESIRED" into the property, no uevent
will be generated.

This patch also adds support for handling new udev events for HDCP
connector property changes. Any such change, triggers change in the
weston_head's current_protection.

[1] https://patchwork.freedesktop.org/series/57233/#rev7
[2] https://patchwork.freedesktop.org/patch/303903/?series=57233&rev=7

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
2019-08-26 16:18:22 +05:30
Daniel Stone e404b72fd5 compositor-drm: Split assign_planes() into separate file
drm_assign_planes() is called to separate views out and decide what will
be taken out for plane composition and what will be left for the
renderer to compose.

It calls drm_output_propose_state() in order to find a good
configuration, which itself has a number of helpers that it calls. Break
these out into a separate file.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2019-06-26 23:08:36 +01:00