Hi @sreegink,
For the display related patch, I find the driver code and change it according to the patch. For the optee-os patch about CFG_CORE_ARM64_PA_BITS, I also change it manually by adding the related code as below.
Display patch:
kernel/linaro/hisilicon-4.14/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
diff --git a/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c b/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
index 728d004..1df8509 100644
--- a/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
+++ b/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
@@ -23,7 +23,7 @@
#include "kirin_drm_dpe_utils.h"
#include "kirin_drm_drv.h"
-#define ROUND1(x, y) ((x) / (y) + ((x) % (y) ? 1 : 0))
+//#define ROUND1(x, y) ((x) / (y) + ((x) % (y) ? 1 : 0))
#define DSS_CHN_MAX_DEFINE (DSS_COPYBIT_MAX)
static int mid_array[DSS_CHN_MAX_DEFINE] = {0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x2, 0x1, 0x3, 0x0};
@@ -705,7 +705,7 @@ static int hisi_dss_rdma_config(struct dss_hw_ctx *ctx,
u32 afbcd_header_stride = 0;
u32 afbcd_payload_addr = 0;
u32 afbcd_payload_stride = 0;
- u32 h_display = 0;
+ //u32 h_display = 0;
if (!ctx) {
DRM_ERROR("ctx is NULL!\n");
@@ -800,12 +800,13 @@ static int hisi_dss_rdma_config(struct dss_hw_ctx *ctx,
set_reg(rdma_base + CH_CTL, 0xf005, 32, 0);
} else {
stretch_size_vrt = rdma_oft_y1 - rdma_oft_y0;
- h_display = (rect->right - rect->left) + 1;
- if (h_display % 64) {
- rdma_stride = ROUND1(h_display, 64) * 64 * bpp / DMA_ALIGN_BYTES;
- } else {
- rdma_stride = h_display * bpp / DMA_ALIGN_BYTES;
- }
+ rdma_stride = ((rect->right - rect->left) + 1) * bpp / DMA_ALIGN_BYTES;
+ //h_display = (rect->right - rect->left) + 1;
+ //if (h_display % 64) {
+ // rdma_stride = ROUND1(h_display, 64) * 64 * bpp / DMA_ALIGN_BYTES;
+ //} else {
+ // rdma_stride = h_display * bpp / DMA_ALIGN_BYTES;
+ //}
set_reg(rdma_base + CH_REG_DEFAULT, 0x1, 32, 0);
set_reg(rdma_base + CH_REG_DEFAULT, 0x0, 32, 0);
The optee-os patch
#in optee_os/core/arch/arm/plat-hikey/conf.mk
# Hikey960 4G/6G versions have physical addresses above 4G range
ifneq (,$(filter 4 6,$(CFG_DRAM_SIZE_GB)))
$(call force,CFG_CORE_ARM64_PA_BITS,36)
endif
V3.8.3, android can’t fully boot, it get stuck at android logo. But adb shell can be used to access the board.