[openchrome-devel] xf86-video-openchrome: Branch 'main' - 4 commits - configure.ac src/via_dri.c src/via_driver.c src/via_driver.h src/via_exa.c src/via_ums.c
configure.ac |2 +- src/via_dri.c|7 --- src/via_driver.c |9 ++--- src/via_driver.h |9 + src/via_exa.c| 36 ++-- src/via_ums.c|3 --- 6 files changed, 30 insertions(+), 36 deletions(-) New commits: commit a4ea11cb14925d2d1bdd92cf6209ed242dc4259b Author: Kevin Brace Date: Wed Sep 2 15:47:19 2020 -0700 Version bumped to 0.6.311 Signed-off-by: Kevin Brace diff --git a/configure.ac b/configure.ac index b64db0b..e991b9b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-openchrome], -[0.6.310], +[0.6.311], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg=Driver/openchrome], [xf86-video-openchrome]) commit 0908406455ced556052246dba7f31b7bde143a73 Author: Kevin Brace Date: Wed Sep 2 15:46:21 2020 -0700 Remove unnecessary goto statements This is to suppress compilation warnings when --disable-dri option is specified for makefile generation. Signed-off-by: Kevin Brace diff --git a/src/via_ums.c b/src/via_ums.c index e680e12..236f962 100644 --- a/src/via_ums.c +++ b/src/via_ums.c @@ -869,19 +869,16 @@ viaUMSScreenInit(ScrnInfoPtr pScrn) } else if (pVia->directRenderingType == DRI_1) { if (!VIADRIKernelInit(pScrn)) { ret = FALSE; -goto exit; } if ((!pVia->NoAccel) && (pVia->useEXA)) { if (!viaInitExa(pScrn->pScreen)) { ret = FALSE; -goto exit; } } #endif } -exit: DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting %s.\n", __func__)); return ret; commit 67be048bedd7504e6187f508a41adbd121a889ea Author: Kevin Brace Date: Wed Sep 2 15:43:33 2020 -0700 Hide viaDumpDMA() behind OPENCHROMEDRI macro This is to suppress compilation warnings when --disable-dri option is specified for makefile generation. Signed-off-by: Kevin Brace diff --git a/src/via_exa.c b/src/via_exa.c index 7358a40..88cd974 100644 --- a/src/via_exa.c +++ b/src/via_exa.c @@ -43,24 +43,6 @@ #include "via_regs.h" #include "via_dmabuffer.h" -/* - * Use PCI MMIO to flush the command buffer when AGP DMA is not available. - */ -static void -viaDumpDMA(ViaCommandBuffer *cb) -{ -register CARD32 *bp = cb->buf; -CARD32 *endp = bp + cb->pos; - -while (bp != endp) { -if (((bp - cb->buf) & 3) == 0) { -ErrorF("\n %04lx: ", (unsigned long)(bp - cb->buf)); -} -ErrorF("0x%08x ", (unsigned)*bp++); -} -ErrorF("\n"); -} - static void viaFlushPCI(ViaCommandBuffer *cb) { @@ -134,6 +116,24 @@ viaFlushPCI(ViaCommandBuffer *cb) } #ifdef OPENCHROMEDRI +/* + * Use PCI MMIO to flush the command buffer when AGP DMA is not available. + */ +static void +viaDumpDMA(ViaCommandBuffer *cb) +{ +register CARD32 *bp = cb->buf; +CARD32 *endp = bp + cb->pos; + +while (bp != endp) { +if (((bp - cb->buf) & 3) == 0) { +ErrorF("\n %04lx: ", (unsigned long)(bp - cb->buf)); +} +ErrorF("0x%08x ", (unsigned)*bp++); +} +ErrorF("\n"); +} + /* * Flush the command buffer using DRM. If in PCI mode, we can bypass DRM, * but not for command buffers that contain 3D engine state, since then commit e4637225f470a443e9ba370945294637e871e49e Author: Kevin Brace Date: Wed Sep 2 15:40:43 2020 -0700 Hide ViaDRMVersion typedef behind OPENCHROMEDRI macro Also, hide ViaDRMVersion based struct declaration behind OPENCHROMEDRI macro. These suppress compilation warnings when --disable-dri option is specified for makefile generation. Signed-off-by: Kevin Brace diff --git a/src/via_dri.c b/src/via_dri.c index 4ffc034..15287a4 100644 --- a/src/via_dri.c +++ b/src/via_dri.c @@ -67,13 +67,6 @@ extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig * configs, void **configprivs); -typedef struct -{ -int major; -int minor; -int patchlevel; -} ViaDRMVersion; - static char VIAKernelDriverName[] = "via"; static char VIAClientDriverName[] = "unichrome"; diff --git a/src/via_driver.c b/src/via_driver.c index 03e5942..db41677 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -57,16 +57,11 @@ /* RandR support */ #include "xf86RandR12.h" -typedef struct -{ - int major; - int minor; - int patchlevel; -} ViaDRMVersion; - +#ifdef OPENCHROMEDRI static const ViaDRMVersion drmVIADRMExpected = { 1, 3, 0 }; static const ViaDRMVersion drmVIADRMCompat = { 3, 0, 0 }; static const ViaDRMVersion drmOpenChromeDRMVersion = { 3, 3, 0 }; +#endif /* OPENCHROMEDRI */ /* Prototypes. */ static void VIAIdentify(int flags); diff --git a/src/via_driver.h b/src/via_driver.h index 6b0b95a..efd9961 100644 ---
[openchrome-devel] xf86-video-openchrome: Branch 'main' - 3 commits - configure.ac src/Makefile.am
configure.ac| 90 +++- src/Makefile.am | 126 ++-- 2 files changed, 111 insertions(+), 105 deletions(-) New commits: commit 476bdc466e0964effb4931f0f9dd0e335636e639 Author: Kevin Brace Date: Wed Sep 2 13:08:20 2020 -0700 Version bumped to 0.6.310 This version significantly improves the build script for KMS support. Signed-off-by: Kevin Brace diff --git a/configure.ac b/configure.ac index fdf9cf9..b64db0b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-openchrome], -[0.6.309], +[0.6.310], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg=Driver/openchrome], [xf86-video-openchrome]) commit 0dae4fff61fc1257709a4417aa263265eb3ea5a7 Author: Kevin Brace Date: Wed Sep 2 13:07:11 2020 -0700 Add the ability to disable KMS support This commit also fixes a build issue when DRI is disabled. Signed-off-by: Kevin Brace diff --git a/configure.ac b/configure.ac index e6d33b7..fdf9cf9 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,11 @@ AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], [DRI="$enableval"], [DRI=auto]) +AC_ARG_ENABLE(kms, AS_HELP_STRING([--disable-kms], + [Disable KMS support [[default=enabled]]]), + [DRM_MODE="$enableval"], + [DRM_MODE=yes]) + AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debugging support [[default=no]]]), [DEBUG="$enableval"], @@ -143,16 +148,20 @@ if test "$DRI" = yes; then AC_DEFINE(OPENCHROMEDRI_DEVEL, 1, [Enable developmental DRI driver support]) save_CFLAGS="$CFLAGS" CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $CFLAGS" -AC_CHECK_HEADER(xf86drmMode.h, -[DRM_MODE=yes], [DRM_MODE=no], -[#include - #include ]) if test "x$DRM_MODE" = xyes; then -PKG_CHECK_MODULES(LIBUDEV, [libudev], - [LIBUDEV=yes], [LIBUDEV=no]) -if test "x$LIBUDEV" = xyes; then -AC_DEFINE(HAVE_LIBUDEV, 1, [libudev support]) +AC_CHECK_HEADER(xf86drmMode.h, +[DRM_KMS=yes], [DRM_KMS=no], +[#include + #include ]) +if test "x$DRM_KMS" = xyes; then +PKG_CHECK_MODULES(LIBUDEV, [libudev], + [LIBUDEV=yes], [LIBUDEV=no]) +if test "x$LIBUDEV" = xyes; then +AC_DEFINE(HAVE_LIBUDEV, 1, [libudev support]) +fi fi +else +DRM_KMS=no fi CFLAGS="$save_CFLAGS" @@ -165,9 +174,13 @@ if test "$DRI" = yes; then XVMC=no ;; esac else +DRM_KMS=no XVMC="no" fi +AC_MSG_CHECKING([whether to include KMS support]) +AC_MSG_RESULT([$DRM_KMS]) + if test "x$XVMC" = xyes; then AC_CHECK_HEADERS(pthread.h sys/ioctl.h sys/time.h time.h,,[XVMC="no"; break],) PKG_CHECK_MODULES(XVMC, [x11 xext xvmc]) @@ -176,6 +189,8 @@ fi AC_MSG_CHECKING([whether to build XvMC driver support]) AC_MSG_RESULT([$XVMC]) +AM_CONDITIONAL(XF86DRM_MODE, test "x$DRM_KMS" = xyes) + AM_CONDITIONAL(XVMC, test x$XVMC = xyes) AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test x$XSERVER_LIBPCIACCESS = xyes) diff --git a/src/Makefile.am b/src/Makefile.am index 9d47ada..8e8df29 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,78 +26,70 @@ SUBDIRS = xvmc +if DRI +OPENCHROME_DRI_SRCS = \ +via_dri.c \ +via_xvmc.c +endif + +if XF86DRM_MODE +OPENCHROME_KMS_SRCS = \ +drmmode_display.c +endif + AM_CFLAGS = @XORG_CFLAGS@ $(CWARNFLAGS) @DRI_CFLAGS@ @LIBUDEV_CFLAGS@ + openchrome_drv_la_LTLIBRARIES = openchrome_drv.la openchrome_drv_la_LDFLAGS = -module -avoid-version openchrome_drv_ladir = @moduledir@/drivers openchrome_drv_la_SOURCES = \ - compat-api.h \ - via_eng_regs.h \ - via_3d.c \ - via_3d.h \ - via_3d_reg.h \ - via_analog.c \ - via_rop.h \ - via_exa.c \ - via_exa_h2.c \ - via_exa_h6.c \ - via_ums.h \ - via_ch7xxx.c \ - via_ch7xxx.h \ - via_display.c \ - via_dmabuffer.h \ - via_driver.c \ - via_driver.h \ - via_i2c.c \ - via_fp.c \ - via_fp.h \ - via_memcpy.c \ - via_memmgr.h \ - via_memmgr.c \ - via_options.c \ - via_outputs.c \ - via_priv.h \ - via_regs.h \ - via_sii164.c \ - via_sii164.h \ - via_tmds.c \ - via_tv.c \ - via_xv_overlay.c \ - via_xv_overlay.h \ - via_ums.c \ - via_vgahw.c \ - via_vgahw.h \ - via_xv.c \ - via_xv.h \ - via_vt162x.c \ -