output/kms: Make winsys_id unique
We were using the connector_id for the winsys_id, but different devices could have connectors with the same id. Since we use winsys_id to uniquely identify outputs, use both the connector id and the device id to avoid having outputs with the same id.
This commit is contained in:
parent
5e005316ef
commit
fb8dc91893
@ -512,6 +512,7 @@ meta_create_kms_output (MetaGpuKms *gpu_kms,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned int crtc_mask;
|
unsigned int crtc_mask;
|
||||||
int fd;
|
int fd;
|
||||||
|
uint32_t id;
|
||||||
|
|
||||||
output = g_object_new (META_TYPE_OUTPUT, NULL);
|
output = g_object_new (META_TYPE_OUTPUT, NULL);
|
||||||
|
|
||||||
@ -520,9 +521,11 @@ meta_create_kms_output (MetaGpuKms *gpu_kms,
|
|||||||
output->driver_notify = (GDestroyNotify) meta_output_destroy_notify;
|
output->driver_notify = (GDestroyNotify) meta_output_destroy_notify;
|
||||||
|
|
||||||
output->gpu = gpu;
|
output->gpu = gpu;
|
||||||
output->winsys_id = connector->connector_id;
|
|
||||||
output->name = make_output_name (connector);
|
output->name = make_output_name (connector);
|
||||||
|
|
||||||
|
id = meta_gpu_kms_get_id (gpu_kms);
|
||||||
|
output->winsys_id = ((uint64_t) id << 32) | connector->connector_id;
|
||||||
|
|
||||||
switch (connector->subpixel)
|
switch (connector->subpixel)
|
||||||
{
|
{
|
||||||
case DRM_MODE_SUBPIXEL_NONE:
|
case DRM_MODE_SUBPIXEL_NONE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user