Skip to content

Commit

Permalink
dkms: optimize the dg2 kernel driver loading time
Browse files Browse the repository at this point in the history
Tracked-On: OAM-124024
Signed-off-by: Wang, Yiyang <[email protected]>
  • Loading branch information
wangyiyanga committed Sep 6, 2024
1 parent 00f6060 commit eb49c65
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions groups/graphics/auto/AndroidBoard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ $(foreach t, $(patsubst $(I915_FW_PATH)/%,%,$(wildcard $(I915_FW_PATH)/adl*)) ,$
$(foreach t, $(patsubst $(I915_FW_PATH)/%,%,$(wildcard $(I915_FW_PATH)/dg2*)) ,$(eval I915_FW += i915/$(t)) $(eval $(LOCAL_KERNEL) : $(PRODUCT_OUT)/vendor/firmware/i915/$(t)))
$(foreach t, $(patsubst $(I915_FW_PATH)/%,%,$(wildcard $(I915_FW_PATH)/mtl*)) ,$(eval I915_FW += i915/$(t)) $(eval $(LOCAL_KERNEL) : $(PRODUCT_OUT)/vendor/firmware/i915/$(t)))

$(foreach t, $(patsubst $(I915_FW_PATH)/%,%,$(wildcard $(I915_FW_PATH)/intel_vsec*)) ,$(eval I915_FW += i915/$(t)) $(eval $(LOCAL_KERNEL) : $(PRODUCT_OUT)/vendor/firmware/i915/$(t)))
$(foreach t, $(patsubst $(I915_FW_PATH)/%,%,$(wildcard $(I915_FW_PATH)/compat*)) ,$(eval I915_FW += i915/$(t)) $(eval $(LOCAL_KERNEL) : $(PRODUCT_OUT)/vendor/firmware/i915/$(t)))
$(foreach t, $(patsubst $(I915_FW_PATH)/%,%,$(wildcard $(I915_FW_PATH)/i915_ag*)) ,$(eval I915_FW += i915/$(t)) $(eval $(LOCAL_KERNEL) : $(PRODUCT_OUT)/vendor/firmware/i915/$(t)))

_EXTRA_FW_ += $(I915_FW)

AUTO_IN += $(TARGET_DEVICE_DIR)/{{_extra_dir}}/auto_hal.in
Expand Down
10 changes: 10 additions & 0 deletions groups/kernel/AndroidBoard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ $(LOCAL_KERNEL_PATH)/copy_modules: $(LOCAL_KERNEL)
mkdir -p $(PWD)/$(PRODUCT_OUT)/$(KERNEL_MODULES_ROOT)/$(KERNELRELEASE)/$$(dirname $$f) ; \
ln -s /$(KERNEL_MODULES_ROOT_PATH)/$$(basename $$f) $(PWD)/$(PRODUCT_OUT)/$(KERNEL_MODULES_ROOT)/$(KERNELRELEASE)/$$f || exit 1; \
done
$(hide) cd $(LOCAL_KERNEL_PATH)/lib/modules/$(KERNELRELEASE) && for f in `find . -name 'compat.ko'`; do \
cp $$f $(PWD)/$(PRODUCT_OUT)/vendor/firmware/i915/ || exit 1; \
done
$(hide) cd $(LOCAL_KERNEL_PATH)/lib/modules/$(KERNELRELEASE) && for f in `find . -name 'intel_vsec.ko'`; do \
cp $$f $(PWD)/$(PRODUCT_OUT)/vendor/firmware/i915/ || exit 1; \
done
$(hide) cd $(LOCAL_KERNEL_PATH)/lib/modules/$(KERNELRELEASE) && for f in `find . -name 'i915_ag.ko'`; do \
cp $$f $(PWD)/$(PRODUCT_OUT)/vendor/firmware/i915/ || exit 1; \
done
$(KERNEL_MAKE_CMD) $(KERNEL_MAKE_OPTIONS)
$(hide) touch $@
#usb-init for recovery
$(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/$(KERNEL_MODULES_ROOT)
Expand Down
8 changes: 0 additions & 8 deletions groups/kernel/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,3 @@ on property:sys.boot_completed=1

on early-init
mount proc proc /proc remount hidepid=2,gid=3009

{{#i915_ag_mods_version}}
on fs
insmod /vendor/lib/modules/compat.ko
insmod /vendor/lib/modules/intel_vsec.ko
insmod /vendor/lib/modules/i915_ag.ko

{{/i915_ag_mods_version}}

0 comments on commit eb49c65

Please sign in to comment.