mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
kms/update: Add helper to get primary plane assignment
Replaces a private static function, with no functional changes made to it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/826
This commit is contained in:
parent
66ae09b670
commit
3e41568074
@ -134,24 +134,6 @@ process_plane_property (MetaKmsImpl *impl,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static MetaKmsPlaneAssignment *
|
||||
get_primary_plane_assignment (MetaKmsImpl *impl,
|
||||
MetaKmsUpdate *update,
|
||||
MetaKmsCrtc *crtc)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = meta_kms_update_get_plane_assignments (update); l; l = l->next)
|
||||
{
|
||||
MetaKmsPlaneAssignment *plane_assignment = l->data;
|
||||
|
||||
if (plane_assignment->crtc == crtc)
|
||||
return plane_assignment;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static CachedModeSet *
|
||||
cached_mode_set_new (GList *connectors,
|
||||
const drmModeModeInfo *drm_mode)
|
||||
@ -222,7 +204,8 @@ process_mode_set (MetaKmsImpl *impl,
|
||||
&connectors,
|
||||
&n_connectors);
|
||||
|
||||
plane_assignment = get_primary_plane_assignment (impl, update, crtc);
|
||||
plane_assignment = meta_kms_update_get_primary_plane_assignment (update,
|
||||
crtc);
|
||||
if (!plane_assignment)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
|
||||
@ -632,7 +615,8 @@ process_page_flip (MetaKmsImpl *impl,
|
||||
int ret;
|
||||
|
||||
crtc = page_flip->crtc;
|
||||
plane_assignment = get_primary_plane_assignment (impl, update, crtc);
|
||||
plane_assignment = meta_kms_update_get_primary_plane_assignment (update,
|
||||
crtc);
|
||||
|
||||
page_flip_data = meta_kms_page_flip_data_new (impl,
|
||||
crtc,
|
||||
|
@ -97,6 +97,9 @@ void meta_kms_plane_assignment_set_plane_property (MetaKmsPlaneAssignment *plane
|
||||
uint32_t prop_id,
|
||||
uint64_t value);
|
||||
|
||||
MetaKmsPlaneAssignment * meta_kms_update_get_primary_plane_assignment (MetaKmsUpdate *update,
|
||||
MetaKmsCrtc *crtc);
|
||||
|
||||
GList * meta_kms_update_get_plane_assignments (MetaKmsUpdate *update);
|
||||
|
||||
GList * meta_kms_update_get_mode_sets (MetaKmsUpdate *update);
|
||||
|
@ -235,6 +235,23 @@ meta_kms_plane_assignment_set_plane_property (MetaKmsPlaneAssignment *plane_assi
|
||||
g_list_prepend (plane_assignment->plane_properties, plane_prop);
|
||||
}
|
||||
|
||||
MetaKmsPlaneAssignment *
|
||||
meta_kms_update_get_primary_plane_assignment (MetaKmsUpdate *update,
|
||||
MetaKmsCrtc *crtc)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = meta_kms_update_get_plane_assignments (update); l; l = l->next)
|
||||
{
|
||||
MetaKmsPlaneAssignment *plane_assignment = l->data;
|
||||
|
||||
if (plane_assignment->crtc == crtc)
|
||||
return plane_assignment;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GList *
|
||||
meta_kms_update_get_plane_assignments (MetaKmsUpdate *update)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user