From nobody Mon Aug 5 07:17:33 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wcnnn4xWRz5SjwC; Mon, 05 Aug 2024 07:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wcnnn4D1zz4h18; Mon, 5 Aug 2024 07:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722842253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKrVkJcOcd9zEeC+d2M639QZL5EUtVDc+f2cjKXQBn4=; b=ME2j0xznd+u6tS3SGEM6mrg7PN2a0MllnM6fHx0RgMjnK3d7To4Kw481db+hMByBsdcS23 Ixi4zVXdJR+9oD4eRcPxj4QshYieItH9SdT9d9so7R0+L0tPZeXMc3IsZYH1NV3IEMgytg 0l9wpopkaQwO52f8WNzwC4ggkYYuRVFADGvIR1RUtSdppV9DtL9S7BZQX1tjYvhEoM5M0a CJgr+QSjcH8kylFC7XJ1bTINdoOWJJZLcX6ERQHam2ijrzFco7Vzm6wtN/chJVlvP3eFZx aaeJK7MuUxWXZkEgNv0UtV0R8M2TyLC/UbKJ5O2U9cMdk/H1j6Hnrt0edmMgYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722842253; a=rsa-sha256; cv=none; b=S9DheQCCHx82qx5zmiU1xxMFVODKc1U+SVQgi9cPfgAsN6pxB9JC2gjyN6+KpsDf6Av6wt mWkBBUtbOe6CSrmITadAfv9Aa5dZYp66zDFQZae+VmJbb89Uv0j/w6u6VMGmZS4VAp0lNK zJA19xAi8F8j5T2bMbWUB/r8HLVhM1ZFdEaYDOQVXGFz/K/BE5DAmZk5kdHB1hGPMpZDWH sxZ4TbVBFTB/ODRCtvxc7QKyhFy43EKsDB2sZcozZhlAHqFVYiEu8Q9OX8ocknw5PAOKzN lfdTeO8lJWu++X/DY3HSh4zfddM5yguHIVcHxXXCVDJdFWu9iJwB0v05l8AKmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722842253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NKrVkJcOcd9zEeC+d2M639QZL5EUtVDc+f2cjKXQBn4=; b=OCM+nrjK+9z+cMUo3MqCUFQ4V+egermetKKuWZubrc09/fIcpw8ePLiS3VkvZL13ho4ObT homcasK8Yh2TrhPPxc+Wb16eakvyCTDzBURXl4FAj8frCwZ8evh68Nrsg7wMnzwAMjTEEx rtFds7F9PPAZZLb9BKy+C5qwJ9BTCn/RDpd28bmUbDUSP6sQg/UoFCyPmBcelVslx36jgn mhEQ/BbnkR1bSgRP5ewHoTW9+KnKL19TmKLNGcJklC+PBxXOIKSTIFIaGjCiPZbMhhh4oL kYl2zUJKmBI+x7H20igSSgP4eSNICFovMXxO2iGdbdDW9Ah168qS3q1FEYbkVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wcnnn3S3QzDjC; Mon, 5 Aug 2024 07:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4757HXWd080016; Mon, 5 Aug 2024 07:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4757HXFW080013; Mon, 5 Aug 2024 07:17:33 GMT (envelope-from git) Date: Mon, 5 Aug 2024 07:17:33 GMT Message-Id: <202408050717.4757HXFW080013@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 810c909c9e33 - 2024Q3 - x11-drivers/xf86-video-mga: Restore port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q3 X-Git-Reftype: branch X-Git-Commit: 810c909c9e3325cae336761073ca8e2d5c070bfa Auto-Submitted: auto-generated The branch 2024Q3 has been updated by manu: URL: https://cgit.FreeBSD.org/ports/commit/?id=810c909c9e3325cae336761073ca8e2d5c070bfa commit 810c909c9e3325cae336761073ca8e2d5c070bfa Author: Emmanuel Vadot AuthorDate: 2024-08-01 13:31:01 +0000 Commit: Emmanuel Vadot CommitDate: 2024-08-05 07:17:05 +0000 x11-drivers/xf86-video-mga: Restore port This hardware is still present on server hardware. Sponsored by: Beckhoff Automation GmbH & Co. KG PR: 270509 (cherry picked from commit 6e5bffcde1c9f14f2348556bccb9c1a9d557c7b7) --- x11-drivers/Makefile | 1 + x11-drivers/xf86-video-mga/Makefile | 16 ++++++++++++++++ x11-drivers/xf86-video-mga/distinfo | 3 +++ .../xf86-video-mga/files/patch-src_mga__dac3026.c | 15 +++++++++++++++ .../xf86-video-mga/files/patch-src_mga__dri.c | 22 ++++++++++++++++++++++ .../xf86-video-mga/files/patch-src_mga__driver.c | 19 +++++++++++++++++++ x11-drivers/xf86-video-mga/pkg-descr | 1 + x11-drivers/xf86-video-mga/pkg-plist | 2 ++ 8 files changed, 79 insertions(+) diff --git a/x11-drivers/Makefile b/x11-drivers/Makefile index 688416d9f60a..a3c59c418859 100644 --- a/x11-drivers/Makefile +++ b/x11-drivers/Makefile @@ -16,6 +16,7 @@ SUBDIR += xf86-video-ati SUBDIR += xf86-video-dummy SUBDIR += xf86-video-intel + SUBDIR += xf86-video-mga SUBDIR += xf86-video-nv SUBDIR += xf86-video-qxl SUBDIR += xf86-video-scfb diff --git a/x11-drivers/xf86-video-mga/Makefile b/x11-drivers/xf86-video-mga/Makefile new file mode 100644 index 000000000000..8999babe9e91 --- /dev/null +++ b/x11-drivers/xf86-video-mga/Makefile @@ -0,0 +1,16 @@ +PORTNAME= xf86-video-mga +PORTVERSION= 2.0.0 +PORTREVISION= 5 +PORTEPOCH= 3 +CATEGORIES= x11-drivers + +MAINTAINER= x11@FreeBSD.org +COMMENT= X.Org mga display driver +WWW= https://www.x.org/ + +USES= gl xorg-cat:driver +USE_GL= gl + +GNU_CONFIGURE_MANPREFIX=${PREFIX}/share + +.include diff --git a/x11-drivers/xf86-video-mga/distinfo b/x11-drivers/xf86-video-mga/distinfo new file mode 100644 index 000000000000..ddc579a06475 --- /dev/null +++ b/x11-drivers/xf86-video-mga/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1546479273 +SHA256 (xorg/driver/xf86-video-mga-2.0.0.tar.bz2) = 268946e1a13e9d80e4f724a0740df9e6e8c8bad37697fcbf456924e9fdbb5d79 +SIZE (xorg/driver/xf86-video-mga-2.0.0.tar.bz2) = 452486 diff --git a/x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c b/x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c new file mode 100644 index 000000000000..4a225c085a78 --- /dev/null +++ b/x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c @@ -0,0 +1,15 @@ +# Fix a style warning +# +--- src/mga_dac3026.c.orig 2017-01-17 22:40:29 UTC ++++ src/mga_dac3026.c +@@ -886,8 +886,8 @@ MGA3026LoadCursorImage( + outTi3026dreg(TVP3026_WADR_PAL, 0x00); + + while(i--) { +- while (INREG8(0x1FDA) & 0x01); +- while (!(INREG8(0x1FDA) & 0x01)); ++ while (INREG8(0x1FDA) & 0x01) {} ++ while (!(INREG8(0x1FDA) & 0x01)) {} + outTi3026dreg(TVP3026_CUR_RAM, *(src++)); + } + } diff --git a/x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c b/x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c new file mode 100644 index 000000000000..1c4114bc5920 --- /dev/null +++ b/x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c @@ -0,0 +1,22 @@ +# Use the correct constants for this type +# +--- src/mga_dri.c.orig 2017-01-17 22:40:29 UTC ++++ src/mga_dri.c +@@ -316,7 +316,7 @@ static void MGAWaitForIdleDMA( ScrnInfoP + for (;;) { + do { + /* first ask for quiescent and flush */ +- lock.flags = DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH; ++ lock.flags = _DRM_LOCK_QUIESCENT | _DRM_LOCK_FLUSH; + do { + ret = drmCommandWrite( pMga->drmFD, DRM_MGA_FLUSH, + &lock, sizeof( drm_lock_t ) ); +@@ -324,7 +324,7 @@ static void MGAWaitForIdleDMA( ScrnInfoP + + /* if it's still busy just try quiescent */ + if ( ret == -EBUSY ) { +- lock.flags = DRM_LOCK_QUIESCENT; ++ lock.flags = _DRM_LOCK_QUIESCENT; + do { + ret = drmCommandWrite( pMga->drmFD, DRM_MGA_FLUSH, + &lock, sizeof( drm_lock_t ) ); diff --git a/x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c b/x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c new file mode 100644 index 000000000000..7f54cb869b32 --- /dev/null +++ b/x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c @@ -0,0 +1,19 @@ +--- src/mga_driver.c.orig 2024-08-01 13:23:52 UTC ++++ src/mga_driver.c +@@ -702,6 +702,8 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_ + ScrnInfoPtr pScrn = NULL; + MGAPtr pMga; + ++#ifndef __FreeBSD__ ++ /* FreeBSD always has vgapci driver attached. */ + if (pci_device_has_kernel_driver(dev)) { + /* If it's a G200 server chip, it's probably on KMS, so bail; if not, + * it might be using matroxfb, which is ok. */ +@@ -721,6 +723,7 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_ + return FALSE; + } + } ++#endif + + /* Allocate a ScrnInfoRec and claim the slot */ + pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, MGAPciChipsets, diff --git a/x11-drivers/xf86-video-mga/pkg-descr b/x11-drivers/xf86-video-mga/pkg-descr new file mode 100644 index 000000000000..6eb856b4abf9 --- /dev/null +++ b/x11-drivers/xf86-video-mga/pkg-descr @@ -0,0 +1 @@ +This package contains the X.Org xf86-video-mga driver. diff --git a/x11-drivers/xf86-video-mga/pkg-plist b/x11-drivers/xf86-video-mga/pkg-plist new file mode 100644 index 000000000000..f75700697c98 --- /dev/null +++ b/x11-drivers/xf86-video-mga/pkg-plist @@ -0,0 +1,2 @@ +lib/xorg/modules/drivers/mga_drv.so +share/man/man4/mga.4x.gz