onscreen/native: Plumb through MetaKmsAssignPlaneFlag
Through meta_onscreen_native_flip_crtc and meta_crtc_kms_assign_primary_plane. Preparation for following commits, no functional change intended. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3389>
This commit is contained in:
parent
ebf9a1edde
commit
0f52c2a6da
@ -257,16 +257,16 @@ meta_crtc_kms_apply_transform (MetaCrtcKms *crtc_kms,
|
||||
}
|
||||
|
||||
MetaKmsPlaneAssignment *
|
||||
meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaKmsUpdate *kms_update)
|
||||
meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaKmsUpdate *kms_update,
|
||||
MetaKmsAssignPlaneFlag flags)
|
||||
{
|
||||
MetaCrtc *crtc = META_CRTC (crtc_kms);
|
||||
const MetaCrtcConfig *crtc_config;
|
||||
const MetaCrtcModeInfo *crtc_mode_info;
|
||||
MetaFixed16Rectangle src_rect;
|
||||
MtkRectangle dst_rect;
|
||||
MetaKmsAssignPlaneFlag flags;
|
||||
MetaKmsCrtc *kms_crtc;
|
||||
MetaKmsDevice *kms_device;
|
||||
MetaKmsPlane *primary_kms_plane;
|
||||
@ -288,8 +288,6 @@ meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
.height = crtc_mode_info->height,
|
||||
};
|
||||
|
||||
flags = META_KMS_ASSIGN_PLANE_FLAG_NONE;
|
||||
|
||||
kms_crtc = meta_crtc_kms_get_kms_crtc (crtc_kms);
|
||||
kms_device = meta_kms_crtc_get_device (kms_crtc);
|
||||
primary_kms_plane = meta_kms_device_get_primary_plane_for (kms_device,
|
||||
|
@ -40,9 +40,10 @@ G_DECLARE_FINAL_TYPE (MetaCrtcKms, meta_crtc_kms,
|
||||
void meta_crtc_kms_apply_transform (MetaCrtcKms *crtc_kms,
|
||||
MetaKmsPlaneAssignment *kms_plane_assignment);
|
||||
|
||||
MetaKmsPlaneAssignment * meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaKmsUpdate *kms_update);
|
||||
MetaKmsPlaneAssignment * meta_crtc_kms_assign_primary_plane (MetaCrtcKms *crtc_kms,
|
||||
MetaDrmBuffer *buffer,
|
||||
MetaKmsUpdate *kms_update,
|
||||
MetaKmsAssignPlaneFlag flags);
|
||||
|
||||
void meta_crtc_kms_set_mode (MetaCrtcKms *crtc_kms,
|
||||
MetaKmsUpdate *kms_update);
|
||||
|
@ -411,13 +411,13 @@ meta_onscreen_native_dummy_power_save_page_flip (CoglOnscreen *onscreen)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_onscreen_native_flip_crtc (CoglOnscreen *onscreen,
|
||||
MetaRendererView *view,
|
||||
MetaCrtc *crtc,
|
||||
MetaKmsUpdate *kms_update,
|
||||
MetaKmsPageFlipListenerFlag flags,
|
||||
const int *rectangles,
|
||||
int n_rectangles)
|
||||
meta_onscreen_native_flip_crtc (CoglOnscreen *onscreen,
|
||||
MetaRendererView *view,
|
||||
MetaCrtc *crtc,
|
||||
MetaKmsUpdate *kms_update,
|
||||
MetaKmsAssignPlaneFlag flags,
|
||||
const int *rectangles,
|
||||
int n_rectangles)
|
||||
{
|
||||
MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
|
||||
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
|
||||
@ -445,7 +445,8 @@ meta_onscreen_native_flip_crtc (CoglOnscreen *onscreen,
|
||||
|
||||
plane_assignment = meta_crtc_kms_assign_primary_plane (crtc_kms,
|
||||
buffer,
|
||||
kms_update);
|
||||
kms_update,
|
||||
flags);
|
||||
|
||||
if (rectangles != NULL && n_rectangles != 0)
|
||||
{
|
||||
@ -468,7 +469,7 @@ meta_onscreen_native_flip_crtc (CoglOnscreen *onscreen,
|
||||
meta_kms_update_add_page_flip_listener (kms_update,
|
||||
kms_crtc,
|
||||
&page_flip_listener_vtable,
|
||||
flags,
|
||||
META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE,
|
||||
NULL,
|
||||
g_object_ref (view),
|
||||
g_object_unref);
|
||||
@ -498,7 +499,8 @@ meta_onscreen_native_set_crtc_mode (CoglOnscreen *onscreen,
|
||||
MetaDrmBuffer *buffer;
|
||||
|
||||
buffer = META_DRM_BUFFER (onscreen_native->egl.dumb_fb);
|
||||
meta_crtc_kms_assign_primary_plane (crtc_kms, buffer, kms_update);
|
||||
meta_crtc_kms_assign_primary_plane (crtc_kms, buffer, kms_update,
|
||||
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -1175,7 +1177,7 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
||||
onscreen_native->view,
|
||||
onscreen_native->crtc,
|
||||
kms_update,
|
||||
META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE,
|
||||
META_KMS_ASSIGN_PLANE_FLAG_NONE,
|
||||
rectangles,
|
||||
n_rectangles);
|
||||
}
|
||||
@ -1274,7 +1276,8 @@ meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,
|
||||
kms_crtc = meta_crtc_kms_get_kms_crtc (crtc_kms);
|
||||
|
||||
test_update = meta_kms_update_new (kms_device);
|
||||
meta_crtc_kms_assign_primary_plane (crtc_kms, fb, test_update);
|
||||
meta_crtc_kms_assign_primary_plane (crtc_kms, fb, test_update,
|
||||
META_KMS_ASSIGN_PLANE_FLAG_NONE);
|
||||
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"Posting direct scanout test update for CRTC %u (%s) synchronously",
|
||||
@ -1396,7 +1399,7 @@ meta_onscreen_native_direct_scanout (CoglOnscreen *onscreen,
|
||||
onscreen_native->view,
|
||||
onscreen_native->crtc,
|
||||
kms_update,
|
||||
META_KMS_PAGE_FLIP_LISTENER_FLAG_NONE,
|
||||
META_KMS_ASSIGN_PLANE_FLAG_NONE,
|
||||
NULL,
|
||||
0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user