Browse Source

Merge "video: driver: compile video driver"

qctecmdr 3 years ago
parent
commit
2beddeb26e
3 changed files with 22 additions and 5 deletions
  1. 7 2
      Android.mk
  2. 8 2
      video_kernel_board.mk
  3. 7 1
      video_kernel_product.mk

+ 7 - 2
Android.mk

@@ -1,7 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0-only
-
+TARGET_VIDC_ENABLE := false
 ifeq ($(TARGET_USES_QMAA),false)
+TARGET_VIDC_ENABLE := true
+endif
 ifeq ($(TARGET_USES_QMAA_OVERRIDE_VIDEO),true)
+TARGET_VIDC_ENABLE := true
+endif
+
+ifeq ($(TARGET_VIDC_ENABLE),true)
 VIDEO_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/video-driver
 VIDEO_SELECT := CONFIG_MSM_VIDC_V4L2=m
 
@@ -37,4 +43,3 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(call intermediates-dir-for,DLKM,mmrm-module-s
 # BOARD_VENDOR_KERNEL_MODULES += $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE)
 include $(DLKM_DIR)/Build_external_kernelmodule.mk
 endif
-endif

+ 8 - 2
video_kernel_board.mk

@@ -1,7 +1,14 @@
 # SPDX-License-Identifier: GPL-2.0-only
-# Build video kernel driver
+TARGET_VIDC_ENABLE := false
 ifeq ($(TARGET_USES_QMAA),false)
+TARGET_VIDC_ENABLE := true
+endif
 ifeq ($(TARGET_USES_QMAA_OVERRIDE_VIDEO),true)
+TARGET_VIDC_ENABLE := true
+endif
+
+# Build video kernel driver
+ifeq ($(TARGET_VIDC_ENABLE),true)
 ifneq ($(TARGET_KERNEL_DLKM_DISABLE),true)
 ifneq ($(TARGET_BOARD_AUTO),true)
 ifeq ($(call is-board-platform-in-list,$(TARGET_BOARD_PLATFORM)),true)
@@ -12,4 +19,3 @@ endif
 endif
 endif
 endif
-endif

+ 7 - 1
video_kernel_product.mk

@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0-only
+TARGET_VIDC_ENABLE := false
 ifeq ($(TARGET_USES_QMAA),false)
+TARGET_VIDC_ENABLE := true
+endif
 ifeq ($(TARGET_USES_QMAA_OVERRIDE_VIDEO),true)
-PRODUCT_PACKAGES += msm_video.ko
+TARGET_VIDC_ENABLE := true
 endif
+
+ifeq ($(TARGET_VIDC_ENABLE),true)
+PRODUCT_PACKAGES += msm_video.ko
 endif