Skip to content

Commit

Permalink
Initial changes for hybrid ION/PMEM
Browse files Browse the repository at this point in the history
  • Loading branch information
arco committed Dec 24, 2013
1 parent 8314630 commit c1babe0
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 5,146 deletions.
17 changes: 8 additions & 9 deletions BoardConfig.mk
Expand Up @@ -28,8 +28,6 @@ USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/samsung/ancora/BoardConfigVendor.mk

TARGET_SPECIFIC_HEADER_PATH := device/samsung/ancora/include

TARGET_BOARD_PLATFORM := msm7x30
TARGET_BOARD_PLATFORM_GPU := qcom-adreno200

Expand All @@ -44,7 +42,7 @@ TARGET_USE_SCORPION_BIONIC_OPTIMIZATION := true

TARGET_ARCH_LOWMEM := true

COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE
COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DNEW_ION_API
COMMON_GLOBAL_CFLAGS += -DBINDER_COMPAT
COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CAMERA_LEGACY

Expand All @@ -69,7 +67,7 @@ BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_WLAN_DEVICE := bcmdhd
BOARD_HAVE_SAMSUNG_WIFI := true

WIFI_DRIVER_MODULE_PATH := "/lib/modules/dhd.ko"
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/dhd.ko"
WIFI_DRIVER_MODULE_NAME := "dhd"
WIFI_DRIVER_MODULE_ARG := "firmware_path=/vendor/firmware/fw_bcmdhd.bin nvram_path=/vendor/firmware/nvram_net.txt"
WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/vendor/firmware/fw_bcmdhd_apsta.bin nvram_path=/vendor/firmware/nvram_net.txt"
Expand Down Expand Up @@ -105,11 +103,10 @@ USE_OPENGL_RENDERER := true
ENABLE_WEBGL := true
TARGET_FORCE_CPU_UPLOAD := true

TARGET_QCOM_DISPLAY_VARIANT := legacy
TARGET_NO_HW_VSYNC := false
TARGET_USES_ION := false
TARGET_QCOM_DISPLAY_VARIANT := caf
TARGET_QCOM_MEDIA_VARIANT := caf
TARGET_USES_ION := true
TARGET_USES_C2D_COMPOSITION := true
BOARD_EGL_NEEDS_LEGACY_FB := true

BOARD_NEEDS_MEMORYHEAPPMEM := true

Expand All @@ -120,6 +117,7 @@ BOARD_USE_LEGACY_TOUCHSCREEN := true

# Camera stuff
BOARD_USES_LEGACY_OVERLAY := true
BOARD_USES_QCOM_LEGACY_CAM_PARAMS := true
BOARD_CAMERA_USE_MM_HEAP := true
TARGET_DISABLE_ARM_PIE := true

Expand Down Expand Up @@ -158,7 +156,8 @@ TARGET_RECOVERY_FSTAB := device/samsung/ancora/recovery.fstab
#BOARD_UMS_LUNFILE := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
# End recovery stuff

TARGET_PREBUILT_KERNEL := device/samsung/ancora/prebuilt/zImage
TARGET_KERNEL_SOURCE := kernel/samsung/msm7x30-common
TARGET_KERNEL_CONFIG := ancora_defconfig
TARGET_PREBUILT_RECOVERY_KERNEL := device/samsung/ancora/recovery/zImage

TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
18 changes: 0 additions & 18 deletions ancora.mk
Expand Up @@ -72,15 +72,6 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/keyfiles/sec_power_key.kl:system/usr/keylayout/sec_power_key.kl \
$(LOCAL_PATH)/keyfiles/sec_touchscreen.kl:system/usr/keylayout/sec_touchscreen.kl

# Modules
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/prebuilt/cifs.ko:root/lib/modules/cifs.ko \
$(LOCAL_PATH)/prebuilt/dhd.ko:root/lib/modules/dhd.ko \
$(LOCAL_PATH)/prebuilt/scsi_wait_scan.ko:root/lib/modules/scsi_wait_scan.ko \
$(LOCAL_PATH)/prebuilt/cifs.ko:system/lib/modules/cifs.ko \
$(LOCAL_PATH)/prebuilt/dhd.ko:system/lib/modules/dhd.ko \
$(LOCAL_PATH)/prebuilt/scsi_wait_scan.ko:system/lib/modules/scsi_wait_scan.ko

