dde_linux: update intel_fb to 4.16.3

Fixes #2736
This commit is contained in:
Alexander Boettcher 2018-04-09 23:33:34 +02:00 committed by Christian Helmuth
parent 80104f5192
commit eb62d9cc04
25 changed files with 3582 additions and 1493 deletions

View File

@ -137,7 +137,7 @@ proc platform_drv_policy {} {
<policy label_prefix="ahci_drv"> <pci class="AHCI"/> </policy>
<policy label_prefix="nvme_drv"> <pci class="NVME"/> </policy>
<policy label_prefix="audio_drv"> <pci class="AUDIO"/> <pci class="HDAUDIO"/> </policy>
<policy label_prefix="intel_fb_drv" irq_mode="nomsi">
<policy label_prefix="intel_fb_drv">
<pci class="VGA"/>
<pci bus="0" device="0" function="0"/>
<pci class="ISABRIDGE"/>

View File

@ -1,76 +1,161 @@
linux-x.x.x/arch/x86/include/asm/agp.h
linux-x.x.x/arch/x86/include/asm/iosf_mbi.h
linux-x.x.x/arch/x86/include/asm/pci-direct.h
linux-x.x.x/arch/x86/kernel/early-quirks.c
linux-x.x.x/drivers/char/agp/agp.h
linux-x.x.x/drivers/char/agp/backend.c
linux-x.x.x/drivers/char/agp/generic.c
linux-x.x.x/drivers/char/agp/intel-agp.h
linux-x.x.x/drivers/char/agp/intel-gtt.c
linux-x.x.x/drivers/dma-buf/dma-fence.c
linux-x.x.x/drivers/dma-buf/dma-fence-array.c
linux-x.x.x/drivers/gpu/drm/drm_atomic_helper.c
linux-x.x.x/drivers/gpu/drm/drm_atomic.c
linux-x.x.x/drivers/gpu/drm/drm_blend.c
linux-x.x.x/drivers/gpu/drm/drm_bridge.c
linux-x.x.x/drivers/gpu/drm/drm_cache.c
linux-x.x.x/drivers/gpu/drm/drm_connector.c
linux-x.x.x/drivers/gpu/drm/drm_color_mgmt.c
linux-x.x.x/drivers/gpu/drm/drm_crtc.c
linux-x.x.x/drivers/gpu/drm/drm_crtc_helper.c
linux-x.x.x/drivers/gpu/drm/drm_crtc_helper_internal.h
linux-x.x.x/drivers/gpu/drm/drm_crtc_internal.h
linux-x.x.x/drivers/gpu/drm/drm_dp_dual_mode_helper.c
linux-x.x.x/drivers/gpu/drm/drm_dp_helper.c
linux-x.x.x/drivers/gpu/drm/drm_dp_mst_topology.c
linux-x.x.x/drivers/gpu/drm/drm_edid.c
linux-x.x.x/drivers/gpu/drm/drm_encoder.c
linux-x.x.x/drivers/gpu/drm/drm_fourcc.c
linux-x.x.x/drivers/gpu/drm/drm_framebuffer.c
linux-x.x.x/drivers/gpu/drm/drm_gem.c
linux-x.x.x/drivers/gpu/drm/drm_internal.h
linux-x.x.x/drivers/gpu/drm/drm_irq.c
linux-x.x.x/drivers/gpu/drm/drm_mm.c
linux-x.x.x/drivers/gpu/drm/drm_mode_config.c
linux-x.x.x/drivers/gpu/drm/drm_mode_object.c
linux-x.x.x/drivers/gpu/drm/drm_modes.c
linux-x.x.x/drivers/gpu/drm/drm_modeset_helper.c
linux-x.x.x/drivers/gpu/drm/drm_modeset_lock.c
linux-x.x.x/drivers/gpu/drm/drm_plane.c
linux-x.x.x/drivers/gpu/drm/drm_plane_helper.c
linux-x.x.x/drivers/gpu/drm/drm_probe_helper.c
linux-x.x.x/drivers/gpu/drm/drm_property.c
linux-x.x.x/drivers/gpu/drm/drm_rect.c
linux-x.x.x/drivers/gpu/drm/i915/i915_dma.c
linux-x.x.x/drivers/gpu/drm/drm_vblank.c
linux-x.x.x/drivers/gpu/drm/drm_vma_manager.c
linux-x.x.x/drivers/gpu/drm/i915/i915_drv.c
linux-x.x.x/drivers/gpu/drm/i915/i915_drv.h
linux-x.x.x/drivers/gpu/drm/i915/i915_vma.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gemfs.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_batch_pool.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_context.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_fence.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_context.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_clflush.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_clflush.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_fence_reg.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_fence_reg.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_gtt.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_gtt.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_internal.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_object.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_render_state.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_render_state.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_request.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_request.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_stolen.c
linux-x.x.x/drivers/gpu/drm/i915/i915_guc_reg.h
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_tiling.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_timeline.c
linux-x.x.x/drivers/gpu/drm/i915/i915_gem_timeline.h
linux-x.x.x/drivers/gpu/drm/i915/i915_irq.c
linux-x.x.x/drivers/gpu/drm/i915/i915_params.h
linux-x.x.x/drivers/gpu/drm/i915/i915_pci.c
linux-x.x.x/drivers/gpu/drm/i915/i915_pmu.h
linux-x.x.x/drivers/gpu/drm/i915/i915_pvinfo.h
linux-x.x.x/drivers/gpu/drm/i915/i915_reg.h
linux-x.x.x/drivers/gpu/drm/i915/i915_selftest.h
linux-x.x.x/drivers/gpu/drm/i915/i915_sw_fence.h
linux-x.x.x/drivers/gpu/drm/i915/i915_syncmap.h
linux-x.x.x/drivers/gpu/drm/i915/i915_utils.h
linux-x.x.x/drivers/gpu/drm/i915/i915_vma.h
linux-x.x.x/drivers/gpu/drm/i915/i915_vgpu.c
linux-x.x.x/drivers/gpu/drm/i915/i915_vgpu.h
linux-x.x.x/drivers/gpu/drm/i915/intel_atomic.c
linux-x.x.x/drivers/gpu/drm/i915/intel_atomic_plane.c
linux-x.x.x/drivers/gpu/drm/i915/intel_bios.c
linux-x.x.x/drivers/gpu/drm/i915/intel_bios.h
linux-x.x.x/drivers/gpu/drm/i915/intel_cdclk.c
linux-x.x.x/drivers/gpu/drm/i915/intel_color.c
linux-x.x.x/drivers/gpu/drm/i915/intel_crt.c
linux-x.x.x/drivers/gpu/drm/i915/intel_device_info.c
linux-x.x.x/drivers/gpu/drm/i915/intel_device_info.h
linux-x.x.x/drivers/gpu/drm/i915/intel_ddi.c
linux-x.x.x/drivers/gpu/drm/i915/intel_display.c
linux-x.x.x/drivers/gpu/drm/i915/intel_display.h
linux-x.x.x/drivers/gpu/drm/i915/intel_dp.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dp_link_training.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dp_mst.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dpio_phy.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dpll_mgr.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dpll_mgr.h
linux-x.x.x/drivers/gpu/drm/i915/intel_drv.h
linux-x.x.x/drivers/gpu/drm/i915/intel_dsi_pll.c
linux-x.x.x/drivers/gpu/drm/i915/intel_dsi.h
linux-x.x.x/drivers/gpu/drm/i915/intel_fbc.c
linux-x.x.x/drivers/gpu/drm/i915/intel_fifo_underrun.c
linux-x.x.x/drivers/gpu/drm/i915/intel_frontbuffer.c
linux-x.x.x/drivers/gpu/drm/i915/intel_frontbuffer.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc.c
linux-x.x.x/drivers/gpu/drm/i915/intel_guc.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_ct.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_fw.c
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_fw.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_fwif.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_log.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_reg.h
linux-x.x.x/drivers/gpu/drm/i915/intel_guc_submission.h
linux-x.x.x/drivers/gpu/drm/i915/intel_gvt.h
linux-x.x.x/drivers/gpu/drm/i915/intel_hdmi.c
linux-x.x.x/drivers/gpu/drm/i915/intel_hotplug.c
linux-x.x.x/drivers/gpu/drm/i915/intel_huc.c
linux-x.x.x/drivers/gpu/drm/i915/intel_huc.h
linux-x.x.x/drivers/gpu/drm/i915/intel_i2c.c
linux-x.x.x/drivers/gpu/drm/i915/intel_lrc.h
linux-x.x.x/drivers/gpu/drm/i915/intel_lspcon.c
linux-x.x.x/drivers/gpu/drm/i915/intel_lvds.c
linux-x.x.x/drivers/gpu/drm/i915/intel_mocs.c
linux-x.x.x/drivers/gpu/drm/i915/intel_mocs.h
linux-x.x.x/drivers/gpu/drm/i915/intel_modes.c
linux-x.x.x/drivers/gpu/drm/i915/intel_opregion.h
linux-x.x.x/drivers/gpu/drm/i915/intel_overlay.c
linux-x.x.x/drivers/gpu/drm/i915/intel_panel.c
linux-x.x.x/drivers/gpu/drm/i915/intel_pm.c
linux-x.x.x/drivers/gpu/drm/i915/intel_psr.c
linux-x.x.x/drivers/gpu/drm/i915/intel_ringbuffer.c
linux-x.x.x/drivers/gpu/drm/i915/intel_renderstate.h
linux-x.x.x/drivers/gpu/drm/i915/intel_renderstate_gen6.c
linux-x.x.x/drivers/gpu/drm/i915/intel_renderstate_gen7.c
linux-x.x.x/drivers/gpu/drm/i915/intel_renderstate_gen8.c
linux-x.x.x/drivers/gpu/drm/i915/intel_renderstate_gen9.c
linux-x.x.x/drivers/gpu/drm/i915/intel_ringbuffer.h
linux-x.x.x/drivers/gpu/drm/i915/intel_runtime_pm.c
linux-x.x.x/drivers/gpu/drm/i915/intel_sdvo.c
linux-x.x.x/drivers/gpu/drm/i915/intel_sdvo_regs.h
linux-x.x.x/drivers/gpu/drm/i915/intel_sideband.c
linux-x.x.x/drivers/gpu/drm/i915/intel_sprite.c
linux-x.x.x/drivers/gpu/drm/i915/intel_uc.c
linux-x.x.x/drivers/gpu/drm/i915/intel_uc.h
linux-x.x.x/drivers/gpu/drm/i915/intel_uc_fw.c
linux-x.x.x/drivers/gpu/drm/i915/intel_uc_fw.h
linux-x.x.x/drivers/gpu/drm/i915/intel_uncore.c
linux-x.x.x/drivers/gpu/drm/i915/intel_uncore.h
linux-x.x.x/drivers/gpu/drm/i915/intel_vbt_defs.h
linux-x.x.x/drivers/i2c/algos/i2c-algo-bit.c
linux-x.x.x/drivers/i2c/i2c-boardinfo.c
linux-x.x.x/drivers/i2c/i2c-core.c
linux-x.x.x/drivers/i2c/i2c-core.h
linux-x.x.x/drivers/i2c/i2c-core-base.c
linux-x.x.x/drivers/i2c/i2c-core-smbus.c
linux-x.x.x/drivers/video/hdmi.c
linux-x.x.x/include/asm-generic/atomic64.h
linux-x.x.x/include/asm-generic/bitops/__ffs.h
@ -85,34 +170,85 @@ linux-x.x.x/include/drm/drmP.h
linux-x.x.x/include/drm/drm_agpsupport.h
linux-x.x.x/include/drm/drm_atomic.h
linux-x.x.x/include/drm/drm_atomic_helper.h
linux-x.x.x/include/drm/drm_auth.h
linux-x.x.x/include/drm/drm_blend.h
linux-x.x.x/include/drm/drm_bridge.h
linux-x.x.x/include/drm/drm_cache.h
linux-x.x.x/include/drm/drm_connector.h
linux-x.x.x/include/drm/drm_color_mgmt.h
linux-x.x.x/include/drm/drm_crtc.h
linux-x.x.x/include/drm/drm_crtc_helper.h
linux-x.x.x/include/drm/drm_debugfs_crc.h
linux-x.x.x/include/drm/drm_device.h
linux-x.x.x/include/drm/drm_displayid.h
linux-x.x.x/include/drm/drm_dp_dual_mode_helper.h
linux-x.x.x/include/drm/drm_dp_helper.h
linux-x.x.x/include/drm/drm_dp_mst_helper.h
linux-x.x.x/include/drm/drm_drv.h
linux-x.x.x/include/drm/drm_edid.h
linux-x.x.x/include/drm/drm_encoder.h
linux-x.x.x/include/drm/drm_file.h
linux-x.x.x/include/drm/drm_fixed.h
linux-x.x.x/include/drm/drm_fourcc.h
linux-x.x.x/include/drm/drm_framebuffer.h
linux-x.x.x/include/drm/drm_gem.h
linux-x.x.x/include/drm/drm_global.h
linux-x.x.x/include/drm/drm_hashtab.h
linux-x.x.x/include/drm/drm_ioctl.h
linux-x.x.x/include/drm/drm_irq.h
linux-x.x.x/include/drm/drm_legacy.h
linux-x.x.x/include/drm/drm_mm.h
linux-x.x.x/include/drm/drm_mipi_dsi.h
linux-x.x.x/include/drm/drm_mode_config.h
linux-x.x.x/include/drm/drm_mode_object.h
linux-x.x.x/include/drm/drm_modes.h
linux-x.x.x/include/drm/drm_modeset_helper.h
linux-x.x.x/include/drm/drm_modeset_helper_vtables.h
linux-x.x.x/include/drm/drm_modeset_lock.h
linux-x.x.x/include/drm/drm_pci.h
linux-x.x.x/include/drm/drm_plane.h
linux-x.x.x/include/drm/drm_plane_helper.h
linux-x.x.x/include/drm/drm_print.h
linux-x.x.x/include/drm/drm_prime.h
linux-x.x.x/include/drm/drm_property.h
linux-x.x.x/include/drm/drm_rect.h
linux-x.x.x/include/drm/drm_scdc_helper.h
linux-x.x.x/include/drm/drm_utils.h
linux-x.x.x/include/drm/drm_vma_manager.h
linux-x.x.x/include/drm/drm_vblank.h
linux-x.x.x/include/drm/i915_drm.h
linux-x.x.x/include/drm/i915_pciids.h
linux-x.x.x/include/drm/intel-gtt.h
linux-x.x.x/include/linux/agp_backend.h
linux-x.x.x/include/linux/circ_buf.h
linux-x.x.x/include/linux/dma-fence.h
linux-x.x.x/include/linux/dma-fence-array.h
linux-x.x.x/include/linux/hdmi.h
linux-x.x.x/include/linux/firmware.h
linux-x.x.x/include/linux/gpio/consumer.h
linux-x.x.x/include/linux/i2c-algo-bit.h
linux-x.x.x/include/linux/i2c.h
linux-x.x.x/include/linux/idr.h
linux-x.x.x/include/linux/interval_tree.h
linux-x.x.x/include/linux/interval_tree_generic.h
linux-x.x.x/include/linux/irqhandler.h
linux-x.x.x/include/linux/io-mapping.h
linux-x.x.x/include/linux/list.h
linux-x.x.x/include/linux/list_sort.h
linux-x.x.x/include/linux/llist.h
linux-x.x.x/include/linux/math64.h
linux-x.x.x/include/linux/log2.h
linux-x.x.x/include/linux/pagevec.h
linux-x.x.x/include/linux/pci_ids.h
linux-x.x.x/include/linux/pm_runtime.h
linux-x.x.x/include/linux/pm_wakeirq.h
linux-x.x.x/include/linux/ratelimit.h
linux-x.x.x/include/linux/radix-tree.h
linux-x.x.x/include/linux/rbtree.h
linux-x.x.x/include/linux/rbtree_augmented.h
linux-x.x.x/include/linux/scatterlist.h
linux-x.x.x/include/linux/sort.h
linux-x.x.x/include/linux/vga_switcheroo.h
linux-x.x.x/include/uapi/asm-generic/ioctl.h
linux-x.x.x/include/uapi/drm/drm.h
linux-x.x.x/include/uapi/drm/drm_fourcc.h
@ -125,4 +261,10 @@ linux-x.x.x/include/uapi/linux/pci_regs.h
linux-x.x.x/include/uapi/linux/swab.h
linux-x.x.x/include/video/display_timing.h
linux-x.x.x/include/video/videomode.h
linux-x.x.x/lib/div64.c
linux-x.x.x/lib/idr.c
linux-x.x.x/lib/list_sort.c
linux-x.x.x/lib/llist.c
linux-x.x.x/lib/radix-tree.c
linux-x.x.x/lib/rbtree.c
linux-x.x.x/lib/scatterlist.c

View File

@ -5,6 +5,7 @@ LIBS += intel_fb_include
SRC_C :=
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/char/agp/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/dma-buf/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/i2c/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/i2c/algos/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/gpu/drm/*.c))
@ -12,6 +13,7 @@ SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/gpu/drm/i915/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/video/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/video/fbdev/core/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/lib/*.c))
SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/arch/x86/kernel/*.c))
#
# Linux sources are C89 with GNU extensions
@ -27,6 +29,7 @@ CC_WARN = -Wall -Wno-uninitialized -Wno-unused-but-set-variable \
-Wno-int-to-pointer-cast
vpath %.c $(LX_CONTRIB_DIR)/drivers/char/agp
vpath %.c $(LX_CONTRIB_DIR)/drivers/dma-buf
vpath %.c $(LX_CONTRIB_DIR)/drivers/i2c
vpath %.c $(LX_CONTRIB_DIR)/drivers/i2c/algos
vpath %.c $(LX_CONTRIB_DIR)/drivers/gpu/drm/i915
@ -34,6 +37,7 @@ vpath %.c $(LX_CONTRIB_DIR)/drivers/gpu/drm
vpath %.c $(LX_CONTRIB_DIR)/drivers/video
vpath %.c $(LX_CONTRIB_DIR)/drivers/video/fbdev/core
vpath %.c $(LX_CONTRIB_DIR)/lib
vpath %.c $(LX_CONTRIB_DIR)/arch/x86/kernel
CC_CXX_WARN_STRICT =

View File

@ -4,7 +4,7 @@
panel->backlight.present = true;
+ intel_panel_set_backlight(intel_connector, panel->backlight.max*75/100, panel->backlight.max);
+ intel_panel_set_backlight(connector->state, panel->backlight.max*75/100, panel->backlight.max);
DRM_DEBUG_KMS("Connector %s backlight initialized, %s, brightness %u/%u\n",
connector->name,
panel->backlight.enabled ? "enabled" : "disabled",

View File

@ -0,0 +1,244 @@
--- a/drivers/gpu/drm/i915/i915_gem_object.h
--- b/drivers/gpu/drm/i915/i915_gem_object.h
@@ -26,6 +26,7 @@
#define __I915_GEM_OBJECT_H__
#include <linux/reservation.h>
+#include <linux/radix-tree.h>
#include <drm/drm_vma_manager.h>
#include <drm/drm_gem.h>
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -544,7 +544,9 @@
{
iter->dev = dev;
iter->conn = NULL;
+#ifdef CONFIG_LOCKDEP
lock_acquire_shared_recursive(&connector_list_iter_dep_map, 0, 1, NULL, _RET_IP_);
+#endif
}
EXPORT_SYMBOL(drm_connector_list_iter_begin);
@@ -625,7 +627,9 @@
__drm_connector_put_safe(iter->conn);
spin_unlock_irqrestore(&config->connector_list_lock, flags);
}
+#ifdef CONFIG_LOCKDEP
lock_release(&connector_list_iter_dep_map, 0, _RET_IP_);
+#endif
}
EXPORT_SYMBOL(drm_connector_list_iter_end);
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -423,7 +423,7 @@
struct drm_mm_node *node,
u64 size)
{
- return drm_mm_insert_node_generic(mm, node, size, 0, 0, 0);
+ return drm_mm_insert_node_generic(mm, node, size, 0, 0, DRM_MM_INSERT_BEST);
}
void drm_mm_remove_node(struct drm_mm_node *node);
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -122,10 +122,9 @@
*/
static inline struct drm_printer drm_debug_printer(const char *prefix)
{
- struct drm_printer p = {
- .printfn = __drm_printfn_debug,
- .prefix = prefix
- };
+ struct drm_printer p;
+ p.printfn = __drm_printfn_debug;
+ p.prefix = prefix;
return p;
}
#endif /* DRM_PRINT_H_ */
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -24,6 +24,7 @@
#include "intel_guc.h"
#include "i915_drv.h"
+#include "intel_drv.h"
static void gen8_guc_raise_irq(struct intel_guc *guc)
{
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -26,6 +26,7 @@
#include "intel_guc_submission.h"
#include "intel_guc.h"
#include "i915_drv.h"
+#include "intel_drv.h"
/* Reset GuC providing us with fresh state for both GuC and HuC.
*/
--- a/drivers/gpu/drm/i915/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/intel_guc_fw.c
@@ -29,6 +29,7 @@
#include "intel_guc_fw.h"
#include "i915_drv.h"
+#include "intel_drv.h"
#define SKL_FW_MAJOR 6
#define SKL_FW_MINOR 1
--- a/drivers/gpu/drm/i915/i915_gem_fence_reg.c
+++ b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
@@ -24,6 +24,7 @@
#include <drm/drmP.h>
#include <drm/i915_drm.h>
#include "i915_drv.h"
+#include "intel_drv.h"
/**
* DOC: fence register handling
--- a/drivers/gpu/drm/i915/intel_huc.c
+++ b/drivers/gpu/drm/i915/intel_huc.c
@@ -26,6 +26,7 @@
#include "intel_huc.h"
#include "i915_drv.h"
+#include "intel_drv.h"
/**
* DOC: HuC Firmware
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -29,6 +29,7 @@
#include <linux/sched/signal.h>
#include "i915_drv.h"
+#include "intel_drv.h"
static const char *i915_fence_get_driver_name(struct dma_fence *fence)
{
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -27,6 +27,7 @@
#include "i915_drv.h"
#include "intel_ringbuffer.h"
#include "intel_frontbuffer.h"
+#include "intel_drv.h"
#include <drm/drm_gem.h>
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1276,9 +1276,11 @@
goto out_list;
}
+#if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_OF)
res = of_i2c_setup_smbus_alert(adap);
if (res)
goto out_reg;
+#endif
dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name);
@@ -1311,7 +1313,9 @@
return 0;
+#if IS_ENABLED(CONFIG_I2C_SMBUS) && IS_ENABLED(CONFIG_OF)
out_reg:
+#endif
init_completion(&adap->dev_released);
device_unregister(&adap->dev);
wait_for_completion(&adap->dev_released);
--- a/include/drm/intel-gtt.h
+++ b/include/drm/intel-gtt.h
@@ -4,6 +4,8 @@
#ifndef _DRM_INTEL_GTT_H
#define _DRM_INTEL_GTT_H
+#include <linux/scatterlist.h>
+
void intel_gtt_get(u64 *gtt_total,
u32 *stolen_size,
phys_addr_t *mappable_base,
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1022,11 +1022,11 @@
intel_uc_init_mmio(dev_priv);
- ret = intel_engines_init_mmio(dev_priv);
+// ret = intel_engines_init_mmio(dev_priv);
if (ret)
goto err_uncore;
- i915_gem_init_mmio(dev_priv);
+// i915_gem_init_mmio(dev_priv);
return 0;
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -487,9 +487,11 @@
}
dev_priv->preempt_context = ctx;
+/*
DRM_DEBUG_DRIVER("%s context support initialized\n",
dev_priv->engine[RCS]->context_size ? "logical" :
"fake");
+*/
return 0;
err_kernel_context:
--- a/drivers/gpu/drm/drm_framebuffer.c
--- b/drivers/gpu/drm/drm_framebuffer.c
@@ -675,7 +675,8 @@
INIT_LIST_HEAD(&fb->filp_head);
fb->funcs = funcs;
- strcpy(fb->comm, current->comm);
+ if (current) /* used for debugging */
+ strcpy(fb->comm, current->comm);
ret = __drm_mode_object_add(dev, &fb->base, DRM_MODE_OBJECT_FB,
false, drm_framebuffer_free);
--- a/drivers/gpu/drm/i915/intel_display.c
--- b/drivers/gpu/drm/i915/intel_display.c
@@ -12199,7 +12199,7 @@
u64 put_domains[I915_MAX_PIPES] = {};
int i;
- intel_atomic_commit_fence_wait(intel_state);
+// intel_atomic_commit_fence_wait(intel_state);
drm_atomic_helper_wait_for_dependencies(state);
@@ -12479,13 +12479,14 @@
dev_priv->cdclk.actual = intel_state->cdclk.actual;
}
- drm_atomic_state_get(state);
INIT_WORK(&state->commit_work, intel_atomic_commit_work);
i915_sw_fence_commit(&intel_state->commit_ready);
if (nonblock && intel_state->modeset) {
+ drm_atomic_state_get(state);
queue_work(dev_priv->modeset_wq, &state->commit_work);
} else if (nonblock) {
+ drm_atomic_state_get(state);
queue_work(system_unbound_wq, &state->commit_work);
} else {
if (intel_state->modeset)
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -154,7 +158,7 @@
* We don't allow disabling PPGTT for gen9+ as it's a requirement for
* execlists, the sole mechanism available to submit work.
*/
- if (enable_ppgtt == 0 && INTEL_GEN(dev_priv) < 9)
+ if (enable_ppgtt == 0) // && INTEL_GEN(dev_priv) < 9)
return 0;
if (enable_ppgtt == 1)

View File

@ -1,13 +0,0 @@
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13567,6 +13568,10 @@
intel_crtc = to_intel_crtc(crtc);
plane->fb = fb;
+
+ if (!crtc)
+ return;
+
crtc->x = src->x1 >> 16;
crtc->y = src->y1 >> 16;

View File

@ -0,0 +1,52 @@
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -28,6 +28,11 @@
#include <asm/irq_remapping.h>
#include <asm/early_ioremap.h>
+#define __initconst
+#define __ro_after_init
+
+#if 0
+
#define dev_err(msg) pr_err("pci 0000:%02x:%02x.%d: %s", bus, slot, func, msg)
static void __init fix_hypertransport_config(int num, int slot, int func)
@@ -230,6 +235,8 @@
set_irq_remapping_broken();
}
+#endif /*#if 0*/
+
/*
* Systems with Intel graphics controllers set aside memory exclusively
* for gfx driver use. This memory is not marked in the E820 as reserved
@@ -558,11 +565,13 @@
&intel_graphics_stolen_res);
/* Mark this space as reserved */
+#if 0
e820__range_add(base, size, E820_TYPE_RESERVED);
e820__update_table(e820_table);
+#endif
}
-static void __init intel_graphics_quirks(int num, int slot, int func)
+void __init intel_graphics_quirks(int num, int slot, int func)
{
const struct intel_early_ops *early_ops;
u16 device;
@@ -584,6 +593,8 @@
}
}
+#if 0
+
static void __init force_disable_hpet(int num, int slot, int func)
{
#ifdef CONFIG_HPET_TIMER
@@ -774,3 +785,4 @@
early_pci_scan_bus(0);
}
+#endif /*#if 0*/

