Display module identification method, electronic equipment and computer readable storage medium
By obtaining the product ID of the display module during the UEFI boot phase, and combining it with the ID PIN pin status and module specification identifier, the problem of inaccurate display module category identification in the prior art is solved, ensuring the stability of the display effect of electronic devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-07
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technology cannot accurately distinguish the type of display module, which causes electronic devices to fail to load driver information correctly, resulting in unstable display effects.
By introducing a more granular parameter, the product ID, combined with the pre-configuration status of the ID PIN and the module specification identifier, the electronic device obtains the product ID of the module to be identified during the UEFI boot phase and determines its category.
It enables accurate identification of display module categories in different scenarios, ensuring stable display performance for electronic devices.
Smart Images

Figure CN121996334A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software technology, and in particular to a display module identification method, electronic device, and computer-readable storage medium. Background Technology
[0002] Electronic devices typically support multiple display modules. Different manufacturers provide display modules with varying specifications, and the initial configuration information, such as drivers, differs for each type of display module. When a display module is connected to an electronic device, the device needs to correctly identify the type of display module in order to correctly load the required driver information.
[0003] In the existing technology, electronic devices cannot accurately distinguish the category of display modules, thus failing to load the driving information correctly, resulting in unstable display effects of electronic devices. Summary of the Invention
[0004] This application provides a display module identification method, an electronic device, and a computer-readable storage medium, which can accurately distinguish the category of display modules to complete the correct configuration of display modules and enable the electronic device to have a stable display effect.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0006] Firstly, a display module identification method is provided. This method is applied to an electronic device including a module to be identified, which is any one of multiple categories of display modules. In the embodiments of this application, the electronic device can obtain the product ID of the module to be identified. The product ID can be used to uniquely identify the display module. In the case where the pre-configuration state of the module to be identified is the same as the pre-configuration state of a first module and the module specification identifier of the module to be identified is the same as the module specification identifier of the first module (hereinafter referred to as Case 1), the category of the module to be identified is determined according to the product ID. The first module can be at least one of multiple categories of display modules, and the first module is different from the module to be identified. For example, among the multiple display modules, there are display module 1 and display module 2 with the same pre-configuration state and module specification identifier. When the module to be identified and the first module are display module 1 and display module 2 respectively, the electronic device cannot determine the category of the module to be identified through the pre-configuration state and module specification identifier. Therefore, it further determines the category of the module to be identified based on the product ID. Furthermore, the pre-configuration state of the aforementioned display module can specifically be the pre-configuration state of the ID PIN pin of the display module. In one possible design, the electronic device can also obtain the product ID of the module to be identified when the pre-configuration state of the module to be identified is the same as that of the first module and the module specification identifier of the module to be identified is the same as that of the first module, and then determine the category of the module to be identified based on the product ID.
[0007] As can be seen, this application distinguishes the categories of display modules by introducing a more granular parameter, product ID, which can accurately identify the categories of display modules in different scenarios, thereby completing the correct configuration of the display modules and enabling electronic devices to have stable display effects.
[0008] In one embodiment provided in the first aspect, before the electronic device determines the category of the module to be identified based on the product ID, the electronic device can also obtain the pre-configuration state of the module to be identified. In related technologies, the electronic device can obtain the pre-configuration state of the module to be identified during the UEFI boot phase. The solution provided in this embodiment can be completed during the UEFI phase, that is, engineers can use existing UEFI boot phase running programs to complete the solution provided in this embodiment, improving program compatibility.
[0009] In one embodiment provided in the first aspect, based on the electronic device acquiring the pre-configuration state of the module to be identified, the electronic device can further determine whether the pre-configuration state of the module to be identified is the same as the pre-configuration state of the first module. Furthermore, if the electronic device can also acquire the module specification identifier of the module to be identified if the pre-configuration state of the module to be identified is the same as the pre-configuration state of the first module, and determine whether the module specification identifier of the module to be identified is the same as the module specification identifier of the first module. In other words, the electronic device can determine whether the module to be identified meets the above condition 1 through two determinations.
[0010] In one embodiment provided in the first aspect, when the pre-configuration states of multiple categories of display modules are the same and the module specification identifiers of at least two display modules among the multiple categories are different, the electronic device can directly obtain the module specification identifier of the module to be identified without additionally determining whether the pre-configuration state of the module to be identified is the same as that of the first module, and then determine whether the module specification identifier of the module to be identified is the same as that of the first module. This simplifies the process and improves the identification efficiency.
[0011] In one embodiment provided in the first aspect, when the pre-configuration state of the module to be identified differs from the pre-configuration state of the second module, the category of the module to be identified is determined based on the pre-configuration state of the module to be identified. The second module is a display module other than the module to be identified among multiple categories of display modules. In other words, the electronic device can also determine its category solely based on the pre-configuration state of the module to be identified, which simplifies the process and improves recognition efficiency.
[0012] In one embodiment provided in the first aspect, when the pre-configuration state of the module to be identified is the same as the pre-configuration state of the third module, but the module specification identifier of the module to be identified is different from that of the third module, the category of the module to be identified is determined according to the module specification identifier of the module to be identified. The third module is a display module other than the module to be identified among multiple categories of display modules. That is to say, the electronic device can also determine its category solely by the module specification identifier of the module to be identified, which helps to simplify the process and improve the identification efficiency.
[0013] In one embodiment provided in the first aspect, the electronic device is equipped with a display driver. After entering the kernel boot stage, the electronic device can obtain the product ID of the display module through the display driver, and if the pre-configuration state and module specification identifier of the module to be identified are the same as those of the first module, the electronic device can determine the category of the module to be identified based on the product ID through the display driver.
[0014] In one embodiment provided in the first aspect, before the display driver obtains the product ID of the display module, the electronic device may, after entering the kernel boot stage, have the touch driver initialize the module to be identified, then have the touch driver obtain the pre-configuration state of the module to be identified, and have the display driver send a request to the touch driver to obtain the product ID, so that the display driver can obtain the product ID.
[0015] In one embodiment provided in the first aspect, before the touch driver initializes the module to be identified, after the electronic device enters the Unified Extensible Firmware Interface (UEFI) boot phase, the touch driver and display driver can be initialized by the bootloader, and then the display driver initializes the module to be identified and obtains the pre-configuration state of the module to be identified.
[0016] In a second aspect, this application provides an electronic device, including: a memory and a processor; the processor is coupled to the memory; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in the first aspect and any embodiment thereof.
[0017] Thirdly, this application provides a computer-readable storage medium including computer instructions; when the computer instructions are executed on an electronic device, they cause the electronic device to perform the method described in the first aspect and any of its embodiments.
[0018] Fourthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method as described in the first aspect and any of its embodiments.
[0019] The technical effects of any of the second to fourth aspects can be found in the technical effects of different embodiments in the first aspect, and will not be repeated here. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0021] Figure 2 A layered architecture diagram of an electronic device provided in this application embodiment;
[0022] Figure 3 A flowchart illustrating a display module identification method provided in this application embodiment;
[0023] Figure 4 A flowchart illustrating another display module identification method provided in this application embodiment;
[0024] Figure 5 A flowchart illustrating yet another display module identification method provided in this application embodiment;
[0025] Figure 6 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0027] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0028] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0029] Electronic devices typically support multiple display modules. Different manufacturers provide display modules with varying specifications, and the initial configuration information, such as drivers, used by different types of display modules differs. When a display module is connected to an electronic device, the device needs to correctly identify the connected display module in order to correctly load the driver information required by the display module.
[0030] In existing technologies, the interface of a display module can have a reserved pin for identifying the module's identity; this pin is called the ID PIN. In existing technologies, the general purpose input / output (GPIO) interface of an electronic device is connected to the ID PIN pin of the display module to be identified. However, this method has certain limitations; the types of display modules that GPIO can recognize are limited, and in some cases, the type of display module cannot be identified in this way.
[0031] For example, an electronic device may have a reserved GPIO pin for an ID PIN connection. This ID PIN pin can be pre-configured to be powered on, grounded, or floating. Different pre-configured states correspond to different types of display modules. Therefore, the electronic device can determine the pre-configured state of the ID PIN pin by reading the GPIO's voltage level, and thus determine the type of display module. In this case, if there are more than three display module categories, different categories of display modules may have the same pre-configured state, causing the electronic device to be unable to accurately identify the type of display module.
[0032] For example, there are four different categories of display modules: display module A to display module D. Display module A has a pre-configured state of being powered on, display module B has a pre-configured state of being grounded, and display modules C and D have a pre-configured state of being floating. Therefore, if the electronic device determines that the ID PIN pin of the module to be identified is in a floating pre-configured state, the electronic device cannot determine whether the module to be identified is display module C or display module D.
[0033] Furthermore, to differentiate between different models and batches of display modules, display module manufacturers typically set a module specification identifier for each model and batch in a one-time programmable (OTP). Electronic devices can read the module specification identifier of the display module to be identified to determine its category. However, this method also has limitations. For example, after a display module manufacturer has burned OTP data into a certain model and batch of display modules, it may discover that some of these modules have characteristics inconsistent with conventional display modules (e.g., defects), requiring different driver information to be loaded; otherwise, they cannot display correctly. In this case, the electronic device cannot distinguish between the aforementioned conventional display modules and some non-conventional display modules using the OTP data of the module to be identified.
[0034] For example, there are three categories of display modules: display module A to display module C. Display module A corresponds to pre-configuration state 1, while display modules B and C correspond to pre-configuration state 2. Display modules B and C are two different categories of the same model and batch of display modules, and have the same module specification identifier. In this case, the electronic device cannot determine the category of display module B and display module C through the module specification identifier.
[0035] It is evident that existing technologies cannot accurately distinguish the types of display modules, making it impossible for electronic devices to load the driving information matched to the display module, thus leading to uneven display performance of electronic devices.
[0036] In view of this, this application provides a display module identification method, which can be applied to scenarios where the category of a display module cannot be determined based on the pre-configuration state of the ID PIN pin or the module specification identifier. For example, display modules originally exist in three categories: display module A, display module B, and display module C. Display module A corresponds to pre-configuration state 1, and display modules B and C correspond to pre-configuration state 2. Display module B has a module specification identifier b, and display module C has a module specification identifier c. The electronic device can determine the category of display module A through the pre-configuration state and the categories of display modules B and C through the module specification identifier. Furthermore, the manufacturer of display module B discovers that display module B1 in display module B has a performance defect, while display module B2 performs normally; that is, display modules B1 and B2 have the same module specification identifier b. In this scenario, the electronic device cannot distinguish the categories of display modules B1 and B2 based on the module specification identifier.
[0037] In the above scenario, the electronic device can obtain the product ID of the display module. This product ID is used to uniquely identify the display module, and the category of the display module is determined based on the product ID. This solution introduces the product ID and uses finer-grained parameters to distinguish the category of the display module. It can accurately identify the category of the display module in different scenarios, ensuring that the correct driving parameters can be loaded, so that the electronic device has a stable display effect.
[0038] Please see Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 1 As shown, the electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display module 194, and a subscriber identification module (SIM) card interface 195, etc.
[0039] The processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0040] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0041] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0042] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0043] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0044] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0045] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in internal memory 121. For example, in this embodiment, processor 110 can execute instructions stored in internal memory 121, which may include a program storage area and a data storage area.
[0046] The program storage area can store the operating system, at least one application required for a function (such as a video application), etc. The data storage area can store data created during the use of the electronic device (such as IDPIN, OTP data, the correspondence between product ID and display module 194, configuration parameters of different types of display modules 194), etc. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0047] Display module 194 is used to display images, videos, etc. Display module 194 includes a display panel, a driver chip, etc. In some embodiments, the display panel can be a touch panel (TP).
[0048] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0049] The software system of the aforementioned electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. Here, we will use... Figure 2 The layered architecture shown is used to illustrate the hardware and software structure of an electronic device.
[0050] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through interfaces. In some embodiments, a terminal device may include an application layer, an application framework layer, and a kernel layer. It should be noted that... Figure 2 The layered architecture shown is for illustrative purposes only and may vary in different operating systems (e.g., Android). TM Any system (such as iOS system, etc.) can achieve the solution of this application as long as the functions implemented by each functional module are similar to those in the embodiments of this application.
[0051] The application layer can include a series of applications. For example... Figure 2 As shown, applications can include camera, gallery, calendar, email, call, and other applications.
[0052] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer also includes some predefined functions.
[0053] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0054] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0055] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0056] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0057] A phone manager is used to provide communication functions for electronic devices. For example, it manages call status (including connection and disconnection).
[0058] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0059] The notification manager allows applications to display notifications in the status bar. These can be used to deliver announcements or notifications, and can disappear automatically after a short pause without user interaction. For example, the notification manager can be used to notify users of download completion or message alerts.
[0060] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver and touch panel (TP) driver.
[0061] The display driver is used to transmit data sources to the display module 194, driving the display module 194 to display images, etc. The TP driver is used to convert user operations on the touch screen (such as clicks and swipes) into corresponding system commands to implement the corresponding operations.
[0062] like Figure 2 As shown, the electronic device also includes a hardware layer. The hardware layer may include the aforementioned display module 194.
[0063] The following embodiments can all be implemented in electronic devices that have the above-described hardware and software structures.
[0064] In this embodiment, the electronic device includes a module to be identified, which is the display module of the electronic device. The electronic device can determine the category of the module to be identified based on one or more of the following: the pre-configuration status of the ID PIN pin of the module to be identified, the module specification identifier of the module to be identified, and the product ID of the module to be identified.
[0065] In this system, the GPIO of the electronic device is connected to the ID PIN pin of the module to be identified. The ID PIN pin of the module to be identified is used to identify the module category. The ID PIN pin can be configured to multiple states, with different pre-configured states corresponding to different module categories. These multiple states may include, for example, two or three of the following: powered on, grounded, or floating.
[0066] Furthermore, the display driver of the electronic device can have OTP data pre-programmed into the control IC of the module to be identified. This OTP data includes the module specification identifier of the module to be identified, which is used to identify the module's model, batch, etc. The display driver of the electronic device can read the OTP data of the control IC of the module to be identified to obtain the module specification identifier of the module to be identified.
[0067] A product ID is a unique code or identifier used to identify a product, and can be used to uniquely identify a display module. In other words, different categories of display modules have different product IDs. Optionally, the display driver of an electronic device can obtain the product ID of the module to be identified through the touch driver; see the details below. Figures 3-5 Related content will not be described here.
[0068] In this embodiment, the electronic device stores a configuration file, which includes multiple categories of the module to be identified, the correspondence between the pre-configuration status of the ID PIN pin and the module category, the correspondence between the module specification identifier and the module category, and the correspondence between the product ID and the module category. It is understood that the above configuration file is derived based on actual application scenarios.
[0069] Furthermore, the parameters and procedures used by electronic devices to determine the category of the module to be identified can differ in different application environments. This application's embodiments involve at least the following three application scenarios:
[0070] Scenario 1: Among multiple categories of display modules, there are at least two different categories of display modules corresponding to different pre-configured states of the IDPIN pin, at least two different categories of display modules have different module specification identifiers, and at least two different categories of display modules have the same module specification identifier.
[0071] Scenario 2: In multiple categories of display modules, all categories of display modules correspond to the same pre-configured state of the ID PIN pin. There are at least two different categories of display modules with different module specification identifiers, and at least two different categories of display modules with the same module specification identifier.
[0072] Scenario 3: In multiple categories of display modules, all categories of display modules correspond to the same pre-configured state of the ID PIN pin, and all categories of display modules have the same module specification identifier.
[0073] The following section will illustrate the display module recognition method in different application scenarios, with reference to the accompanying drawings and specific examples of different application scenarios.
[0074] For example, one configuration file for Scenario 1 can be shown in Table 1:
[0075] Table 1
[0076] category Pre-configuration status Module specification markings Display Module 1 State 1 ver_001 Display Module 2 State 1 ver_001 Display Module 3 State 1 ver_002 Display Module 4 State 2 ver_003
[0077] As shown in Table 1, the modules to be identified include four categories: display module 1, display module 2, display module 3, and display module 4. The ID PIN pin of the module to be identified can be configured to state 1 or state 2, where state 1 corresponds to display module 1, display module 2, and display module 3, and state 2 corresponds to display module 4. The module specification identifier for display module 1 and display module 2 is ver_001, and the module specification identifier for display module 3 is ver_002. It should be noted that the above configuration file only shows partial information; for example, it may also include the correspondence between product ID and module category.
[0078] Among them, state 1 and state 2 can be any two of the following states: connected to power, grounded, or floating.
[0079] Please see Figure 3 This is a flowchart of a display module identification method in scenario one provided by an embodiment of this application. Figure 3 As shown, the display module identification method provided in this application embodiment specifically includes S301 to S313.
[0080] S301, in response to the user's power-on operation, the bootloader initializes the display driver and touch driver.
[0081] Understandably, after receiving a user's power-on command, an electronic device can execute a boot process. This boot process includes the process from powering on the electronic device to displaying the login interface or desktop, and can be divided into four stages: the Basic Input Output System (BIOS) / Unified Extensible Firmware Interface (UEFI) boot stage, the kernel boot stage, the kernel startup stage, and the service startup stage. For example... Figure 3 As shown, the display module identification method provided in this application mainly involves the UEFI startup stage and the kernel startup stage. The UEFI startup stage includes S301 to S303, and the kernel startup stage includes S304 to S313.
[0082] BIOS is a traditional firmware boot program used to detect the hardware functions of an electronic device when it is powered on and to boot the operating system; its functionality is limited. UEFI, on the other hand, is a boot program with richer functionality than BIOS. It can be used to load the operating system from a pre-boot environment into the current operating system, thereby saving boot time. This application embodiment only illustrates UEFI boot as an example.
[0083] During the UEFI boot phase, the board support package (BSP) powers on. The bootloader, a crucial component of the BSP, is loaded after the BSP powers on. Once loaded, the bootloader gains control of the electronic devices.
[0084] The bootloader initializes the hardware, loads the operating system kernel from storage into memory, and jumps to the kernel's entry point to begin executing operating system code. During hardware initialization, the bootloader can initialize the corresponding hardware drivers, which then configure the hardware accordingly.
[0085] This application takes a display module as an example. Therefore, the Bootloader can initialize the display driver to perform the initialization operation on the display module.
[0086] S302, Display driver initializes the module to be identified.
[0087] In this embodiment, the display driver can initialize the display function of the module to be identified, so that the module can display images, videos, etc. The display module may include a driver IC and a display panel, etc. The initialization of the module to be identified by the display driver may include: the display driver pulling high the vddio of the driver IC of the module to be identified. vddio refers to the input / output (I / O) voltage of the driver IC.
[0088] Optionally, the display driver initialization of the module to be identified may also include the display driver configuring the memory controller, registers, etc. of the module to be identified, without specific limitations.
[0089] S303, the display driver determines the pre-configuration status of the ID PIN pin of the module to be identified.
[0090] The method for determining the pre-configuration state of the ID PIN pin of the module to be identified can be found above, and no specific restrictions are made here.
[0091] S304, the display driver determines whether the pre-configuration state of the ID PIN pin is state 2.
[0092] If the pre-configuration state of the ID PIN pin is state 2, then execute S305; if the pre-configuration state of the ID PIN pin is not state 2, then execute S306.
[0093] Understandably, the pre-stored configuration file in the electronic device indicates that the ID PIN pin of the module to be identified can be configured to state 1 or state 2, with state 1 corresponding to display module 1, display module 2, and display module 3, and state 2 corresponding to display module 4. That is to say, among all types of display modules, only the state of the ID PIN pin of display module 4 is different from the state of the ID PIN pin of the other types of display modules.
[0094] Therefore, if the pre-configuration state of the ID PIN pin of the module to be identified is state 2, the display driver can determine that the module to be identified is display module 4, i.e., execute S305. If the pre-configuration state of the ID PIN pin is not state 2, it means that the module to be identified may be any one of display module 1, display module 2, or display module 3. That is, the display driver cannot identify the category of the display module based on the pre-configuration state of the ID PIN pin, and further differentiation is required through module specification identifier or product ID, so execute S306.
[0095] S305, the display driver determines that the module to be identified is display module 4.
[0096] S306, the display driver reads the module specification identifier of the module to be identified.
[0097] In this embodiment, the display driver can read the OTP data of the control IC of the module to be identified to obtain the module specification identifier of the module to be identified.
[0098] S307, the display driver determines whether the module specification identifier is ver_002.
[0099] If the module specification identifier is ver_002, then the driver execution S308 is displayed; if the module specification identifier is not ver_002, then the driver execution S311 is displayed.
[0100] In this embodiment, the module specification identifiers for display module 1 and display module 2 are ver_001, and the module specification identifier for display module 3 is ver_002. It can be seen that among display module 1, display module 2, and display module 3, only the module specification identifier (i.e., ver_002) of display module 3 differs from the module specification identifiers (i.e., ver_001) of the other two categories (i.e., display module 1 and display module 2).
[0101] Therefore, if the module specification identifier is ver_002, the display driver can determine that the module to be identified is display module 3, i.e., execute S308. If the module specification identifier is not ver_002, it means that the module to be identified may be display module 1 or display module 2, i.e., the display driver cannot determine the category of the module to be identified based on the module specification identifier, and needs to further determine it through the product ID, i.e., execute S309.
[0102] S308, the display driver determines that the module to be identified is display module 3.
[0103] S309, Touch driver initializes the module to be identified.
[0104] In this embodiment, the touch driver can initialize the touch function of the module to be identified, so that the user can interact with the electronic device through the module to be identified.
[0105] In one possible design, the touch driver can initialize the touch functionality of the module to be recognized through the ts_kit_ops function.
[0106] S310, the touch driver obtains the product ID of the module to be identified.
[0107] After the touch driver initializes the touch functionality of the module to be identified, it can obtain the product ID of the module. In one possible design, the touch driver can obtain the product ID of the module to be identified through the thp_get_tp_project_id function.
[0108] It should be noted that there is no logical order between S309~S310 and S306~S308. S306~S308 can be executed first and then S309~S310, or S309~S310 can be executed first and then S306~S308, or they can be executed simultaneously, as long as S309~S310 is executed before S311.
[0109] S311, the display driver sends a request to the touch driver to obtain the product ID.
[0110] In one possible design, the display driver can send a request to retrieve the product ID via the function ret = ts_ops->get_up_project_id(tp_id, TP_PROJECT_ID_LEN, 0).
[0111] S312, the touch driver sends the product ID of the module to be identified to the display driver.
[0112] S313, the display driver determines the category of the module to be identified based on the product ID.
[0113] As explained earlier, the configuration files pre-stored in electronic devices also include the correspondence between product IDs and module categories. Therefore, the display driver can query the category of the module to be identified from the configuration file based on the product ID.
[0114] In one possible design, the display driver can determine the category of the module to be identified using the snprintf_s(buf,PAGE_SIZE,LCDMODEL_SIZE,"%sver_x00",pinfo->lcd_model) function.
[0115] In this embodiment, the electronic device can obtain the product ID of the module to be identified before determining the category of the module to be identified based on the product ID.
[0116] For example, in Figure 3 In the process shown, the display driver of the electronic device sends a request to obtain the product ID to the touch driver when the module specification identifier is not ver_002 (i.e., executes S311). This avoids the electronic device obtaining the product ID unnecessarily (e.g., when the module specification identifier is ver_002), simplifies the process, and saves the software and hardware resources required to execute S311.
[0117] For example, the display driver of an electronic device can send a request to the touch driver to obtain the product ID before executing S307, and obtain the product ID of the module to be identified. If the module specification identifier is not ver_002, the category of the module to be identified can be determined based on the product ID (i.e., S313 is executed). This method allows the display driver to obtain the product ID in advance, saving the time that the display driver would have to wait to execute S313.
[0118] As another example, one configuration file for Scenario 2 can be shown in Table 2.
[0119] Table 2
[0120] category Pre-configuration status Module specification markings Display Module 1 State 1 ver_001 Display Module 2 State 1 ver_001 Display Module 3 State 1 ver_002
[0121] As shown in Table 2, the modules to be identified include three categories: display module 1, display module 2, and display module 3. The ID PIN pin of the module to be identified can be configured to state 1, where state 1 corresponds to display module 1, display module 2, and display module 3. The module specification identifier for display module 1 and display module 2 is ver_001, and the module specification identifier for display module 3 is ver_002. It should be noted that the above configuration file only shows partial information; for example, it may also include the correspondence between product ID and module category.
[0122] Please see Figure 4 This is a flowchart of the display module identification method in scenario two provided by an embodiment of this application. Figure 4 As shown, the display module identification method provided in this application embodiment specifically includes S401 to S411. Furthermore, the display module identification method provided in this application embodiment mainly involves the UEFI boot stage and the kernel boot stage, wherein the UEFI boot stage includes S401 to S403, and the kernel boot stage includes S404 to S411.
[0123] S401, in response to the user's power-on operation, initializes the display driver and touch driver using the bootloader.
[0124] For details, please refer to S301 and related content, which will not be described here.
[0125] S402, Display driver initializes the module to be identified.
[0126] For details, please refer to S302 and related content, which will not be described here.
[0127] S403, the display driver determines the pre-configuration status of the ID PIN pin of the module to be identified.
[0128] For details, please refer to S303 and related content, which will not be described here.
[0129] S404, the display driver reads the module specification identifier of the module to be identified.
[0130] For details, please refer to S306 and related content, which will not be described here.
[0131] S405, the display driver determines whether the module specification identifier is ver_002.
[0132] If the module specification identifier is ver_002, then the driver execution S406 is displayed; if the module specification identifier is not ver_002, then the driver execution S409 is displayed.
[0133] In this embodiment, the module specification identifiers for display module 1 and display module 2 are ver_001, and the module specification identifier for display module 3 is ver_002. It can be seen that among display module 1, display module 2, and display module 3, only the module specification identifier (i.e., ver_002) of display module 3 differs from the module specification identifiers (i.e., ver_001) of the other two categories (i.e., display module 1 and display module 2).
[0134] Therefore, if the module specification identifier is ver_002, the display driver can determine that the module to be identified is display module 3, i.e., execute S406. If the module specification identifier is not ver_002, it means that the module to be identified may be display module 1 or display module 2, i.e., the display driver cannot determine the category of the module to be identified based on the module specification identifier, and needs to further determine it through the product ID, i.e., execute S407.
[0135] S406, The display driver determines that the module to be identified is display module 3.
[0136] S407, touch driver initializes the module to be identified.
[0137] For details regarding the initialization of the touch driver for the module to be identified, please refer to S309, which will not be repeated here.
[0138] S408, the touch driver obtains the product ID of the module to be identified.
[0139] For details on how the touch driver obtains the product ID of the module to be identified, please refer to S310, which will not be repeated here.
[0140] S409, the display driver sends a request to the touch driver to obtain the product ID.
[0141] For details regarding the request to obtain the product ID, please refer to S311, which will not be repeated here.
[0142] S410, the touch driver sends the product ID of the module to be identified to the display driver.
[0143] S411, the display driver determines the category of the module to be identified based on the product ID.
[0144] For details, please refer to S313 and related content, which will not be described here.
[0145] Comparing Scenario 2 and Scenario 1, the difference lies in the following: In Scenario 2, all categories of display modules correspond to the same pre-configuration state of the ID PIN pin. Therefore, electronic devices cannot distinguish the category of the module to be identified based on the pre-configuration state of the ID PIN pin. Thus, after the display driver determines the pre-configuration state of the ID PIN pin of the module to be identified (i.e., executes S403), there is no need to judge the pre-configuration state of the ID PIN pin; the module specification identifier of the module to be identified can be directly read (i.e., executes S404). This saves time, speeds up the process, and improves the efficiency of determining the display module category.
[0146] As another example, one configuration file for Scenario 3 can be shown in Table 3.
[0147] Table 3
[0148]
[0149]
[0150] As shown in Table 3, the modules to be identified include two types: display module 1 and display module 2. The ID PIN pin of the module to be identified can be configured to state 1, where state 1 corresponds to display module 1 and display module 2. The module specification identifier for both display module 1 and display module 2 is ver_001. In addition, the configuration file also includes the correspondence between product ID and module category.
[0151] Please see Figure 5 This is a flowchart of the display module identification method in scenario three provided by an embodiment of this application. Figure 5As shown, the display module identification method provided in this application embodiment specifically includes S501 to S508. Furthermore, the display module identification method provided in this application embodiment mainly involves the UEFI boot stage and the kernel boot stage, wherein the UEFI boot stage includes S501 to S503, and the kernel boot stage includes S504 to S508.
[0152] S501, in response to the user's power-on operation, initializes the display driver and touch driver using a bootloader.
[0153] For details, please refer to S301 and related content, which will not be described here.
[0154] S502, the display driver initializes the module to be identified.
[0155] For details, please refer to S302 and related content, which will not be described here.
[0156] S503, the display driver determines the pre-configuration status of the ID PIN pin of the module to be identified.
[0157] For details, please refer to S403 and related content, which will not be described here.
[0158] S504, the touch driver initializes the module to be identified.
[0159] For details regarding the initialization of the touch driver for the module to be identified, please refer to S309, which will not be repeated here.
[0160] S505, the touch driver obtains the product ID of the module to be identified.
[0161] For details on how the touch driver obtains the product ID of the module to be identified, please refer to S310, which will not be repeated here.
[0162] S506, the display driver sends a request to the touch driver to obtain the product ID.
[0163] For details regarding the request to obtain the product ID, please refer to S311, which will not be repeated here.
[0164] S507, the touch driver sends the product ID of the module to be identified to the display driver.
[0165] S508, the display driver determines the category of the module to be identified based on the product ID.
[0166] For details, please refer to S313 and related content, which will not be described here.
[0167] Comparing Scenario 3 and Scenario 1, the differences are as follows: In Scenario 3, all categories of display modules correspond to the same pre-configuration state of the ID PIN pin, therefore the electronic device cannot determine the category of the module to be identified based on the pre-configuration state of the ID PIN pin; and, in Scenario 3, all categories of display modules have the same module specification identifier, therefore the electronic device cannot determine the category of the module to be identified based on the module specification identifier. Therefore, after the display driver determines the pre-configuration state of the ID PIN pin of the module to be identified (i.e., executes S503), there is no need to judge the pre-configuration state of the ID PIN pin, nor is it necessary to read the module specification identifier of the module to be identified. The module specification identifier of the module to be identified can be read directly (i.e., executes S504), which further saves program time and improves the efficiency of determining the display module category.
[0168] Furthermore, comparing the embodiments in the three scenarios above, it can be seen that even when the electronic device cannot determine the category of the module to be identified through the pre-configuration state of the ID PIN pin, the display driver of the electronic device still needs to determine the pre-configuration state of the ID PIN pin of the module to be identified. This is because this process is completed during the UEFI boot phase. Retaining this step allows engineers to retain the existing UEFI boot phase runtime, improving program compatibility.
[0169] In this embodiment, after the display driver of the electronic device determines the category of the module to be identified, it can also determine the configuration parameters according to the category of the module to be identified, and further configure the module to be identified according to the configuration parameters. This helps to improve the stability of the display effect of the electronic device.
[0170] Taking display module 1 and display module 2 as examples, display module 1 has a ghosting problem, while display module 2 has an insufficient number of registers. Ghosting is a fault phenomenon of display modules, specifically manifested as black horizontal stripes trailing behind displayed fonts, images, and windows. The length of the stripes can vary depending on the severity.
[0171] When the display driver of the electronic device identifies the module to be identified as display module 1, it can configure the module to be identified based on configuration parameter 1 to increase the operating frequency of the module and thus solve the ghosting problem. When the display driver of the electronic device identifies the module to be identified as display module 2, it can configure the module to be identified based on configuration parameter 2 to increase the number of registers in the module and thus solve the problem of insufficient registers. In this way, regardless of whether the electronic device uses display module 1 or display module 2, it can have a good and stable display effect.
[0172] In summary, the display module identification method provided in this application can obtain the product ID of the module to be identified when the electronic device cannot determine the category of the module to be identified through the IDPIN pin and module specification identifier, and determine the category of the module to be identified based on the product ID. This solution introduces the product ID and uses finer-grained parameters to distinguish the category of the display module, enabling accurate identification of the category of the display module in different scenarios.
[0173] This application also provides a chip system, such as... Figure 6 As shown, the chip system 600 includes at least one processor 601 and at least one interface circuit 602. The processor 601 and the interface circuit 602 are interconnected via lines. For example, the interface circuit 602 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 602 can be used to send signals to other devices (e.g., the processor 601). Exemplarily, the interface circuit 602 can read instructions stored in memory and send those instructions to the processor 601. When the instructions are executed by the processor 601, the electronic device or server can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application embodiment does not specifically limit this.
[0174] This embodiment also provides a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device to perform the various functions or steps described in the above method embodiments.
[0175] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps in the above method embodiments.
[0176] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to perform the various functions or steps performed by the mobile phone in the above method embodiments.
[0177] In this embodiment, the electronic device, communication system, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0178] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0179] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0180] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.
[0181] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0182] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A method for identifying a display module, characterized in that, Applied to an electronic device, the electronic device including a module to be identified, the module to be identified being any one of multiple categories of display modules, the method comprising: Obtain the product ID of the module to be identified; different display modules have different product IDs. When the pre-configuration state of the module to be identified is the same as that of the first module and the module specification identifier of the module to be identified is the same as that of the first module, the category of the module to be identified is determined according to the product ID. The first module is at least one of the multiple categories of display modules, and the first module is different from the module to be identified.
2. The method according to claim 1, characterized in that, Before determining the category of the module to be identified based on the product ID, the method further includes: Obtain the pre-configuration status of the module to be identified.
3. The method according to claim 2, characterized in that, Before determining the category of the module to be identified based on the product ID, the method further includes: If the pre-configuration state of the module to be identified is the same as the pre-configuration state of the first module, the module specification identifier of the module to be identified is obtained. Determine whether the module specification identifier of the module to be identified is the same as that of the first module.
4. The method according to claim 2, characterized in that, Before determining the category of the module to be identified based on the product ID, the method further includes: If the pre-configuration states of the multiple categories of display modules are all the same and the module specification identifiers of at least two of the multiple categories of display modules are different, the module specification identifier of the module to be identified is obtained. Determine whether the module specification identifier of the module to be identified is the same as that of the first module.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: If the pre-configuration state of the module to be identified is different from the pre-configuration state of the second module, the category of the module to be identified is determined according to the pre-configuration state of the module to be identified, wherein the second module is a display module other than the module to be identified among the multiple categories of display modules.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: If the pre-configuration state of the module to be identified is the same as the pre-configuration state of the third module and the module specification identifier of the module to be identified is different from that of the third module, the category of the module to be identified is determined according to the module specification identifier of the module to be identified. The third module is a display module other than the module to be identified among the multiple categories of display modules.
7. The method according to any one of claims 1-6, characterized in that, The electronic device is equipped with a display driver, and obtaining the product ID of the module to be identified includes: After entering the kernel startup phase, the display driver obtains the product ID of the display module; If the pre-configuration state and module specification identifier of the module to be identified are the same as those of the first module, the category of the module to be identified is determined according to the product ID, including: When the pre-configuration state and module specification identifier of the module to be identified are the same as those of the first module, the display driver determines the category of the module to be identified based on the product ID.
8. The method according to claim 7, characterized in that, Before the display driver obtains the product ID of the display module, the method further includes: After entering the kernel startup phase, the touch driver initializes the module to be identified; The touch driver acquires the pre-configuration status of the module to be identified; The display driver obtains the product ID of the display module, including: The display driver sends a request to the touch driver to obtain the product ID; The touch driver sends the product ID of the module to be identified to the display driver.
9. The method according to claim 8, characterized in that, Before the touch driver initializes the module to be identified, the method further includes: After entering the Unified Extensible Firmware Interface (UEFI) boot phase, the bootloader initializes the touch driver and the display driver; The display driver initializes the module to be identified; The display driver acquires the pre-configuration status of the module to be identified.
10. An electronic device, characterized in that, The electronic device includes: a memory and a processor; the processor is coupled to the memory; wherein the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-9.
11. A computer-readable storage medium, characterized in that, Includes computer instructions; when the computer instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-9.