mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Always generate meta-default-modes.h
This adds a hard requirement on having cvt installed, which in the past was soft, where the generated file was added to the repository.
This commit is contained in:
parent
e0727aba5f
commit
8a03f1ad02
@ -445,6 +445,9 @@ AC_CHECK_DECL([GL_EXT_x11_sync_object],
|
|||||||
[#include <GL/glx.h>])
|
[#include <GL/glx.h>])
|
||||||
|
|
||||||
AC_PATH_PROG([CVT],[cvt],[])
|
AC_PATH_PROG([CVT],[cvt],[])
|
||||||
|
if test x"$CVT" = xno; then
|
||||||
|
AC_MSG_ERROR([cvt not found in your path])
|
||||||
|
fi
|
||||||
|
|
||||||
#### Warnings (last since -Werror can disturb other tests)
|
#### Warnings (last since -Werror can disturb other tests)
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ mutter_built_sources = \
|
|||||||
$(dbus_login1_built_sources) \
|
$(dbus_login1_built_sources) \
|
||||||
meta/meta-enum-types.h \
|
meta/meta-enum-types.h \
|
||||||
meta-enum-types.c \
|
meta-enum-types.c \
|
||||||
|
meta-default-modes.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
if HAVE_REMOTE_DESKTOP
|
if HAVE_REMOTE_DESKTOP
|
||||||
@ -505,7 +506,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES += \
|
|||||||
backends/native/meta-clutter-backend-native.h \
|
backends/native/meta-clutter-backend-native.h \
|
||||||
backends/native/meta-cursor-renderer-native.c \
|
backends/native/meta-cursor-renderer-native.c \
|
||||||
backends/native/meta-cursor-renderer-native.h \
|
backends/native/meta-cursor-renderer-native.h \
|
||||||
backends/native/meta-default-modes.h \
|
|
||||||
backends/native/meta-gpu-kms.c \
|
backends/native/meta-gpu-kms.c \
|
||||||
backends/native/meta-gpu-kms.h \
|
backends/native/meta-gpu-kms.h \
|
||||||
backends/native/meta-input-settings-native.c \
|
backends/native/meta-input-settings-native.c \
|
||||||
@ -760,10 +760,10 @@ $(dbus_login1_built_sources) : Makefile.am org.freedesktop.login1.xml
|
|||||||
--c-generate-autocleanup all \
|
--c-generate-autocleanup all \
|
||||||
$(srcdir)/org.freedesktop.login1.xml
|
$(srcdir)/org.freedesktop.login1.xml
|
||||||
|
|
||||||
backends/native/meta-default-modes.h: backends/native/gen-default-modes.py Makefile.am
|
meta-default-modes.h: backends/native/gen-default-modes.py Makefile.am
|
||||||
@if test -n "$(CVT)"; then \
|
@if test -n "$(CVT)"; then \
|
||||||
if $(AM_V_P); then PS4= set -x; else echo " GEN $@"; fi; \
|
if $(AM_V_P); then PS4= set -x; else echo " GEN $@"; fi; \
|
||||||
python $< > $@; \
|
$(top_srcdir)/src/backends/native/gen-default-modes.py $@; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
|
19
src/backends/native/gen-default-modes.py
Normal file → Executable file
19
src/backends/native/gen-default-modes.py
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
# Copyright (C) 2016 Red Hat Inc.
|
# Copyright (C) 2016 Red Hat Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
@ -18,6 +20,10 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print("Usage: %s [output file]"%sys.argv[0])
|
||||||
|
exit(1)
|
||||||
|
|
||||||
common_resolutions = [
|
common_resolutions = [
|
||||||
# 4:3
|
# 4:3
|
||||||
(800, 600),
|
(800, 600),
|
||||||
@ -109,6 +115,13 @@ for resolution in common_resolutions:
|
|||||||
cvt.close()
|
cvt.close()
|
||||||
output_lines.append("};")
|
output_lines.append("};")
|
||||||
|
|
||||||
for line in output_lines:
|
try:
|
||||||
sys.stdout.write(line + "\n")
|
output_file = open(sys.argv[1], 'w')
|
||||||
sys.stdout.flush()
|
|
||||||
|
for line in output_lines:
|
||||||
|
output_file.write(line + "\n")
|
||||||
|
output_file.flush()
|
||||||
|
output_file.close()
|
||||||
|
except:
|
||||||
|
print("Failed to generate modelines:", sys.exc_info()[0])
|
||||||
|
exit(1)
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
/* Generated by gen-default-modes.py */
|
|
||||||
|
|
||||||
static const drmModeModeInfo meta_default_landscape_drm_mode_infos[] = {
|
|
||||||
{ 38250, 800, 832, 912, 1024, 0, 600, 603, 607, 624, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "800x600_60.00" },
|
|
||||||
{ 63500, 1024, 1072, 1176, 1328, 0, 768, 771, 775, 798, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1024x768_60.00" },
|
|
||||||
{ 81750, 1152, 1216, 1336, 1520, 0, 864, 867, 871, 897, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1152x864_60.00" },
|
|
||||||
{ 101250, 1280, 1360, 1488, 1696, 0, 960, 963, 967, 996, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1280x960_60.00" },
|
|
||||||
{ 121750, 1400, 1488, 1632, 1864, 0, 1050, 1053, 1057, 1089, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1400x1050_60.00" },
|
|
||||||
{ 129000, 1440, 1528, 1680, 1920, 0, 1080, 1083, 1087, 1120, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1440x1080_60.00" },
|
|
||||||
{ 161000, 1600, 1712, 1880, 2160, 0, 1200, 1203, 1207, 1245, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1600x1200_60.00" },
|
|
||||||
{ 233500, 1920, 2064, 2264, 2608, 0, 1440, 1443, 1447, 1493, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1920x1440_60.00" },
|
|
||||||
{ 267250, 2048, 2208, 2424, 2800, 0, 1536, 1539, 1543, 1592, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "2048x1536_60.00" },
|
|
||||||
{ 83500, 1280, 1352, 1480, 1680, 0, 800, 803, 809, 831, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1280x800_60.00" },
|
|
||||||
{ 106500, 1440, 1528, 1672, 1904, 0, 900, 903, 909, 934, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1440x900_60.00" },
|
|
||||||
{ 146250, 1680, 1784, 1960, 2240, 0, 1050, 1053, 1059, 1089, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1680x1050_60.00" },
|
|
||||||
{ 193250, 1920, 2056, 2256, 2592, 0, 1200, 1203, 1209, 1245, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1920x1200_60.00" },
|
|
||||||
{ 348500, 2560, 2760, 3032, 3504, 0, 1600, 1603, 1609, 1658, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "2560x1600_60.00" },
|
|
||||||
{ 74500, 1280, 1344, 1472, 1664, 0, 720, 723, 728, 748, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1280x720_60.00" },
|
|
||||||
{ 85250, 1368, 1440, 1576, 1784, 0, 768, 771, 781, 798, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1368x768_60.00" },
|
|
||||||
{ 118250, 1600, 1696, 1856, 2112, 0, 900, 903, 908, 934, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1600x900_60.00" },
|
|
||||||
{ 173000, 1920, 2048, 2248, 2576, 0, 1080, 1083, 1088, 1120, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "1920x1080_60.00" },
|
|
||||||
{ 197000, 2048, 2184, 2400, 2752, 0, 1152, 1155, 1160, 1195, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "2048x1152_60.00" },
|
|
||||||
{ 312250, 2560, 2752, 3024, 3488, 0, 1440, 1443, 1448, 1493, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "2560x1440_60.00" },
|
|
||||||
{ 396250, 2880, 3096, 3408, 3936, 0, 1620, 1623, 1628, 1679, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "2880x1620_60.00" },
|
|
||||||
{ 492000, 3200, 3456, 3800, 4400, 0, 1800, 1803, 1808, 1865, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "3200x1800_60.00" },
|
|
||||||
{ 712750, 3840, 4160, 4576, 5312, 0, 2160, 2163, 2168, 2237, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "3840x2160_60.00" },
|
|
||||||
{ 813000, 4096, 4440, 4888, 5680, 0, 2304, 2307, 2312, 2386, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "4096x2304_60.00" },
|
|
||||||
{ 1276500, 5120, 5560, 6128, 7136, 0, 2880, 2883, 2888, 2982, 0, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, DRM_MODE_TYPE_DEFAULT, "5120x2880_60.00" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const drmModeModeInfo meta_default_portrait_drm_mode_infos[] = {
|
|
||||||
{ 38250, 600, 603, 607, 624, 0, 800, 832, 912, 1024, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "600x800_60.00" },
|
|
||||||
{ 63500, 768, 771, 775, 798, 0, 1024, 1072, 1176, 1328, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "768x1024_60.00" },
|
|
||||||
{ 81750, 864, 867, 871, 897, 0, 1152, 1216, 1336, 1520, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "864x1152_60.00" },
|
|
||||||
{ 101250, 960, 963, 967, 996, 0, 1280, 1360, 1488, 1696, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "960x1280_60.00" },
|
|
||||||
{ 121750, 1050, 1053, 1057, 1089, 0, 1400, 1488, 1632, 1864, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1050x1400_60.00" },
|
|
||||||
{ 129000, 1080, 1083, 1087, 1120, 0, 1440, 1528, 1680, 1920, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1080x1440_60.00" },
|
|
||||||
{ 161000, 1200, 1203, 1207, 1245, 0, 1600, 1712, 1880, 2160, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1200x1600_60.00" },
|
|
||||||
{ 233500, 1440, 1443, 1447, 1493, 0, 1920, 2064, 2264, 2608, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1440x1920_60.00" },
|
|
||||||
{ 267250, 1536, 1539, 1543, 1592, 0, 2048, 2208, 2424, 2800, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1536x2048_60.00" },
|
|
||||||
{ 83500, 800, 803, 809, 831, 0, 1280, 1352, 1480, 1680, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "800x1280_60.00" },
|
|
||||||
{ 106500, 900, 903, 909, 934, 0, 1440, 1528, 1672, 1904, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "900x1440_60.00" },
|
|
||||||
{ 146250, 1050, 1053, 1059, 1089, 0, 1680, 1784, 1960, 2240, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1050x1680_60.00" },
|
|
||||||
{ 193250, 1200, 1203, 1209, 1245, 0, 1920, 2056, 2256, 2592, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1200x1920_60.00" },
|
|
||||||
{ 348500, 1600, 1603, 1609, 1658, 0, 2560, 2760, 3032, 3504, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1600x2560_60.00" },
|
|
||||||
{ 74500, 720, 723, 728, 748, 0, 1280, 1344, 1472, 1664, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "720x1280_60.00" },
|
|
||||||
{ 85250, 768, 771, 781, 798, 0, 1368, 1440, 1576, 1784, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "768x1368_60.00" },
|
|
||||||
{ 118250, 900, 903, 908, 934, 0, 1600, 1696, 1856, 2112, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "900x1600_60.00" },
|
|
||||||
{ 173000, 1080, 1083, 1088, 1120, 0, 1920, 2048, 2248, 2576, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1080x1920_60.00" },
|
|
||||||
{ 197000, 1152, 1155, 1160, 1195, 0, 2048, 2184, 2400, 2752, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1152x2048_60.00" },
|
|
||||||
{ 312250, 1440, 1443, 1448, 1493, 0, 2560, 2752, 3024, 3488, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1440x2560_60.00" },
|
|
||||||
{ 396250, 1620, 1623, 1628, 1679, 0, 2880, 3096, 3408, 3936, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1620x2880_60.00" },
|
|
||||||
{ 492000, 1800, 1803, 1808, 1865, 0, 3200, 3456, 3800, 4400, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "1800x3200_60.00" },
|
|
||||||
{ 712750, 2160, 2163, 2168, 2237, 0, 3840, 4160, 4576, 5312, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "2160x3840_60.00" },
|
|
||||||
{ 813000, 2304, 2307, 2312, 2386, 0, 4096, 4440, 4888, 5680, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "2304x4096_60.00" },
|
|
||||||
{ 1276500, 2880, 2883, 2888, 2982, 0, 5120, 5560, 6128, 7136, 0, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC, DRM_MODE_TYPE_DEFAULT, "2880x5120_60.00" },
|
|
||||||
};
|
|
@ -38,7 +38,8 @@
|
|||||||
#include "backends/native/meta-crtc-kms.h"
|
#include "backends/native/meta-crtc-kms.h"
|
||||||
#include "backends/native/meta-launcher.h"
|
#include "backends/native/meta-launcher.h"
|
||||||
#include "backends/native/meta-output-kms.h"
|
#include "backends/native/meta-output-kms.h"
|
||||||
#include "backends/native/meta-default-modes.h"
|
|
||||||
|
#include "meta-default-modes.h"
|
||||||
|
|
||||||
typedef struct _MetaKmsSource
|
typedef struct _MetaKmsSource
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
|
|
||||||
#include "backends/meta-crtc.h"
|
#include "backends/meta-crtc.h"
|
||||||
#include "backends/native/meta-crtc-kms.h"
|
#include "backends/native/meta-crtc-kms.h"
|
||||||
#include "backends/native/meta-default-modes.h"
|
|
||||||
|
#include "meta-default-modes.h"
|
||||||
|
|
||||||
#define SYNC_TOLERANCE 0.01 /* 1 percent */
|
#define SYNC_TOLERANCE 0.01 /* 1 percent */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user