kms/update: Add flags to plane assignment

Currently unused, but will used to let the implementation know when it
can avoid setting the plane content (i.e. not call drmModeSetCursor()).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/930
This commit is contained in:
Jonas Ådahl 2019-11-08 23:54:43 +01:00
parent c1fc46e3db
commit 01bab81727
4 changed files with 26 additions and 13 deletions

View File

@ -83,6 +83,7 @@ meta_crtc_kms_assign_primary_plane (MetaCrtc *crtc,
int x, y;
MetaFixed16Rectangle src_rect;
MetaFixed16Rectangle dst_rect;
MetaKmsAssignPlaneFlag flags;
MetaKmsCrtc *kms_crtc;
MetaKmsDevice *kms_device;
MetaKmsPlane *primary_kms_plane;
@ -105,6 +106,8 @@ meta_crtc_kms_assign_primary_plane (MetaCrtc *crtc,
.height = meta_fixed_16_from_int (crtc->rect.height),
};
flags = META_KMS_ASSIGN_PLANE_FLAG_NONE;
kms_crtc = meta_crtc_kms_get_kms_crtc (crtc);
kms_device = meta_kms_crtc_get_device (kms_crtc);
primary_kms_plane = meta_kms_device_get_primary_plane_for (kms_device,
@ -114,7 +117,8 @@ meta_crtc_kms_assign_primary_plane (MetaCrtc *crtc,
primary_kms_plane,
fb_id,
src_rect,
dst_rect);
dst_rect,
flags);
meta_crtc_kms_apply_transform (crtc, plane_assignment);
}

View File

@ -40,6 +40,7 @@ typedef struct _MetaKmsPlaneAssignment
uint32_t fb_id;
MetaFixed16Rectangle src_rect;
MetaFixed16Rectangle dst_rect;
MetaKmsAssignPlaneFlag flags;
GList *plane_properties;
} MetaKmsPlaneAssignment;

View File

@ -80,7 +80,8 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
MetaKmsPlane *plane,
uint32_t fb_id,
MetaFixed16Rectangle src_rect,
MetaFixed16Rectangle dst_rect)
MetaFixed16Rectangle dst_rect,
MetaKmsAssignPlaneFlag flags)
{
MetaKmsPlaneAssignment *plane_assignment;
@ -94,6 +95,7 @@ meta_kms_update_assign_plane (MetaKmsUpdate *update,
.fb_id = fb_id,
.src_rect = src_rect,
.dst_rect = dst_rect,
.flags = flags,
};
update->plane_assignments = g_list_prepend (update->plane_assignments,

View File

@ -29,6 +29,11 @@
#include "backends/native/meta-kms-types.h"
#include "meta/boxes.h"
typedef enum _MetaKmsAssignPlaneFlag
{
META_KMS_ASSIGN_PLANE_FLAG_NONE = 0,
} MetaKmsAssignPlaneFlag;
struct _MetaKmsPageFlipFeedback
{
void (* flipped) (MetaKmsCrtc *crtc,
@ -64,7 +69,8 @@ MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate *upd
MetaKmsPlane *plane,
uint32_t fb_id,
MetaFixed16Rectangle src_rect,
MetaFixed16Rectangle dst_rect);
MetaFixed16Rectangle dst_rect,
MetaKmsAssignPlaneFlag flags);
MetaKmsPlaneAssignment * meta_kms_update_unassign_plane (MetaKmsUpdate *update,
MetaKmsCrtc *crtc,