View File

@ -1,16 +0,0 @@
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 32cf973..ec1d558 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15816,3 +15816,11 @@ void intel_modeset_preclose(struct drm_device *dev, struct drm_file *file)
spin_unlock_irq(&dev->event_lock);
}
}
+
+struct drm_framebuffer *
+lx_c_intel_framebuffer_create(struct drm_device *dev,
+ struct drm_mode_fb_cmd2 *mode_cmd,
+ struct drm_i915_gem_object *obj) {
+ return intel_framebuffer_create(dev, mode_cmd, obj);
+}
+EXPORT_SYMBOL(lx_c_intel_framebuffer_create);

View File

@ -0,0 +1,97 @@
--- a/drivers/gpu/drm/i915/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/intel_hotplug.c
@@ -336,11 +336,10 @@
/*
* Handle hotplug events outside the interrupt handler proper.
*/
-static void i915_hotplug_work_func(struct work_struct *work)
+static void i915_hotplug_work_func_x(struct work_struct *work,
+ struct drm_i915_private *dev_priv,
+ struct drm_device *dev)
{
- struct drm_i915_private *dev_priv =
- container_of(work, struct drm_i915_private, hotplug.hotplug_work);
- struct drm_device *dev = &dev_priv->drm;
struct intel_connector *intel_connector;
struct intel_encoder *intel_encoder;
struct drm_connector *connector;
@@ -353,7 +352,7 @@
spin_lock_irq(&dev_priv->irq_lock);
- hpd_event_bits = dev_priv->hotplug.event_bits;
+ hpd_event_bits = dev_priv->hotplug.event_bits | dev_priv->hotplug.recheck_event_bits;
dev_priv->hotplug.event_bits = 0;
/* Disable hotplug on connectors that hit an irq storm. */
@@ -379,8 +378,40 @@
drm_connector_list_iter_end(&conn_iter);
mutex_unlock(&dev->mode_config.mutex);
- if (changed)
+ if (changed) {
+ dev_priv->hotplug.recheck_event_bits = 0;
drm_kms_helper_hotplug_event(dev);
+ } else {
+ if (hpd_event_bits && !dev_priv->hotplug.recheck_event_bits) {
+ unsigned long delay = msecs_to_jiffies(2000);
+ schedule_delayed_work(&dev_priv->hotplug.recheck_hotplug, delay);
+ }
+
+ if (hpd_event_bits != dev_priv->hotplug.recheck_event_bits)
+ dev_priv->hotplug.recheck_event_bits |= hpd_event_bits;
+ }
+}
+
+static void i915_hotplug_work_func(struct work_struct *work)
+{
+ struct drm_i915_private *dev_priv =
+ container_of(work, struct drm_i915_private, hotplug.hotplug_work);
+ struct drm_device *dev = &dev_priv->drm;
+
+ i915_hotplug_work_func_x(work, dev_priv, dev);
+}
+
+static void i915_hotplug_recheck_func(struct work_struct *work)
+{
+ struct drm_i915_private *dev_priv =
+ container_of(work, typeof(*dev_priv),
+ hotplug.recheck_hotplug.work);
+ struct drm_device *dev = &dev_priv->drm;
+
+ i915_hotplug_work_func_x(work, dev_priv, dev);
+
+ /* re-try just once */
+ dev_priv->hotplug.recheck_event_bits = 0;
}
@@ -604,6 +635,8 @@
INIT_WORK(&dev_priv->hotplug.poll_init_work, i915_hpd_poll_init_work);
INIT_DELAYED_WORK(&dev_priv->hotplug.reenable_work,
intel_hpd_irq_storm_reenable_work);
+ INIT_DELAYED_WORK(&dev_priv->hotplug.recheck_hotplug,
+ i915_hotplug_recheck_func);
}
void intel_hpd_cancel_work(struct drm_i915_private *dev_priv)
@@ -620,6 +653,7 @@
cancel_work_sync(&dev_priv->hotplug.hotplug_work);
cancel_work_sync(&dev_priv->hotplug.poll_init_work);
cancel_delayed_work_sync(&dev_priv->hotplug.reenable_work);
+ cancel_delayed_work_sync(&dev_priv->hotplug.recheck_hotplug);
}
bool intel_hpd_disable(struct drm_i915_private *dev_priv, enum hpd_pin pin)
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -278,7 +278,9 @@
} state;
} stats[HPD_NUM_PINS];
u32 event_bits;
+ u32 recheck_event_bits;
struct delayed_work reenable_work;
+ struct delayed_work recheck_hotplug;
struct intel_digital_port *irq_port[I915_MAX_PORTS];
u32 long_port_mask;

