Commit edd73bf0 authored by forum_service's avatar forum_service Committed by carbon

linux: version release v4.1.4

[ion] support get ion total size
[fb_ili9341]fb_ili9341 bring up

Change-Id: I41cf49172640923ebc64947cbc9a23cad3d05a46
parent d13f317c
This diff is collapsed.
[spatch]
options = --timeout 200
options = --use-gitgrep
......@@ -47,7 +47,7 @@
#define SDHCI_GPIO_CD_DEBOUNCE_DELAY_TIME 200
#ifdef CONFIG_PM_SLEEP
#ifdef CONFIG_ARCH_CVCV180X_ASIC
#ifdef CONFIG_ARCH_CV180X_ASIC
#define RTC_CTRL_BASE 0x5025000
#define RTCSYS_CLKMUX 0x1C
......
......@@ -47,7 +47,7 @@
#define SDHCI_GPIO_CD_DEBOUNCE_DELAY_TIME 200
#ifdef CONFIG_PM_SLEEP
#ifdef CONFIG_ARCH_CVCV181X_ASIC
#ifdef CONFIG_ARCH_CV181X_ASIC
#define RTC_CTRL_BASE 0x5025000
#define RTCSYS_CLKMUX 0x1C
......
......@@ -201,11 +201,9 @@ static int cvitek_get_heap_info(struct ion_device *dev, struct cvitek_heap_info
case ION_HEAP_TYPE_CARVEOUT:
case ION_HEAP_TYPE_CHUNK:
{
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0))
info->total_size = heap->total_size;
info->avail_size =
heap->total_size - heap->num_of_alloc_bytes;
#endif
break;
}
case ION_HEAP_TYPE_SYSTEM:
......
......@@ -30,6 +30,9 @@ static int init_display(struct fbtft_par *par)
{
par->fbtftops.reset(par);
if (par->gpio.cs)
gpiod_set_value(par->gpio.cs, 0); /* Activate chip */
/* startup sequence for MI0283QT-9A */
write_reg(par, MIPI_DCS_SOFT_RESET);
mdelay(5);
......
......@@ -3,7 +3,7 @@
INCLUDEDIR := -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/
CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g
TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test
TEST_GEN_FILES := ionapp_export ionapp_import ionmap_test iongetsize_test
all: $(TEST_GEN_FILES)
......@@ -18,3 +18,4 @@ include ../../lib.mk
$(OUTPUT)/ionapp_export: ionapp_export.c ipcsocket.c ionutils.c
$(OUTPUT)/ionapp_import: ionapp_import.c ipcsocket.c ionutils.c
$(OUTPUT)/ionmap_test: ionmap_test.c ionutils.c ipcsocket.c
$(OUTPUT)/iongetsize_test: iongetsize_test.c
\ No newline at end of file
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include "ion_cvitek.h"
int main(int argc, char *argv[])
{
int ret, ionfd;
struct ion_custom_data custom;
struct cvitek_heap_info head_info;
ionfd = open("/dev/ion", O_RDWR);
if (ionfd < 0) {
fprintf(stderr, "<%s>: Failed to open ion client:\n",
__func__);
return -1;
}
memset(&custom, 0, sizeof(custom));
custom.cmd = ION_IOC_CVITEK_GET_HEAP_INFO;
custom.arg = &head_info;
head_info.id = 0;
ret = ioctl(ionfd, ION_IOC_CUSTOM, &custom);
if (ret < 0) {
fprintf(stderr, "<%s>: Failed: ION_IOC_CUSTOM\n",
__func__);
goto exit;
}
fprintf(stderr, "head_id=%d, total_size=0x%lx, avail_size=0x%lx\n",
head_info.id, head_info.total_size, head_info.avail_size);
exit:
if (ionfd)
close(ionfd);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment