monitor-manager: Rename MetaCRTC(Info) to MetaCrtc(Info)
Change to follow the naming convention used everywhere else. This means changing CRTC to Crtc even though it is an abbreviation. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
156c478ccb
commit
1650c35e38
@ -898,7 +898,7 @@ apply_configuration (MetaMonitorConfig *self,
|
||||
return FALSE;
|
||||
|
||||
meta_monitor_manager_apply_configuration (manager,
|
||||
(MetaCRTCInfo**)crtcs->pdata, crtcs->len,
|
||||
(MetaCrtcInfo**)crtcs->pdata, crtcs->len,
|
||||
(MetaOutputInfo**)outputs->pdata, outputs->len);
|
||||
|
||||
set_current (self, config);
|
||||
@ -1772,7 +1772,7 @@ output_can_clone (MetaOutput *output,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
can_clone (MetaCRTCInfo *info,
|
||||
can_clone (MetaCrtcInfo *info,
|
||||
MetaOutput *output)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -1789,7 +1789,7 @@ can_clone (MetaCRTCInfo *info,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
crtc_can_drive_output (MetaCRTC *crtc,
|
||||
crtc_can_drive_output (MetaCrtc *crtc,
|
||||
MetaOutput *output)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -1803,14 +1803,14 @@ crtc_can_drive_output (MetaCRTC *crtc,
|
||||
|
||||
static gboolean
|
||||
crtc_assignment_assign (CrtcAssignment *assign,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
MetaMonitorMode *mode,
|
||||
int x,
|
||||
int y,
|
||||
MetaMonitorTransform transform,
|
||||
MetaOutput *output)
|
||||
{
|
||||
MetaCRTCInfo *info = g_hash_table_lookup (assign->info, crtc);
|
||||
MetaCrtcInfo *info = g_hash_table_lookup (assign->info, crtc);
|
||||
|
||||
if (!crtc_can_drive_output (crtc, output))
|
||||
return FALSE;
|
||||
@ -1834,7 +1834,7 @@ crtc_assignment_assign (CrtcAssignment *assign,
|
||||
}
|
||||
else
|
||||
{
|
||||
info = g_slice_new0 (MetaCRTCInfo);
|
||||
info = g_slice_new0 (MetaCrtcInfo);
|
||||
|
||||
info->crtc = crtc;
|
||||
info->mode = mode;
|
||||
@ -1852,10 +1852,10 @@ crtc_assignment_assign (CrtcAssignment *assign,
|
||||
|
||||
static void
|
||||
crtc_assignment_unassign (CrtcAssignment *assign,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
MetaOutput *output)
|
||||
{
|
||||
MetaCRTCInfo *info = g_hash_table_lookup (assign->info, crtc);
|
||||
MetaCrtcInfo *info = g_hash_table_lookup (assign->info, crtc);
|
||||
|
||||
if (info)
|
||||
{
|
||||
@ -1901,7 +1901,7 @@ static gboolean
|
||||
real_assign_crtcs (CrtcAssignment *assignment,
|
||||
unsigned int output_num)
|
||||
{
|
||||
MetaCRTC *crtcs;
|
||||
MetaCrtc *crtcs;
|
||||
MetaOutput *outputs;
|
||||
unsigned int n_crtcs, n_outputs;
|
||||
MetaOutputKey *output_key;
|
||||
@ -1925,7 +1925,7 @@ real_assign_crtcs (CrtcAssignment *assignment,
|
||||
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &crtcs[i];
|
||||
MetaCrtc *crtc = &crtcs[i];
|
||||
unsigned int pass;
|
||||
|
||||
/* Make two passes, one where frequencies must match, then
|
||||
@ -1989,8 +1989,8 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
|
||||
{
|
||||
CrtcAssignment assignment;
|
||||
GHashTableIter iter;
|
||||
MetaCRTC *crtc;
|
||||
MetaCRTCInfo *info;
|
||||
MetaCrtc *crtc;
|
||||
MetaCrtcInfo *info;
|
||||
unsigned int i;
|
||||
MetaOutput *all_outputs;
|
||||
unsigned int n_outputs;
|
||||
@ -2041,10 +2041,10 @@ meta_monitor_config_assign_crtcs (MetaConfiguration *config,
|
||||
}
|
||||
|
||||
void
|
||||
meta_crtc_info_free (MetaCRTCInfo *info)
|
||||
meta_crtc_info_free (MetaCrtcInfo *info)
|
||||
{
|
||||
g_ptr_array_free (info->outputs, TRUE);
|
||||
g_slice_free (MetaCRTCInfo, info);
|
||||
g_slice_free (MetaCrtcInfo, info);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -121,7 +121,7 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
|
||||
manager->modes[0].height = 768;
|
||||
manager->modes[0].refresh_rate = 60.0;
|
||||
|
||||
manager->crtcs = g_new0 (MetaCRTC, num_monitors);
|
||||
manager->crtcs = g_new0 (MetaCrtc, num_monitors);
|
||||
manager->n_crtcs = num_monitors;
|
||||
manager->outputs = g_new0 (MetaOutput, num_monitors);
|
||||
manager->n_outputs = num_monitors;
|
||||
@ -157,7 +157,7 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
|
||||
manager->outputs[i].modes = g_new0 (MetaMonitorMode *, 1);
|
||||
manager->outputs[i].modes[0] = &manager->modes[0];
|
||||
manager->outputs[i].n_possible_crtcs = 1;
|
||||
manager->outputs[i].possible_crtcs = g_new0 (MetaCRTC *, 1);
|
||||
manager->outputs[i].possible_crtcs = g_new0 (MetaCrtc *, 1);
|
||||
manager->outputs[i].possible_crtcs[0] = &manager->crtcs[i];
|
||||
manager->outputs[i].n_possible_clones = 0;
|
||||
manager->outputs[i].possible_clones = g_new0 (MetaOutput *, 0);
|
||||
@ -171,7 +171,7 @@ meta_monitor_manager_dummy_read_current (MetaMonitorManager *manager)
|
||||
|
||||
static void
|
||||
meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
|
||||
MetaCRTCInfo **crtcs,
|
||||
MetaCrtcInfo **crtcs,
|
||||
unsigned int n_crtcs,
|
||||
MetaOutputInfo **outputs,
|
||||
unsigned int n_outputs)
|
||||
@ -181,8 +181,8 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
|
||||
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTCInfo *crtc_info = crtcs[i];
|
||||
MetaCRTC *crtc = crtc_info->crtc;
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
crtc->is_dirty = TRUE;
|
||||
|
||||
if (crtc_info->mode == NULL)
|
||||
@ -245,7 +245,7 @@ meta_monitor_manager_dummy_apply_config (MetaMonitorManager *manager,
|
||||
/* Disable CRTCs not mentioned in the list */
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
|
||||
crtc->logical_monitor = NULL;
|
||||
|
||||
|
@ -52,10 +52,10 @@ typedef struct _MetaMonitorConfig MetaMonitorConfig;
|
||||
|
||||
typedef struct _MetaLogicalMonitor MetaLogicalMonitor;
|
||||
|
||||
typedef struct _MetaCRTC MetaCRTC;
|
||||
typedef struct _MetaCrtc MetaCrtc;
|
||||
typedef struct _MetaOutput MetaOutput;
|
||||
typedef struct _MetaMonitorMode MetaMonitorMode;
|
||||
typedef struct _MetaCRTCInfo MetaCRTCInfo;
|
||||
typedef struct _MetaCrtcInfo MetaCrtcInfo;
|
||||
typedef struct _MetaOutputInfo MetaOutputInfo;
|
||||
typedef struct _MetaTileInfo MetaTileInfo;
|
||||
|
||||
@ -110,7 +110,7 @@ struct _MetaTileInfo {
|
||||
struct _MetaOutput
|
||||
{
|
||||
/* The CRTC driving this output, NULL if the output is not enabled */
|
||||
MetaCRTC *crtc;
|
||||
MetaCrtc *crtc;
|
||||
/* The low-level ID of this output, used to apply back configuration */
|
||||
glong winsys_id;
|
||||
char *name;
|
||||
@ -128,7 +128,7 @@ struct _MetaOutput
|
||||
MetaMonitorMode **modes;
|
||||
unsigned int n_modes;
|
||||
|
||||
MetaCRTC **possible_crtcs;
|
||||
MetaCrtc **possible_crtcs;
|
||||
unsigned int n_possible_crtcs;
|
||||
|
||||
MetaOutput **possible_clones;
|
||||
@ -164,7 +164,7 @@ struct _MetaOutput
|
||||
MetaTileInfo tile_info;
|
||||
};
|
||||
|
||||
struct _MetaCRTC
|
||||
struct _MetaCrtc
|
||||
{
|
||||
glong crtc_id;
|
||||
MetaRectangle rect;
|
||||
@ -244,15 +244,15 @@ struct _MetaLogicalMonitor
|
||||
};
|
||||
|
||||
/*
|
||||
* MetaCRTCInfo:
|
||||
* MetaCrtcInfo:
|
||||
* This represents the writable part of a CRTC, as deserialized from DBus
|
||||
* or built by MetaMonitorConfig
|
||||
*
|
||||
* Note: differently from the other structures in this file, MetaCRTCInfo
|
||||
* Note: differently from the other structures in this file, MetaCrtcInfo
|
||||
* is handled by pointer. This is to accomodate the usage in MetaMonitorConfig
|
||||
*/
|
||||
struct _MetaCRTCInfo {
|
||||
MetaCRTC *crtc;
|
||||
struct _MetaCrtcInfo {
|
||||
MetaCrtc *crtc;
|
||||
MetaMonitorMode *mode;
|
||||
int x;
|
||||
int y;
|
||||
@ -262,7 +262,7 @@ struct _MetaCRTCInfo {
|
||||
|
||||
/*
|
||||
* MetaOutputInfo:
|
||||
* this is the same as MetaCRTCInfo, but for outputs
|
||||
* this is the same as MetaCrtcInfo, but for outputs
|
||||
*/
|
||||
struct _MetaOutputInfo {
|
||||
MetaOutput *output;
|
||||
@ -309,7 +309,7 @@ struct _MetaMonitorManager
|
||||
MetaMonitorMode *modes;
|
||||
unsigned int n_modes;
|
||||
|
||||
MetaCRTC *crtcs;
|
||||
MetaCrtc *crtcs;
|
||||
unsigned int n_crtcs;
|
||||
|
||||
GList *logical_monitors;
|
||||
@ -335,7 +335,7 @@ struct _MetaMonitorManagerClass
|
||||
MetaOutput *);
|
||||
|
||||
void (*apply_configuration) (MetaMonitorManager *,
|
||||
MetaCRTCInfo **,
|
||||
MetaCrtcInfo **,
|
||||
unsigned int ,
|
||||
MetaOutputInfo **,
|
||||
unsigned int);
|
||||
@ -348,13 +348,13 @@ struct _MetaMonitorManagerClass
|
||||
int);
|
||||
|
||||
void (*get_crtc_gamma) (MetaMonitorManager *,
|
||||
MetaCRTC *,
|
||||
MetaCrtc *,
|
||||
gsize *,
|
||||
unsigned short **,
|
||||
unsigned short **,
|
||||
unsigned short **);
|
||||
void (*set_crtc_gamma) (MetaMonitorManager *,
|
||||
MetaCRTC *,
|
||||
MetaCrtc *,
|
||||
gsize ,
|
||||
unsigned short *,
|
||||
unsigned short *,
|
||||
@ -396,7 +396,7 @@ MetaOutput *meta_monitor_manager_get_outputs (MetaMonitorManager *
|
||||
void meta_monitor_manager_get_resources (MetaMonitorManager *manager,
|
||||
MetaMonitorMode **modes,
|
||||
unsigned int *n_modes,
|
||||
MetaCRTC **crtcs,
|
||||
MetaCrtc **crtcs,
|
||||
unsigned int *n_crtcs,
|
||||
MetaOutput **outputs,
|
||||
unsigned int *n_outputs);
|
||||
@ -410,7 +410,7 @@ void meta_monitor_manager_get_screen_limits (MetaMonitorManager *
|
||||
int *height);
|
||||
|
||||
void meta_monitor_manager_apply_configuration (MetaMonitorManager *manager,
|
||||
MetaCRTCInfo **crtcs,
|
||||
MetaCrtcInfo **crtcs,
|
||||
unsigned int n_crtcs,
|
||||
MetaOutputInfo **outputs,
|
||||
unsigned int n_outputs);
|
||||
@ -422,7 +422,7 @@ void meta_output_parse_edid (MetaOutput *output,
|
||||
GBytes *edid);
|
||||
gboolean meta_output_is_laptop (MetaOutput *output);
|
||||
|
||||
void meta_crtc_info_free (MetaCRTCInfo *info);
|
||||
void meta_crtc_info_free (MetaCrtcInfo *info);
|
||||
void meta_output_info_free (MetaOutputInfo *info);
|
||||
|
||||
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
|
||||
@ -435,7 +435,7 @@ gboolean meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *
|
||||
|
||||
void meta_monitor_manager_clear_output (MetaOutput *output);
|
||||
void meta_monitor_manager_clear_mode (MetaMonitorMode *mode);
|
||||
void meta_monitor_manager_clear_crtc (MetaCRTC *crtc);
|
||||
void meta_monitor_manager_clear_crtc (MetaCrtc *crtc);
|
||||
|
||||
/* Returns true if transform causes width and height to be inverted
|
||||
This is true for the odd transforms in the enum */
|
||||
|
@ -178,7 +178,7 @@ make_logical_config (MetaMonitorManager *manager)
|
||||
|
||||
monitor_number = 0;
|
||||
|
||||
/* Walk the list of MetaCRTCs, and build a MetaLogicalMonitor
|
||||
/* Walk the list of MetaCrtcs, and build a MetaLogicalMonitor
|
||||
for each of them, unless they reference a rectangle that
|
||||
is already there.
|
||||
*/
|
||||
@ -208,7 +208,7 @@ make_logical_config (MetaMonitorManager *manager)
|
||||
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
GList *l;
|
||||
|
||||
/* Ignore CRTCs not in use */
|
||||
@ -429,7 +429,7 @@ meta_monitor_manager_free_mode_array (MetaMonitorMode *old_modes,
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_manager_clear_crtc (MetaCRTC *crtc)
|
||||
meta_monitor_manager_clear_crtc (MetaCrtc *crtc)
|
||||
{
|
||||
if (crtc->driver_notify)
|
||||
crtc->driver_notify (crtc);
|
||||
@ -438,7 +438,7 @@ meta_monitor_manager_clear_crtc (MetaCRTC *crtc)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_monitor_manager_free_crtc_array (MetaCRTC *old_crtcs,
|
||||
meta_monitor_manager_free_crtc_array (MetaCrtc *old_crtcs,
|
||||
int n_old_crtcs)
|
||||
{
|
||||
int i;
|
||||
@ -624,7 +624,7 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
|
||||
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
GVariantBuilder transforms;
|
||||
|
||||
g_variant_builder_init (&transforms, G_VARIANT_TYPE ("au"));
|
||||
@ -766,7 +766,7 @@ meta_monitor_manager_handle_get_resources (MetaDBusDisplayConfig *skeleton,
|
||||
|
||||
static gboolean
|
||||
output_can_config (MetaOutput *output,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
MetaMonitorMode *mode)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -803,7 +803,7 @@ output_can_clone (MetaOutput *output,
|
||||
|
||||
void
|
||||
meta_monitor_manager_apply_configuration (MetaMonitorManager *manager,
|
||||
MetaCRTCInfo **crtcs,
|
||||
MetaCrtcInfo **crtcs,
|
||||
unsigned int n_crtcs,
|
||||
MetaOutputInfo **outputs,
|
||||
unsigned int n_outputs)
|
||||
@ -862,12 +862,12 @@ meta_monitor_manager_handle_apply_configuration (MetaDBusDisplayConfig *skeleto
|
||||
&crtc_id, &new_mode, &x, &y, &transform,
|
||||
&nested_outputs, NULL))
|
||||
{
|
||||
MetaCRTCInfo *crtc_info;
|
||||
MetaCrtcInfo *crtc_info;
|
||||
MetaOutput *first_output;
|
||||
MetaCRTC *crtc;
|
||||
MetaCrtc *crtc;
|
||||
MetaMonitorMode *mode;
|
||||
|
||||
crtc_info = g_slice_new (MetaCRTCInfo);
|
||||
crtc_info = g_slice_new (MetaCrtcInfo);
|
||||
crtc_info->outputs = g_ptr_array_new ();
|
||||
|
||||
if (crtc_id >= manager->n_crtcs)
|
||||
@ -1033,7 +1033,7 @@ meta_monitor_manager_handle_apply_configuration (MetaDBusDisplayConfig *skeleto
|
||||
}
|
||||
|
||||
meta_monitor_manager_apply_configuration (manager,
|
||||
(MetaCRTCInfo**)crtc_infos->pdata,
|
||||
(MetaCrtcInfo**)crtc_infos->pdata,
|
||||
crtc_infos->len,
|
||||
(MetaOutputInfo**)output_infos->pdata,
|
||||
output_infos->len);
|
||||
@ -1136,7 +1136,7 @@ meta_monitor_manager_handle_get_crtc_gamma (MetaDBusDisplayConfig *skeleton,
|
||||
{
|
||||
MetaMonitorManager *manager = META_MONITOR_MANAGER (skeleton);
|
||||
MetaMonitorManagerClass *klass;
|
||||
MetaCRTC *crtc;
|
||||
MetaCrtc *crtc;
|
||||
gsize size;
|
||||
unsigned short *red;
|
||||
unsigned short *green;
|
||||
@ -1199,7 +1199,7 @@ meta_monitor_manager_handle_set_crtc_gamma (MetaDBusDisplayConfig *skeleton,
|
||||
{
|
||||
MetaMonitorManager *manager = META_MONITOR_MANAGER (skeleton);
|
||||
MetaMonitorManagerClass *klass;
|
||||
MetaCRTC *crtc;
|
||||
MetaCrtc *crtc;
|
||||
gsize size, dummy;
|
||||
unsigned short *red;
|
||||
unsigned short *green;
|
||||
@ -1459,7 +1459,7 @@ void
|
||||
meta_monitor_manager_get_resources (MetaMonitorManager *manager,
|
||||
MetaMonitorMode **modes,
|
||||
unsigned int *n_modes,
|
||||
MetaCRTC **crtcs,
|
||||
MetaCrtc **crtcs,
|
||||
unsigned int *n_crtcs,
|
||||
MetaOutput **outputs,
|
||||
unsigned int *n_outputs)
|
||||
@ -1503,7 +1503,7 @@ void
|
||||
meta_monitor_manager_read_current_config (MetaMonitorManager *manager)
|
||||
{
|
||||
MetaOutput *old_outputs;
|
||||
MetaCRTC *old_crtcs;
|
||||
MetaCrtc *old_crtcs;
|
||||
MetaMonitorMode *old_modes;
|
||||
unsigned int n_old_outputs, n_old_crtcs, n_old_modes;
|
||||
|
||||
|
@ -158,7 +158,7 @@ set_pending_cursor_sprite_gbm_bo (MetaCursorSprite *cursor_sprite,
|
||||
|
||||
static void
|
||||
set_crtc_cursor (MetaCursorRendererNative *native,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
MetaCursorSprite *cursor_sprite,
|
||||
gboolean force)
|
||||
{
|
||||
@ -213,7 +213,7 @@ update_hw_cursor (MetaCursorRendererNative *native,
|
||||
MetaCursorRendererNativePrivate *priv = meta_cursor_renderer_native_get_instance_private (native);
|
||||
MetaCursorRenderer *renderer = META_CURSOR_RENDERER (native);
|
||||
MetaMonitorManager *monitors;
|
||||
MetaCRTC *crtcs;
|
||||
MetaCrtc *crtcs;
|
||||
unsigned int i, n_crtcs;
|
||||
MetaRectangle rect;
|
||||
gboolean painted = FALSE;
|
||||
@ -285,7 +285,7 @@ cursor_over_transformed_crtc (MetaCursorRenderer *renderer,
|
||||
MetaCursorSprite *cursor_sprite)
|
||||
{
|
||||
MetaMonitorManager *monitors;
|
||||
MetaCRTC *crtcs;
|
||||
MetaCrtc *crtcs;
|
||||
unsigned int i, n_crtcs;
|
||||
MetaRectangle rect;
|
||||
|
||||
|
@ -84,7 +84,7 @@ typedef struct {
|
||||
uint32_t rotation_prop_id;
|
||||
uint32_t rotation_map[ALL_TRANSFORMS];
|
||||
uint32_t all_hw_transforms;
|
||||
} MetaCRTCKms;
|
||||
} MetaCrtcKms;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -193,7 +193,7 @@ meta_monitor_mode_destroy_notify (MetaMonitorMode *output)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_crtc_destroy_notify (MetaCRTC *crtc)
|
||||
meta_crtc_destroy_notify (MetaCrtc *crtc)
|
||||
{
|
||||
g_free (crtc->driver_private);
|
||||
}
|
||||
@ -281,9 +281,9 @@ find_connector_properties (MetaMonitorManagerKms *manager_kms,
|
||||
|
||||
static void
|
||||
find_crtc_properties (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *meta_crtc)
|
||||
MetaCrtc *meta_crtc)
|
||||
{
|
||||
MetaCRTCKms *crtc_kms;
|
||||
MetaCrtcKms *crtc_kms;
|
||||
drmModeObjectPropertiesPtr props;
|
||||
size_t i;
|
||||
|
||||
@ -561,9 +561,9 @@ find_property_index (MetaMonitorManager *manager,
|
||||
static void
|
||||
parse_transforms (MetaMonitorManager *manager,
|
||||
drmModePropertyPtr prop,
|
||||
MetaCRTC *crtc)
|
||||
MetaCrtc *crtc)
|
||||
{
|
||||
MetaCRTCKms *crtc_kms = crtc->driver_private;
|
||||
MetaCrtcKms *crtc_kms = crtc->driver_private;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < prop->count_enums; i++)
|
||||
@ -604,14 +604,14 @@ is_primary_plane (MetaMonitorManager *manager,
|
||||
|
||||
static void
|
||||
init_crtc_rotations (MetaMonitorManager *manager,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
unsigned int idx)
|
||||
{
|
||||
MetaMonitorManagerKms *manager_kms = META_MONITOR_MANAGER_KMS (manager);
|
||||
drmModeObjectPropertiesPtr props;
|
||||
drmModePlaneRes *planes;
|
||||
drmModePlane *drm_plane;
|
||||
MetaCRTCKms *crtc_kms;
|
||||
MetaCrtcKms *crtc_kms;
|
||||
unsigned int i;
|
||||
|
||||
crtc_kms = crtc->driver_private;
|
||||
@ -704,7 +704,7 @@ add_common_modes (MetaMonitorManager *manager,
|
||||
}
|
||||
|
||||
static void
|
||||
init_crtc (MetaCRTC *crtc,
|
||||
init_crtc (MetaCrtc *crtc,
|
||||
MetaMonitorManager *manager,
|
||||
drmModeCrtc *drm_crtc)
|
||||
{
|
||||
@ -732,7 +732,7 @@ init_crtc (MetaCRTC *crtc,
|
||||
}
|
||||
}
|
||||
|
||||
crtc->driver_private = g_new0 (MetaCRTCKms, 1);
|
||||
crtc->driver_private = g_new0 (MetaCrtcKms, 1);
|
||||
crtc->driver_notify = (GDestroyNotify) meta_crtc_destroy_notify;
|
||||
}
|
||||
|
||||
@ -827,13 +827,13 @@ init_output (MetaOutput *output,
|
||||
output_kms->current_encoder = output_kms->encoders[i];
|
||||
}
|
||||
|
||||
crtcs = g_array_new (FALSE, FALSE, sizeof (MetaCRTC*));
|
||||
crtcs = g_array_new (FALSE, FALSE, sizeof (MetaCrtc*));
|
||||
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
if (crtc_mask & (1 << i))
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
g_array_append_val (crtcs, crtc);
|
||||
}
|
||||
}
|
||||
@ -1072,12 +1072,12 @@ init_crtcs (MetaMonitorManager *manager,
|
||||
unsigned int i;
|
||||
|
||||
manager->n_crtcs = resources->count_crtcs;
|
||||
manager->crtcs = g_new0 (MetaCRTC, manager->n_crtcs);
|
||||
manager->crtcs = g_new0 (MetaCrtc, manager->n_crtcs);
|
||||
|
||||
for (i = 0; i < (unsigned)resources->count_crtcs; i++)
|
||||
{
|
||||
drmModeCrtc *drm_crtc;
|
||||
MetaCRTC *crtc;
|
||||
MetaCrtc *crtc;
|
||||
|
||||
drm_crtc = drmModeGetCrtc (manager_kms->fd, resources->crtcs[i]);
|
||||
|
||||
@ -1144,7 +1144,7 @@ calculate_screen_size (MetaMonitorManager *manager)
|
||||
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
|
||||
width = MAX (width, crtc->rect.x + crtc->rect.width);
|
||||
height = MAX (height, crtc->rect.y + crtc->rect.height);
|
||||
@ -1246,8 +1246,8 @@ set_underscan (MetaMonitorManagerKms *manager_kms,
|
||||
if (!output->crtc)
|
||||
return;
|
||||
|
||||
MetaCRTC *crtc = output->crtc;
|
||||
MetaCRTCKms *crtc_kms = crtc->driver_private;
|
||||
MetaCrtc *crtc = output->crtc;
|
||||
MetaCrtcKms *crtc_kms = crtc->driver_private;
|
||||
if (!crtc_kms->underscan_prop_id)
|
||||
return;
|
||||
|
||||
@ -1283,7 +1283,7 @@ set_underscan (MetaMonitorManagerKms *manager_kms,
|
||||
|
||||
static void
|
||||
meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
|
||||
MetaCRTCInfo **crtcs,
|
||||
MetaCrtcInfo **crtcs,
|
||||
unsigned int n_crtcs,
|
||||
MetaOutputInfo **outputs,
|
||||
unsigned int n_outputs)
|
||||
@ -1295,9 +1295,9 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
|
||||
screen_width = 0; screen_height = 0;
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTCInfo *crtc_info = crtcs[i];
|
||||
MetaCRTC *crtc = crtc_info->crtc;
|
||||
MetaCRTCKms *crtc_kms = crtc->driver_private;
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
MetaCrtcKms *crtc_kms = crtc->driver_private;
|
||||
MetaMonitorTransform hw_transform;
|
||||
|
||||
crtc->is_dirty = TRUE;
|
||||
@ -1372,7 +1372,7 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
|
||||
because they weren't seen in the first loop) */
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
|
||||
crtc->logical_monitor = NULL;
|
||||
|
||||
@ -1424,7 +1424,7 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
|
||||
|
||||
static void
|
||||
meta_monitor_manager_kms_get_crtc_gamma (MetaMonitorManager *manager,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
gsize *size,
|
||||
unsigned short **red,
|
||||
unsigned short **green,
|
||||
@ -1447,7 +1447,7 @@ meta_monitor_manager_kms_get_crtc_gamma (MetaMonitorManager *manager,
|
||||
|
||||
static void
|
||||
meta_monitor_manager_kms_set_crtc_gamma (MetaMonitorManager *manager,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
gsize size,
|
||||
unsigned short *red,
|
||||
unsigned short *green,
|
||||
@ -1531,7 +1531,7 @@ meta_monitor_manager_kms_init (MetaMonitorManagerKms *manager_kms)
|
||||
|
||||
static void
|
||||
get_crtc_connectors (MetaMonitorManager *manager,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
uint32_t **connectors,
|
||||
unsigned int *n_connectors)
|
||||
{
|
||||
@ -1552,7 +1552,7 @@ get_crtc_connectors (MetaMonitorManager *manager,
|
||||
|
||||
gboolean
|
||||
meta_monitor_manager_kms_apply_crtc_mode (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
int x,
|
||||
int y,
|
||||
uint32_t fb_id)
|
||||
@ -1598,7 +1598,7 @@ invoke_flip_closure (GClosure *flip_closure)
|
||||
|
||||
gboolean
|
||||
meta_monitor_manager_kms_is_crtc_active (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *crtc)
|
||||
MetaCrtc *crtc)
|
||||
{
|
||||
MetaMonitorManager *manager = META_MONITOR_MANAGER (manager_kms);
|
||||
unsigned int i;
|
||||
@ -1627,7 +1627,7 @@ meta_monitor_manager_kms_is_crtc_active (MetaMonitorManagerKms *manager_kms,
|
||||
|
||||
gboolean
|
||||
meta_monitor_manager_kms_flip_crtc (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
int x,
|
||||
int y,
|
||||
uint32_t fb_id,
|
||||
@ -1746,9 +1746,9 @@ meta_monitor_manager_kms_class_init (MetaMonitorManagerKmsClass *klass)
|
||||
|
||||
MetaMonitorTransform
|
||||
meta_monitor_manager_kms_get_view_transform (MetaMonitorManagerKms *manager,
|
||||
MetaCRTC *crtc)
|
||||
MetaCrtc *crtc)
|
||||
{
|
||||
MetaCRTCKms *crtc_kms;
|
||||
MetaCrtcKms *crtc_kms;
|
||||
|
||||
crtc_kms = crtc->driver_private;
|
||||
if ((1 << crtc->transform) & crtc_kms->all_hw_transforms)
|
||||
|
@ -40,16 +40,16 @@ GType meta_monitor_manager_kms_get_type (void);
|
||||
typedef void (*MetaKmsFlipCallback) (void *user_data);
|
||||
|
||||
gboolean meta_monitor_manager_kms_apply_crtc_mode (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
int x,
|
||||
int y,
|
||||
uint32_t fb_id);
|
||||
|
||||
gboolean meta_monitor_manager_kms_is_crtc_active (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *crtc);
|
||||
MetaCrtc *crtc);
|
||||
|
||||
gboolean meta_monitor_manager_kms_flip_crtc (MetaMonitorManagerKms *manager_kms,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
int x,
|
||||
int y,
|
||||
uint32_t fb_id,
|
||||
@ -60,7 +60,7 @@ void meta_monitor_manager_kms_wait_for_flip (MetaMonitorManagerKms *manager_kms)
|
||||
|
||||
MetaMonitorTransform
|
||||
meta_monitor_manager_kms_get_view_transform (MetaMonitorManagerKms *manager,
|
||||
MetaCRTC *crtc);
|
||||
MetaCrtc *crtc);
|
||||
|
||||
|
||||
#endif /* META_MONITOR_MANAGER_KMS_H */
|
||||
|
@ -564,7 +564,7 @@ flip_egl_stream (MetaRendererNative *renderer_native,
|
||||
static void
|
||||
meta_onscreen_native_flip_crtc (MetaOnscreenNative *onscreen_native,
|
||||
GClosure *flip_closure,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
int x,
|
||||
int y,
|
||||
gboolean *fb_in_use)
|
||||
@ -640,7 +640,7 @@ meta_onscreen_native_set_crtc_modes (MetaOnscreenNative *onscreen_native)
|
||||
|
||||
for (i = 0; i < monitor_manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &monitor_manager->crtcs[i];
|
||||
MetaCrtc *crtc = &monitor_manager->crtcs[i];
|
||||
int x = crtc->rect.x - logical_monitor->rect.x;
|
||||
int y = crtc->rect.y - logical_monitor->rect.y;
|
||||
|
||||
@ -659,7 +659,7 @@ meta_onscreen_native_set_crtc_modes (MetaOnscreenNative *onscreen_native)
|
||||
|
||||
for (i = 0; i < monitor_manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &monitor_manager->crtcs[i];
|
||||
MetaCrtc *crtc = &monitor_manager->crtcs[i];
|
||||
|
||||
meta_monitor_manager_kms_apply_crtc_mode (monitor_manager_kms,
|
||||
crtc,
|
||||
@ -707,7 +707,7 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
|
||||
|
||||
for (i = 0; i < monitor_manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &monitor_manager->crtcs[i];
|
||||
MetaCrtc *crtc = &monitor_manager->crtcs[i];
|
||||
int x = crtc->rect.x - logical_monitor->rect.x;
|
||||
int y = crtc->rect.y - logical_monitor->rect.y;
|
||||
|
||||
@ -725,7 +725,7 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
|
||||
|
||||
for (i = 0; i < monitor_manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &monitor_manager->crtcs[i];
|
||||
MetaCrtc *crtc = &monitor_manager->crtcs[i];
|
||||
|
||||
meta_onscreen_native_flip_crtc (onscreen_native, flip_closure,
|
||||
crtc, crtc->rect.x, crtc->rect.y,
|
||||
|
@ -667,7 +667,7 @@ output_get_crtcs (MetaMonitorManager *manager,
|
||||
guint j, k;
|
||||
guint n_actual_crtcs;
|
||||
|
||||
meta_output->possible_crtcs = g_new0 (MetaCRTC *, output->ncrtc);
|
||||
meta_output->possible_crtcs = g_new0 (MetaCrtc *, output->ncrtc);
|
||||
|
||||
n_actual_crtcs = 0;
|
||||
for (j = 0; j < (unsigned)output->ncrtc; j++)
|
||||
@ -774,7 +774,7 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
||||
manager->n_modes = resources->nmode;
|
||||
manager->outputs = g_new0 (MetaOutput, manager->n_outputs);
|
||||
manager->modes = g_new0 (MetaMonitorMode, manager->n_modes);
|
||||
manager->crtcs = g_new0 (MetaCRTC, manager->n_crtcs);
|
||||
manager->crtcs = g_new0 (MetaCrtc, manager->n_crtcs);
|
||||
|
||||
for (i = 0; i < (unsigned)resources->nmode; i++)
|
||||
{
|
||||
@ -795,7 +795,7 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
|
||||
for (i = 0; i < (unsigned)resources->ncrtc; i++)
|
||||
{
|
||||
XRRCrtcInfo *crtc;
|
||||
MetaCRTC *meta_crtc;
|
||||
MetaCrtc *meta_crtc;
|
||||
|
||||
crtc = XRRGetCrtcInfo (manager_xrandr->xdisplay, resources, resources->crtcs[i]);
|
||||
|
||||
@ -1047,7 +1047,7 @@ output_set_underscanning_xrandr (MetaMonitorManagerXrandr *manager_xrandr,
|
||||
|
||||
static void
|
||||
meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||
MetaCRTCInfo **crtcs,
|
||||
MetaCrtcInfo **crtcs,
|
||||
unsigned int n_crtcs,
|
||||
MetaOutputInfo **outputs,
|
||||
unsigned int n_outputs)
|
||||
@ -1062,8 +1062,8 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||
width = 0; height = 0;
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTCInfo *crtc_info = crtcs[i];
|
||||
MetaCRTC *crtc = crtc_info->crtc;
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
crtc->is_dirty = TRUE;
|
||||
|
||||
if (crtc_info->mode == NULL)
|
||||
@ -1088,8 +1088,8 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||
*/
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTCInfo *crtc_info = crtcs[i];
|
||||
MetaCRTC *crtc = crtc_info->crtc;
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
|
||||
if (crtc_info->mode == NULL ||
|
||||
crtc->rect.x + crtc->rect.width > width ||
|
||||
@ -1115,7 +1115,7 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||
/* Disable CRTCs not mentioned in the list */
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
|
||||
if (crtc->is_dirty)
|
||||
{
|
||||
@ -1155,8 +1155,8 @@ meta_monitor_manager_xrandr_apply_configuration (MetaMonitorManager *manager,
|
||||
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTCInfo *crtc_info = crtcs[i];
|
||||
MetaCRTC *crtc = crtc_info->crtc;
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
|
||||
if (crtc_info->mode != NULL)
|
||||
{
|
||||
@ -1290,7 +1290,7 @@ meta_monitor_manager_xrandr_change_backlight (MetaMonitorManager *manager,
|
||||
|
||||
static void
|
||||
meta_monitor_manager_xrandr_get_crtc_gamma (MetaMonitorManager *manager,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
gsize *size,
|
||||
unsigned short **red,
|
||||
unsigned short **green,
|
||||
@ -1311,7 +1311,7 @@ meta_monitor_manager_xrandr_get_crtc_gamma (MetaMonitorManager *manager,
|
||||
|
||||
static void
|
||||
meta_monitor_manager_xrandr_set_crtc_gamma (MetaMonitorManager *manager,
|
||||
MetaCRTC *crtc,
|
||||
MetaCrtc *crtc,
|
||||
gsize size,
|
||||
unsigned short *red,
|
||||
unsigned short *green,
|
||||
|
@ -77,7 +77,7 @@ meta_monitor_manager_test_read_current (MetaMonitorManager *manager)
|
||||
|
||||
static void
|
||||
meta_monitor_manager_test_apply_configuration (MetaMonitorManager *manager,
|
||||
MetaCRTCInfo **crtcs,
|
||||
MetaCrtcInfo **crtcs,
|
||||
unsigned int n_crtcs,
|
||||
MetaOutputInfo **outputs,
|
||||
unsigned int n_outputs)
|
||||
@ -87,8 +87,8 @@ meta_monitor_manager_test_apply_configuration (MetaMonitorManager *manager,
|
||||
|
||||
for (i = 0; i < n_crtcs; i++)
|
||||
{
|
||||
MetaCRTCInfo *crtc_info = crtcs[i];
|
||||
MetaCRTC *crtc = crtc_info->crtc;
|
||||
MetaCrtcInfo *crtc_info = crtcs[i];
|
||||
MetaCrtc *crtc = crtc_info->crtc;
|
||||
crtc->is_dirty = TRUE;
|
||||
|
||||
if (crtc_info->mode == NULL)
|
||||
@ -151,7 +151,7 @@ meta_monitor_manager_test_apply_configuration (MetaMonitorManager *manager,
|
||||
/* Disable CRTCs not mentioned in the list */
|
||||
for (i = 0; i < manager->n_crtcs; i++)
|
||||
{
|
||||
MetaCRTC *crtc = &manager->crtcs[i];
|
||||
MetaCrtc *crtc = &manager->crtcs[i];
|
||||
|
||||
crtc->logical_monitor = NULL;
|
||||
|
||||
|
@ -28,7 +28,7 @@ typedef struct _MetaMonitorTestSetup
|
||||
int n_modes;
|
||||
MetaOutput *outputs;
|
||||
int n_outputs;
|
||||
MetaCRTC *crtcs;
|
||||
MetaCrtc *crtcs;
|
||||
int n_crtcs;
|
||||
} MetaMonitorTestSetup;
|
||||
|
||||
|
@ -214,7 +214,7 @@ create_monitor_test_setup (MonitorTestCase *test_case)
|
||||
}
|
||||
|
||||
test_setup->n_crtcs = test_case->setup.n_crtcs;
|
||||
test_setup->crtcs = g_new0 (MetaCRTC, test_setup->n_crtcs);
|
||||
test_setup->crtcs = g_new0 (MetaCrtc, test_setup->n_crtcs);
|
||||
for (i = 0; i < test_setup->n_crtcs; i++)
|
||||
{
|
||||
int current_mode_index;
|
||||
@ -226,7 +226,7 @@ create_monitor_test_setup (MonitorTestCase *test_case)
|
||||
else
|
||||
current_mode = &test_setup->modes[current_mode_index];
|
||||
|
||||
test_setup->crtcs[i] = (MetaCRTC) {
|
||||
test_setup->crtcs[i] = (MetaCrtc) {
|
||||
.crtc_id = i + 1,
|
||||
.current_mode = current_mode,
|
||||
.transform = META_MONITOR_TRANSFORM_NORMAL,
|
||||
@ -239,13 +239,13 @@ create_monitor_test_setup (MonitorTestCase *test_case)
|
||||
for (i = 0; i < test_setup->n_outputs; i++)
|
||||
{
|
||||
int crtc_index;
|
||||
MetaCRTC *crtc;
|
||||
MetaCrtc *crtc;
|
||||
int preferred_mode_index;
|
||||
MetaMonitorMode *preferred_mode;
|
||||
MetaMonitorMode **modes;
|
||||
int n_modes;
|
||||
int j;
|
||||
MetaCRTC **possible_crtcs;
|
||||
MetaCrtc **possible_crtcs;
|
||||
int n_possible_crtcs;
|
||||
int scale;
|
||||
|
||||
@ -272,7 +272,7 @@ create_monitor_test_setup (MonitorTestCase *test_case)
|
||||
}
|
||||
|
||||
n_possible_crtcs = test_case->setup.outputs[i].n_possible_crtcs;
|
||||
possible_crtcs = g_new0 (MetaCRTC *, n_possible_crtcs);
|
||||
possible_crtcs = g_new0 (MetaCrtc *, n_possible_crtcs);
|
||||
for (j = 0; j < n_possible_crtcs; j++)
|
||||
{
|
||||
int possible_crtc_index;
|
||||
|
Loading…
Reference in New Issue
Block a user