mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
output/kms: Make EDID be read via MetaOutputNative object
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
parent
fd4ea67b27
commit
074d4f3418
@ -89,7 +89,7 @@ static GBytes *
|
||||
meta_monitor_manager_native_read_edid (MetaMonitorManager *manager,
|
||||
MetaOutput *output)
|
||||
{
|
||||
return meta_output_kms_read_edid (META_OUTPUT_KMS (output));
|
||||
return meta_output_native_read_edid (META_OUTPUT_NATIVE (output));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -110,9 +110,10 @@ meta_output_kms_can_clone (MetaOutputKms *output_kms,
|
||||
other_output_kms->kms_connector);
|
||||
}
|
||||
|
||||
GBytes *
|
||||
meta_output_kms_read_edid (MetaOutputKms *output_kms)
|
||||
static GBytes *
|
||||
meta_output_kms_read_edid (MetaOutputNative *output_native)
|
||||
{
|
||||
MetaOutputKms *output_kms = META_OUTPUT_KMS (output_native);
|
||||
const MetaKmsConnectorState *connector_state;
|
||||
GBytes *edid_data;
|
||||
|
||||
@ -387,4 +388,7 @@ meta_output_kms_init (MetaOutputKms *output_kms)
|
||||
static void
|
||||
meta_output_kms_class_init (MetaOutputKmsClass *klass)
|
||||
{
|
||||
MetaOutputNativeClass *output_native_class = META_OUTPUT_NATIVE_CLASS (klass);
|
||||
|
||||
output_native_class->read_edid = meta_output_kms_read_edid;
|
||||
}
|
||||
|
@ -47,8 +47,6 @@ MetaKmsConnector * meta_output_kms_get_kms_connector (MetaOutputKms *output_kms)
|
||||
|
||||
uint32_t meta_output_kms_get_connector_id (MetaOutputKms *output_kms);
|
||||
|
||||
GBytes * meta_output_kms_read_edid (MetaOutputKms *output_kms);
|
||||
|
||||
MetaOutputKms * meta_output_kms_new (MetaGpuKms *gpu_kms,
|
||||
MetaKmsConnector *kms_connector,
|
||||
MetaOutput *old_output,
|
||||
|
@ -24,6 +24,14 @@
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaOutputNative, meta_output_native,
|
||||
META_TYPE_OUTPUT)
|
||||
|
||||
GBytes *
|
||||
meta_output_native_read_edid (MetaOutputNative *output_native)
|
||||
{
|
||||
MetaOutputNativeClass *klass = META_OUTPUT_NATIVE_GET_CLASS (output_native);
|
||||
|
||||
return klass->read_edid (output_native);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_output_native_init (MetaOutputNative *output_native)
|
||||
{
|
||||
|
@ -30,6 +30,10 @@ G_DECLARE_DERIVABLE_TYPE (MetaOutputNative, meta_output_native,
|
||||
struct _MetaOutputNativeClass
|
||||
{
|
||||
MetaOutputClass parent_class;
|
||||
|
||||
GBytes * (* read_edid) (MetaOutputNative *output_native);
|
||||
};
|
||||
|
||||
GBytes * meta_output_native_read_edid (MetaOutputNative *output_native);
|
||||
|
||||
#endif /* META_OUTPUT_NATIVE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user