Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a50f5d0

Browse files
committed
Merge pull request torvalds#85 from xin3liang/vblank
enbable vblank event and reserve 128MB memory for graphic usage
2 parents 5ee2650 + 01949f5 commit a50f5d0

File tree

9 files changed

+229
-175
lines changed

9 files changed

+229
-175
lines changed

arch/arm64/boot/dts/hi6220-hikey.dts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@
4141
reg = <0x0 0x00000000 0x0 0x40000000>;
4242
};
4343

44+
reserved-memory {
45+
#address-cells = <2>;
46+
#size-cells = <2>;
47+
ranges;
48+
49+
/* global autoconfigured region for contiguous allocations
50+
* e.g. for graphic usage */
51+
linux,cma {
52+
compatible = "shared-dma-pool";
53+
reusable;
54+
size = <0x0 0x8000000>; /* 128M */
55+
alignment = <0x0 0x2000>; /* 4k page alignment */
56+
linux,cma-default;
57+
};
58+
};
59+
4460
smb {
4561
uart0: uart@f8015000 { /* console */
4662
status = "ok";
@@ -194,4 +210,20 @@
194210
startup-delay-us = <70000>;
195211
enable-active-high;
196212
};
213+
214+
hisi-ion@0 {
215+
compatible = "hisilicon,ion";
216+
217+
heap_sys_user@0 {
218+
heap-name = "sys_user";
219+
heap-range = <0x0 0x0>;
220+
heap-type = "ion_system";
221+
};
222+
223+
heap_sys_contig@0 {
224+
heap-name = "sys_contig";
225+
heap-range = <0x0 0x0>;
226+
heap-type = "ion_system_contig";
227+
};
228+
};
197229
};

arch/arm64/boot/dts/hi6220.dtsi

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@
685685
#address-cells = <2>;
686686
#size-cells = <2>;
687687
ranges;
688+
dma-coherent;
688689

689690
ade: ade@f4100000 {
690691
compatible = "hisilicon,hi6220-ade";
@@ -703,7 +704,10 @@
703704
"clk_ade_pix",
704705
"clk_syspll_src",
705706
"clk_medpll_src";
706-
/*ade core clock rate*/
707+
708+
interrupts = <0 115 4>;
709+
710+
/*ade core clock rate*/
707711
ade_core_clk_rate = <360000000>;
708712
/*media_noc clock rate*/
709713
media_noc_clk_rate = <288000000>;
@@ -956,57 +960,10 @@
956960
};
957961
};
958962

959-
hisi-ion@0 {
960-
compatible = "hisilicon,ion";
961-
memreserve_base = <0x1ff00000>;
962-
memreserve_size = <0x18d00000>;
963-
964-
heap_fb@0 {
965-
heap-name = "fb";
966-
heap-range = <0x37300000 0x01900000>;
967-
heap-type = "ion_carveout";
968-
};
969-
970-
heap_vpu@0 {
971-
heap-name = "vpu";
972-
heap-range = <0x34200000 0x03100000>;
973-
heap-type = "ion_carveout";
974-
};
975-
976-
heap_jpu@0 {
977-
heap-name = "jpu";
978-
heap-range = <0x33100000 0x01100000>;
979-
heap-type = "ion_carveout";
980-
};
981-
982-
heap_gralloc@0 {
983-
heap-name = "gralloc-carveout";
984-
heap-range = <0x27b00000 0x0b600000>;
985-
heap-type = "ion_carveout";
986-
};
987-
988-
heap_overlay@0 {
989-
heap-name = "overlay";
990-
heap-range = <0x1ff00000 0x07c00000>;
991-
heap-type = "ion_carveout";
992-
};
993-
994-
heap_sys_user@0 {
995-
heap-name = "sys_user";
996-
heap-range = <0x0 0x0>;
997-
heap-type = "ion_system";
998-
};
999-
1000-
heap_sys_contig@0 {
1001-
heap-name = "sys_contig";
1002-
heap-range = <0x0 0x0>;
1003-
heap-type = "ion_system_contig";
1004-
};
1005-
};
1006-
1007963
mali:mali@f4080000 {
1008964
compatible = "arm,mali-450", "arm,mali-utgard";
1009965
reg = <0x0 0x3f100000 0x0 0x00708000>;
966+
dma-coherent;
1010967
clocks = <&clock_media HI6220_G3D_CLK>,
1011968
<&clock_media HI6220_G3D_PCLK>;
1012969
clock-names = "clk_g3d", "pclk_g3d";

arch/arm64/configs/defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ CONFIG_MEDIA_SUPPORT=y
269269
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
270270
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
271271
CONFIG_MALI400=m
272+
CONFIG_MALI400_DEBUG=y
272273
CONFIG_MALI450=y
273274
# CONFIG_MALI400_PROFILING is not set
274275
# CONFIG_MALI_DVFS is not set
@@ -278,7 +279,6 @@ CONFIG_MALI_PLAT_SPECIFIC_DT=y
278279
CONFIG_DRM=y
279280
CONFIG_DRM_I2C_ADV7533=y
280281
CONFIG_DRM_HISI=y
281-
CONFIG_ION=y
282282
CONFIG_ION_HISI=y
283283
CONFIG_FB_ARMCLCD=y
284284
CONFIG_FRAMEBUFFER_CONSOLE=y

drivers/gpu/arm/utgard/linux/mali_memory_external.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ _mali_osk_errcode_t _mali_ukk_map_external_mem(_mali_uk_map_external_mem_s *args
4747
args->phys_addr, (args->phys_addr + args->size - 1),
4848
args->mali_address));
4949

50+
#if 0
5051
/* Validate the mali physical range */
5152
if (_MALI_OSK_ERR_OK != mali_mem_validation_check(args->phys_addr, args->size)) {
5253
return _MALI_OSK_ERR_FAULT;
5354
}
55+
#endif
5456

5557
descriptor = mali_mem_descriptor_create(session, MALI_MEM_EXTERNAL);
5658
if (NULL == descriptor) MALI_ERROR(_MALI_OSK_ERR_NOMEM);

0 commit comments

Comments
 (0)