xf86-video-intel: 2 commits - src/sna/sna_display.c src/sna/sna_video.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 10 10:03:08 UTC 2019


 src/sna/sna_display.c |   14 ++++++++++++++
 src/sna/sna_video.c   |   10 ++++++++++
 2 files changed, 24 insertions(+)

New commits:
commit c37c7ee0748ba828ec5d2c7304cd2a17af2c8109
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Nov 30 14:11:04 2018 +0000

    sna: Switch off old outputs on topology changes
    
    The kernel may keep the old connector id around so that userspace can
    gracefully switch it off, which means that on detecting a topology
    change (a new id for an old connector path), we must do a SetCRTC to
    release the old resources.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106250
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index f6a6d99b..fe67f85b 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -5254,6 +5254,20 @@ sna_output_add(struct sna *sna, unsigned id, unsigned serial)
 			if (strcmp(output->name, name) == 0) {
 				assert(output->scrn == scrn);
 				assert(output->funcs == &sna_output_funcs);
+
+				/*
+				 * If the old output is still in use, tell
+				 * the kernel to switch it off so we can
+				 * move its resources over to the new id.
+				 */
+				if (output->crtc) {
+					struct drm_mode_crtc arg = {
+						.crtc_id = __sna_crtc_id(to_sna_crtc(output->crtc)),
+					};
+					drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_SETCRTC, &arg);
+					output->crtc = NULL;
+				}
+
 				sna_output_destroy(output);
 				goto reset;
 			}
commit 985553dff9d9de255edb6acb0ae85117ceb3e76c
Author: Sergii Romantsov <sergii.romantsov at gmail.com>
Date:   Thu Jan 10 11:42:45 2019 +0200

    sna: fix of byteswap.h absence on bsd
    
    OpenBSD, FreeBSD and NetBSD don't contains file byteswap.h.
    Used specifics of them.
    
    Fixes: 746ab3bb131d (sna: Added AYUV format support for textured and sprite video adapters.)
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109268
    CC: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
    CC: Chris Wilson <chris at chris-wilson.co.uk>
    Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>

diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index cf284975..b7aa6624 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -59,7 +59,17 @@
 #include "intel_options.h"
 
 #include <xf86xv.h>
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+#include <sys/types.h>
+#include <sys/endian.h>
+#ifdef __OpenBSD__
+#define bswap_32 swap32
+#else
+#define bswap_32 bswap32
+#endif
+#else
 #include <byteswap.h>
+#endif
 
 #ifdef SNA_XVMC
 #define _SNA_XVMC_SERVER_


More information about the xorg-commit mailing list