search
HomeDatabaseMysql Tutoriallcd debug notes 2(qcom and orise)

1 polarity inversion 面板极性变换方式 可使用的common电极驱动方式 Frame inversion 固定与变动 Row inversion 固定与变动 Column inversion 只能使用固定的common电极电压 Dot inversion 只能使用固定的common电极电压 面板极性变换方式 Flicker的现象 Cr

1  polarity inversion

面板极性变换方式  可使用的common电极驱动方式 
Frame inversion  固定与变动 
Row inversion  固定与变动 
Column inversion  只能使用固定的common电极电压 
Dot inversion  只能使用固定的common电极电压


面板极性变换方式  Flicker的现象  Crosstalk(串扰; 串音)的现象 
Frame inversion    明显                   垂直与水平方向都易发生 
Row inversion        不明显               水平方向容易发生 
Columninversion  不明显                垂直方向容易发生 
Dot inversion         几乎没有            不易发生 


Current Orise IC is supported for Column Inversion and Dot Inversion (0xC0B4h Panel Driving Mode)


2  The method of showing layer (qcom)

2.1 Insert the following patch

diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index ae7bb95..3f1a657 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -331,11 +331,121 @@ static int hwc_query(struct hwc_composer_device_1* dev,
 
 }
 
+inline void getHalPixelFormatStr(int format, char pixelformatstr[])
+{
+    if (!pixelformatstr)
+        return;
+
+    switch(format) {
+        case HAL_PIXEL_FORMAT_RGBA_8888:
+            strcpy(pixelformatstr, "RGBA_8888");
+            break;
+        case HAL_PIXEL_FORMAT_RGBX_8888:
+            strcpy(pixelformatstr, "RGBX_8888");
+            break;
+        case HAL_PIXEL_FORMAT_RGB_888:
+            strcpy(pixelformatstr, "RGB_888");
+            break;
+        case HAL_PIXEL_FORMAT_RGB_565:
+            strcpy(pixelformatstr, "RGB_565");
+            break;
+        case HAL_PIXEL_FORMAT_BGRA_8888:
+            strcpy(pixelformatstr, "BGRA_8888");
+            break;
+        case HAL_PIXEL_FORMAT_RGBA_5551:
+            strcpy(pixelformatstr, "RGBA_5551");
+            break;
+        case HAL_PIXEL_FORMAT_RGBA_4444:
+            strcpy(pixelformatstr, "RGBA_4444");
+            break;
+        case HAL_PIXEL_FORMAT_YV12:
+            strcpy(pixelformatstr, "YV12");
+            break;
+        case HAL_PIXEL_FORMAT_YCbCr_422_SP:
+            strcpy(pixelformatstr, "YCbCr_422_SP_NV16");
+            break;
+        case HAL_PIXEL_FORMAT_YCrCb_420_SP:
+            strcpy(pixelformatstr, "YCrCb_420_SP_NV21");
+            break;
+        case HAL_PIXEL_FORMAT_YCbCr_422_I:
+            strcpy(pixelformatstr, "YCbCr_422_I_YUY2");
+            break;
+        case HAL_PIXEL_FORMAT_NV12_ENCODEABLE:
+            strcpy(pixelformatstr, "NV12_ENCODEABLE");
+            break;
+        case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
+            strcpy(pixelformatstr, "YCbCr_420_SP_TILED_TILE_4x2");
+            break;
+        case HAL_PIXEL_FORMAT_YCbCr_420_SP:
+            strcpy(pixelformatstr, "YCbCr_420_SP");
+            break;
+        case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO:
+            strcpy(pixelformatstr, "YCrCb_420_SP_ADRENO");
+            break;
+        case HAL_PIXEL_FORMAT_YCrCb_422_SP:
+            strcpy(pixelformatstr, "YCrCb_422_SP");
+            break;
+        case HAL_PIXEL_FORMAT_R_8:
+            strcpy(pixelformatstr, "R_8");
+            break;
+        case HAL_PIXEL_FORMAT_RG_88:
+            strcpy(pixelformatstr, "RG_88");
+            break;
+        case HAL_PIXEL_FORMAT_INTERLACE:
+            strcpy(pixelformatstr, "INTERLACE");
+            break;
+        default:
+            sprintf(pixelformatstr, "Unknown0x%X", format);
+            break;
+    }
+}
+
+void dump_layers(int layercount, size_t layerIndex, hwc_layer_1_t hwLayers[])
+{
+    hwc_layer_1_t *layer = &hwLayers[layerIndex];
+    hwc_rect_t sourceCrop = layer->sourceCrop;
+    hwc_rect_t displayFrame = layer->displayFrame;
+    private_handle_t *hnd = (private_handle_t *)layer->handle;
+    char *layer_format=new char[50];
+    getHalPixelFormatStr(hnd->format,layer_format);
+    int composition_type =layer->compositionType;
+    char sfdumpfile_name[256];
+
+    sprintf(sfdumpfile_name, "/data/layerdump/dump%03d_layer%d_%dx%d_%s_comp%d.raw",
+               layercount, layerIndex, hnd->width, hnd->height,
+               layer_format,composition_type);
+    FILE* fp = fopen(sfdumpfile_name, "w+");
+    if (fp != NULL) {
+        fwrite((void*)hnd->base, hnd->size, 1, fp);
+        fclose(fp);
+    }
+    
+}
+
 static int hwc_set_primary(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
     ATRACE_CALL();
     int ret = 0;
     const int dpy = HWC_DISPLAY_PRIMARY;
     if (LIKELY(list) && ctx->dpyAttr[dpy].isActive) {
+
+    char property_fb[PROPERTY_VALUE_MAX];
+    static int layer_count =0;
+    int count_limit=0;
+    if (property_get("debug.sf.dump", property_fb, NULL) > 0) {
+       if(atoi(property_fb) > 0) {
+               count_limit=atoi(property_fb) ;
+               if (0 == mkdir("/data/layerdump", 0777))
+                       layer_count=0;
+               if(layer_count<count_limit for int i="0;i<list-">numHwLayers;i++)
+                               dump_layers(layer_count, i, list->hwLayers);
+                       layer_count ++ ;
+               }
+       }
+    }
+
+
+
         uint32_t last = list->numHwLayers - 1;
         hwc_layer_1_t *fbLayer = &list->hwLayers[last];
         int fd = -1; //FenceFD from the Copybit(valid in async mode)
</count_limit>

2.2 Issue the following command

# setprop debug.sf.dump 100

The dump data is in /data/layerdump folder.


2.3 Issue the following command

# adb pull <remote> <local></local></remote>

2.4 Download the tool: Irfanview and PlugIns

The newest version of Irfanview is 4.36


2.5 Open the corresponding files, such as *.raw

Please notes that the pixels need to be matched to oringinal size. Then the pictures can be shown, as follows:


dump035_layer0_544x960_RGBX_8888_comp1.raw // layer0 means layer 0; RGBX  X means no alpha

dump034_layer1_544x960_RGBA_8888_comp1.raw

dump035_layer2_416x608_RGBA_8888_comp1.raw // layer2 means layer 2; comp1 means mdpcomp

dump033_layer3_544x960_RGBA_8888_comp1.raw

dump035_layer4_544x960_RGBA_8888_comp3.raw // layer4 means layer 4; comp3 means fb_target


According to the methods in div 2, we can capture all layers from hwc.cpp. The root cause is related to the progress of animation. Because of the animation, the actual size of popup menu is variable and the alpha value isn't 0xff until the animation is shown completely. But mdp RGB pipe can't handle this scenario smoothly which causes the edge of popup menu jitter. So if this scenario appears, mdp composition should be disabled.


The animation can be disabled via the following steps:

Settings -> Developer options -> 

Window animation scale  (off, .5x, 1x, 2x, 5x, 10x)

Transition animation scale

Animator duration scale


So the animation progress can be adjusted if you need to do this. Meanwhile we can disable hw overlay via the option of Disable HW overlays.


4  overlay process

4.1 mdp4_overlay_set (key point)
a. Get pipe from request (struct mdp_overlay ), choose corresponding pipe type;
Where the function checks if the request is valid or not, such as width, height, downscale ratio(1/8), upscale ratio(20(mdp version > 4.1, otherwise 8)) and so on.
b. Return pipe index;
c. Calc mdp clock for current frame and bandwidth;
d. Done.

5  Ghost Shadow

This issue is caused by VCOM. For orise 9605, we can adjust 0xD900h(VCOMDC: VCOM voltage setting, 0x39:-1)

影像残留主要是PANEL Pixel上的正负电压值不对称,解决方案是调整VCOM(寄存器D900)。如果改Panel的翻转方式,也可以改善。如果LCM上有GVDD、NGVDD的测试点,可以量一下这两个点的电压,理论上这两个电压值是一致的!

If we adjust the mode of inversion to dot inversion, the power will increase about 10mA, althrough this way  can fix this issue too. I don't think it is a good method.


6  DTYPE_DCS_WRITE (long, short)

#define DTYPE_DCS_LWRITE	0x39	/* long write */
#define DTYPE_DCS_WRITE		0x05	/* short write, 0 parameter */
#define DTYPE_DCS_WRITE1	0x15	/* short write, 1 parameter */
#define DTYPE_DCS_READ		0x06	/* read */

With regard to opening lcd or closing lcd(sleep out/in),  it is proper to use DTYPE_DCS_WRITE. If the commands have one parameter, it is proper to use DTYPE_DCS_WRITE1. If the commands have more than one parameter, it is proper to use DTYPE_DCS_LWRITE.


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

MySQL's Role: Databases in Web ApplicationsMySQL's Role: Databases in Web ApplicationsApr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

MySQL: Building Your First DatabaseMySQL: Building Your First DatabaseApr 17, 2025 am 12:22 AM

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL: A Beginner-Friendly Approach to Data StorageMySQL: A Beginner-Friendly Approach to Data StorageApr 17, 2025 am 12:21 AM

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use