[openchrome-devel] xf86-video-openchrome: Branch 'main' - 3 commits - configure.ac src/openchrome_drm.h src/via_driver.c src/via_memmgr.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Fri Aug 14 01:51:39 UTC 2020
configure.ac | 2 +-
src/openchrome_drm.h | 6 ++++++
src/via_driver.c | 2 +-
src/via_memmgr.c | 8 ++++++++
4 files changed, 16 insertions(+), 2 deletions(-)
New commits:
commit 770ddae0023e49648d83e563c21e77dbe490a766
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 13 18:44:19 2020 -0700
Version bumped to 0.6.302
Starting with this version, KMS support will require OpenChrome DRM
Version 3.3.0 or later.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 8adbd5d..8d7038b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-openchrome],
- [0.6.301],
+ [0.6.302],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit ae6f393fee019e4af708032d5a08482cced309b4
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 13 18:42:55 2020 -0700
Add support for frame buffer unmapping via OpenChrome DRM uAPI
This requires the use of OpenChrome DRM Version 3.3.0 or later.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.c b/src/via_driver.c
index e2c1138..b767a5f 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -67,7 +67,7 @@ typedef struct
static const ViaDRMVersion drmVIADRMExpected = { 1, 3, 0 };
static const ViaDRMVersion drmVIADRMCompat = { 3, 0, 0 };
-static const ViaDRMVersion drmOpenChromeDRMVersion = { 3, 2, 0 };
+static const ViaDRMVersion drmOpenChromeDRMVersion = { 3, 3, 0 };
/* Prototypes. */
static void VIAIdentify(int flags);
diff --git a/src/via_memmgr.c b/src/via_memmgr.c
index fd3fc4a..84b3ca4 100644
--- a/src/via_memmgr.c
+++ b/src/via_memmgr.c
@@ -247,12 +247,20 @@ void
drm_bo_unmap(ScrnInfoPtr pScrn, struct buffer_object *obj)
{
VIAPtr pVia = VIAPTR(pScrn);
+ struct drm_openchrome_gem_unmap args;
if (pVia->directRenderingType == DRI_2) {
munmap(obj->ptr, obj->size);
}
obj->ptr = NULL;
+
+ memset(&args, 0, sizeof(struct drm_openchrome_gem_unmap));
+ args.handle = obj->handle;
+ drmCommandRead(pVia->drmmode.fd,
+ DRM_OPENCHROME_GEM_UNMAP,
+ &args,
+ sizeof(struct drm_openchrome_gem_unmap));
}
void
commit ab5c6d753a29f826565b6962bee1db8ef720c8b9
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Aug 13 17:48:27 2020 -0700
Add DRM_OPENCHROME_GEM_UNMAP OpenChrome DRM uAPI call
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/openchrome_drm.h b/src/openchrome_drm.h
index 06f7f2a..6253612 100644
--- a/src/openchrome_drm.h
+++ b/src/openchrome_drm.h
@@ -42,10 +42,12 @@ extern "C" {
#define DRM_OPENCHROME_GEM_CREATE 0x00
#define DRM_OPENCHROME_GEM_MAP 0x01
+#define DRM_OPENCHROME_GEM_UNMAP 0x02
#define DRM_IOCTL_OPENCHROME_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_OPENCHROME_GEM_CREATE, struct drm_openchrome_gem_create)
#define DRM_IOCTL_OPENCHROME_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_OPENCHROME_GEM_MAP, struct drm_openchrome_gem_map)
+#define DRM_IOCTL_OPENCHROME_GEM_UNMAP DRM_IOR(DRM_COMMAND_BASE + DRM_OPENCHROME_GEM_UNMAP, struct drm_openchrome_gem_unmap)
struct drm_openchrome_gem_create {
@@ -61,6 +63,10 @@ struct drm_openchrome_gem_map {
uint64_t map_offset;
};
+struct drm_openchrome_gem_unmap {
+ uint32_t handle;
+};
+
#if defined(__cplusplus)
}
More information about the openchrome-devel
mailing list