intel_fb_drv: Aperture exhaustion and display IRQ patch

* display an error in case the aperture is too small for all
  framebuffers
* handle display engine IRQs only

issue #4233
This commit is contained in:
Sebastian Sumpf 2021-07-20 17:44:49 +02:00 committed by Christian Helmuth
parent 1727de30b7
commit 2fe70f111b
5 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,26 @@
Exit upon exhaustion of aperature and handle display engine IRQs only.
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -4007,6 +4007,8 @@
if (flags & PIN_NOEVICT)
return -ENOSPC;
+ aperture_exit();
+
/* No free space, pick a slot at random.
*
* There is a pathological case here using a GTT shared between
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2699,8 +2699,8 @@
disable_rpm_wakeref_asserts(dev_priv);
/* Find, clear, then process each source of interrupt */
- ret = gen8_gt_irq_ack(dev_priv, master_ctl, gt_iir);
- gen8_gt_irq_handler(dev_priv, gt_iir);
+ //ret = gen8_gt_irq_ack(dev_priv, master_ctl, gt_iir);
+ //gen8_gt_irq_handler(dev_priv, gt_iir);
ret |= gen8_de_irq_handler(dev_priv, master_ctl);
I915_WRITE_FW(GEN8_MASTER_IRQ, GEN8_MASTER_IRQ_CONTROL);

View File

@ -1 +1 @@
8a88c22df242631ae38c2bf58d6d7b24a6fa18d1 017ed559d35da47f9df49d5ac1c3c7ef26b0491e

View File

@ -207,6 +207,7 @@ PATCH_OPT(patches/intel_fb_drm.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
PATCH_OPT(patches/intel_fb_early.patch) := -p1 -d$(SRC_DIR_INTEL_FB) PATCH_OPT(patches/intel_fb_early.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
# drop it when https://bugs.freedesktop.org/show_bug.cgi?id=107125 gets fixed # drop it when https://bugs.freedesktop.org/show_bug.cgi?id=107125 gets fixed
PATCH_OPT(patches/intel_fb_hotplug.patch) := -p1 -d$(SRC_DIR_INTEL_FB) PATCH_OPT(patches/intel_fb_hotplug.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
PATCH_OPT(patches/intel_fb_aperture_de_irq.patch):= -p1 -d$(SRC_DIR_INTEL_FB)
# Freescale NIC # Freescale NIC
PATCH_OPT(patches/fec_skbuff_cast.patch) := -p1 -d$(SRC_DIR_FEC) PATCH_OPT(patches/fec_skbuff_cast.patch) := -p1 -d$(SRC_DIR_FEC)

View File

@ -2725,6 +2725,8 @@ void tasklet_disable(struct tasklet_struct *);
void enable_irq(unsigned int); void enable_irq(unsigned int);
void disable_irq(unsigned int); void disable_irq(unsigned int);
void aperture_exit(void);
#include <linux/math64.h> #include <linux/math64.h>
#include <legacy/lx_emul/extern_c_end.h> #include <legacy/lx_emul/extern_c_end.h>

View File

@ -1994,4 +1994,11 @@ int acpi_reconfig_notifier_register(struct notifier_block *nb)
return 0; return 0;
} }
void aperture_exit()
{
Genode::error("Error: no space in aperture left");
Lx_kit::env().env().parent().exit(1);
}
} /* extern "C" */ } /* extern "C" */