diff --git a/repos/dde_linux/intel_fb.list b/repos/dde_linux/intel_fb.list deleted file mode 100644 index ce829d10a2..0000000000 --- a/repos/dde_linux/intel_fb.list +++ /dev/null @@ -1,271 +0,0 @@ -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/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_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_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.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_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.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 -linux-x.x.x/include/asm-generic/bitops/__fls.h -linux-x.x.x/include/asm-generic/bitops/ffs.h -linux-x.x.x/include/asm-generic/bitops/fls.h -linux-x.x.x/include/asm-generic/bitops/fls64.h -linux-x.x.x/include/asm-generic/bitops/non-atomic.h -linux-x.x.x/include/asm-generic/getorder.h -linux-x.x.x/include/asm-generic/ioctl.h -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 -linux-x.x.x/include/uapi/drm/drm_mode.h -linux-x.x.x/include/uapi/drm/i915_drm.h -linux-x.x.x/include/uapi/linux/byteorder/little_endian.h -linux-x.x.x/include/uapi/linux/fb.h -linux-x.x.x/include/uapi/linux/i2c.h -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 diff --git a/repos/dde_linux/lib/import/import-intel_fb_include.mk b/repos/dde_linux/lib/import/import-intel_fb_include.mk deleted file mode 100644 index 049c92dad2..0000000000 --- a/repos/dde_linux/lib/import/import-intel_fb_include.mk +++ /dev/null @@ -1,28 +0,0 @@ -LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/framebuffer/intel -SRC_DIR := $(REP_DIR)/src/drivers/framebuffer/intel - -# architecture-dependent includes -ifeq ($(filter-out $(SPECS),x86),) - ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86 \ - $(LX_CONTRIB_DIR)/arch/x86/include - ifeq ($(filter-out $(SPECS),32bit),) - ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86_32 - endif # 32bit - ifeq ($(filter-out $(SPECS),64bit),) - ARCH_SRC_INC_DIR += $(REP_DIR)/src/include/spec/x86_64 - endif # 64bit -endif # x86 - -INC_DIR += $(SRC_DIR)/include \ - $(REP_DIR)/src/include \ - $(ARCH_SRC_INC_DIR) \ - $(LX_CONTRIB_DIR)/drivers/gpu/drm \ - $(LX_CONTRIB_DIR)/drivers/gpu/include/drm \ - $(LX_CONTRIB_DIR)/drivers/gpu/include \ - $(LX_CONTRIB_DIR)/include \ - $(LX_CONTRIB_DIR)/include/uapi \ - $(LIB_CACHE_DIR)/intel_fb_include/include/include/include - -CC_OPT += -U__linux__ -D__KERNEL__ -CC_OPT += -DCONFIG_DRM_I915_KMS -DCONFIG_I2C -DCONFIG_I2C_BOARDINFO -CC_OPT += -DCONFIG_ACPI diff --git a/repos/dde_linux/lib/mk/spec/x86/intel_fb_drv.mk b/repos/dde_linux/lib/mk/spec/x86/intel_fb_drv.mk deleted file mode 100644 index 1de9388ce6..0000000000 --- a/repos/dde_linux/lib/mk/spec/x86/intel_fb_drv.mk +++ /dev/null @@ -1,43 +0,0 @@ -LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/framebuffer/intel -SRC_DIR := $(REP_DIR)/src/drivers/framebuffer/intel - -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)) -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 -# -CC_C_OPT += -std=gnu89 - -# -# Reduce build noise of compiling contrib code -# -CC_WARN = -Wall -Wno-uninitialized -Wno-unused-but-set-variable \ - -Wno-unused-variable -Wno-unused-function \ - -Wno-pointer-arith -Wno-pointer-sign \ - -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 -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 = diff --git a/repos/dde_linux/lib/mk/spec/x86/intel_fb_include.mk b/repos/dde_linux/lib/mk/spec/x86/intel_fb_include.mk deleted file mode 100644 index 101cd25fbf..0000000000 --- a/repos/dde_linux/lib/mk/spec/x86/intel_fb_include.mk +++ /dev/null @@ -1,37 +0,0 @@ -# -# Pseudo library to generate a symlink for each header file included by the -# contrib code. Each symlink points to the same 'lx_emul.h' file, which -# provides our emulation of the Linux kernel API. -# - -ifeq ($(called_from_lib_mk),yes) - -LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/framebuffer/intel -LX_EMUL_H := $(REP_DIR)/src/drivers/framebuffer/intel/include/lx_emul.h - -# -# Determine the header files included by the contrib code. For each -# of these header files we create a symlink to 'lx_emul.h'. -# -SCAN_DIRS := $(addprefix $(LX_CONTRIB_DIR)/include/, drm uapi asm-generic video linux) \ - $(addprefix $(LX_CONTRIB_DIR)/, drivers lib arch/x86) -GEN_INCLUDES := $(shell grep -rIh "^\#include .*" $(SCAN_DIRS) |\ - sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\ - sort | uniq) - -# -# Put Linux headers in 'GEN_INC' dir, since some include use "../../" paths use -# three level include hierarchy -# -GEN_INC := $(shell pwd)/include/include/include -GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES)) - -all: $(GEN_INCLUDES) - -$(GEN_INCLUDES): - $(VERBOSE)mkdir -p $(dir $@) - $(VERBOSE)ln -sf $(LX_EMUL_H) $@ - -endif - -CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/patches/intel_fb_aperture_de_irq.patch b/repos/dde_linux/patches/intel_fb_aperture_de_irq.patch deleted file mode 100644 index 26892683d3..0000000000 --- a/repos/dde_linux/patches/intel_fb_aperture_de_irq.patch +++ /dev/null @@ -1,26 +0,0 @@ -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); diff --git a/repos/dde_linux/patches/intel_fb_backlight.patch b/repos/dde_linux/patches/intel_fb_backlight.patch deleted file mode 100644 index 4960e7469b..0000000000 --- a/repos/dde_linux/patches/intel_fb_backlight.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/drivers/gpu/drm/i915/intel_panel.c -+++ a/drivers/gpu/drm/i915/intel_panel.c -@@ -1715,6 +1715,7 @@ - - panel->backlight.present = true; - -+ 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", diff --git a/repos/dde_linux/patches/intel_fb_drm.patch b/repos/dde_linux/patches/intel_fb_drm.patch deleted file mode 100644 index 6d53e5a0b9..0000000000 --- a/repos/dde_linux/patches/intel_fb_drm.patch +++ /dev/null @@ -1,244 +0,0 @@ ---- 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 -+#include - - #include - #include ---- 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 - #include - #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 - - #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 - ---- 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 -+ - 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) diff --git a/repos/dde_linux/patches/intel_fb_early.patch b/repos/dde_linux/patches/intel_fb_early.patch deleted file mode 100644 index 92aee52314..0000000000 --- a/repos/dde_linux/patches/intel_fb_early.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/arch/x86/kernel/early-quirks.c -+++ b/arch/x86/kernel/early-quirks.c -@@ -28,6 +28,11 @@ - #include - #include - -+#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*/ diff --git a/repos/dde_linux/patches/intel_fb_hotplug.patch b/repos/dde_linux/patches/intel_fb_hotplug.patch deleted file mode 100644 index ee0e391a84..0000000000 --- a/repos/dde_linux/patches/intel_fb_hotplug.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- 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; diff --git a/repos/dde_linux/ports/dde_linux.hash b/repos/dde_linux/ports/dde_linux.hash index 2cbe0132f7..1551b47f15 100644 --- a/repos/dde_linux/ports/dde_linux.hash +++ b/repos/dde_linux/ports/dde_linux.hash @@ -1 +1 @@ -9cb34790ab695fee44e6d559d7a0d8f919e22f6e +447158aa8aa24d4e2925a0479d8710a2d7d738e9 diff --git a/repos/dde_linux/ports/dde_linux.port b/repos/dde_linux/ports/dde_linux.port index 9980eead45..31219db3b9 100644 --- a/repos/dde_linux/ports/dde_linux.port +++ b/repos/dde_linux/ports/dde_linux.port @@ -1,6 +1,6 @@ LICENSE := GPLv2 VERSION := 2 -DOWNLOADS := intel_fb.archive lxip.archive \ +DOWNLOADS := lxip.archive \ fec.archive \ usb_host.archive dwc_otg_host.git usb_hid.archive \ usb_modem.archive usb_net.archive @@ -64,17 +64,6 @@ REV(dwc_otg_host) := r5 DIR(dwc_otg_host) := $(SRC_DIR_USB_HOST)/drivers/usb/host -# -# Intel framebuffer driver -# -SRC_DIR_INTEL_FB := src/drivers/framebuffer/intel -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) := 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 - # # IP stack sources # @@ -101,11 +90,9 @@ HASH_INPUT += $(REP_DIR)/fec.list # Patches # PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/lxip*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/intel*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_host*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_modem*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/intel*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/fec_*.patch))) PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_hid*.patch))) @@ -143,14 +130,6 @@ PATCH_OPT(patches/usb_net_skbuff_cast.patch) := $(USB_NET_OPT) USB_MODEM_OPT = -p1 -d$(SRC_DIR_USB_MODEM) PATCH_OPT(patches/usb_modem_skbuff_cast.patch) := $(USB_MODEM_OPT) -# 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) -PATCH_OPT(patches/intel_fb_aperture_de_irq.patch):= -p1 -d$(SRC_DIR_INTEL_FB) - # Freescale NIC PATCH_OPT(patches/fec_skbuff_cast.patch) := -p1 -d$(SRC_DIR_FEC) PATCH_OPT(patches/fec_tx_bounce_dma.patch) := -p1 -d$(SRC_DIR_FEC) diff --git a/repos/dde_linux/recipes/src/legacy_intel_fb_drv/content.mk b/repos/dde_linux/recipes/src/legacy_intel_fb_drv/content.mk deleted file mode 100644 index 8b26cf799a..0000000000 --- a/repos/dde_linux/recipes/src/legacy_intel_fb_drv/content.mk +++ /dev/null @@ -1,29 +0,0 @@ -LIB_MK := lib/mk/spec/x86/intel_fb_drv.mk \ - lib/mk/spec/x86/intel_fb_include.mk \ - $(foreach SPEC,x86_32 x86_64,lib/mk/spec/$(SPEC)/lx_kit_setjmp.mk) - -PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux) - -MIRROR_FROM_REP_DIR := $(LIB_MK) \ - lib/import/import-intel_fb_include.mk \ - src/include src/lib/legacy/lx_kit \ - src/lib/lx_kit/spec \ - $(foreach SPEC,x86 x86_32 x86_64,src/include/spec/$(SPEC)) \ - $(shell cd $(REP_DIR); find src/drivers/framebuffer/intel -type f) - -MIRROR_FROM_PORT_DIR := $(shell cd $(PORT_DIR); find src/drivers/framebuffer/intel -type f | grep -v ".git") -MIRROR_FROM_PORT_DIR := $(filter-out $(MIRROR_FROM_REP_DIR),$(MIRROR_FROM_PORT_DIR)) - -content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_PORT_DIR) - -$(MIRROR_FROM_REP_DIR): - $(mirror_from_rep_dir) - -$(MIRROR_FROM_PORT_DIR): - mkdir -p $(dir $@) - cp $(PORT_DIR)/$@ $@ - -content: LICENSE -LICENSE: - ( echo "GNU General Public License version 2, see:"; \ - echo "https://www.kernel.org/pub/linux/kernel/COPYING" ) > $@ diff --git a/repos/dde_linux/recipes/src/legacy_intel_fb_drv/hash b/repos/dde_linux/recipes/src/legacy_intel_fb_drv/hash deleted file mode 100644 index d9ed9badc3..0000000000 --- a/repos/dde_linux/recipes/src/legacy_intel_fb_drv/hash +++ /dev/null @@ -1 +0,0 @@ -2022-04-27 e2dae7c47cf8faa31b490c2c9663520988fbac1e diff --git a/repos/dde_linux/recipes/src/legacy_intel_fb_drv/used_apis b/repos/dde_linux/recipes/src/legacy_intel_fb_drv/used_apis deleted file mode 100644 index b8846965eb..0000000000 --- a/repos/dde_linux/recipes/src/legacy_intel_fb_drv/used_apis +++ /dev/null @@ -1,7 +0,0 @@ -base -os -platform_session -timer_session -report_session -capture_session -blit diff --git a/repos/dde_linux/src/drivers/framebuffer/intel/README b/repos/dde_linux/src/drivers/framebuffer/intel/README deleted file mode 100644 index 92e758ea78..0000000000 --- a/repos/dde_linux/src/drivers/framebuffer/intel/README +++ /dev/null @@ -1,61 +0,0 @@ -This driver is for Intel i915 compatible graphic cards. - -Default behaviour -~~~~~~~~~~~~~~~~~ -When no configuration is provided to the driver, it will switch on all devices -the graphic card is initially connected to. It will use the best resolution as -provided by the BIOS or EDID information from the display devices for each -connector. The virtual resolution delivered to the client is the maximum in -width and height of the different connectors. The framebuffer memory is -directly exported to the client of the driver. When newly connected devices are -detected by the hardware, the new connectors are enabled, probed, and again the -'best' resolution will be chosen for the device. Nevertheless, it won't have an -effect on the virtual resolution. - -Configuration -~~~~~~~~~~~~~ -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: - -! -! -! - -When the configuration changes during run-time, the driver will adapt to it. In -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: - -! - -If you define a period of zero, the driver won't poll at all, which is the -default value. - -To present all available connectors and their possible resolutions to the user -the driver is able to export a corresponding report ROM. This has to be -configured too, like in the following: - -! -! -! - -The exported report has the following format: - -! -! -! -! ... -! -! -! -! - -The brightness attribute is soley reported if the hardware supports it. - diff --git a/repos/dde_linux/src/drivers/framebuffer/intel/dummies.c b/repos/dde_linux/src/drivers/framebuffer/intel/dummies.c deleted file mode 100644 index 87e3c81a4e..0000000000 --- a/repos/dde_linux/src/drivers/framebuffer/intel/dummies.c +++ /dev/null @@ -1,1806 +0,0 @@ -#include -#include -#include -#include -#include -#include - - -bool access_ok(int access, void *addr, size_t size) -{ - TRACE_AND_STOP; - return -1; -} - -int acpi_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *ev) -{ - TRACE_AND_STOP; - return -1; -} - -bool acpi_driver_match_device(struct device *dev, const struct device_driver *drv) -{ - TRACE_AND_STOP; - return -1; -} - -int acpi_lid_notifier_unregister(struct notifier_block *nb) -{ - TRACE_AND_STOP; - return -1; -} - -int acpi_lid_open(void) -{ - TRACE_AND_STOP; - return -1; -} - -void acpi_video_unregister(void) -{ - TRACE_AND_STOP; -} - -int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) -{ - TRACE_AND_STOP; - return -1; -} - -bool capable(int cap) -{ - TRACE_AND_STOP; - return false; -} - -size_t copy_from_user(void *to, void const *from, size_t len) -{ - TRACE_AND_STOP; - return -1; -} - -size_t copy_to_user(void *dst, void const *src, size_t len) -{ - TRACE_AND_STOP; - return -1; -} - -void cpufreq_cpu_put(struct cpufreq_policy *policy) -{ - TRACE_AND_STOP; -} - -void destroy_workqueue(struct workqueue_struct *wq) -{ - TRACE_AND_STOP; -} - -void *dev_get_drvdata(const struct device *dev) -{ - TRACE_AND_STOP; - return NULL; -} - -int device_init_wakeup(struct device *dev, bool val) -{ - TRACE_AND_STOP; - return -1; -} - -const char *dev_name(const struct device *dev) -{ - TRACE_AND_STOP; - return NULL; -} - -int dma_set_coherent_mask(struct device *dev, u64 mask) -{ - TRACE_AND_STOP; - return -1; -} - -void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, enum dma_data_direction direction) -{ - printk("%s %llx+%x\n", __func__, dma_address, size); - TRACE; //_AND_STOP; -} - -void down_read(struct rw_semaphore *sem) -{ - TRACE_AND_STOP; -} - -int drm_gem_prime_fd_to_handle(struct drm_device *dev, struct drm_file *file_priv, int prime_fd, uint32_t *handle) -{ - TRACE_AND_STOP; - return -1; -} - -int drm_gem_prime_handle_to_fd(struct drm_device *dev, struct drm_file *file_priv, uint32_t handle, uint32_t flags, int *prime_fd) -{ - TRACE_AND_STOP; - return -1; -} - -long drm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - TRACE_AND_STOP; - return -1; -} - -int drm_noop(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - TRACE_AND_STOP; - return -1; -} - -int drm_open(struct inode *inode, struct file *filp) -{ - TRACE_AND_STOP; - return -1; -} - -struct drm_dma_handle *drm_pci_alloc(struct drm_device *dev, size_t size, size_t align) -{ - TRACE_AND_STOP; - return NULL; -} - -void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah) -{ - TRACE_AND_STOP; -} - -unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait) -{ - TRACE_AND_STOP; - return -1; -} - -void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg) -{ - TRACE_AND_STOP; -} - -ssize_t drm_read(struct file *filp, char __user *buffer, size_t count, loff_t *offset) -{ - TRACE_AND_STOP; - return -1; -} - -int drm_release(struct inode *inode, struct file *filp) -{ - TRACE_AND_STOP; - return -1; -} - -struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr) -{ - TRACE_AND_STOP; - return NULL; -} - -void flush_scheduled_work(void) -{ - TRACE_AND_STOP; -} - -void __free_pages(struct page *page, unsigned int order) -{ - if (!page) - TRACE_AND_STOP; - - printk("%s %llx(%llx) order=%x\n", __func__, page->addr, page->paddr, order); -} - -void ips_link_to_i915_driver(void) -{ - TRACE; -} - -int i915_cmd_parser_get_version(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; - return -1; -} - -int __must_check i915_gem_evict_something(struct i915_address_space *vm, - u64 min_size, u64 alignment, - unsigned cache_level, - u64 start, u64 end, - unsigned flags) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_gem_execbuffer(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_gem_execbuffer2(struct drm_device *dev, void *data, struct drm_file *file_priv) -{ - TRACE_AND_STOP; - return -1; -} - -struct dma_buf *i915_gem_prime_export(struct drm_device *dev, struct drm_gem_object *gem_obj, int flags) -{ - TRACE_AND_STOP; - return NULL; -} - -struct drm_gem_object *i915_gem_prime_import(struct drm_device *dev, struct dma_buf *dma_buf) -{ - TRACE_AND_STOP; - return NULL; -} - -unsigned long i915_gem_shrink(struct drm_i915_private *dev_priv, - unsigned long target, unsigned long *nr_scanned, - unsigned flags) -{ - TRACE_AND_STOP; - return -1; -} - -unsigned long i915_gem_shrink_all(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_gem_userptr_ioctl(struct drm_device *dev, void *data, struct drm_file *file) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_restore_state(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_save_state(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; - return -1; -} - -void i915_teardown_sysfs(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void intel_csr_load_program(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - -void intel_csr_ucode_fini(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - -void intel_dvo_init(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - -int intel_guc_enable_ct(struct intel_guc *guc) -{ - TRACE_AND_STOP; - return 0; -} - -void intel_guc_disable_ct(struct intel_guc *guc) -{ - TRACE_AND_STOP; -} - -void i915_guc_log_register(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void i915_guc_log_unregister(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void intel_tv_init(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - -int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, char *envp[]) -{ - TRACE_AND_STOP; - return -1; -} - -void memcpy_toio(volatile void __iomem *dst, const void *src, size_t count) -{ - TRACE_AND_STOP; -} - -void ndelay(unsigned long ns) -{ - TRACE_AND_STOP; -} - -bool need_resched(void) -{ - TRACE; - return false; -} - -loff_t noop_llseek(struct file *file, loff_t offset, int whence) -{ - TRACE_AND_STOP; - return -1; -} - -u64 nsecs_to_jiffies64(u64 n) -{ - TRACE_AND_STOP; - return -1; -} - -u64 nsecs_to_jiffies(u64 n) -{ - TRACE_AND_STOP; - return -1; -} - -int of_alias_get_id(struct device_node *np, const char *stem) -{ - TRACE; - return -ENOSYS; -} - -int of_driver_match_device(struct device *dev, const struct device_driver *drv) -{ - TRACE_AND_STOP; - return -1; -} - -int of_irq_get(struct device_node *dev, int index) -{ - TRACE_AND_STOP; - return -1; -} - -int of_irq_get_byname(struct device_node *dev, const char *name) -{ - TRACE_AND_STOP; - return -1; -} - -void of_node_clear_flag(struct device_node *n, unsigned long flag) -{ - TRACE_AND_STOP; -} - -resource_size_t pcibios_align_resource(void * p, const struct resource *r, resource_size_t s1, resource_size_t s2) -{ - TRACE_AND_STOP; - return -1; -} - -void pci_disable_device(struct pci_dev *dev) -{ - TRACE_AND_STOP; -} - -void pci_disable_msi(struct pci_dev *dev) -{ - TRACE_AND_STOP; -} - -int pci_enable_device(struct pci_dev *dev) -{ - TRACE; - return 0; -} - -struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from) -{ - TRACE_AND_STOP; - return NULL; -} - -void *pci_get_drvdata(struct pci_dev *pdev) -{ - TRACE_AND_STOP; - return NULL; -} - -void pci_iounmap(struct pci_dev *dev, void __iomem *p) -{ - TRACE_AND_STOP; -} - -int pci_save_state(struct pci_dev *dev) -{ - TRACE_AND_STOP; - return -1; -} - -int pci_set_power_state(struct pci_dev *dev, pci_power_t state) -{ - TRACE_AND_STOP; - return -1; -} - -void pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address, size_t size, int direction) -{ - TRACE_AND_STOP; -} - -pgprot_t pgprot_writecombine(pgprot_t prot) -{ - TRACE_AND_STOP; - return prot; -} - -void pm_qos_remove_request(struct pm_qos_request *req) -{ - TRACE_AND_STOP; -} - -void print_hex_dump(const char *level, const char *prefix_str, int prefix_type, int rowsize, int groupsize, const void *buf, size_t len, bool ascii) -{ - TRACE_AND_STOP; -} - -int PTR_ERR_OR_ZERO(__force const void *ptr) -{ - TRACE_AND_STOP; - return -1; -} - -void put_pid(struct pid *pid) -{ - TRACE; -} - -int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) -{ - TRACE_AND_STOP; - return -1; -} - -void pwm_disable(struct pwm_device *pwm) -{ - TRACE_AND_STOP; -} - -int pwm_enable(struct pwm_device *pwm) -{ - TRACE_AND_STOP; - return -1; -} - -struct pwm_device *pwm_get(struct device *dev, const char *con_id) -{ - TRACE_AND_STOP; - return NULL; -} - -unsigned int pwm_get_duty_cycle(const struct pwm_device *pwm) -{ - TRACE_AND_STOP; - return -1; -} - -void pwm_put(struct pwm_device *pwm) -{ - TRACE_AND_STOP; -} - -int register_reboot_notifier(struct notifier_block *nb) -{ - TRACE_AND_STOP; - return -1; -} - -int release_resource(struct resource *r) -{ - TRACE_AND_STOP; - return -1; -} - -int request_resource(struct resource *root, struct resource *r) -{ - TRACE_AND_STOP; - return -1; -} - -void seq_printf(struct seq_file *m, const char *fmt, ...) -{ - TRACE_AND_STOP; -} - -void seq_puts(struct seq_file *m, const char *s) -{ - TRACE_AND_STOP; -} - -int set_page_dirty(struct page *page) -{ - TRACE; - return -1; -} - -int set_pages_wb(struct page *page, int numpages) -{ - TRACE_AND_STOP; - return -1; -} - -struct page *shmem_read_mapping_page( struct address_space *mapping, pgoff_t index) -{ - TRACE_AND_STOP; - return NULL; -} - -void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end) -{ - TRACE_AND_STOP; -} - -int signal_pending(struct task_struct *p) -{ - TRACE_AND_STOP; - return -1; -} - -int signal_pending_state(long state, struct task_struct *p) -{ - TRACE_AND_STOP; - return -1; -} - -int strcmp(const char *s1, const char *s2) -{ - TRACE_AND_STOP; - return -1; -} - -void sysfs_remove_link(struct kobject *kobj, const char *name) -{ - TRACE_AND_STOP; -} - -int unregister_reboot_notifier(struct notifier_block *nb) -{ - TRACE_AND_STOP; - return -1; -} - -void up_read(struct rw_semaphore *sem) -{ - TRACE_AND_STOP; -} - -phys_addr_t virt_to_phys(volatile void *address) -{ - TRACE_AND_STOP; - return -1; -} - -pgprot_t vm_get_page_prot(unsigned long vm_flags) -{ - pgprot_t prot; - TRACE_AND_STOP; - return prot; -} - -unsigned long vm_mmap(struct file *f, unsigned long l1, unsigned long l2, unsigned long l3, unsigned long l4, unsigned long l5) -{ - TRACE_AND_STOP; - return -1; -} - -int wake_up_process(struct task_struct *tsk) -{ - TRACE_AND_STOP; - return -1; -} - -void yield(void) -{ - TRACE; -} - -void bus_unregister(struct bus_type *bus) -{ - TRACE_AND_STOP; -} - -void kvfree(const void *addr) -{ - TRACE_AND_STOP; -} - -int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) -{ - TRACE_AND_STOP; - return -1; -} - -void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) -{ - TRACE_AND_STOP; -} - -void ww_mutex_lock_slow(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) -{ - TRACE_AND_STOP; -} - -int ww_mutex_lock_slow_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) -{ - TRACE_AND_STOP; - return -1; -} - -int ww_mutex_trylock(struct ww_mutex *lock) -{ - TRACE_AND_STOP; - return -1; -} - -void free_irq(unsigned int irq, void *dev_id) -{ - TRACE_AND_STOP; -} - -void backlight_device_unregister(struct backlight_device *bd) -{ - TRACE_AND_STOP; -} - -int ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) -{ - TRACE_AND_STOP; - return -1; -} - -void might_sleep(void) -{ - TRACE; -} - -void rcu_read_lock(void) -{ - TRACE; -} - -void rcu_read_unlock(void) -{ - TRACE; -} - -void might_lock(struct mutex *m) -{ - TRACE; -} - -void unmap_mapping_range(struct address_space *a, loff_t const b, - loff_t const c, int d) -{ - TRACE_AND_STOP; -} - -void intel_audio_init(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void intel_audio_deinit(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void write_lock(rwlock_t *l) -{ - TRACE; -} - -void write_unlock(rwlock_t *l) -{ - TRACE; -} - -void read_lock(rwlock_t *l) -{ - TRACE_AND_STOP; -} - -void read_unlock(rwlock_t *l) -{ - TRACE_AND_STOP; -} - -struct edid *drm_load_edid_firmware(struct drm_connector *connector) -{ - TRACE; - return NULL; -} - -ktime_t ktime_get_raw(void) -{ - TRACE_AND_STOP; - return 0; -} - -void write_seqlock(seqlock_t *l) -{ - TRACE; -} - -void write_sequnlock(seqlock_t *l) -{ - TRACE; -} - -void drm_dev_fini(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - - -unsigned read_seqbegin(const seqlock_t *s) -{ - TRACE; - return 0; -} - -unsigned read_seqretry(const seqlock_t *s, unsigned x) -{ - TRACE; - return 0; -} - -void *kvmalloc(size_t s, gfp_t g) -{ - TRACE_AND_STOP; -} - -void *kvmalloc_array(size_t a, size_t b, gfp_t g) -{ - TRACE_AND_STOP; -} - -int i915_perf_open_ioctl(struct drm_device *dev, void *data, - struct drm_file *file) -{ - TRACE_AND_STOP; - return 0; -} - -int i915_perf_add_config_ioctl(struct drm_device *dev, void *data, - struct drm_file *file) -{ - TRACE_AND_STOP; - return 0; -} - -int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data, - struct drm_file *file) -{ - TRACE_AND_STOP; - return 0; -} - -void i915_perf_init(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void i915_perf_fini(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void i915_perf_register(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void i915_perf_unregister(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void cond_resched(void) -{ - TRACE; -} - -struct page *kmap_to_page(void *p) -{ - TRACE_AND_STOP; - return 0; -} - -void vunmap(const void *a) -{ - TRACE_AND_STOP; -} - -void reservation_object_init(struct reservation_object *obj) -{ - TRACE; -} - -void reservation_object_fini(struct reservation_object *obj) -{ - TRACE; -} - -bool reservation_object_test_signaled_rcu(struct reservation_object *obj, - bool test_all) -{ - TRACE_AND_STOP; - return false; -} - -int reservation_object_lock(struct reservation_object *obj, - struct ww_acquire_ctx *ctx) -{ - TRACE; - return 0; -} - -void reservation_object_unlock(struct reservation_object *obj) -{ - TRACE; -} - -bool reservation_object_trylock(struct reservation_object *obj) -{ - TRACE_AND_STOP; - return false; -} - -void reservation_object_add_excl_fence(struct reservation_object *obj, - struct dma_fence *fence) -{ - TRACE_AND_STOP; -} - -struct dma_fence * reservation_object_get_excl_rcu(struct reservation_object *obj) -{ - TRACE; - return obj->fence_excl; -} - -int reservation_object_get_fences_rcu(struct reservation_object *obj, - struct dma_fence **pfence_excl, - unsigned *pshared_count, - struct dma_fence ***pshared) -{ - TRACE; - *pshared_count = 0; - *pfence_excl = NULL; - *pshared = NULL; - return 0; -} - -void set_current_state(int state) -{ - switch (state) { - case TASK_INTERRUPTIBLE: - printk("%s TASK_INTERRUPTIBLE\n", __func__); - break; - case TASK_RUNNING: - printk("%s TASK_RUNNING\n", __func__); - break; - default: - printk("%s unknown %d\n", __func__, state); - } -} - -void __set_current_state(int state) -{ - set_current_state(state); -} - -void tasklet_enable(struct tasklet_struct *t) -{ - TRACE_AND_STOP; -} - -void tasklet_disable(struct tasklet_struct *t) -{ - TRACE_AND_STOP; -} - -void tasklet_kill(struct tasklet_struct *t) -{ - TRACE_AND_STOP; -} - -void intel_dsi_init(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -int intel_dsi_dcs_init_backlight_funcs(struct intel_connector *intel_connector) -{ - TRACE_AND_STOP; - return 0; -} - -void rwlock_init(rwlock_t *rw) -{ - TRACE; -} - -unsigned long vma_pages(struct vm_area_struct *p) -{ - TRACE_AND_STOP; - return 0; -} - -void pwm_apply_args(struct pwm_device *p) -{ - TRACE_AND_STOP; -} - -void intel_guc_ct_init_early(struct intel_guc_ct *ct) -{ - TRACE; - - enum { CTB_OWNER_HOST = 0 }; - - ct->host_channel.owner = CTB_OWNER_HOST; -} - -void i915_gem_object_set_cache_coherency(struct drm_i915_gem_object *obj, - unsigned int cache_level) -{ - TRACE; -} - -int i915_gem_evict_for_node(struct i915_address_space *vm, - struct drm_mm_node *node, unsigned int flags) -{ - TRACE_AND_STOP; - return 0; -} - -void i915_gem_shrinker_cleanup(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void i915_gem_cleanup_userptr(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void intel_lpe_audio_irq_handler(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable) -{ - TRACE_AND_STOP; - return false; -} - -bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set) -{ - TRACE_AND_STOP; - return false; -} - -void intel_engine_init_cmd_parser(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; -} - - -bool intel_engines_are_idle(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; - return false; -} - -void intel_engines_park(struct drm_i915_private *i915) -{ - TRACE_AND_STOP; -} - -void intel_engine_init_global_seqno(struct intel_engine_cs *engine, u32 seqno) -{ - TRACE_AND_STOP; -} - -bool intel_engine_has_kernel_context(const struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; - return false; -} - -void intel_engine_cleanup_common(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; -} - -void intel_engines_unpark(struct drm_i915_private *i915) -{ - TRACE_AND_STOP; -} - -void intel_engines_reset_default_submission(struct drm_i915_private *i915) -{ - TRACE_AND_STOP; -} - -void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m, - const char *header, ...) -{ - TRACE_AND_STOP; -} - -bool intel_engine_is_idle(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; - return false; -} - -unsigned int intel_engines_has_context_isolation(struct drm_i915_private *i915) -{ - TRACE_AND_STOP; - return 0; -} - -int logical_render_ring_init(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; - return 0; -} - -int logical_xcs_ring_init(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; - return 0; -} - -void intel_logical_ring_cleanup(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; -} - -void intel_lr_context_resume(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -int intel_engines_init(struct drm_i915_private *dev_priv) -{ - TRACE; - return 0; -} - -int init_workarounds_ring(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; - return 0; -} - -int intel_ring_workarounds_emit(struct drm_i915_gem_request *req) -{ - TRACE_AND_STOP; - return 0; -} - -int intel_engine_init_common(struct intel_engine_cs *engine) -{ - TRACE; - return 0; -} - -int intel_engine_create_scratch(struct intel_engine_cs *engine, int size) -{ - TRACE_AND_STOP; - return 0; -} - -int is_vmalloc_addr(const void *x) -{ - TRACE_AND_STOP; - return 0; -} - -void drm_dev_printk(const struct device *dev, const char *level, - unsigned int category, const char *function_name, - const char *prefix, const char *format, ...) -{ - TRACE_AND_STOP; -} - -void drm_dev_unregister(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - -void drm_dev_put(struct drm_device *dev) -{ - TRACE_AND_STOP; -} - -void init_wait_entry(struct wait_queue_entry *wq_entry, int flags) -{ - TRACE; - wq_entry->flags = flags; - wq_entry->private = current; - wq_entry->func = autoremove_wake_function; - INIT_LIST_HEAD(&wq_entry->entry); -} - -void spin_lock_nested(spinlock_t *lock, int subclass) -{ - TRACE; -} - -struct pid *get_task_pid(struct task_struct *t, enum pid_type p) -{ - TRACE_AND_STOP; - return NULL; -} - -int set_pages_array_wb(struct page **p, int x) -{ - TRACE_AND_STOP; - return 0; -} - -void __pagevec_release(struct pagevec *pvec) -{ - TRACE; -} - -struct file *shmem_file_setup_with_mnt(struct vfsmount *mnt, const char *name, - loff_t size, unsigned long flags) -{ - TRACE_AND_STOP; - return NULL; -} - -int set_pages_array_wc(struct page **p, int c) -{ - TRACE_AND_STOP; - return 0; -} - -bool static_cpu_has(long c) -{ - TRACE; - - if (c == X86_FEATURE_CLFLUSH) - return true; - - TRACE_AND_STOP; - return false; -} - -void rcu_barrier(void) -{ - TRACE_AND_STOP; -} - -int i915_gemfs_init(struct drm_i915_private *i915) -{ - TRACE; - return 0; -} - -void i915_gemfs_fini(struct drm_i915_private *i915) -{ - TRACE_AND_STOP; -} - -pid_t pid_nr(struct pid *p) -{ - TRACE_AND_STOP; - return 0; -} - -unsigned int work_busy(struct work_struct *w) -{ - TRACE_AND_STOP; - return 0; -} - -void enable_irq(unsigned int irq) -{ - TRACE_AND_STOP; -} - -void disable_irq(unsigned int irq) -{ - TRACE_AND_STOP; -} - -unsigned raw_read_seqcount(const seqcount_t *s) -{ - TRACE_AND_STOP; - return 0; -} - -int remap_io_mapping(struct vm_area_struct *vma, unsigned long addr, - unsigned long pfn, unsigned long size, - struct io_mapping *iomap) -{ - TRACE_AND_STOP; - return 0; -} - -void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *)) -{ - TRACE; - - func(head); -} - -int read_seqcount_retry(const seqcount_t *s, unsigned x) -{ - TRACE_AND_STOP; - return 0; -} - -void synchronize_rcu(void) -{ - TRACE_AND_STOP; -} - -gfp_t mapping_gfp_mask(struct address_space * mapping) -{ - TRACE; - return __GFP_RECLAIM; -} - -int down_write_killable(struct rw_semaphore *s) -{ - TRACE_AND_STOP; - return 0; -} - -void atomic_andnot(int x, atomic_t *t) -{ - t->counter &= ~x; - TRACE; -} - -unsigned int get_random_int(void) -{ - TRACE_AND_STOP; - return 0; -} - -unsigned long get_random_long(void) -{ - TRACE_AND_STOP; - return 0; -} - -bool boot_cpu_has(long x) -{ - TRACE_AND_STOP; - return false; -} - -int pagecache_write_begin(struct file *f, struct address_space *a, loff_t o, - unsigned w, unsigned x, struct page **y, void **z) -{ - TRACE_AND_STOP; - return 0; -} - -int pagecache_write_end(struct file *f, struct address_space *a, loff_t o, - unsigned w, unsigned x, struct page *y, void *z) -{ - TRACE_AND_STOP; - return 0; -} - -int drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a, - const char *b, bool c) -{ - TRACE; - return 0; -} - -int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, - struct drm_connector *connector) -{ - TRACE_AND_STOP; - return 0; -} - -int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, - struct drm_connector *connector) -{ - TRACE_AND_STOP; - return 0; -} - -void drain_workqueue(struct workqueue_struct *w) -{ - TRACE_AND_STOP; -} - -unsigned __read_seqcount_begin(const seqcount_t *s) -{ - TRACE; - return 0; -} - -int __read_seqcount_retry(const seqcount_t *s, unsigned x) -{ - TRACE; - return 1; -} - -void intel_init_audio_hooks(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void intel_hangcheck_init(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void intel_csr_ucode_suspend(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void intel_csr_ucode_resume(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -struct page * nth_page(struct page * page, int n) -{ - TRACE_AND_STOP; -} - -unsigned int swiotlb_max_segment(void) -{ - TRACE; - return 0; -} - -void seqlock_init (seqlock_t *s) -{ - TRACE; -} - -struct irq_domain *irq_domain_create_linear(struct fwnode_handle *f, - unsigned int x, - const struct irq_domain_ops *y, - void *z) -{ - TRACE_AND_STOP; - return NULL; -} - -struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) -{ - TRACE; - return NULL; -} - -void irq_dispose_mapping(unsigned int virq) -{ - TRACE_AND_STOP; -} - -void irq_domain_remove(struct irq_domain *d) -{ - TRACE_AND_STOP; -} - -void i915_memcpy_init_early(struct drm_i915_private *dev_priv) -{ - TRACE; -} - -void add_taint(unsigned i, enum lockdep_ok o) -{ - TRACE_AND_STOP; -} - -struct timespec64 ns_to_timespec64(const s64 nsec) -{ - struct timespec64 ret = { 0, 0 }; - - TRACE; - - if (!nsec) - return ret; - - s32 rest = 0; - ret.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rest); - if (rest < 0) { - ret.tv_sec--; - rest += NSEC_PER_SEC; - } - ret.tv_nsec = rest; - - return ret; -} - -pgprot_t pgprot_decrypted(pgprot_t prot) -{ - TRACE_AND_STOP; - return prot; -} - -void dev_pm_set_driver_flags(struct device *dev, u32 x) -{ - TRACE; -} - -void dma_buf_put(struct dma_buf *buf) -{ - TRACE_AND_STOP; -} - -void wake_up_bit(void *p, int x) -{ - TRACE_AND_STOP; -} - -unsigned cache_line_size() -{ - TRACE_AND_STOP; - return 0; -} - -void of_node_put(struct device_node *d) -{ - TRACE_AND_STOP; -} - -int ___ratelimit(struct ratelimit_state *rs, const char *func) -{ - TRACE_AND_STOP; - return 0; -} - -bool _drm_lease_held(struct drm_file *f, int x) -{ - TRACE_AND_STOP; - return false; -} - -void i915_syncmap_init(struct i915_syncmap **root) -{ - TRACE; -} - -void i915_syncmap_free(struct i915_syncmap **root) -{ - TRACE; -} - -char *kstrdup(const char *s, gfp_t gfp) -{ - if (!s) - return NULL; - - size_t const len = strlen(s); - char * ptr = kmalloc(len + 1, gfp); - if (ptr) - memcpy(ptr, s, len + 1); - return ptr; -} - -bool kthread_should_park(void) -{ - TRACE_AND_STOP; - return false; -} - -bool kthread_should_stop(void) -{ - TRACE_AND_STOP; - return false; -} - -int kthread_park(struct task_struct *t) -{ - TRACE_AND_STOP; - return 0; -} - -void kthread_unpark(struct task_struct *t) -{ - TRACE_AND_STOP; -} - -void kthread_parkme(void) -{ - TRACE_AND_STOP; -} - -int kthread_stop(struct task_struct *k) -{ - TRACE_AND_STOP; - return 0; -} - -void pagefault_disable(void) -{ - TRACE_AND_STOP; -} - -void pagefault_enable(void) -{ - TRACE_AND_STOP; -} - -bool irq_work_queue(struct irq_work *work) -{ - TRACE_AND_STOP; - return false; -} - -void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) -{ - TRACE_AND_STOP; -} - -long long atomic64_add_return(long long i, atomic64_t *p) -{ - TRACE; - p->counter += i; - return p->counter; -} - -int wake_up_state(struct task_struct *tsk, unsigned int state) -{ - TRACE_AND_STOP; - return 0; -} - -void __init_waitqueue_head(struct wait_queue_head *wq_head, const char *name, struct lock_class_key *key) -{ - TRACE_AND_STOP; -} - -int set_pages_array_uc(struct page **pages, int addrinarray) -{ - TRACE_AND_STOP; - return 0; -} - -bool PageSlab(struct page *page) -{ - TRACE_AND_STOP; - return false; -} - -void clflushopt(volatile void *p) -{ - TRACE; -} - -int intel_guc_submission_init(struct intel_guc *guc) -{ - TRACE_AND_STOP; - return 0; -} - -int intel_guc_submission_enable(struct intel_guc *guc) -{ - TRACE_AND_STOP; - return 0; -} - -void intel_guc_submission_disable(struct intel_guc *guc) -{ - TRACE_AND_STOP; -} - -void intel_guc_submission_fini(struct intel_guc *guc) -{ - TRACE_AND_STOP; -} - -void i915_gem_shrinker_register(struct drm_i915_private *i915) -{ - TRACE; -} - -void i915_gem_shrinker_unregister(struct drm_i915_private *i915) -{ - TRACE_AND_STOP; -} - -ktime_t ktime_add_ns(const ktime_t kt, u64 nsec) -{ - TRACE_AND_STOP; - return 0; -} - -int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence, - struct i915_sw_fence *after, - wait_queue_entry_t *wq) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_sw_fence_await_sw_fence_gfp(struct i915_sw_fence *fence, - struct i915_sw_fence *after, - gfp_t gfp) -{ - TRACE_AND_STOP; - return -1; -} - -void __i915_sw_fence_init(struct i915_sw_fence *fence, - i915_sw_fence_notify_t fn, - const char *name, - struct lock_class_key *key) -{ - TRACE; -} - -void i915_sw_fence_commit(struct i915_sw_fence *fence) -{ - TRACE; -} - -int i915_sw_fence_await_dma_fence(struct i915_sw_fence *fence, - struct dma_fence *dma, - unsigned long timeout, - gfp_t gfp) -{ - TRACE_AND_STOP; - return -1; -} - -int i915_sw_fence_await_reservation(struct i915_sw_fence *fence, - struct reservation_object *resv, - const struct dma_fence_ops *exclude, - bool write, - unsigned long timeout, - gfp_t gfp) -{ - TRACE; - return 0; -} - -u32 *intel_ring_begin(struct drm_i915_gem_request *req, - unsigned int n) -{ - TRACE_AND_STOP; - return 0; -} - -void intel_legacy_submission_resume(struct drm_i915_private *dev_priv) -{ - TRACE_AND_STOP; -} - -void intel_engine_cleanup(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; -} - -int intel_ring_wait_for_space(struct intel_ring *ring, unsigned int bytes) -{ - TRACE_AND_STOP; - return 0; -} - -void intel_ring_free(struct intel_ring *ring) -{ - TRACE_AND_STOP; -} - -bool intel_breadcrumbs_busy(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; - return 0; -} - -void intel_engine_enable_signaling(struct drm_i915_gem_request *request, - bool wakeup) -{ - TRACE_AND_STOP; -} - -void intel_engine_remove_wait(struct intel_engine_cs *engine, - struct intel_wait *wait) -{ - TRACE_AND_STOP; -} - -bool intel_engine_add_wait(struct intel_engine_cs *engine, - struct intel_wait *wait) -{ - TRACE_AND_STOP; -} - -void __intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine) -{ - TRACE_AND_STOP; -} - -struct page *virt_to_page(const void *addr) -{ - TRACE_AND_STOP; - return 0; -} - -int set_memory_wb(unsigned long addr, int numpages) -{ - TRACE_AND_STOP; - return -1; -} - -const char *acpi_dev_name(struct acpi_device *adev) -{ - TRACE_AND_STOP; - return 0; -} - -void ClearPageReserved(struct page *page) -{ - TRACE_AND_STOP; -} - -int stop_machine(cpu_stop_fn_t a, void *b, const struct cpumask *c) -{ - TRACE_AND_STOP; - return -1; -} - -int unregister_acpi_notifier(struct notifier_block *nb) -{ - TRACE_AND_STOP; - return -1; -} - -const struct acpi_device_id * i2c_acpi_match_device(const struct acpi_device_id *matches, - struct i2c_client *client) -{ - TRACE_AND_STOP; - return 0; -} - -static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value, void *arg) -{ - TRACE_AND_STOP; - return -1; -} - -struct notifier_block i2c_acpi_notifier = { - .notifier_call = i2c_acpi_notify, -}; - -void intel_unregister_dsm_handler(void) -{ - TRACE_AND_STOP; -} - -enum acpi_backlight_type acpi_video_get_backlight_type(void) -{ - TRACE_AND_STOP; -} diff --git a/repos/dde_linux/src/drivers/framebuffer/intel/gen_dummy b/repos/dde_linux/src/drivers/framebuffer/intel/gen_dummy deleted file mode 100755 index 0037573468..0000000000 --- a/repos/dde_linux/src/drivers/framebuffer/intel/gen_dummy +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/tclsh - -# -# \brief Private utility to generate a dummy function from a symbol name -# \date 2015-08-21 -# \author Norman Feske -# -# The script must be executed in its directory and takes a symbol name as last -# argument. It searches the following places for a declaration that corresponds -# to the specified symbol: -# -# - the local include/ directory -# - the dde_linux/src/include/lx_emul/ directory -# - the contrib/dde_linux-/src/drivers/framebuffer/intel directory -# -# If a declaration could be found, the script generates a dummy implementation -# with the signature of the declarated function. -# - -set symbol [lindex $argv 0] - -# determine contrib directory of dde_linux -set lx_drv_path [exec ../../../../../../tool/ports/current dde_linux] -append lx_drv_path "/src/drivers/framebuffer/intel" - -# grep for lines that contain the symbol and have with no leading whitespace -if {[catch { -set header [exec grep -rl "^\\w.*$symbol\\>" include ../../../include/lx_emul $lx_drv_path | grep -v "~"] -}]} { - puts stderr "failed to lookup symbol $symbol" - exit 1 -} - -if {[llength $header] != 1} { - puts stderr "cannot generate dummy for symbol $symbol" - exit 1 -} - -puts stderr "found declaration of $symbol in $header" - -set statements [split [exec cat $header] ";{}"] - -foreach statement $statements { - - # strip off comments and preprocessor commands - regsub -all {/\*.*?\*/} $statement "" statement - regsub -all {//.*?\n} $statement "" statement - regsub -all {#.*?\n} $statement "\n" statement - - # delete consecutive newlines - while {[regexp {\n\n} $statement dummy]} { - regsub -all {\n\n} $statement "\n" statement - } - - # function declarations have no leading tabs - if {[regexp {^\t} $statement dummy]} continue - - # skip statements where the symbol does not occur - if {![regexp "$symbol\\(" $statement dummy]} continue - - # strip leading whitespace (linefeed) - regsub {^\s*} $statement "" statement - - # strip leading extern keyword - regsub {^extern\s*} $statement "" statement - - # strip leading inline keyword - regsub {^inline\s*} $statement "" statement - - # merge multi-line parameter list into a single line - regsub -all {\s*\n\s*} $statement " " statement - - # strip function attributes starting with '__' - regsub -all {\)\s*__.*} $statement ")" statement - - # determine return type 'ret' of the function - regexp {^[^\(]*} $statement func_ret - regsub {\s[^\s\*]*$} $func_ret "" ret - - # output function definition - puts "$statement" - puts "{" - puts "\tTRACE_AND_STOP;" - if {[regexp {\*} $ret]} { - # function returns a pointer - puts "\treturn NULL;" - } elseif {[regexp {void} $ret dummy]} { - # void function - } else { - # function with return value - puts "\treturn -1;" - } - puts "}\n" - - # success - exit 0 -} - -puts stderr "failed to match declaration of $symbol in $header" diff --git a/repos/dde_linux/src/drivers/framebuffer/intel/i915_params.c b/repos/dde_linux/src/drivers/framebuffer/intel/i915_params.c deleted file mode 100644 index 698531fe12..0000000000 --- a/repos/dde_linux/src/drivers/framebuffer/intel/i915_params.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * \brief Linux emulation Intel i915 parameter struct definition - * \author Stefan Kalkowski - * \date 2016-03-22 - */ - -/* - * Copyright (C) 2016-2017 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#include <../drivers/gpu/drm/i915/i915_drv.h> -struct i915_params i915_modparams = { - .vbt_firmware = NULL, - .modeset = -1, - .panel_ignore_lid = 1, - .lvds_channel_mode = 0, - .panel_use_ssc = -1, - .vbt_sdvo_panel_type = -1, - .enable_dc = -1, - .enable_fbc = -1, - .enable_ppgtt = 0, - .enable_psr = 0, - .disable_power_well = -1, - .enable_ips = true, - .invert_brightness = 0, - .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 -}; diff --git a/repos/dde_linux/src/drivers/framebuffer/intel/include/driver.h b/repos/dde_linux/src/drivers/framebuffer/intel/include/driver.h deleted file mode 100644 index ac7eb2a8df..0000000000 --- a/repos/dde_linux/src/drivers/framebuffer/intel/include/driver.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * \brief Intel framebuffer driver - * \author Stefan Kalkowski - * \author Norman Feske - * \date 2015-10-16 - */ - -/* - * Copyright (C) 2015-2020 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#ifndef __DRIVER_H__ -#define __DRIVER_H__ - -/* Genode includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace Framebuffer { - - using namespace Genode; - class Driver; -} - - -class Framebuffer::Driver -{ - private: - - using Area = Capture::Area; - using Pixel = Capture::Pixel; - - struct Configuration - { - struct lx_c_fb_config _lx = { .height = 16, - .width = 64, - .pitch = 64, - .bpp = 4, - .addr = nullptr, - .size = 0, - .lx_fb = nullptr }; - } _lx_config; - - Env &_env; - - Attached_rom_dataspace &_config; - - Timer::Connection _timer { _env }; - - Reporter _reporter { _env, "connectors" }; - - Signal_handler _poll_handler { _env.ep(), *this, &Driver::_poll }; - - uint64_t _poll_ms = 0; - - Signal_context_capability _config_sigh; - - drm_display_mode * _preferred_mode(drm_connector *connector, - unsigned &brightness); - - void _poll(); - - uint64_t _polling_from_config() { - return _config.xml().attribute_value("poll", 0); } - - - /* - * Capture - */ - - Constructible _capture { }; - - Constructible _captured_screen { }; - - Timer::Connection _capture_timer { _env }; - - Signal_handler _capture_timer_handler { - _env.ep(), *this, &Driver::_handle_capture_timer }; - - void _handle_capture_timer() - { - if (!_captured_screen.constructed()) - return; - - Area const phys_size { _lx_config._lx.pitch/sizeof(Pixel), - _lx_config._lx.height }; - - Capture::Surface surface((Pixel *)_lx_config._lx.addr, phys_size); - - _captured_screen->apply_to_surface(surface); - } - - int _force_width_from_config() - { - return _config.xml().attribute_value("force_width", 0); - } - - int _force_height_from_config() - { - return _config.xml().attribute_value("force_height", 0); - } - - public: - - Driver(Env &env, Attached_rom_dataspace &config) - : - _env(env), _config(config) - { - _capture_timer.sigh(_capture_timer_handler); - } - - void finish_initialization(); - void set_polling(uint64_t 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(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()) - Signal_transmitter(_config_sigh).submit(); - else - warning("config signal handler unexpectedly undefined"); - } - - void config_changed() - { - _config.update(); - - set_polling(_polling_from_config()); - - update_mode(); - - Area const size { _lx_config._lx.width, _lx_config._lx.height }; - - - if (_captured_screen.constructed()) { - _capture.destruct(); - _captured_screen.destruct(); - } - - _capture.construct(_env); - _captured_screen.construct(*_capture, _env.rm(), size); - - _capture_timer.trigger_periodic(10*1000); - } -}; - -#endif /* __DRIVER_H__ */ diff --git a/repos/dde_linux/src/drivers/framebuffer/intel/include/lx_emul.h b/repos/dde_linux/src/drivers/framebuffer/intel/include/lx_emul.h deleted file mode 100644 index ea1c94174a..0000000000 --- a/repos/dde_linux/src/drivers/framebuffer/intel/include/lx_emul.h +++ /dev/null @@ -1,2734 +0,0 @@ -/* - * \brief Emulation of the Linux kernel API used by DRM - * \author Norman Feske - * \date 2015-08-19 - * - * The content of this file, in particular data structures, is partially - * derived from Linux-internal headers. - */ - -#ifndef _LX_EMUL_H_ -#define _LX_EMUL_H_ - -#include -#include - -#include - -/***************** - ** asm/param.h ** - *****************/ - -enum { HZ = 100UL }; - -#define DEBUG_LINUX_PRINTK 0 - -#include -#include -#include -#include - -static inline void atomic_or(int i, atomic_t *v) { - v->counter = v->counter | i; } -void atomic_andnot(int, atomic_t *); - -#define smp_mb__before_atomic_inc() barrier() -#define smp_mb__before_atomic() barrier() - -void atomic_set_mask(unsigned int mask, atomic_t *v); -#define atomic_set_release(v, i) atomic_set((v), (i)) - -#include -#include - -typedef unsigned long kernel_ulong_t; -typedef unsigned int u_int; -typedef long ptrdiff_t; -typedef unsigned __bitwise slab_flags_t; - -#define DECLARE_BITMAP(name,bits) \ - unsigned long name[BITS_TO_LONGS(bits)] - - -/*************************** - ** asm-generic/barrier.h ** - ***************************/ - -#define smp_load_acquire(p) *(p) - - -/************************ - ** uapi/linux/types.h ** - ************************/ - -typedef __u16 __le16; -typedef __u16 __be16; -typedef __u32 __le32; -typedef __u32 __be32; -typedef __u64 __le64; -typedef __u64 __be64; - -typedef unsigned __poll_t; - -/******************** - ** linux/printk.h ** - ********************/ - -/* needed by drm_edid.c */ -enum { DUMP_PREFIX_NONE, }; - -void print_hex_dump(const char *level, const char *prefix_str, - int prefix_type, int rowsize, int groupsize, - const void *buf, size_t len, bool ascii); - -#define printk_once(fmt, ...) ({}) - - -/*********************** - ** linux/sync_file.h ** - ***********************/ - -struct sync_file { - struct file *file; -}; -struct dma_fence; -struct dma_fence *sync_file_get_fence(int); -struct sync_file *sync_file_create(struct dma_fence *); - -/********************* - ** uapi/linux/fb.h ** - *********************/ - -#define KHZ2PICOS(a) (1000000000UL/(a)) - - - -/******************* - ** linux/ctype.h ** - *******************/ - -#define isascii(c) (((unsigned char)(c))<=0x7f) -#define isprint(c) (isascii(c) && ((unsigned char)(c) >= 32)) - - - -/**************** - ** asm/page.h ** - ****************/ - -/* - * For now, hardcoded - */ -#define PAGE_SIZE 4096UL -#define PAGE_MASK (~(PAGE_SIZE-1)) - - -enum { - PAGE_SHIFT = 12, -}; - -struct page -{ - atomic_t _count; - void *addr; - dma_addr_t paddr; -} __attribute((packed)); - -/* needed for agp/generic.c */ -struct page *virt_to_page(const void *addr); - -dma_addr_t page_to_phys(struct page *page); - -#include - -extern unsigned long find_next_bit(const unsigned long *addr, unsigned long - size, unsigned long offset); -extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned - long size, unsigned long offset); -#define find_first_bit(addr, size) find_next_bit((addr), (size), 0) -#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0) - -#define __const_hweight8(w) \ - ( (!!((w) & (1ULL << 0))) + \ - (!!((w) & (1ULL << 1))) + \ - (!!((w) & (1ULL << 2))) + \ - (!!((w) & (1ULL << 3))) + \ - (!!((w) & (1ULL << 4))) + \ - (!!((w) & (1ULL << 5))) + \ - (!!((w) & (1ULL << 6))) + \ - (!!((w) & (1ULL << 7))) ) -#define hweight8(w) __const_hweight8(w) -#define hweight16(w) (__const_hweight8(w) + __const_hweight8((w) >> 8 )) -#define hweight32(w) (hweight16(w) + hweight16((w) >> 16)) -#define hweight64(w) (hweight32(w) + hweight32((w) >> 32)) - -#define GENMASK(h, l) \ - (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) - -#include - - -#include - -/* needed by 'virt_to_phys', which is needed by agp/generic.c */ -typedef unsigned long phys_addr_t; - -#include - -void *memchr_inv(const void *s, int c, size_t n); - -/********************** - ** linux/compiler.h ** - **********************/ - -#include - -#define prefetchw(x) __builtin_prefetch(x,1) - -static inline void __read_once_size(const volatile void *p, void *res, int size) -{ - switch (size) { - case 1: *(__u8 *)res = *(volatile __u8 *)p; break; - case 2: *(__u16 *)res = *(volatile __u16 *)p; break; - case 4: *(__u32 *)res = *(volatile __u32 *)p; break; - case 8: *(__u64 *)res = *(volatile __u64 *)p; break; - default: - barrier(); - __builtin_memcpy((void *)res, (const void *)p, size); - barrier(); - } -} - -#ifdef __cplusplus -#define READ_ONCE(x) \ -({ \ - barrier(); \ - x; \ -}) - -#else -#define READ_ONCE(x) \ -({ \ - union { typeof(x) __val; char __c[1]; } __u; \ - __read_once_size(&(x), __u.__c, sizeof(x)); \ - __u.__val; \ -}) -#endif - -#include -#include - -#define SIZE_MAX (~(size_t)0) -#define U64_MAX ((u64)~0ULL) -#define U16_MAX ((u16)~0U) - -extern long simple_strtol(const char *,char **,unsigned int); -typedef __kernel_time_t time_t; - -extern int oops_in_progress; - -#define pr_debug(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) -#define pr_info(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) -#define pr_err(fmt, ...) printk(KERN_ERR fmt, ##__VA_ARGS__) -#define pr_warn(fmt, ...) printk(KERN_ERR fmt, ##__VA_ARGS__) -#define pr_info_once(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) -#define pr_notice(fmt, ...) printk(KERN_NOTICE fmt, ##__VA_ARGS__) - - -int sprintf(char *buf, const char *fmt, ...); -int snprintf(char *buf, size_t size, const char *fmt, ...); - -int sscanf(const char *, const char *, ...); - -int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); - -enum { SPRINTF_STR_LEN = 64 }; - -#define kasprintf(gfp, fmt, ...) ({ \ - void *buf = kmalloc(SPRINTF_STR_LEN, 0); \ - sprintf(buf, fmt, __VA_ARGS__); \ - buf; \ - }) - -#define DIV_ROUND_UP_ULL(ll,d) \ - ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; }) - -#define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ - { \ - typeof(divisor) __d = divisor; \ - unsigned long long _tmp = (x) + (__d) / 2; \ - do_div(_tmp, __d); \ - _tmp; \ - } \ - ) - -#define mult_frac(x, numer, denom) ({ \ - typeof(x) quot = (x) / (denom); \ - typeof(x) rem = (x) % (denom); \ - (quot * (numer)) + ((rem * (numer)) / (denom)); \ - }) - -extern int panic_timeout; -extern struct atomic_notifier_head panic_notifier_list; - -/* linux/i2c.h */ -#define __deprecated - -#define rounddown(x, y) ( \ - { \ - typeof(x) __x = (x); \ - __x - (__x % (y)); \ - } \ - ) - -/************************ - ** linux/page-flags.h ** - ************************/ - -/* needed by agp/generic.c */ -void SetPageReserved(struct page *page); -void ClearPageReserved(struct page *page); -bool PageSlab(struct page *page); - - -/******************** - ** linux/printk.h ** - ********************/ - -int hex_dump_to_buffer(const void *buf, size_t len, - int rowsize, int groupsize, - char *linebuf, size_t linebuflen, bool ascii); - - -#include - -#define MODULE_ALIAS_MISCDEV(x) /* needed by agp/backend.c */ - -/* i2c-core.c */ -#define postcore_initcall(fn) void postcore_##fn(void) { fn(); } - -#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); }) -#define symbol_put(x) do { } while (0) - - -/************************** - ** linux/preempt_mask.h ** - **************************/ - -/* needed bu i2c-core.c */ -bool in_atomic(); -void preempt_enable(void); -void preempt_disable(void); - - -/********************** - ** linux/irqflags.h ** - **********************/ - -/* needed bu i2c-core.c */ -bool irqs_disabled(); - -void local_irq_enable(); -void local_irq_disable(); - - -/******************** - ** linux/kernel.h ** - ********************/ - -#define min3(x, y, z) min((typeof(x))min(x, y), z) - -// typecheck(u64, x); -#define u64_to_user_ptr(x) ({ \ - (void __user *)(uintptr_t)x; \ -}) -char *kvasprintf(gfp_t, const char *, va_list); - -#define U32_MAX ((u32)~0U) - -#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) - -#define TAINT_MACHINE_CHECK 4 -#define TAINT_WARN 9 - -/********************** - ** sched/wait_bit.c ** - **********************/ -void wake_up_bit(void *, int); -int wait_on_bit(unsigned long *, int, unsigned); -int wait_on_bit_timeout(unsigned long *, int, unsigned, unsigned long); - - -/****************** - ** linux/kref.h ** - ******************/ - -struct kref; -unsigned int kref_read(const struct kref*); - - - -/********************* - ** linux/jiffies.h ** - *********************/ - -#include - -#define time_before(a,b) time_after(b,a) -#define time_before_eq(a,b) time_after_eq(b,a) - -#define time_in_range(a,b,c) \ - (time_after_eq(a,b) && \ - time_before_eq(a,c)) - -u64 nsecs_to_jiffies(u64); -extern u64 nsecs_to_jiffies64(u64 n); - -static inline u64 get_jiffies_64(void) { return jiffies; } - -#include -#include - -#include - -LX_MUTEX_INIT_DECLARE(bridge_lock); -LX_MUTEX_INIT_DECLARE(core_lock); - -#define bridge_lock LX_MUTEX(bridge_lock) -#define core_lock LX_MUTEX(core_lock) - - -static inline int mutex_lock_interruptible(struct mutex *lock) { - mutex_lock(lock); - return 0; -} - -void mutex_lock_nest_lock(struct mutex *, struct mutex *); - -void might_lock(struct mutex *); - - -/********************* - ** linux/rtmutex.h ** - *********************/ - -#define rt_mutex mutex -#define rt_mutex_init(m) mutex_init(m) -#define rt_mutex_lock(m) mutex_lock(m) -#define rt_mutex_trylock(m) mutex_trylock(m) -#define rt_mutex_unlock(m) mutex_unlock(m) - - -/********************* - ** linux/ww_mutex.h ** - *********************/ - -struct ww_acquire_ctx { unsigned dummy; }; -struct ww_class { int dummy; }; -struct ww_mutex { - bool locked; - struct ww_acquire_ctx *ctx; -}; - -#define DEFINE_WW_CLASS(classname) \ - struct ww_class classname; -#define DEFINE_WW_MUTEX(mutexname, ww_class) \ - struct ww_mutex mutexname; - - -/****************** - ** linux/time.h ** - ******************/ - -#include - -void getrawmonotonic(struct timespec *ts); - -struct timespec timespec_sub(struct timespec lhs, struct timespec rhs); -bool timespec_valid(const struct timespec *ts); -void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); -struct timespec ns_to_timespec(const s64 nsec); -s64 timespec_to_ns(const struct timespec *ts); - - -/******************* - ** linux/timer.h ** - *******************/ - -typedef int clockid_t; - -#include - -#define del_singleshot_timer_sync(t) del_timer_sync(t) - -void timer_setup(struct timer_list *, void (*func)(struct timer_list *), unsigned int); - -#include - -extern bool flush_delayed_work(struct delayed_work *dwork); - -extern unsigned long timespec_to_jiffies(const struct timespec *value); - -#define wait_event_interruptible_timeout wait_event_timeout - -#define setup_timer_on_stack setup_timer - -unsigned long round_jiffies_up_relative(unsigned long j); - -extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); - -#define from_timer(var, callback_timer, timer_fieldname) \ - container_of(callback_timer, typeof(*var), timer_fieldname) - -#define TIMER_IRQSAFE 0x00200000 - -/*********************** - ** linux/workqueue.h ** - ***********************/ - -enum { - WORK_STRUCT_PENDING_BIT = 0, -}; - -#define work_data_bits(work) ((unsigned long *)(&(work)->data)) - -#define work_pending(work) \ - test_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) - -#define delayed_work_pending(w) \ - work_pending(&(w)->work) - -#ifndef CONFIG_DEBUG_OBJECTS_WORK -#define INIT_WORK_ONSTACK(_work, _func) while(0) { } -static inline void destroy_work_on_stack(struct work_struct *work) { } -#endif - -void INIT_DELAYED_WORK_ONSTACK(void *, void *); -void destroy_delayed_work_on_stack(struct delayed_work *); - -unsigned int work_busy(struct work_struct *); - -/******************* - ** linux/sched.h ** - *******************/ - -enum { TASK_COMM_LEN = 16 }; - -enum { - TASK_RUNNING = 0x0, - TASK_INTERRUPTIBLE = 0x1, - TASK_UNINTERRUPTIBLE = 0x2, - TASK_NORMAL = TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, -}; - -#define MAX_SCHEDULE_TIMEOUT LONG_MAX - -struct mm_struct; -struct task_struct { - struct mm_struct *mm; - char comm[16]; /* only for debug output */ - unsigned pid; - int prio; - volatile long state; -}; - -signed long schedule_timeout(signed long timeout); -void __set_current_state(int state); -int signal_pending(struct task_struct *p); -void schedule(void); -int wake_up_process(struct task_struct *tsk); -int wake_up_state(struct task_struct *tsk, unsigned int state); - -/* normally declared in linux/smp.h, included by sched.h */ -int on_each_cpu(void (*func) (void *info), void *info, int wait); -#define get_cpu() 0 -#define put_cpu() -#define smp_processor_id() 0 - -/* normally defined in asm/current.h, included by sched.h */ -extern struct task_struct *current; - -void yield(void); - -extern signed long schedule_timeout_uninterruptible(signed long timeout); - -extern u64 local_clock(void); -extern bool need_resched(void); -extern int signal_pending_state(long state, struct task_struct *p); - -struct pid; -extern struct pid *task_pid(struct task_struct *task); - -void cond_resched(void); - -void set_current_state(int); -long io_schedule_timeout(long); - -struct sched_param { - int sched_priority; -}; - -#define SCHED_FIFO 1 - -int sched_setscheduler_nocheck(struct task_struct *, int, const struct sched_param *); - -/************************ - ** linux/completion.h ** - ************************/ - -#include - -struct completion { - unsigned done; - void * task; -}; - -long __wait_completion(struct completion *work, unsigned long); - -/********************* - ** linux/raid/pq.h ** - *********************/ - -void cpu_relax(void); /* i915_dma.c */ -#define cpu_relax_lowlatency() cpu_relax() - - -/************************* - ** linux/bottom_half.h ** - *************************/ - -void local_bh_disable(void); -void local_bh_enable(void); - - -/***************** - ** linux/panic ** - *****************/ - -enum lockdep_ok { LOCKDEP_STILL_OK }; -void add_taint(unsigned, enum lockdep_ok); - - -/******************* - ** linux/delay.h ** - *******************/ - -void msleep(unsigned int); -void udelay(unsigned long); -void mdelay(unsigned long); -void ndelay(unsigned long); - -void usleep_range(unsigned long min, unsigned long max); /* intel_dp.c */ - - -/************************* - ** linux/scatterlist.h ** - *************************/ - -struct scatterlist; - -#include - -enum kobject_action { - KOBJ_CHANGE, -}; - -int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, char *envp[]); - - -/************************ - ** asm/memory_model.h ** - ************************/ - -dma_addr_t page_to_pfn(struct page *page); -struct page * pfn_to_page(dma_addr_t); - - -/********************* - ** linux/pagemap.h ** - *********************/ - -#define page_cache_release(page) put_page(page) - -struct address_space { - unsigned long flags; - struct page * my_page; -}; - -gfp_t mapping_gfp_mask(struct address_space * mapping); -void mapping_set_gfp_mask(struct address_space *m, gfp_t mask); - -gfp_t mapping_gfp_constraint(struct address_space *mapping, gfp_t gfp_mask); - - -/****************** - ** linux/swap.h ** - ******************/ - -void mark_page_accessed(struct page *); - - -/*************************** - ** linux/pgtable_types.h ** - ***************************/ - -typedef unsigned long pgprotval_t; -struct pgprot { pgprotval_t pgprot; }; -typedef struct pgprot pgprot_t; - -#define PAGE_KERNEL ((pgprot_t) {0}) /* XXX */ -#define PAGE_KERNEL_IO ((pgprot_t) {1}) /* XXX */ - -extern pgprot_t pgprot_writecombine(pgprot_t prot); -extern pgprot_t pgprot_decrypted(pgprot_t prot); - - -/********************* - ** linux/kthread.h ** - *********************/ - -void kthread_parkme(void); -int kthread_park(struct task_struct *); -void kthread_unpark(struct task_struct *); -bool kthread_should_park(void); -bool kthread_should_stop(void); -int kthread_stop(struct task_struct *k); - -struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), - void *data, - int node, - const char namefmt[], ...); - -/******************** - ** linux/mmzone.h ** - ********************/ - -#define MAX_ORDER 11 - -/********************** - ** linux/mm_types.h ** - **********************/ - -struct vm_operations_struct; - -struct vm_area_struct { - unsigned long vm_start; - unsigned long vm_end; - pgprot_t vm_page_prot; - unsigned long vm_flags; - const struct vm_operations_struct *vm_ops; - unsigned long vm_pgoff; - void *vm_private_data; -}; - -struct mm_struct { struct rw_semaphore mmap_sem; }; - - -/********************** - ** linux/shrinker.h ** - **********************/ - -struct shrinker { int DUMMY; }; - -/**************** - ** linux/mm.h ** - ****************/ - -enum { - VM_FAULT_OOM = 0x001, - VM_FAULT_SIGBUS = 0x002, - VM_FAULT_NOPAGE = 0x100, - VM_PFNMAP = 0x00000400, - VM_IO = 0x00004000, - VM_DONTEXPAND = 0x00040000, - VM_NORESERVE = 0x00200000, - VM_DONTDUMP = 0x04000000, -}; - -enum { FAULT_FLAG_WRITE = 0x1 }; - -enum { DEFAULT_SEEKS = 2 }; - -#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) - -#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) - -struct vm_fault { - struct vm_area_struct *vma; - unsigned int flags; - unsigned long address; -}; - -int set_page_dirty(struct page *page); - -void get_page(struct page *page); -void put_page(struct page *page); - -extern unsigned long totalram_pages; - - -struct vm_area_struct; - -struct vm_operations_struct { - void (*open)(struct vm_area_struct * area); - void (*close)(struct vm_area_struct * area); - int (*fault)(struct vm_fault *vmf); -}; - -struct file; - -extern unsigned long vm_mmap(struct file *, unsigned long, - unsigned long, unsigned long, - unsigned long, unsigned long); - -static inline void *page_address(struct page *page) { return page ? page->addr : 0; }; - -int is_vmalloc_addr(const void *x); - -void free_pages(unsigned long addr, unsigned int order); - -extern void kvfree(const void *addr); - -extern struct page * nth_page(struct page * page, int n); - -extern struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr); - -pgprot_t vm_get_page_prot(unsigned long vm_flags); - -void *kvmalloc(size_t, gfp_t); -void *kvmalloc_array(size_t, size_t, gfp_t); - -void unmap_mapping_range(struct address_space *, loff_t const, loff_t const, int); - -unsigned long vma_pages(struct vm_area_struct *); - -#include - - -/*************** - ** asm/smp.h ** - ***************/ - -static inline void wbinvd() { } -static inline int wbinvd_on_all_cpus() { return 0; } - - -/********************************** - ** x86/include/asm/set_memory.h ** - **********************************/ - -int set_memory_wb(unsigned long addr, int numpages); -int set_memory_uc(unsigned long addr, int numpages); -int set_pages_array_uc(struct page **pages, int addrinarray); - -/********************* - ** linux/vmalloc.h ** - *********************/ - -/* needed by agp/backend.c */ -void *vzalloc(unsigned long size); -void vfree(const void *addr); - - -/************************ - ** uapi/linux/const.h ** - ************************/ - -#define _AT(T,X) ((T)(X)) - - -/************************************************* - ** asm/pgtable_64_types.h, asm/pgtable_types.h ** - *************************************************/ - -typedef unsigned long pteval_t; - - -#define _PAGE_BIT_PRESENT 0 /* is present */ -#define _PAGE_BIT_RW 1 /* writeable */ -#define _PAGE_BIT_PWT 3 /* page write through */ -#define _PAGE_BIT_PCD 4 /* page cache disabled */ -#define _PAGE_BIT_PAT 7 /* on 4KB pages */ - -#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT) -#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW) -#define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT) -#define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD) -#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) - - -/********************** - ** asm/cacheflush.h ** - **********************/ - -int set_pages_wb(struct page *page, int numpages); -int set_pages_uc(struct page *page, int numpages); - - -/****************** - ** linux/slab.h ** - ******************/ - -enum { - SLAB_HWCACHE_ALIGN = 0x00002000ul, - SLAB_RECLAIM_ACCOUNT = 0x00020000ul, - SLAB_PANIC = 0x00040000ul, - SLAB_TYPESAFE_BY_RCU = 0x00080000ul, -}; - -void *kzalloc(size_t size, gfp_t flags); -void kfree(const void *); -void *kcalloc(size_t n, size_t size, gfp_t flags); -void *kmalloc(size_t size, gfp_t flags); -void *krealloc(const void *, size_t, gfp_t); -void *kmalloc_array(size_t n, size_t size, gfp_t flags); - -struct kmem_cache; -struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, unsigned long, void (*)(void *)); -void kmem_cache_destroy(struct kmem_cache *); -void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags); -void kmem_cache_free(struct kmem_cache *, void *); - -#define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\ - sizeof(struct __struct), __alignof__(struct __struct),\ - (__flags), NULL) - -void *kmem_cache_alloc(struct kmem_cache *, gfp_t); - - -/********************** - ** linux/kmemleak.h ** - **********************/ - -#ifndef CONFIG_DEBUG_KMEMLEAK -static inline void kmemleak_update_trace(const void *ptr) { } -static inline void kmemleak_alloc(const void *ptr, size_t size, int min_count, - gfp_t gfp) { } -static inline void kmemleak_free(const void *ptr) { } -#endif - -/********************** - ** linux/byteorder/ ** - **********************/ - -#include - - -/****************** - ** linux/swab.h ** - ******************/ - -#define swab16 __swab16 - - -/********************** - ** linux/highmem.h ** - **********************/ - -static inline void *kmap(struct page *page) { return page_address(page); } -static inline void *kmap_atomic(struct page *page) { return kmap(page); } -static inline void kunmap(struct page *page) { return; } -static inline void kunmap_atomic(void *addr) { return; } -struct page *kmap_to_page(void *); - - -#include - -void __free_pages(struct page *page, unsigned int order); - -#define __free_page(page) __free_pages((page), 0) - -struct page *alloc_pages(gfp_t gfp_mask, unsigned int order); - -#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) - -unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); - -static inline void flush_kernel_dcache_page(struct page *page) { } - -/************************* - ** linux/percpu-defs.h ** - *************************/ - -#define DECLARE_PER_CPU(type, name) \ - extern typeof(type) name - -#define DEFINE_PER_CPU(type, name) \ - typeof(type) name - -#define this_cpu_xchg(pcp, nval) \ -({ \ - typeof(pcp) before = pcp; \ - pcp = nval; \ - before; \ -}) - -#define this_cpu_ptr(ptr) ptr -#define this_cpu_read(val) val -#define per_cpu(var, cpu) var - -#define this_cpu_cmpxchg(pcp, oval, nval) \ - cmpxchg(&pcp, oval, nval) - - -#define cpuhp_setup_state_nocalls(a, b, c, d) 0 - -/****************** - ** linux/gfp.h ** - ******************/ - -#define __GFP_BITS_SHIFT (25 + IS_ENABLED(CONFIG_LOCKDEP)) -#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) - -static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) -{ - return !!(gfp_flags & __GFP_DIRECT_RECLAIM); -} - -unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); - -#define __get_free_page(gfp_mask) \ - __get_free_pages((gfp_mask), 0) - -void free_pages(unsigned long addr, unsigned int order); -#define free_page(addr) free_pages((addr), 0) - -/************************************** - ** asm-generic/dma-mapping-common.h ** - **************************************/ - -struct dma_attrs; -struct device; - -enum dma_data_direction { DMA_DATA_DIRECTION_DUMMY }; - -int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, - int nents, enum dma_data_direction dir, - struct dma_attrs *attrs); - -#define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL) - - -void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg, - int nents, enum dma_data_direction dir, - struct dma_attrs *attrs); - -#define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL) - -extern dma_addr_t dma_map_page(struct device *dev, struct page *page, - unsigned long offset, size_t size, - enum dma_data_direction direction); -extern void dma_unmap_page(struct device *dev, dma_addr_t dma_address, - size_t size, enum dma_data_direction direction); - -extern int dma_mapping_error(struct device *dev, dma_addr_t dma_addr); - - -/********************* - ** linux/dma-buf.h ** - *********************/ - -struct dma_buf; -void dma_buf_put(struct dma_buf *); - - -/******************** - ** linux/pm_qos.h ** - ********************/ - -enum { PM_QOS_CPU_DMA_LATENCY, }; - -struct pm_qos_request { int dummy; }; - -void pm_qos_remove_request(struct pm_qos_request *req); -void pm_qos_update_request(struct pm_qos_request *req, s32 new_value); -void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, s32 value); - - -#define PM_QOS_DEFAULT_VALUE -1 - - -/*********************** - ** linux/pm_wakeup.h ** - ***********************/ - -bool device_can_wakeup(struct device *dev); -int device_init_wakeup(struct device *dev, bool val); - - -/******************* - ** linux/sysfs.h ** - *******************/ - -struct attribute { int dummy; }; - -struct attribute_group { - struct attribute **attrs; -}; - -#define __ATTRIBUTE_GROUPS(_name) \ - static const struct attribute_group *_name##_groups[] = { \ - &_name##_group, \ - NULL, \ - } - -#define ATTRIBUTE_GROUPS(_name) \ - static const struct attribute_group _name##_group = { \ - .attrs = _name##_attrs, \ - }; \ -__ATTRIBUTE_GROUPS(_name) - -int sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name); -void sysfs_remove_link(struct kobject *kobj, const char *name); - - -/**************** - ** linux/pm.h ** - ****************/ - -#include - -enum { - PM_EVENT_QUIESCE = 0x0008, - PM_EVENT_PRETHAW = PM_EVENT_QUIESCE, -}; - -struct dev_pm_domain; - -#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) -#define DPM_FLAG_NEVER_SKIP BIT(0) - -enum rpm_status { - RPM_ACTIVE = 0, - RPM_RESUMING, - RPM_SUSPENDED, - RPM_SUSPENDING, -}; - - -/*********************** - ** linux/pm_domain.h ** - ***********************/ - -static inline int dev_pm_domain_attach(struct device *dev, bool power_on) { - return -ENODEV; } -static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} - -/******************** - ** linux/device.h ** - ********************/ - -struct device_driver; -struct subsys_private; - -struct bus_type -{ - const char *name; - - int (*match)(struct device *dev, struct device_driver *drv); - int (*probe)(struct device *dev); - int (*remove)(struct device *dev); - void (*shutdown)(struct device *dev); - int (*suspend)(struct device *dev, pm_message_t state); - int (*resume)(struct device *dev); - - const struct dev_pm_ops *pm; - struct subsys_private *p; -}; - -struct device_type -{ - const struct attribute_group **groups; - int (*uevent)(struct device *dev, struct kobj_uevent_env *env); - void (*release)(struct device *dev); -}; - -struct dev_archdata -{ - struct dma_map_ops *dma_ops; -}; - -struct fwnode_handle { int dummy; }; - -struct device { - struct device *parent; - struct kobject kobj; - u64 _dma_mask_buf; - u64 *dma_mask; - u64 coherent_dma_mask; - struct device_driver *driver; - void *drvdata; /* not in Linux */ - const struct device_type *type; - void *platform_data; - struct dev_pm_info power; - struct dev_archdata archdata; - struct bus_type *bus; - struct device_node *of_node; - struct fwnode_handle *fwnode; -}; - -struct device_attribute { - struct attribute attr; -}; - -struct lock_class_key { int dummy; }; - -#define DEVICE_ATTR(_name, _mode, _show, _store) \ - struct device_attribute dev_attr_##_name = { { 0 } } - -#define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \ - struct device_attribute dev_attr_##_name = { { 0 } } - -#define dev_info( dev, format, arg...) lx_printf("dev_info: " format , ## arg) -#define dev_warn( dev, format, arg...) lx_printf("dev_warn: " format , ## arg) -#define dev_WARN( dev, format, arg...) lx_printf("dev_WARN: " format , ## arg) -#define dev_err( dev, format, arg...) lx_printf("dev_error: " format , ## arg) -#define dev_notice(dev, format, arg...) lx_printf("dev_notice: " format , ## arg) -#define dev_crit( dev, format, arg...) lx_printf("dev_crit: " format , ## arg) - -#define dev_printk(level, dev, format, arg...) \ - lx_printf("dev_printk: " format , ## arg) -#define dev_dbg(dev, format, arg...) \ - lx_printf("dev_dbg: " format, ## arg) - -#define dev_err_ratelimited(dev, fmt, ...) \ - dev_err(dev, fmt, ##__VA_ARGS__) - -struct device_driver -{ - int dummy; - char const *name; - struct bus_type *bus; - struct module *owner; - const struct of_device_id*of_match_table; - const struct acpi_device_id *acpi_match_table; - const struct dev_pm_ops *pm; -}; - -int driver_register(struct device_driver *drv); -void driver_unregister(struct device_driver *drv); - -void *dev_get_drvdata(const struct device *dev); -int dev_set_drvdata(struct device *dev, void *data); -int dev_set_name(struct device *dev, const char *name, ...); - -int bus_register(struct bus_type *bus); -void bus_unregister(struct bus_type *bus); - -struct device *get_device(struct device *dev); -void put_device(struct device *dev); - -int device_for_each_child(struct device *dev, void *data, int (*fn)(struct device *dev, void *data)); -int device_register(struct device *dev); -void device_unregister(struct device *dev); - -const char *dev_name(const struct device *dev); - -int bus_for_each_drv(struct bus_type *bus, struct device_driver *start, - void *data, int (*fn)(struct device_driver *, void *)); - -int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data, - int (*fn)(struct device *dev, void *data)); - -void dev_pm_set_driver_flags(struct device *, u32); - -/* needed by linux/i2c.h */ -struct acpi_device; - -struct acpi_dev_node { struct acpi_device *companion; }; - - -/********************* - ** acpi/acpi_bus.h ** - *********************/ - -typedef char acpi_bus_id[8]; -typedef char acpi_device_class[20]; - -struct acpi_bus_event { - struct list_head node; - acpi_device_class device_class; - acpi_bus_id bus_id; - u32 type; - u32 data; -}; - - -/**************** - ** linux/io.h ** - ****************/ - -enum { - MEMREMAP_WB = 1 << 0, -}; - -#define writel_relaxed(v, a) writel(v, a) -#define iowrite32(v, addr) writel((v), (addr)) -#define ioread32(addr) readl(addr) - -void outb(u8 value, u32 port); -void outw(u16 value, u32 port); -void outl(u32 value, u32 port); - -u8 inb(u32 port); -u16 inw(u32 port); -u32 inl(u32 port); - -void iounmap(volatile void *addr); - -void __iomem *ioremap(phys_addr_t offset, unsigned long size); - -#define mmiowb() barrier() - -/** - * Map I/O memory write combined - */ -void *ioremap_wc(resource_size_t phys_addr, unsigned long size); - -#define ioremap_nocache ioremap_wc - -int arch_phys_wc_add(unsigned long base, unsigned long size); -static inline void arch_phys_wc_del(int handle) { } - -phys_addr_t virt_to_phys(volatile void *address); - -void memset_io(void *s, int c, size_t n); -void memcpy_toio(volatile void __iomem *dst, const void *src, size_t count); -void memcpy_fromio(void *dst, const volatile void __iomem *src, size_t count); - - -/************************************** - ** arch/x86/include/asm/string_64.h ** - **************************************/ - -#ifdef __x86_64__ -static inline void *memset64(uint64_t *s, uint64_t v, size_t n) -{ - long d0, d1; - asm volatile("rep\n\t" - "stosq" - : "=&c" (d0), "=&D" (d1) - : "a" (v), "1" (s), "0" (n) - : "memory"); - return s; -} -#else -static inline void *memset64(uint64_t *s, uint64_t v, size_t count) -{ - uint64_t *xs = s; - - while (count--) - *xs++ = v; - return s; -} -#endif - - -/********************* - ** linux/uaccess.h ** - *********************/ - -enum { VERIFY_READ = 0, VERIFY_WRITE = 1 }; - -#define get_user(x, ptr) ({ (x) = *(ptr); 0; }) -#define put_user(x, ptr) ({ *(ptr) = (x); 0; }) - -bool access_ok(int access, void *addr, size_t size); - -size_t copy_from_user(void *to, void const *from, size_t len); -size_t copy_to_user(void *dst, void const *src, size_t len); - -#define __copy_from_user copy_from_user -#define __copy_to_user copy_to_user -#define __copy_from_user_inatomic copy_from_user -#define __copy_to_user_inatomic copy_to_user -#define __copy_from_user_inatomic_nocache copy_from_user - -void pagefault_disable(void); -void pagefault_enable(void); - -/************************* - ** linux/dma-mapping.h ** - *************************/ - -#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) - -int dma_set_coherent_mask(struct device *dev, u64 mask); - - -/************************ - ** linux/io-mapping.h ** - ************************/ - -#define pgprot_noncached(prot) prot - -#include - - -/******************** - ** linux/random.h ** - ********************/ - -unsigned int get_random_int(void); -unsigned long get_random_long(void); - - -/******************** - ** linux/ioport.h ** - ********************/ - -#include - -extern struct resource iomem_resource; - -int request_resource(struct resource *root, struct resource *); /* intel-gtt.c */ - -int release_resource(struct resource *r); /* i915_dma.c */ - -unsigned long resource_type(const struct resource *); - -#define IORESOURCE_ROM_SHADOW (1<<1) -#define IORESOURCE_BITS 0x000000ff - -/***************** - ** linux/pci.h ** - *****************/ - -enum { - PCI_STD_RESOURCE_END = 5, - PCI_ROM_RESOURCE, - PCI_NUM_RESOURCES, - DEVICE_COUNT_RESOURCE = PCI_NUM_RESOURCES, -}; - -struct pci_dev { - unsigned int devfn; - unsigned int irq; - struct resource resource[DEVICE_COUNT_RESOURCE]; - struct pci_bus *bus; /* i915_dma.c */ - unsigned short vendor; /* intel-agp.c */ - unsigned short device; - u8 hdr_type; - bool msi_enabled; - struct device dev; /* intel-agp.c */ - unsigned short subsystem_vendor; /* intel_display.c */ - unsigned short subsystem_device; - u8 revision; /* i915_gem.c */ - u8 pcie_cap; - u16 pcie_flags_reg; - unsigned int class; -}; - -struct pci_device_id { - u32 vendor, device, subvendor, subdevice, class, class_mask; - unsigned long driver_data; -}; - -#include - -struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); -int pci_bus_alloc_resource(struct pci_bus *bus, - struct resource *res, resource_size_t size, - resource_size_t align, resource_size_t min, - unsigned int type_mask, - resource_size_t (*alignf)(void *, - const struct resource *, - resource_size_t, - resource_size_t), - void *alignf_data); -resource_size_t pcibios_align_resource(void *, const struct resource *, - resource_size_t, - resource_size_t); -int pci_set_power_state(struct pci_dev *dev, pci_power_t state); -struct pci_dev *pci_get_class(unsigned int device_class, struct pci_dev *from); -int pci_save_state(struct pci_dev *dev); - -enum { PCIBIOS_MIN_MEM = 0UL }; - - -static inline void pci_set_drvdata(struct pci_dev *pdev, void *data) -{ - pdev->dev.drvdata = data; -} - -static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) -{ - *dev->dev.dma_mask = mask; - return 0; -} - -static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) -{ - dev->dev.coherent_dma_mask = mask; - return 0; -} - -/* agp/generic.c */ -#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) - -static inline dma_addr_t pci_bus_address(struct pci_dev *pdev, int bar) -{ - lx_printf("pci_bus_address called\n"); - return (dma_addr_t)pci_resource_start(pdev, bar); -} - -struct pci_dev *pci_dev_get(struct pci_dev *dev); - -void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); -void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); - - -/********************************** - ** asm-generic/pci-dma-compat.h ** - **********************************/ - -void pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address, size_t size, int direction); - -dma_addr_t pci_map_page(struct pci_dev *hwdev, struct page *page, unsigned long offset, size_t size, int direction); - -int pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr); - -int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction); -void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction); - - -/***************************** - ** asm-generic/pci_iomap.h ** - *****************************/ - -void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); -void pci_iounmap(struct pci_dev *dev, void __iomem *p); - - -/*********************** - ** linux/irqreturn.h ** - ***********************/ - -#include - -/******************** - ** linux/of_irq.h ** - ********************/ - -extern int of_irq_get(struct device_node *dev, int index); -extern int of_irq_get_byname(struct device_node *dev, const char *name); -struct irq_data *irq_get_irq_data(unsigned int); - - -/********************** - ** linux/irq_work.h ** - **********************/ - -struct irq_work { int DUMMY; }; -bool irq_work_queue(struct irq_work *work); -void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)); - -/********************* - ** linux/hardirq.h ** - *********************/ - -extern void synchronize_irq(unsigned int irq); - -/***************** - ** linux/irq.h ** - *****************/ - -#include - -struct irq_chip { int DUMMY; }; -void irqd_set_trigger_type(struct irq_data *, u32); -void irq_set_chip_and_handler(unsigned int, struct irq_chip *, - irq_flow_handler_t); -void handle_simple_irq(struct irq_desc *); -extern struct irq_chip dummy_irq_chip; - -/************************ - ** linux/capability.h ** - ************************/ - -#define CAP_SYS_ADMIN 21 -#define CAP_SYS_NICE 23 - -bool capable(int); - - -/************************* - ** linux/agp_backend.h ** - *************************/ - -#include - - -/******************** - ** linux/vgaarb.h ** - ********************/ - -/* - * needed for compiling i915_dma.c - */ - -enum { - VGA_RSRC_LEGACY_IO = 0x01, - VGA_RSRC_LEGACY_MEM = 0x02, - VGA_RSRC_NORMAL_IO = 0x04, - VGA_RSRC_NORMAL_MEM = 0x08, -}; - -int vga_client_register(struct pci_dev *pdev, void *cookie, - void (*irq_set_state)(void *cookie, bool state), - unsigned int (*set_vga_decode)(void *cookie, bool state)); - -int vga_get_uninterruptible(struct pci_dev *pdev, unsigned int rsrc); - -void vga_put(struct pci_dev *pdev, unsigned int rsrc); - - -/********************** - ** linux/notifier.h ** - **********************/ - -/* needed by intel_lvds.c */ - -struct notifier_block; - -typedef int (*notifier_fn_t)(struct notifier_block *nb, unsigned long action, void *data); - -struct notifier_block { notifier_fn_t notifier_call; }; - -enum { - NOTIFY_DONE = 0x0000, - NOTIFY_OK = 0x0001, - NOTIFY_STOP_MASK = 0x8000, - NOTIFY_BAD = (NOTIFY_STOP_MASK|0x0002), -}; - -struct atomic_notifier_head { unsigned dummy; }; - -extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, struct notifier_block *nb); -extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh, struct notifier_block *nb); - -#define ATOMIC_INIT_NOTIFIER_HEAD(name) do { } while (0) - -int atomic_notifier_call_chain(struct atomic_notifier_head *nh, - unsigned long val, void *v); - -/******************* - ** acpi/button.h ** - *******************/ - -int acpi_lid_open(void); -int acpi_lid_notifier_register(struct notifier_block *nb); -int acpi_lid_notifier_unregister(struct notifier_block *nb); - - -/********************* - ** linux/console.h ** - *********************/ - -static inline bool vgacon_text_force(void) { return false; } - - -/****************** - ** acpi/video.h ** - ******************/ - -#define ACPI_VIDEO_CLASS "video" - -int acpi_video_register(void); -void acpi_video_unregister(void); - -enum acpi_backlight_type { - acpi_backlight_native = 3, -}; -enum acpi_backlight_type acpi_video_get_backlight_type(void); - - -/****************** - ** acpi/video.h ** - ******************/ - -int register_acpi_notifier(struct notifier_block *); -int unregister_acpi_notifier(struct notifier_block *); - - -/********************** - ** linux/memremap.h ** - **********************/ - -void *memremap(resource_size_t offset, size_t size, unsigned long flags); -void memunmap(void *addr); - - -/***************** - ** asm/ioctl.h ** - *****************/ - -#include - - -/**************** - ** linux/fs.h ** - ****************/ - -struct inode { - const struct inode_operations *i_op; - struct address_space *i_mapping; -}; - -struct file -{ - atomic_long_t f_count; - struct inode *f_inode; - struct address_space *f_mapping; - void *private_data; -}; - -struct poll_table_struct; -typedef struct poll_table_struct poll_table; - -struct inode; -struct inode_operations { void (*truncate) (struct inode *); }; - -/* i915_drv.c */ -struct file_operations { - struct module *owner; - loff_t (*llseek) (struct file *, loff_t, int); - ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); - unsigned int (*poll) (struct file *, struct poll_table_struct *); - long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); - int (*mmap) (struct file *, struct vm_area_struct *); - long (*compat_ioctl) (struct file *, unsigned int, unsigned long); - int (*open) (struct inode *, struct file *); - int (*release) (struct inode *, struct file *); -}; - -enum { PROT_READ = 0x1, PROT_WRITE = 0x2 }; - -enum { MAP_SHARED = 0x1 }; - -loff_t noop_llseek(struct file *file, loff_t offset, int whence); - -struct inode *file_inode(struct file *f); - -unsigned long invalidate_mapping_pages(struct address_space *mapping, - pgoff_t start, pgoff_t end); - -int pagecache_write_begin(struct file *, struct address_space *, loff_t, - unsigned, unsigned, struct page **, void **); -int pagecache_write_end(struct file *, struct address_space *, loff_t, - unsigned, unsigned, struct page *, void *); - - -/****************************** - ** include/asm/set_memory.h ** - ******************************/ - -int set_pages_array_wc(struct page **, int); -int set_pages_array_wb(struct page **, int); - - -/************************** - ** linux/stop_machine.h ** - **************************/ -struct cpumask; - -typedef int (*cpu_stop_fn_t)(void *arg); - -int stop_machine(cpu_stop_fn_t, void *, const struct cpumask *); - - -/***** - * - */ -struct rcu_head { int dummy; }; - -void clflush(volatile void *); -void clflushopt(volatile void *); - - -/********************* - ** linux/vmalloc.h ** - *********************/ - -void vunmap(const void *); -void *vmap(struct page **, unsigned int, unsigned long, pgprot_t); - - -/********************* - ** linux/seqlock.h ** - *********************/ - -typedef unsigned seqlock_t; - -typedef struct seqcount { - unsigned DUMMY; -} seqcount_t; - -void seqlock_init (seqlock_t *); -unsigned __read_seqcount_begin(const seqcount_t *); -int __read_seqcount_retry(const seqcount_t *, unsigned); -unsigned raw_read_seqcount(const seqcount_t *); -int read_seqcount_retry(const seqcount_t *, unsigned); -void write_seqlock(seqlock_t *); -void write_sequnlock(seqlock_t *); -unsigned read_seqbegin(const seqlock_t *); -unsigned read_seqretry(const seqlock_t *, unsigned); - -/************************* - ** linux/reservation.h ** - *************************/ - -struct reservation_object_list { - u32 shared_count; - struct dma_fence *shared[]; -}; - -struct reservation_object { - seqcount_t seq; - struct dma_fence *fence_excl; - struct reservation_object_list *fence; -}; -struct ww_acquire_ctx; -int reservation_object_lock(struct reservation_object *, struct ww_acquire_ctx *); -void reservation_object_unlock(struct reservation_object *); -struct dma_fence * reservation_object_get_excl_rcu(struct reservation_object *); -int reservation_object_get_fences_rcu(struct reservation_object *, - struct dma_fence **, unsigned *, - struct dma_fence ***); -bool reservation_object_trylock(struct reservation_object *); -void reservation_object_add_excl_fence(struct reservation_object *, struct dma_fence *); -void reservation_object_init(struct reservation_object *); -void reservation_object_fini(struct reservation_object *); -bool reservation_object_test_signaled_rcu(struct reservation_object *, bool); - - -/******************* - * linux/swiotlb.h * - *******************/ - -unsigned int swiotlb_max_segment(void); - - -/**************** - * linux/uuid.h * - ****************/ - -#define UUID_STRING_LEN 36 - - -/********************** - ** linux/shmem_fs.h ** - **********************/ - -extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); - -extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, - pgoff_t index, gfp_t gfp_mask); -extern struct page *shmem_read_mapping_page( struct address_space *mapping, pgoff_t index); -struct file *shmem_file_setup(const char *, loff_t, unsigned long); -struct vfsmount; -struct file *shmem_file_setup_with_mnt(struct vfsmount *, const char *, loff_t, unsigned long); - -/***************************** - ** linux/mod_devicetable.h ** - *****************************/ - -enum dmi_field { - DMI_SYS_VENDOR, - DMI_PRODUCT_NAME, - DMI_PRODUCT_VERSION, - DMI_BOARD_VENDOR, - DMI_BOARD_NAME, -}; - -struct dmi_strmatch { - unsigned char slot:7; - unsigned char exact_match:1; - char substr[79]; -}; - -struct dmi_system_id { - int (*callback)(const struct dmi_system_id *); - const char *ident; - struct dmi_strmatch matches[4]; - void *driver_data; -}; - -extern int dmi_check_system(const struct dmi_system_id *list); - -#define DMI_MATCH(a, b) { .slot = a, .substr = b } -#define DMI_EXACT_MATCH(a, b) { .slot = a, .substr = b, .exact_match = 1 } - -#define I2C_MODULE_PREFIX "i2c:" -#define I2C_NAME_SIZE 20 - -struct i2c_device_id { - char name[I2C_NAME_SIZE]; - kernel_ulong_t driver_data; /* Data private to the driver */ -}; - -/********************* - ** asm/processor.h ** - *********************/ - -struct boot_cpu_data { - unsigned x86_clflush_size; -}; - -extern struct boot_cpu_data boot_cpu_data; - - -/*********************** - ** linux/backlight.h ** - ***********************/ - -enum backlight_type { - BACKLIGHT_RAW = 1, - BACKLIGHT_PLATFORM, - BACKLIGHT_FIRMWARE, - BACKLIGHT_TYPE_MAX, -}; - -struct backlight_properties { - int brightness; - int max_brightness; - int power; - enum backlight_type type; -}; - -struct backlight_device { - struct backlight_properties props; - const struct backlight_ops * ops; - struct intel_connector *connector; -}; - -static inline struct intel_connector* bl_get_data(struct backlight_device *bl_dev) -{ - if (bl_dev) - return bl_dev->connector; - return NULL; -} - -struct fb_info; -struct backlight_ops { - unsigned int options; - int (*update_status)(struct backlight_device *); - int (*get_brightness)(struct backlight_device *); - int (*check_fb)(struct backlight_device *, struct fb_info *); -}; - -extern struct backlight_device *backlight_device_register(const char *name, - struct device *dev, void *devdata, const struct backlight_ops *ops, - const struct backlight_properties *props); -extern void backlight_device_unregister(struct backlight_device *bd); - -/***************** - ** linux/i2c.h ** - *****************/ - -struct i2c_adapter; -struct i2c_msg; - -enum i2c_slave_event { DUMMY }; - - -/*********************** - ** linux/i2c-smbus.h ** - ***********************/ - -struct i2c_smbus_alert_setup; - - -/**************** - ** linux/of.h ** - ****************/ - -int of_alias_get_id(struct device_node *np, const char *stem); -void of_node_put(struct device_node *); -int of_property_match_string(const struct device_node *, const char *, - const char *); -int of_property_read_u32_index(const struct device_node *, const char *, u32, - u32 *); - - -/*********************** - ** linux/of_device.h ** - ***********************/ - -int of_driver_match_device(struct device *dev, const struct device_driver *drv); - - -/****************** - ** linux/acpi.h ** - ******************/ - -struct kobject_uevent_env; - -bool acpi_driver_match_device(struct device *dev, const struct device_driver *drv); -int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); - -int acpi_dev_pm_attach(struct device *dev, bool power_on); -void acpi_dev_pm_detach(struct device *dev, bool power_off); - -int acpi_device_modalias(struct device *, char *, int); - -#define ACPI_COMPANION(dev) (NULL) -#define ACPI_COMPANION_SET(dev, adev) do { } while (0) - -const char *acpi_dev_name(struct acpi_device *adev); -int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index); -void acpi_device_clear_enumerated(struct acpi_device *); -int acpi_reconfig_notifier_register(struct notifier_block *); -int acpi_reconfig_notifier_unregister(struct notifier_block *); - -/****************** - ** linux/gpio.h ** - ******************/ - -/* make these flag values available regardless of GPIO kconfig options */ -#define GPIOF_DIR_OUT (0 << 0) -#define GPIOF_DIR_IN (1 << 0) - -#define GPIOF_INIT_LOW (0 << 1) -#define GPIOF_INIT_HIGH (1 << 1) - -#define GPIOF_IN (GPIOF_DIR_IN) -#define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH) - -#define GPIOF_OPEN_DRAIN (1 << 3) - -/* needed by drivers/gpu/drm/drm_modes.c */ -#include - -/********************* - ** linux/cpufreq.h ** - *********************/ - -struct cpufreq_cpuinfo { - unsigned int max_freq; - unsigned int min_freq; -}; - -struct cpufreq_policy { - struct cpufreq_cpuinfo cpuinfo; -}; - -struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); -void cpufreq_cpu_put(struct cpufreq_policy *policy); - - -/******************************** - ** arch/x86/include/asm/tsc.h ** - ********************************/ - -extern unsigned int tsc_khz; - - -/************************************** - ** drivers/platform/x86/intel_ips.h ** - **************************************/ - -void ips_link_to_i915_driver(void); - - -/************************************** - ** drivers/gpu/drm/i915/intel_drv.h ** - **************************************/ - -struct drm_device; - - -/****************** - ** linux/kgdb.h ** - ******************/ - -#define in_dbg_master() (0) - - -/************************* - ** asm-generic/div64.h ** - *************************/ - -#define do_div(n,base) ({ \ - unsigned long __base = (base); \ - unsigned long __rem; \ - __rem = ((uint64_t)(n)) % __base; \ - (n) = ((uint64_t)(n)) / __base; \ - __rem; \ - }) - - -/************************************** - ** definitions needed by intel_pm.c ** - **************************************/ - -void trace_intel_gpu_freq_change(int); - - -/**************** - ** linux/fb.h ** - ****************/ - -#include - -enum { - FBINFO_STATE_RUNNING = 0, - FBINFO_STATE_SUSPENDED = 1, - FBINFO_CAN_FORCE_OUTPUT = 0x200000, - FBINFO_DEFAULT = 0, -}; - -extern int fb_get_options(const char *name, char **option); - -struct aperture { - resource_size_t base; - resource_size_t size; -}; - -struct apertures_struct { - unsigned int count; - struct aperture ranges[0]; -}; - -static inline struct apertures_struct *alloc_apertures(unsigned int max_num) { - void * p = kzalloc(sizeof(struct apertures_struct) + max_num * - sizeof(struct aperture), GFP_KERNEL); - struct apertures_struct *a = (struct apertures_struct *)p; - if (!a) - return NULL; - a->count = max_num; - return a; -} - -/******************* - ** linux/sysrq.h ** - *******************/ - -struct sysrq_key_op { unsigned dummy; }; - -int register_sysrq_key(int key, struct sysrq_key_op *op); -int unregister_sysrq_key(int key, struct sysrq_key_op *op); - - -/******************* - ** linux/sysrq.h ** - *******************/ - -struct fence; -void fence_put(struct fence *fence); -signed long fence_wait(struct fence *fence, bool intr); - - -/******************* - ** drm/drm_pci.h ** - *******************/ - -struct drm_dma_handle *drm_pci_alloc(struct drm_device *, size_t, size_t); - - -/**************************** - ** drm/drm_modeset_lock.h ** - ****************************/ - -#include