summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Huang <b02279@freescale.com>2014-03-27 14:13:31 +0800
committerNeena Busireddy <neenareddy.busireddy@nxp.com>2017-09-28 16:09:20 -0500
commite785defc61a2fb1808053a03b30d1264c4532a29 (patch)
tree599bfed59519b2b3b5c5f066fe3ab5ee9bbf8764
parent895b908840311426a4f4d69713fbb24635816e45 (diff)
ENGR00306992-2 gpu:gpu2d may cause bus hang in some corner caserel_imx_3.10.17_1.0.0_ga_caf
Vivante patch name: fix_fsl_2d_base_on_p13.v2.rls.diff -Updated the outstanding request limit to 12. -Refined the 2D chip feature check. -Refine the 2D cache flush operation (avoid FE and PE access memory through the same port). -Enable cache flush for filterblt. -Dynamic enabling SPLIT_RECT by checking chip feature(disable for us) -Use brush stretch blt for clear operation. -Enable SplitFilterBlit to workaround the 2d hang issue in filterblit case. -Refine 2d line operation. Date: May 05, 2014 Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Shawn Guo (cherry picked from commit 479b9125caefc45451aa1c4a1b7f2704b57831fa)
-rw-r--r--drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c58
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h3
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h1
3 files changed, 43 insertions, 19 deletions
diff --git a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
index e8ad2ea3e031..541975b93e08 100644
--- a/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
+++ b/drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.c
@@ -509,6 +509,36 @@ _IdentifyHardware(
Identity->varyingsCount -= 1;
}
+ Identity->chip2DControl = 0;
+ if (Identity->chipModel == gcv320)
+ {
+ gctUINT32 data;
+
+ gcmkONERROR(
+ gckOS_ReadRegisterEx(Os,
+ Core,
+ 0x0002C,
+ &data));
+
+ if ((data != 33956864) &&
+ ((Identity->chipRevision == 0x5007) ||
+ (Identity->chipRevision == 0x5220)))
+ {
+ Identity->chip2DControl |= 0xFF &
+ (Identity->chipRevision == 0x5220 ? 8 :
+ (Identity->chipRevision == 0x5007 ? 12 : 0));
+ }
+
+ if (Identity->chipRevision == 0x5007)
+ {
+ /* Disable splitting rectangle. */
+ Identity->chip2DControl |= 0x100;
+
+ /* Enable 2D Flush. */
+ Identity->chip2DControl |= 0x200;
+ }
+ }
+
/* Success. */
gcmkFOOTER();
return gcvSTATUS_OK;
@@ -1318,33 +1348,22 @@ gckHARDWARE_InitializeHardware(
gcmkONERROR(gckOS_WriteRegisterEx(Hardware->os, Hardware->core, 0x00414, axi_ot));
}
- if ((Hardware->identity.chipModel == gcv320)
- && ((Hardware->identity.chipRevision == 0x5007)
- || (Hardware->identity.chipRevision == 0x5220)))
+ if (Hardware->identity.chip2DControl & 0xFF)
{
gctUINT32 data;
gcmkONERROR(
gckOS_ReadRegisterEx(Hardware->os,
Hardware->core,
- 0x0002C,
+ 0x00414,
&data));
- if (data != 33956864)
- {
- gcmkONERROR(
- gckOS_ReadRegisterEx(Hardware->os,
- Hardware->core,
- 0x00414,
- &data));
-
- data = ((((gctUINT32) (data)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 7:0) - (0 ? 7:0) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 7:0) - (0 ? 7:0) + 1))))))) << (0 ? 7:0))) | (((gctUINT32) ((gctUINT32) (Hardware->identity.chipRevision == 0x5220 ? 8 : (Hardware->identity.chipRevision == 0x5007 ? 16 : 0)) & ((gctUINT32) ((((1 ? 7:0) - (0 ? 7:0) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 7:0) - (0 ? 7:0) + 1))))))) << (0 ? 7:0)));
+ data = ((((gctUINT32) (data)) & ~(((gctUINT32) (((gctUINT32) ((((1 ? 7:0) - (0 ? 7:0) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 7:0) - (0 ? 7:0) + 1))))))) << (0 ? 7:0))) | (((gctUINT32) ((gctUINT32) (Hardware->identity.chip2DControl & 0xFF) & ((gctUINT32) ((((1 ? 7:0) - (0 ? 7:0) + 1) == 32) ? ~0 : (~(~0 << ((1 ? 7:0) - (0 ? 7:0) + 1))))))) << (0 ? 7:0)));
- gcmkONERROR(
- gckOS_WriteRegisterEx(Hardware->os,
- Hardware->core,
- 0x00414,
- data));
- }
+ gcmkONERROR(
+ gckOS_WriteRegisterEx(Hardware->os,
+ Hardware->core,
+ 0x00414,
+ data));
}
/* Update GPU AXI cache atttribute. */
@@ -1553,6 +1572,7 @@ gckHARDWARE_QueryChipIdentity(
Identity->bufferSize = Hardware->identity.bufferSize;
Identity->varyingsCount = Hardware->identity.varyingsCount;
Identity->superTileMode = Hardware->identity.superTileMode;
+ Identity->chip2DControl = Hardware->identity.chip2DControl;
/* Success. */
gcmkFOOTER_NO();
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
index ea86349dcf97..8397f89cb078 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
+++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
@@ -257,6 +257,9 @@ typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
/* Supertile layout style in hardware */
gctUINT32 superTileMode;
+
+ /* Special control bits for 2D chip. */
+ gctUINT32 chip2DControl;
}
gcsHAL_QUERY_CHIP_IDENTITY;
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h
index 1d19882217de..d8141e09ec74 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h
+++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h
@@ -704,6 +704,7 @@ typedef enum _gce2D_STATE
gcv2D_STATE_EN_GAMMA,
gcv2D_STATE_DE_GAMMA,
gcv2D_STATE_MULTI_SRC_BLIT_UNIFIED_DST_RECT,
+ gcv2D_STATE_XRGB_ENABLE,
gcv2D_STATE_ARRAY_EN_GAMMA = 0x10001,
gcv2D_STATE_ARRAY_DE_GAMMA,