View File

@ -1 +1 @@
dbe07ce4380f2028e3b9d5fccaedff6b831b9a0e
d2628a8fe8df14dd00d5fa8ef6bbea527d319bee

View File

@ -41,9 +41,9 @@ DIR(dwc_otg) := $(SRC_DIR_USB)/drivers/usb/host/dwc_otg
# Intel framebuffer driver
#
SRC_DIR_INTEL_FB := src/drivers/framebuffer/intel
VERSION_INTEL_FB := 4.4.3
VERSION_INTEL_FB := 4.16.3
URL(intel_fb) := https://www.kernel.org/pub/linux/kernel/v4.x/linux-$(VERSION_INTEL_FB).tar.xz
SHA(intel_fb) := 0b379cb19bbd7e38fc5a9a000ea927db55cce519a7400ec7fa705c581a6491dd
SHA(intel_fb) := 0d6971a81da97e38b974c5eba31a74803bfe41aabc46d406c3acda56306c81a3
DIR(intel_fb) := $(SRC_DIR_INTEL_FB)
TAR_OPT(intel_fb) := --strip-components=1 --files-from - < <(sed 's/-x.x.x/-$(VERSION_INTEL_FB)/g' $(REP_DIR)/intel_fb.list)
HASH_INPUT += $(REP_DIR)/intel_fb.list
@ -197,9 +197,11 @@ PATCH_OPT(patches/usb_rndis.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_tv64.patch) := $(USB_OPT)
# INTEL FB
PATCH_OPT(patches/intel_fb_export_api.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
PATCH_OPT(patches/intel_fb_drm_remove.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
PATCH_OPT(patches/intel_fb_backlight.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
PATCH_OPT(patches/intel_fb_backlight.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
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)
# 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)
# Freescale NIC
PATCH_OPT(patches/fec_skbuff_cast.patch) := -p1 -d$(SRC_DIR_FEC)

View File

@ -10,6 +10,7 @@ set build_components {
server/report_rom
server/ram_fs
server/fs_rom
app/top
}
source ${genode_dir}/repos/base/run/platform_drv.inc
@ -24,7 +25,7 @@ create_boot_directory
#
append config {
<config verbose="yes" prio_levels="2">
<config verbose="yes" prio_levels="4">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
@ -34,6 +35,7 @@ append config {
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="TRACE"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
@ -48,64 +50,105 @@ append config {
<provides><service name="Timer"/></provides>
</start>
<start name="report_rom" priority="-1">
<start name="report_rom" priority="0">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report" /> <service name="ROM" /> </provides>
<config verbose="yes">
<policy label="intel_fb_controller -> connectors" report="intel_fb_drv -> connectors"/>
</config>
<config verbose="yes"/>
</start>
<start name="config_fs" priority="-1">
<binary name="ram_fs"/>
<resource name="RAM" quantum="8M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content>
<inline name="fb_drv.config">
<config>
<start name="init_dynamic" caps="10000">
<binary name="init"/>
<resource name="RAM" quantum="1000M"/>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<service name="Platform"> <child name="platform_drv" label="intel_fb_drv"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
<config prio_levels="2">
<parent-provides>
<service name="ROM"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="TRACE"/>
<service name="Platform"/>
<service name="Timer"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
<report init_ram="yes" child_ram="yes" delay_ms="10000"/>
<start name="top">
<resource name="RAM" quantum="2M"/>
<config period_ms="40000"/>
</start>
<start name="report_rom" priority="-1">
<resource name="RAM" quantum="2M"/>
<provides> <service name="Report" /> <service name="ROM" /> </provides>
<config verbose="yes">
<policy label="intel_fb_controller -> connectors" report="intel_fb_drv -> connectors"/>
</config>
</start>
<start name="config_fs" priority="-1">
<binary name="ram_fs"/>
<resource name="RAM" quantum="8M"/>
<provides> <service name="File_system"/> </provides>
<config>
<content>
<inline name="fb_drv.config">
<config ld_verbose="yes">
<report connectors="yes"/>
</config>
</inline>
</content>
<policy label_prefix="config_rom" root="/"/>
<policy label_prefix="intel_fb_controller" root="/" writeable="yes"/>
</inline>
</content>
<policy label_prefix="config_rom" root="/"/>
<policy label_prefix="intel_fb_controller" root="/" writeable="yes"/>
</config>
</start>
<start name="config_rom" priority="-1">
<binary name="fs_rom"/>
<resource name="RAM" quantum="4M"/>
<provides><service name="ROM"/></provides>
<route>
<service name="File_system"> <child name="config_fs" /> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="intel_fb_drv" caps="1000">
<resource name="RAM" quantum="60M"/>
<provides><service name="Framebuffer"/></provides>
<configfile name="fb_drv.config"/>
<route>
<service name="ROM" label="fb_drv.config"> <child name="config_rom"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
<start name="intel_fb_controller" priority="-1">
<resource name="RAM" quantum="1M"/>
<config artifical_update_ms="0"/> <!-- off -->
<route>
<service name="File_system"> <child name="config_fs"/> </service>
<service name="ROM" label="connectors"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-framebuffer" priority="-1">
<resource name="RAM" quantum="10M"/>
</start>
</config>
</start>
<start name="config_rom" priority="-1">
<binary name="fs_rom"/>
<resource name="RAM" quantum="4M"/>
<provides><service name="ROM"/></provides>
<route>
<service name="File_system"> <child name="config_fs" /> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="intel_fb_drv" caps="200">
<resource name="RAM" quantum="20M"/>
<provides><service name="Framebuffer"/></provides>
<configfile name="fb_drv.config"/>
<route>
<service name="ROM" label="fb_drv.config"> <child name="config_rom"/> </service>
<service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
<start name="intel_fb_controller" priority="-1">
<resource name="RAM" quantum="1M"/>
<route>
<service name="File_system"> <child name="config_fs"/> </service>
<service name="ROM" label="connectors"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="test-framebuffer" priority="-1">
<resource name="RAM" quantum="10M"/>
</start>
</config>}
install_config $config
@ -118,6 +161,7 @@ install_config $config
set boot_modules {
core ld.lib.so init timer intel_fb_drv intel_fb_controller
test-framebuffer report_rom ram_fs fs_rom
top
}
append_platform_drv_boot_modules

View File

@ -18,7 +18,7 @@ Each of the connector can be configured explicitly in terms of resolution and
whether it should be enabled or not. This looks like the following:
! <config>
! <connector name="LVDS-11" width="1280" height="800" enabled="true"/>
! <connector name="LVDS-11" width="1280" height="800" hz="60" brightness="75" enabled="true"/>
! </config>
When the configuration changes during run-time, the driver will adapt to it. In
@ -26,6 +26,9 @@ this case it will also change the current virtual resolution to the maximum of
the configured resolutions in width and height, and it will inform its client
about the change in resolution.
The brightness value is in percentage and takes effect only if supported by
the hardware.
If you experience problems like hotplugging of connectors does not work, you
can force the driver to poll frequently for hotplug events by defining a period
in milliseconds like this:
@ -46,10 +49,13 @@ configured too, like in the following:
The exported report has the following format:
! <connectors>
! <connector name="LVDS-11" connected="1">
! <connector name="LVDS-11" connected="1" brightness="50">
! <mode width="1280" height="800" hz="60"/>
! ...
! </connector>
! ...
! <connector name="HDMI-A-1" connected="false"/>
! <connector name="DP-1" connected="false"/>
! </connectors>
The brightness attribute is soley reported if the hardware supports it.

File diff suppressed because it is too large Load Diff

View File

@ -12,37 +12,40 @@
*/
#include <../drivers/gpu/drm/i915/i915_drv.h>
struct i915_params i915 = {
struct i915_params i915_modparams = {
.vbt_firmware = NULL,
.modeset = -1,
.panel_ignore_lid = 1,
.semaphores = -1,
.lvds_channel_mode = 0,
.panel_use_ssc = -1,
.vbt_sdvo_panel_type = -1,
.enable_rc6 = -1,
.enable_dc = -1,
.enable_fbc = -1,
.enable_execlists = -1,
.enable_hangcheck = false,
.enable_ppgtt = -1,
.enable_ppgtt = 0,
.enable_psr = 0,
.preliminary_hw_support = true,
.disable_power_well = -1,
.enable_ips = 1,
.fastboot = 0,
.prefault_disable = 0,
.load_detect_test = 0,
.reset = true,
.enable_ips = true,
.invert_brightness = 0,
.disable_display = 0,
.enable_cmd_parser = 1,
.disable_vtd_wa = 0,
.use_mmio_flip = 0,
.mmio_debug = 0,
.verbose_state_checks = 1,
.nuclear_pageflip = 0,
.edp_vswing = 0,
.enable_guc_submission = false,
.guc_log_level = -1,
.guc_firmware_path = NULL,
.huc_firmware_path = NULL,
.mmio_debug = 0,
.edp_vswing = 0,
.enable_guc = 0,
.reset = 0,
.inject_load_failure = 0,
.alpha_support = IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT),
.enable_cmd_parser = true,
.enable_hangcheck = false,
.fastboot = false,
.prefault_disable = false,
.load_detect_test = false,
.force_reset_modeset_test = false,
.error_capture = true,
.disable_display = false,
.verbose_state_checks = true,
.nuclear_pageflip = false,
.enable_dp_mst = false,
.enable_dpcd_backlight = false,
.enable_gvt = false
};

View File

@ -53,7 +53,10 @@ class Framebuffer::Driver
Genode::Signal_handler<Driver> _poll_handler;
unsigned long _poll_ms = 0;
drm_display_mode * _preferred_mode(drm_connector *connector);
Genode::Signal_context_capability _config_sigh;
drm_display_mode * _preferred_mode(drm_connector *connector,
unsigned &brightness);
void _poll();
@ -74,6 +77,29 @@ class Framebuffer::Driver
void set_polling(unsigned long poll);
void update_mode();
void generate_report();
/**
* Register signal handler used for config updates
*
* The signal handler is artificially triggered as a side effect
* of connector changes.
*/
void config_sigh(Genode::Signal_context_capability sigh)
{
_config_sigh = sigh;
}
void trigger_reconfiguration()
{
/*
* Trigger the reprocessing of the configuration following the
* same ontrol flow as used for external config changes.
*/
if (_config_sigh.valid())
Genode::Signal_transmitter(_config_sigh).submit();
else
Genode::warning("config signal handler unexpectedly undefined");
}
};

File diff suppressed because it is too large Load Diff

View File

@ -54,6 +54,8 @@ void lx_c_set_mode(struct drm_device *, struct drm_connector *,
struct drm_framebuffer *, struct drm_display_mode *);
void lx_c_set_driver(struct drm_device *, void *);
void * lx_c_get_driver(struct drm_device *);
void lx_c_set_brightness(struct drm_connector *, unsigned, unsigned);
unsigned lx_c_get_brightness(struct drm_connector * const, unsigned);
#include <lx_emul/extern_c_end.h>

File diff suppressed because it is too large Load Diff

View File

@ -17,23 +17,14 @@
#include <../drivers/gpu/drm/i915/intel_drv.h>
#include <drm/drm_atomic_helper.h>
extern struct drm_framebuffer *
lx_c_intel_framebuffer_create(struct drm_device *dev,
struct drm_mode_fb_cmd2 *mode_cmd,
struct drm_i915_gem_object *obj);
int intel_sanitize_enable_execlists(struct drm_device *dev,
int enable_execlists)
{
if (INTEL_INFO(dev)->gen >= 9)
return 1;
return 0;
}
void lx_c_allocate_framebuffer(struct drm_device * dev,
struct lx_c_fb_config *c)
struct lx_c_fb_config *c)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_mode_fb_cmd2 * r;
@ -44,10 +35,12 @@ void lx_c_allocate_framebuffer(struct drm_device * dev,
/* for linear buffers the pitch needs to be 64 byte aligned */
c->pitch = roundup(c->width * c->bpp, 64);
c->size = roundup(c->pitch * c->height, PAGE_SIZE);
if (c->size * 2 < dev_priv->gtt.stolen_usable_size)
obj = i915_gem_object_create_stolen(dev, c->size);
obj = i915_gem_object_create_stolen(dev_priv, c->size);
if (obj == NULL)
obj = i915_gem_alloc_object(dev, c->size);
obj = i915_gem_object_create(dev_priv, c->size);
if (obj == NULL) goto out2;
r = (struct drm_mode_fb_cmd2*) kzalloc(sizeof(struct drm_mode_fb_cmd2), 0);
@ -56,37 +49,41 @@ void lx_c_allocate_framebuffer(struct drm_device * dev,
r->height = c->height;
r->pixel_format = DRM_FORMAT_RGB565;
r->pitches[0] = c->pitch;
c->lx_fb = lx_c_intel_framebuffer_create(dev, r, obj);
c->lx_fb = intel_framebuffer_create(obj, r);
if (IS_ERR(c->lx_fb)) goto err2;
if (intel_pin_and_fence_fb_obj(NULL, c->lx_fb, NULL, NULL, NULL))
/* XXX rotation info missing */
struct i915_vma * vma = intel_pin_and_fence_fb_obj(c->lx_fb, DRM_MODE_ROTATE_0);
if (IS_ERR(vma))
goto err1;
c->addr = ioremap_wc(dev_priv->gtt.mappable_base
+ i915_gem_obj_ggtt_offset(obj), c->size);
c->addr = ioremap_wc(dev_priv->ggtt.gmadr.start + i915_ggtt_offset(vma),
c->size);
memset_io(c->addr, 0, c->size);
/* intel_framebuffer_create inc ref, so dec since obj ptr is dropped now */
i915_gem_object_put(obj);
goto out1;
err1:
DRM_ERROR("could not allocate framebuffer %ld", (long)vma);
drm_framebuffer_remove(c->lx_fb);
err2:
c->lx_fb = NULL;
drm_gem_object_unreference(&obj->base);
i915_gem_object_put(obj);
out1:
kfree(r);
out2:
mutex_unlock(&dev->struct_mutex);
}
void lx_c_set_mode(struct drm_device * dev, struct drm_connector * connector,
struct drm_framebuffer *fb, struct drm_display_mode *mode)
struct drm_framebuffer *fb, struct drm_display_mode *mode)
{
struct drm_crtc *crtc = NULL;
struct drm_encoder *encoder = connector->encoder;
if (!mode) return;
struct drm_crtc * crtc = NULL;
struct drm_encoder * encoder = connector->encoder;
if (!encoder) {
struct drm_encoder *enc;
@ -109,28 +106,36 @@ void lx_c_set_mode(struct drm_device * dev, struct drm_connector * connector,
}
if (!encoder) {
DRM_DEBUG("Found no encoder for the connector %s\n", connector->name);
lx_printf("Found no encoder for the connector %s\n", connector->name);
return;
}
unsigned used_crtc = 0;
crtc = encoder->crtc;
if (!crtc) {
unsigned i = 0;
struct drm_crtc *c;
list_for_each_entry(c, &dev->mode_config.crtc_list, head) {
if (!(encoder->possible_crtcs & (1 << i))) continue;
if (c->state->enable) continue;
if (c->state->enable) {
used_crtc ++;
continue;
}
crtc = c;
break;
}
}
if (!crtc) {
DRM_DEBUG("Found no crtc for the connector %s\n", connector->name);
if (mode)
lx_printf("Found no crtc for the connector %s used/max %u+1/%u\n",
connector->name, used_crtc, dev->mode_config.num_crtc);
return;
}
DRM_DEBUG("set mode %s for connector %s\n", mode->name, connector->name);
DRM_DEBUG("%s%s for connector %s\n", mode ? "set mode " : "no mode",
mode ? mode->name : "", connector->name);
struct drm_mode_set set;
set.crtc = crtc;
@ -138,11 +143,15 @@ void lx_c_set_mode(struct drm_device * dev, struct drm_connector * connector,
set.y = 0;
set.mode = mode;
set.connectors = &connector;
set.num_connectors = 1;
set.fb = fb;
drm_atomic_helper_set_config(&set);
}
set.num_connectors = mode ? 1 : 0;
set.fb = mode ? fb : 0;
uint32_t const ref_cnt_before = drm_framebuffer_read_refcount(fb);
int ret = drm_atomic_helper_set_config(&set, dev->mode_config.acquire_ctx);
if (ret)
lx_printf("Error: set config failed ret=%d refcnt before=%u after=%u\n",
ret, ref_cnt_before, drm_framebuffer_read_refcount(fb));
}
void lx_c_set_driver(struct drm_device * dev, void * driver)
{
@ -157,3 +166,33 @@ void* lx_c_get_driver(struct drm_device * dev)
struct drm_i915_private *dev_priv = dev->dev_private;
return (void*) dev_priv->audio_component;
}
void lx_c_set_brightness(struct drm_connector * const connector,
unsigned const bn_set, unsigned const bn_max)
{
struct intel_connector * const c = to_intel_connector(connector);
intel_panel_set_backlight_acpi(c->base.state, bn_set, bn_max);
}
unsigned lx_c_get_brightness(struct drm_connector * const connector, unsigned error)
{
if (!connector)
return error;
struct intel_connector * const intel_c = to_intel_connector(connector);
if (!intel_c)
return error;
struct intel_panel *panel = &intel_c->panel;
if (!panel || !panel->backlight.device || !panel->backlight.device->ops ||
!panel->backlight.device->ops->get_brightness)
return error;
panel->backlight.device->connector = intel_c;
unsigned ret = panel->backlight.device->ops->get_brightness(panel->backlight.device);
panel->backlight.device->connector = NULL;
return ret;
}

View File

@ -33,8 +33,10 @@
#include <lx_kit/work.h>
/* Linux module functions */
extern "C" int postcore_i2c_init(); /* i2c-core.c */
extern "C" void postcore_i2c_init(void); /* i2c-core-base.c */
extern "C" int module_i915_init(); /* i915_drv.c */
extern "C" void radix_tree_init(); /* called by start_kernel(void) normally */
extern "C" void drm_connector_ida_init(); /* called by drm_core_init(void) normally */
static void run_linux(void * m);
@ -89,16 +91,25 @@ struct Main
struct Policy_agent
{
Main &main;
Genode::Signal_handler<Policy_agent> sd;
Genode::Signal_handler<Policy_agent> handler;
bool _pending = false;
void handle()
{
_pending = true;
main.linux_task().unblock();
Lx::scheduler().schedule();
}
bool pending()
{
bool ret = _pending;
_pending = false;
return ret;
}
Policy_agent(Main &m)
: main(m), sd(main.ep, *this, &Policy_agent::handle) {}
: main(m), handler(main.ep, *this, &Policy_agent::handle) {}
};
@ -106,17 +117,23 @@ static void run_linux(void * m)
{
Main * main = reinterpret_cast<Main*>(m);
system_wq = alloc_workqueue("system_wq", 0, 0);
radix_tree_init();
drm_connector_ida_init();
postcore_i2c_init();
module_i915_init();
main->root.session.driver().finish_initialization();
main->announce();
static Policy_agent pa(*main);
main->config.sigh(pa.sd);
Policy_agent pa(*main);
main->root.session.driver().config_sigh(pa.handler);
main->config.sigh(pa.handler);
while (1) {
Lx::scheduler().current()->block_and_schedule();
main->root.session.config_changed();
while (pa.pending())
main->root.session.config_changed();
}
}

View File

@ -22,3 +22,4 @@ vpath %.cc $(PRG_DIR)
vpath %.cc $(REP_DIR)/src/lx_kit
CC_CXX_WARN_STRICT =
CC_OPT += -Wno-narrowing

View File

@ -26,12 +26,15 @@ extern unsigned long jiffies;
enum {
JIFFIES_TICK_MS = 1000/HZ,
JIFFIES_TICK_US = 1000*1000/HZ,
JIFFIES_TICK_NS = 1000ULL*1000*1000/HZ,
};
static inline unsigned long msecs_to_jiffies(const unsigned int m) { return m / JIFFIES_TICK_MS; }
static inline unsigned int jiffies_to_msecs(const unsigned long j) { return j * JIFFIES_TICK_MS; }
static inline unsigned long usecs_to_jiffies(const unsigned int u) { return u / JIFFIES_TICK_US; }
static inline unsigned int jiffies_to_msecs(const unsigned long j) { return j * JIFFIES_TICK_MS; }
static inline u64 jiffies_to_nsecs(const unsigned long j) { return (u64)j * JIFFIES_TICK_NS; }
clock_t jiffies_to_clock_t(unsigned long x);
static inline clock_t jiffies_delta_to_clock_t(long delta)
{

View File

@ -20,6 +20,7 @@
#include <base/attached_rom_dataspace.h>
#include <util/xml_generator.h>
#include <util/xml_node.h>
#include <timer_session/connection.h>
using namespace Genode;
@ -31,19 +32,32 @@ struct Framebuffer_controller
Heap heap;
Allocator_avl fs_alloc;
File_system::Connection fs;
Timer::Connection timer;
Signal_handler<Framebuffer_controller> timer_handler;
void update_connector_config(Xml_generator & xml, Xml_node & node);
void update_fb_config(Xml_node & report);
void report_changed();
void handle_timer();
Framebuffer_controller(Env &env)
: rom(env, "connectors"),
rom_sigh(env.ep(), *this, &Framebuffer_controller::report_changed),
heap(env.ram(), env.rm()),
fs_alloc(&heap),
fs(env, fs_alloc, "", "/", true, 128*1024)
fs(env, fs_alloc, "", "/", true, 128*1024),
timer(env),
timer_handler(env.ep(), *this, &Framebuffer_controller::handle_timer)
{
Attached_rom_dataspace config(env, "config");
unsigned long const period_ms = config.xml().attribute_value("artifical_update_ms", 0UL);
rom.sigh(rom_sigh);
if (period_ms) {
timer.sigh(timer_handler);
timer.trigger_periodic(period_ms * 1000 /* in us */);
}
}
};
@ -59,20 +73,25 @@ void Framebuffer_controller::update_connector_config(Xml_generator & xml,
bool connected = node.attribute_value("connected", false);
xml.attribute("enabled", connected ? "true" : "false");
unsigned long width = 0, height = 0;
unsigned long width = 0, height = 0, hz = 0;
node.for_each_sub_node("mode", [&] (Xml_node &mode) {
unsigned long w, h;
unsigned long w, h, z;
w = mode.attribute_value<unsigned long>("width", 0);
h = mode.attribute_value<unsigned long>("height", 0);
if (w > width) {
z = mode.attribute_value<unsigned long>("hz", 0);
if (w >= width) {
width = w;
height = h;
if (z > hz)
hz = z;
}
});
if (width && height) {
xml.attribute("width", width);
xml.attribute("height", height);
xml.attribute("hz", hz);
xml.attribute("brightness", 73);
}
});
}
@ -84,6 +103,7 @@ void Framebuffer_controller::update_fb_config(Xml_node & report)
static char buf[4096];
Xml_generator xml(buf, sizeof(buf), "config", [&] {
// xml.attribute("poll", "5000");
xml.node("report", [&] {
xml.attribute("connectors", "yes");
});
@ -115,6 +135,17 @@ void Framebuffer_controller::report_changed()
}
void Framebuffer_controller::handle_timer()
{
if (!rom.is_valid())
return;
/* artificial update */
Xml_node report(rom.local_addr<char>(), rom.size());
update_fb_config(report);
}
void Component::construct(Genode::Env &env)
{
log("--- Framebuffer controller ---\n");

View File

@ -111,7 +111,7 @@
<policy label_prefix="dynamic -> ahci_drv"> <pci class="AHCI"/> </policy>
<policy label_prefix="dynamic -> nvme_drv"> <pci class="NVME"/> </policy>
<policy label_prefix="usb_drv"> <pci class="USB"/> </policy>
<policy label_prefix="dynamic -> intel_fb_drv" irq_mode="nomsi">
<policy label_prefix="dynamic -> intel_fb_drv">
<pci class="VGA"/>
<pci bus="0" device="0" function="0"/>
<pci class="ISABRIDGE"/>