# LPM
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/lpm/bin/charging_mode:system/bin/charging_mode \
Expand Down Expand Up @@ -152,15 +143,6 @@ PRODUCT_PACKAGES += \
ADDITIONAL_DEFAULT_PROPERTIES += \
ro.secure=0

ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := $(LOCAL_PATH)/prebuilt/zImage
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif

PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel

# We have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise

Expand Down
6 changes: 6 additions & 0 deletions camerahal/Android.mk
Expand Up @@ -15,6 +15,12 @@ LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := cameraHAL.cpp
LOCAL_C_INCLUDES := $(TOP)/frameworks/native/include

ifeq ($(TARGET_QCOM_DISPLAY_VARIANT),caf)
LOCAL_C_INCLUDES += hardware/qcom/display-caf/libgralloc
else
LOCAL_C_INCLUDES += hardware/qcom/display-legacy/libgralloc
endif

LOCAL_SHARED_LIBRARIES := liblog libutils libcutils
LOCAL_SHARED_LIBRARIES += libui libhardware libcamera_client
LOCAL_SHARED_LIBRARIES += libseccameraadaptor
Expand Down
4 changes: 2 additions & 2 deletions camerahal/cameraHAL.cpp
Expand Up @@ -24,7 +24,6 @@
//#define DUMP_PARAMS 1 /* dump parameteters after get/set operation */

#define MAX_CAMERAS_SUPPORTED 2
#define GRALLOC_USAGE_PMEM_PRIVATE_ADSP GRALLOC_USAGE_PRIVATE_3

#define CAMERA_ID_FRONT 1
#define CAMERA_ID_BACK 0
Expand All @@ -42,6 +41,7 @@
#include <binder/IMemory.h>
#include "CameraHardwareInterface.h"
#include <cutils/properties.h>
#include <gralloc_priv.h>

using android::sp;
using android::Overlay;
Expand Down Expand Up @@ -498,7 +498,7 @@ int camera_set_preview_window(struct camera_device * device,
// return -1;
//}

window->set_usage(window, GRALLOC_USAGE_PMEM_PRIVATE_ADSP | GRALLOC_USAGE_HW_RENDER);
window->set_usage(window, GRALLOC_USAGE_PRIVATE_SYSTEM_HEAP | GRALLOC_USAGE_HW_RENDER);

if (window->set_buffers_geometry(window, preview_width,
preview_height, hal_pixel_format)) {
Expand Down
4 changes: 2 additions & 2 deletions cm.mk
Expand Up @@ -9,8 +9,8 @@ $(call inherit-product, $(LOCAL_PATH)/full_ancora.mk)

PRODUCT_RELEASE_NAME := ancora

#CM_EXPERIMENTAL := true
#CM_EXTRAVERSION := alpha1
#RELEASE_TYPE := EXPERIMENTAL
#CM_EXTRAVERSION := beta2

# Setup device configuration
PRODUCT_NAME := cm_ancora
Expand Down
15 changes: 15 additions & 0 deletions config/init.qcom.rc
Expand Up @@ -157,6 +157,21 @@ on boot
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate

chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_rate

write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760

Expand Down
86 changes: 0 additions & 86 deletions include/linux/android_pmem.h

This file was deleted.

55 changes: 0 additions & 55 deletions include/linux/ashmem.h

This file was deleted.

36 changes: 0 additions & 36 deletions include/linux/genlock.h

This file was deleted.

5 comments on commit c1babe0

@Christopher83
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Arne,
I pushed some stuff we were working on during last days to help the devs with Galaxy W porting to hybrid ION+PMEM ADSP:
https://github.com/AriesVE-DevCon-TEAM/android_device_samsung_ancora/commits/cm-10.1_ion_pmem_adsp

I hope these commits could be useful...

I wish you a Merry Christmas!

EDIT: I saw now that you already released a new build. Great!
Best regards.

@arco
Copy link
Owner Author

@arco arco commented on c1babe0 Dec 24, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Christopher83
Copy link
Contributor

@Christopher83 Christopher83 commented on c1babe0 Dec 24, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arco
Copy link
Owner Author

@arco arco commented on c1babe0 Dec 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, CM11 won't boot for me. Stuck at the splash screen. I might be missing something...

@arco
Copy link
Owner Author

@arco arco commented on c1babe0 Dec 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Booting now. Had to include libgenlock in the build.

Please sign in to comment.