osd: create logo_reserved node in dts in Android O

PD#150868: create logo_reserved node in dts in Android O

Change-Id: I4057aef2e40504920a9d3b086d31d96aa23bb52f
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
This commit is contained in:
Pengcheng Chen
2017-09-12 17:08:06 +08:00
committed by Jianxin Pan
parent 50d9fb95d9
commit 905253988f
14 changed files with 123 additions and 78 deletions

View File

@@ -77,7 +77,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x3f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -694,19 +700,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x3e000000";
logo_addr = "0x3f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -35,11 +35,6 @@
serial4 = &uart_AO_B;
};
ion_dev {
compatible = "amlogic, ion_dev";
memory-region = <&ion_reserved>;
};
memory@00000000 {
device_type = "memory";
linux,usable-memory = <0x0 0x0100000 0x0 0x3ff00000>;
@@ -77,14 +72,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
ion_reserved:linux,ion-dev {
fb_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x7000000>;
size = <0x0 0x2400000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x3dc00000 0x0 0x2400000>;
};
/* vdin0 CMA pool */
//vdin0_cma_reserved:linux,vdin0_cma {
// compatible = "shared-dma-pool";
@@ -693,19 +687,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&fb_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x1800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x3e000000";
logo_addr = "0x3dc00000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -86,7 +86,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -703,19 +709,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -36,11 +36,6 @@
serial4 = &uart_AO_B;
};
ion_dev {
compatible = "amlogic, ion_dev";
memory-region = <&ion_reserved>;
};
memory@00000000 {
device_type = "memory";
linux,usable-memory = <0x0 0x0100000 0x0 0x7ff00000>;
@@ -78,12 +73,12 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
ion_reserved:linux,ion-dev {
fb_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x7000000>;
size = <0x0 0x2400000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7dc00000 0x0 0x2400000>;
};
/* vdin0 CMA pool */
@@ -695,19 +690,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&fb_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x1800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7dc00000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -78,7 +78,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -687,19 +693,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -78,7 +78,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x3f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -632,19 +638,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x3e000000";
logo_addr = "0x3f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -78,7 +78,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -632,19 +638,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -36,11 +36,6 @@
serial4 = &uart_AO_B;
};
ion_dev {
compatible = "amlogic, ion_dev";
memory-region = <&ion_reserved>;
};
memory@00000000 {
device_type = "memory";
linux,usable-memory = <0x0 0x0100000 0x0 0x7ff00000>;
@@ -78,12 +73,12 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
ion_reserved:linux,ion-dev {
fb_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x7000000>;
size = <0x0 0x2400000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7dc00000 0x0 0x2400000>;
};
/* vdin0 CMA pool */
@@ -633,19 +628,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&fb_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x1800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7dc00000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -62,9 +62,9 @@
fb_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x2000000>;
size = <0x0 0x2400000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7e000000 0x0 0x2000000>;
alloc-ranges = <0x0 0x7dc00000 0x0 0x2400000>;
};
@@ -473,14 +473,14 @@
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7dc00000";
};
ge2d {

View File

@@ -62,9 +62,9 @@
fb_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x2000000>;
size = <0x0 0x2400000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7e000000 0x0 0x2000000>;
alloc-ranges = <0x0 0x7dc00000 0x0 0x2400000>;
};
@@ -560,14 +560,14 @@
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7dc00000";
};
ge2d {

View File

@@ -76,7 +76,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x3f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -685,18 +691,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
mem_size = <0x00800000 0x01800000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x3f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -77,7 +77,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -718,19 +724,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x7e000000";
logo_addr = "0x7f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -77,7 +77,13 @@
size = <0x0 0x2000000>;
alignment = <0x0 0x400000>;
};
logo_reserved:linux,meson-fb {
compatible = "shared-dma-pool";
reusable;
size = <0x0 0x800000>;
alignment = <0x0 0x400000>;
alloc-ranges = <0x0 0x3f800000 0x0 0x800000>;
};
ion_reserved:linux,ion-dev {
compatible = "shared-dma-pool";
reusable;
@@ -614,19 +620,20 @@
meson-fb {
compatible = "amlogic, meson-fb";
memory-region = <&logo_reserved>;
dev_name = "meson-fb";
status = "okay";
interrupts = <0 3 1
0 89 1>;
interrupt-names = "viu-vsync", "rdma";
mem_size = <0x006AF000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size */
mem_size = <0x00800000 0x01851000 0x00100000>;
/* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
display_mode_default = "1080p60hz";
scale_mode = <1>;
/** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
display_size_default = <1920 1080 1920 3240 32>;
/*1920*1080*4*3 = 0x17BB000*/
logo_addr = "0x3e000000";
logo_addr = "0x3f800000";
};
ge2d {
compatible = "amlogic, ge2d";

View File

@@ -1112,8 +1112,9 @@ static int osd_mmap(struct fb_info *info, struct vm_area_struct *vma)
var = &info->var;
/* read cma/fb-reserved memory first */
if ((b_reserved_mem == true) &&
(fb_memsize[0] + fb_memsize[1] +
fb_memsize[2]) <= size) {
((fb_memsize[0] + fb_memsize[1] +
fb_memsize[2] <= size) &&
(fb_memsize[fb_index + 1] > 0))) {
fb_rmem_size[fb_index] = fb_memsize[fb_index + 1];
if (fb_index == DEV_OSD0)
fb_rmem_paddr[fb_index] = base +
@@ -3051,7 +3052,7 @@ static int __init rmem_fb_setup(struct reserved_mem *rmem)
fb_rmem.base = rmem->base;
fb_rmem.size = rmem->size;
rmem->ops = &rmem_fb_ops;
osd_log_dbg("Reserved memory: created fb at 0x%p, size %ld MiB\n",
osd_log_info("Reserved memory: created fb at 0x%p, size %ld MiB\n",
(void *)rmem->base, (unsigned long)rmem->size / SZ_1M);
return 0;
}