xorg-server-21.1.1

This commit is contained in:
Rmys
2021-11-12 13:20:03 +03:00
parent 883e50fee3
commit 0ee53537ca
8 changed files with 329 additions and 155 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ from pisi.actionsapi import shelltools
from pisi.actionsapi import get
def setup():
# shelltools.chmod("hw/vnc/symlink-vnc.sh")
shelltools.system("patch -Rp1 < 0001-revert-dpi-calculation.patch")
autotools.autoreconf("-fi")
autotools.configure("--enable-install-libxf86config \
@@ -23,7 +23,7 @@ def setup():
--enable-dri \
--enable-dri2 \
--enable-glamor \
--enable-xwayland \
--disable-xwayland \
--enable-config-udev \
--disable-config-hal \
--enable-xfree86-utils \
@@ -0,0 +1,118 @@
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 0389945a7cf0e18545cbe101639b62cd01f1e276..d03382d263399bba67dc77f6525480f751674bcc 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -55,6 +55,7 @@
#include "xf86Xinput.h"
#include "xf86InPriv.h"
#include "mivalidate.h"
+#include "xf86Crtc.h"
/* For xf86GetClocks */
#if defined(CSRG_BASED) || defined(__GNU__)
@@ -851,8 +852,9 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
{
MessageType from = X_DEFAULT;
xf86MonPtr DDC = (xf86MonPtr) (pScrn->monitor->DDC);
- int ddcWidthmm, ddcHeightmm;
+ int probedWidthmm, probedHeightmm;
int widthErr, heightErr;
+ xf86OutputPtr compat = xf86CompatOutput(pScrn);
/* XXX Maybe there is no need for widthmm/heightmm in ScrnInfoRec */
pScrn->widthmm = pScrn->monitor->widthmm;
@@ -862,11 +864,15 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
/* DDC gives display size in mm for individual modes,
* but cm for monitor
*/
- ddcWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */
- ddcHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+ probedWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */
+ probedHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+ }
+ else if (compat && compat->mm_width > 0 && compat->mm_height > 0) {
+ probedWidthmm = compat->mm_width;
+ probedHeightmm = compat->mm_height;
}
else {
- ddcWidthmm = ddcHeightmm = 0;
+ probedWidthmm = probedHeightmm = 0;
}
if (monitorResolution > 0) {
@@ -892,15 +898,15 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
pScrn->widthmm, pScrn->heightmm);
/* Warn if config and probe disagree about display size */
- if (ddcWidthmm && ddcHeightmm) {
+ if (probedWidthmm && probedHeightmm) {
if (pScrn->widthmm > 0) {
- widthErr = abs(ddcWidthmm - pScrn->widthmm);
+ widthErr = abs(probedWidthmm - pScrn->widthmm);
}
else {
widthErr = 0;
}
if (pScrn->heightmm > 0) {
- heightErr = abs(ddcHeightmm - pScrn->heightmm);
+ heightErr = abs(probedHeightmm - pScrn->heightmm);
}
else {
heightErr = 0;
@@ -909,17 +915,17 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
/* Should include config file name for monitor here */
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Probed monitor is %dx%d mm, using Displaysize %dx%d mm\n",
- ddcWidthmm, ddcHeightmm, pScrn->widthmm,
+ probedWidthmm, probedHeightmm, pScrn->widthmm,
pScrn->heightmm);
}
}
}
- else if (ddcWidthmm && ddcHeightmm) {
+ else if (probedWidthmm && probedHeightmm) {
from = X_PROBED;
xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
- ddcWidthmm, ddcHeightmm);
- pScrn->widthmm = ddcWidthmm;
- pScrn->heightmm = ddcHeightmm;
+ probedWidthmm, probedHeightmm);
+ pScrn->widthmm = probedWidthmm;
+ pScrn->heightmm = probedHeightmm;
if (pScrn->widthmm > 0) {
pScrn->xDpi =
(int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c6e89e66f690cd7e2a26a3d4b663f9f146cd84e0..202791774b31d6c349f27ed692c1b4ea7f1fdca4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3256,8 +3256,10 @@ xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon)
free(output->MonInfo);
output->MonInfo = edid_mon;
- output->mm_width = 0;
- output->mm_height = 0;
+ if (edid_mon) {
+ output->mm_width = 0;
+ output->mm_height = 0;
+ }
if (debug_modes) {
xf86DrvMsg(scrn->scrnIndex, X_INFO, "EDID for output %s\n",
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 50cbd043edc8380a3307dfcd5dee9cb280a50ba9..d4651f4e856f9fbe8b87086405401e4c0989b409 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -806,6 +806,12 @@ xf86RandR12CreateScreenResources(ScreenPtr pScreen)
mmWidth = output->conf_monitor->mon_width;
mmHeight = output->conf_monitor->mon_height;
}
+ else if (output &&
+ (output->mm_width > 0 &&
+ output->mm_height > 0)) {
+ mmWidth = output->mm_width;
+ mmHeight = output->mm_height;
+ }
else {
/*
* Otherwise, just set the screen to DEFAULT_DPI
+28 -8
View File
@@ -11,7 +11,10 @@
<License>MIT</License>
<Summary>X.Org X Server</Summary>
<Description>X server is the main application that allows a graphical interface.</Description>
<Archive sha1sum="4a846a4affeb3863e23c1d57a3b1bca4374a2ddb" type="tarxz">mirrors://xorg/individual/xserver/xorg-server-1.20.13.tar.xz</Archive>
<Archive sha1sum="feb1b35841cf64dcbef23802d7e0510e204361f9" type="tarxz">mirrors://xorg/individual/xserver/xorg-server-21.1.1.tar.xz</Archive>
<AdditionalFiles>
<AdditionalFile target="0001-revert-dpi-calculation.patch">0001-revert-dpi-calculation.patch</AdditionalFile>
</AdditionalFiles>
<BuildDependencies>
<Dependency>valgrind</Dependency>
<Dependency>elogind-devel</Dependency>
@@ -60,17 +63,19 @@
<Dependency>wayland-protocols-devel</Dependency>
<Dependency>libglvnd-devel</Dependency>
<Dependency>xkeyboard-config</Dependency>
<Dependency>libxcvt-devel</Dependency>
</BuildDependencies>
<Patches>
<!-- <Patch level="1">nvidia-add-modulepath-support.patch</Patch> -->
<Patch level="1">xserver-autobind-hotplug.patch</Patch>
<!-- <Patch level="1">xserver-autobind-hotplug.patch</Patch> -->
<Patch level="1">xorg-server-1.12-unloadsubmodule.patch</Patch>
<Patch level="1">xorg-server-1.18-support-multiple-Files-sections.patch</Patch>
<!-- <Patch level="1">xorg-server-1.19.4-sysmacros.patch</Patch> -->
</Patches>
</Source>
<Package>
<!--Package>
<Name>xorg-server-common</Name>
<IsA>data</IsA>
<Summary>Common files for X servers</Summary>
@@ -85,7 +90,7 @@
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man/man1/Xserver.1</Path>
</Files>
</Package>
</Package-->
<Package>
<Name>xorg-server</Name>
@@ -101,6 +106,7 @@
<Dependency>elogind</Dependency>
<Dependency>libXdmcp</Dependency>
<Dependency>mesa</Dependency>
<Dependency>libxcvt</Dependency>
<Dependency>libdrm</Dependency>
<Dependency>pixman</Dependency>
<Dependency>libglvnd</Dependency>
@@ -130,6 +136,12 @@
<Path fileType="man">/usr/share/man/man4/fbdevhw.4</Path>
<Path fileType="man">/usr/share/man/man5/xorg.conf.5</Path>
<Path fileType="man">/usr/share/man/man5/xorg.conf.d.5</Path>
<Path fileType="man">/usr/share/man/man4/inputtestdrv.4</Path>
<Path fileType="data">/etc/X11/fontpath.d</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="data">/var/lib/xkb</Path>
<Path fileType="man">/usr/share/man/man1/Xserver.1</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0755" target="/usr/libexec/xorg-save-xkb-config.sh">xorg-save-xkb-config.sh</AdditionalFile>
@@ -138,7 +150,7 @@
</AdditionalFiles>
</Package>
<Package>
<!--Package>
<Name>xorg-server-xdmx</Name>
<IsA>app:console</IsA>
<Summary>Distributed Multihead X Server</Summary>
@@ -163,9 +175,9 @@
<Path fileType="executable">/usr/bin/*dmx*</Path>
<Path fileType="man">/usr/share/man/man1/*dmx*</Path>
</Files>
</Package>
</Package-->
<Package>
<!--Package>
<Name>xorg-server-xwayland</Name>
<IsA>app:console</IsA>
<Summary>Run X clients under wayland</Summary>
@@ -188,7 +200,7 @@
<Files>
<Path fileType="executable">/usr/bin/Xwayland</Path>
</Files>
</Package>
</Package-->
<Package>
<Name>xorg-server-xephyr</Name>
@@ -273,6 +285,7 @@
<Dependency>pixman-devel</Dependency>
<Dependency>mesa-devel</Dependency>
<Dependency>xorg-proto</Dependency>
<Dependency>libxcvt-devel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include/xorg</Path>
@@ -283,6 +296,13 @@
</Package>
<History>
<Update release="21">
<Date>2021-11-12</Date>
<Version>21.1.1</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="20">
<Date>2021-10-01</Date>
<Version>1.20.13</Version>