mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
gpu/kms: Add identifier
We need a device unique id in order to uniquely identify an output, which will use a (device, connector) pair.
This commit is contained in:
parent
c585b214b8
commit
91d4f30ebd
@ -59,6 +59,7 @@ struct _MetaGpuKms
|
|||||||
{
|
{
|
||||||
MetaGpu parent;
|
MetaGpu parent;
|
||||||
|
|
||||||
|
uint32_t id;
|
||||||
int fd;
|
int fd;
|
||||||
char *file_path;
|
char *file_path;
|
||||||
GSource *source;
|
GSource *source;
|
||||||
@ -378,6 +379,12 @@ meta_gpu_kms_get_fd (MetaGpuKms *gpu_kms)
|
|||||||
return gpu_kms->fd;
|
return gpu_kms->fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
meta_gpu_kms_get_id (MetaGpuKms *gpu_kms)
|
||||||
|
{
|
||||||
|
return gpu_kms->id;
|
||||||
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
meta_gpu_kms_get_file_path (MetaGpuKms *gpu_kms)
|
meta_gpu_kms_get_file_path (MetaGpuKms *gpu_kms)
|
||||||
{
|
{
|
||||||
@ -889,7 +896,10 @@ meta_gpu_kms_finalize (GObject *object)
|
|||||||
static void
|
static void
|
||||||
meta_gpu_kms_init (MetaGpuKms *gpu_kms)
|
meta_gpu_kms_init (MetaGpuKms *gpu_kms)
|
||||||
{
|
{
|
||||||
|
static uint32_t id = 0;
|
||||||
|
|
||||||
gpu_kms->fd = -1;
|
gpu_kms->fd = -1;
|
||||||
|
gpu_kms->id = ++id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2017 Red Hat
|
* Copyright (C) 2017 Red Hat
|
||||||
|
* Copyright (C) 2018 DisplayLink (UK) Ltd.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
@ -71,6 +72,8 @@ gboolean meta_gpu_kms_wait_for_flip (MetaGpuKms *gpu_kms,
|
|||||||
|
|
||||||
int meta_gpu_kms_get_fd (MetaGpuKms *gpu_kms);
|
int meta_gpu_kms_get_fd (MetaGpuKms *gpu_kms);
|
||||||
|
|
||||||
|
uint32_t meta_gpu_kms_get_id (MetaGpuKms *gpu_kms);
|
||||||
|
|
||||||
const char * meta_gpu_kms_get_file_path (MetaGpuKms *gpu_kms);
|
const char * meta_gpu_kms_get_file_path (MetaGpuKms *gpu_kms);
|
||||||
|
|
||||||
void meta_gpu_kms_get_max_buffer_size (MetaGpuKms *gpu_kms,
|
void meta_gpu_kms_get_max_buffer_size (MetaGpuKms *gpu_kms,
|
||||||
|
Loading…
Reference in New Issue
Block a user