--- /dev/null
+From cd67d226ebd909d239d2c6e5a6abd6e2a338d1cd Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Thu, 17 Sep 2015 16:42:07 +0300
+Subject: drm/i915/bios: handle MIPI Sequence Block v3+ gracefully
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit cd67d226ebd909d239d2c6e5a6abd6e2a338d1cd upstream.
+
+The VBT MIPI Sequence Block version 3 has forward incompatible changes:
+
+First, the block size in the header has been specified reserved, and the
+actual size is a separate 32-bit value within the block. The current
+find_section() function to will only look at the size in the block
+header, and, depending on what's in that now reserved size field,
+continue looking for other sections in the wrong place.
+
+Fix this by taking the new block size field into account. This will
+ensure that the lookups for other sections will work properly, as long
+as the new 32-bit size does not go beyond the opregion VBT mailbox size.
+
+Second, the contents of the block have been completely
+changed. Gracefully refuse parsing the yet unknown data version.
+
+Cc: Deepak M <m.deepak@intel.com>
+Reviewed-by: Deepak M <m.deepak@intel.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_bios.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/i915/intel_bios.c
++++ b/drivers/gpu/drm/i915/intel_bios.c
+@@ -41,7 +41,7 @@ find_section(struct bdb_header *bdb, int
+ {
+ u8 *base = (u8 *)bdb;
+ int index = 0;
+- u16 total, current_size;
++ u32 total, current_size;
+ u8 current_id;
+
+ /* skip to first section */
+@@ -56,6 +56,10 @@ find_section(struct bdb_header *bdb, int
+ current_size = *((u16 *)(base + index));
+ index += 2;
+
++ /* The MIPI Sequence Block v3+ has a separate size field. */
++ if (current_id == BDB_MIPI_SEQUENCE && *(base + index) >= 3)
++ current_size = *((const u32 *)(base + index + 1));
++
+ if (index + current_size > total)
+ return NULL;
+
+@@ -845,6 +849,12 @@ parse_mipi(struct drm_i915_private *dev_
+ return;
+ }
+
++ /* Fail gracefully for forward incompatible sequence block. */
++ if (sequence->version >= 3) {
++ DRM_ERROR("Unable to parse MIPI Sequence Block v3+\n");
++ return;
++ }
++
+ DRM_DEBUG_DRIVER("Found MIPI sequence block\n");
+
+ block_size = get_blocksize(sequence);
--- /dev/null
+From 69e5d3f893e19613486f300fd6e631810338aa4b Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 14 Sep 2015 10:28:34 +1000
+Subject: drm/qxl: only report first monitor as connected if we have no state
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit 69e5d3f893e19613486f300fd6e631810338aa4b upstream.
+
+If the server isn't new enough to give us state, report the first
+monitor as always connected, otherwise believe the server side.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/qxl/qxl_display.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/qxl/qxl_display.c
++++ b/drivers/gpu/drm/qxl/qxl_display.c
+@@ -886,13 +886,15 @@ static enum drm_connector_status qxl_con
+ drm_connector_to_qxl_output(connector);
+ struct drm_device *ddev = connector->dev;
+ struct qxl_device *qdev = ddev->dev_private;
+- int connected;
++ bool connected = false;
+
+ /* The first monitor is always connected */
+- connected = (output->index == 0) ||
+- (qdev->client_monitors_config &&
+- qdev->client_monitors_config->count > output->index &&
+- qxl_head_enabled(&qdev->client_monitors_config->heads[output->index]));
++ if (!qdev->client_monitors_config) {
++ if (output->index == 0)
++ connected = true;
++ } else
++ connected = qdev->client_monitors_config->count > output->index &&
++ qxl_head_enabled(&qdev->client_monitors_config->heads[output->index]);
+
+ DRM_DEBUG("#%d connected: %d\n", output->index, connected);
+ if (!connected)
--- /dev/null
+From 8d0d94015e96b8853c4f7f06eac3f269e1b3d866 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
+Date: Thu, 24 Sep 2015 15:18:34 +0200
+Subject: drm/qxl: recreate the primary surface when the bo is not primary
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
+
+commit 8d0d94015e96b8853c4f7f06eac3f269e1b3d866 upstream.
+
+When disabling/enabling a crtc the primary area must be updated
+independently of which crtc has been disabled/enabled.
+
+Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1264735
+
+Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/qxl/qxl_display.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/qxl/qxl_display.c
++++ b/drivers/gpu/drm/qxl/qxl_display.c
+@@ -618,7 +618,7 @@ static int qxl_crtc_mode_set(struct drm_
+ adjusted_mode->hdisplay,
+ adjusted_mode->vdisplay);
+
+- if (qcrtc->index == 0)
++ if (bo->is_primary == false)
+ recreate_primary = true;
+
+ if (bo->surf.stride * bo->surf.height > qdev->vram_size) {
--- /dev/null
+From da168d81b44898404d281d5dbe70154ab5f117c1 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Tue, 23 Jun 2015 11:34:21 +0200
+Subject: drm: Reject DRI1 hw lock ioctl functions for kms drivers
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit da168d81b44898404d281d5dbe70154ab5f117c1 upstream.
+
+I've done some extensive history digging across libdrm, mesa and
+xf86-video-{intel,nouveau,ati}. The only potential user of this with
+kms drivers I could find was ttmtest, which once used drmGetLock
+still. But that mistake was quickly fixed up. Even the intel xvmc
+library (which otherwise was really good with using dri1 stuff in kms
+mode) managed to never take the hw lock for dri2 (and hence kms).
+
+Hence it should be save to unconditionally disallow this.
+
+Cc: Peter Antoine <peter.antoine@intel.com>
+Reviewed-by: Peter Antoine <peter.antoine@intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/drm_lock.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/gpu/drm/drm_lock.c
++++ b/drivers/gpu/drm/drm_lock.c
+@@ -61,6 +61,9 @@ int drm_legacy_lock(struct drm_device *d
+ struct drm_master *master = file_priv->master;
+ int ret = 0;
+
++ if (drm_core_check_feature(dev, DRIVER_MODESET))
++ return -EINVAL;
++
+ ++file_priv->lock_count;
+
+ if (lock->context == DRM_KERNEL_CONTEXT) {
+@@ -153,6 +156,9 @@ int drm_legacy_unlock(struct drm_device
+ struct drm_lock *lock = data;
+ struct drm_master *master = file_priv->master;
+
++ if (drm_core_check_feature(dev, DRIVER_MODESET))
++ return -EINVAL;
++
+ if (lock->context == DRM_KERNEL_CONTEXT) {
+ DRM_ERROR("Process %d using kernel context %d\n",
+ task_pid_nr(current), lock->context);
fix-sec-krb5-on-smb3-mounts.patch
disabling-oplocks-leases-via-module-parm-enable_oplocks-broken-for-smb3.patch
do-not-fall-back-to-smbwritex-in-set_file_size-error-cases.patch
+drm-qxl-only-report-first-monitor-as-connected-if-we-have-no-state.patch
+drm-qxl-recreate-the-primary-surface-when-the-bo-is-not-primary.patch
+drm-i915-bios-handle-mipi-sequence-block-v3-gracefully.patch
+drm-reject-dri1-hw-lock-ioctl-functions-for-kms-drivers.patch