Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dkms: optimize the dg2 kernel driver loading time #2028

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)))

I915_FW += i915/compat.ko
I915_FW += i915/intel_vsec.ko
I915_FW += i915/i915_ag.ko

_EXTRA_FW_ += $(I915_FW)

AUTO_IN += $(TARGET_DEVICE_DIR)/{{_extra_dir}}/auto_hal.in
Expand Down
11 changes: 11 additions & 0 deletions groups/kernel/AndroidBoard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,17 @@ $(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
$(hide) rm -rf $(PWD)/$(PRODUCT_OUT)/obj/kernel/drivers/base/firmware_loader
$(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}}