Display method and device and electronic equipment
By dividing the in-vehicle display screen into multiple sub-regions and mapping memory in turn, the problem of insufficient storage space in the in-vehicle chip is solved, enabling larger pixel display and more efficient image refresh.
Patent Information
- Application Number
- CN202512024891.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-15
AI Technical Summary
The limited storage space of automotive chips makes it difficult to meet the huge memory requirements of high-resolution screens, thus restricting further improvements in the display effect of automotive electronic instruments.
The display screen is divided into multiple sub-regions, memory is mapped to each sub-region in turn, and the image data of the sub-region is updated during the mapping, so that the display screen can refresh one frame of image.
It saves storage space, improves image refresh efficiency, supports larger pixel display screens, and performs data processing in parallel to reduce latency.
Smart Images

Figure CN122053891A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicles, and more particularly to a display method, apparatus, and electronic device. Background Technology
[0002] As electronic instruments are increasingly used in vehicles, the required size of in-vehicle screens is also growing. This necessitates more memory to power higher-resolution screens. However, the storage space of automotive chips is limited, making it difficult to meet the enormous memory demands of large-resolution screens and restricting further improvements in the display quality of in-vehicle electronic instruments.
[0003] Therefore, a display method is needed to reduce the memory requirements of screen display. Summary of the Invention
[0004] To address the issue of reducing the memory requirements of screen displays, this application provides a display method, apparatus, and electronic device. It also provides a computer program product and a computer-readable storage medium. In the method of this application's embodiments, instead of mapping memory to all pixels of the display screen, the display screen is divided into multiple sub-regions, and memory is mapped to each sub-region in turn. At any given time, memory only needs to be mapped to one sub-region. During the period when memory is mapped to a sub-region, the data stored in memory is changed to the data of the image to be displayed in that sub-region, so that the sub-region displays the image stored in memory. Thus, when the memory completes the mapping of one sub-region, the display screen has also completed the refresh of one frame of image across all display pixels.
[0005] Specifically, the embodiments of this application adopt the following technical solutions: In a first aspect, this application provides a display method applied to an electronic device, the electronic device including a memory and a display port, the memory including at least a first storage space, the method comprising: Multiple sub-image data are saved to the memory one by one. The set of multiple sub-image data is the data of the image to be displayed. The multiple sub-image data includes at least the first sub-image data and the second sub-image data. The multiple sub-image data stored in the memory are sent to the display port one by one. After the display port receives each sub-image data, it drives the corresponding pixel on the display screen to display the image corresponding to the received sub-image data. in: Saving multiple sub-image data to memory one by one, including saving the first sub-image data to the first storage space; Sending multiple sub-image data stored in the memory to the display port one by one, including sending the first sub-image data stored in the first storage space to the display port; Saving multiple sub-image data to the memory one by one also includes saving the second sub-image data to the first memory space after sending the first sub-image data saved in the first memory space to the display port.
[0006] According to the method in the first aspect, multiple sub-image data share the same storage space, eliminating the need to allocate storage space in the memory for storing the complete image to be displayed, thus saving storage space and enabling the memory to support display screens with larger pixels.
[0007] In one implementation of the first aspect, the storage space further includes a second storage space, and the multiple sub-image data further includes a third sub-image data; Saving multiple sub-image data to the memory one by one, and further including saving the third sub-image data to the second storage space, wherein saving the third sub-image data to the second storage space is performed synchronously with sending the first sub-image data saved in the first storage space to the display port.
[0008] According to the above implementation method, the first storage space and the second storage space are used alternately to save sub-image data, and the second storage space and the first storage space are used alternately to send data to the display port. This can achieve parallel execution of saving sub-image data to the memory and sending sub-image data to the display port, thereby reducing data processing waiting time and improving image refresh efficiency.
[0009] In one implementation of the first aspect, saving multiple sub-image data to memory one by one further includes: Based on the memory's storage space utilization rate, adjust the size of the first and second storage spaces, and / or determine the allocation ratio for saving sub-image data to the first and second storage spaces.
[0010] In one implementation of the first aspect, the method further includes: The clock signal (CLK) and valid data strobe signal (DE) are provided based on the pulse width modulation (PWM) function. The clock signal (CLK) and valid data strobe signal (DE) are used to refresh the display image at the display port.
[0011] In one implementation of the first aspect, the method further includes: Multiple sub-image data are saved to memory one by one using the first direct memory access (DMA) channel; as well as, The second direct memory access (DMA) channel is used to send the multiple sub-image data stored in memory to the display port one by one.
[0012] In one implementation of the first aspect, the image to be displayed is an image that occupies a portion of the display screen; The method also includes recording the positional correspondence between the image to be displayed and the display screen; Saving multiple sub-image data to memory one by one includes saving multiple sub-image data to corresponding addresses in memory according to their positional correspondence.
[0013] In one implementation of the first aspect, saving multiple sub-image data to memory one by one includes compressing the multiple sub-image data using run-length encoding (RLE) and saving the compressed data to memory.
[0014] Secondly, this application provides a display device applied to an electronic device, the electronic device including a memory and a display port, the memory including at least a first storage space, and the device including: The first data transmission module is used to save multiple sub-image data into the memory one by one, wherein the collection of multiple sub-image data is the data of the image to be displayed, and the multiple sub-image data includes at least the first sub-image data and the second sub-image data; The second data transmission module is used to send multiple sub-image data stored in the memory to the display port one by one. The display port refreshes the display image once every time it receives a sub-image data. in: The first data transmission module is used to save the first sub-image data to the first storage space; The second data transmission module is used to send the first sub-image data stored in the first storage space to the display port; The first data transmission module is also used to save the second sub-image data to the first storage space after sending the first sub-image data stored in the first storage space to the display port.
[0015] Thirdly, this application provides an electronic device, which includes a memory and a processor; The processor executes instructions stored in memory to cause the electronic device to perform the method as described in the first aspect.
[0016] Fourthly, this application provides a computer program product containing instructions that, when executed by a computing device system, cause a cluster of computing devices to perform the method as described in the first aspect.
[0017] Fifthly, this application provides a computer-readable storage medium including computer program instructions, which, when executed by a computer system, cause the computer system to perform the method as described in the first aspect. Attached Figure Description
[0018] Figure 1 The diagram shown is a schematic representation of the memory-display screen mapping relationship according to an embodiment of this application; Figure 2 The diagram shown is a schematic diagram of a display device structure according to an embodiment of this application; Figure 3 The diagram shown is a flowchart of a display method according to an embodiment of this application; Figure 4 The diagram shown is a schematic flowchart of a display method according to an embodiment of this application; Figure 5 The diagram shown is a schematic diagram of the DE signal generation logic according to an embodiment of this application; Figure 6 The diagram shown is a schematic diagram of the encoding logic of the RLE algorithm according to an embodiment of this application; Figure 7 The diagram shown is a schematic diagram of the RLE algorithm decoding logic according to an embodiment of this application; Figure 8 The diagram shown is a schematic diagram of the implementation logic of a display method according to an embodiment of this application; Figure 9 The image shown is a schematic diagram of an image to be displayed according to an embodiment of this application; Figure 10 The diagram shown is a schematic representation of the data storage state of the video memory space according to an embodiment of this application; Figure 11 The diagram shown is a schematic representation of the data storage state of the video memory space according to an embodiment of this application; Figure 12 The diagram shown is a schematic representation of the data storage state of the video memory space according to an embodiment of this application; Figure 13 The diagram shown is a schematic representation of the data storage state of the video memory space according to an embodiment of this application; Figure 14 The image shown is a schematic diagram of an image to be displayed according to an embodiment of this application; Figure 15 This is a schematic diagram of an electronic device structure according to an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.
[0021] In automotive electronic instrument clusters, due to limitations in hardware configuration, power consumption, and operational stability, they typically do not have independent display devices. Instead, they are integrated into a single unit, with the display screen incorporated into the instrument cluster itself. To control costs and reduce power consumption, one feasible technical solution involves the electronic instrument cluster directly driving the display screen from memory. In this solution, memory is mapped to all pixels of the display screen; that is, all the information of the image to be displayed on the screen is loaded into memory, and each pixel on the screen corresponds to a storage address in memory.
[0022] For example, Figure 1 The diagram shown is a schematic representation of the memory-display screen mapping relationship according to an embodiment of this application.
[0023] like Figure 1 As shown, display screen 101 is 480. An 800-pixel display screen. This corresponds to display screen 101, and memory 100 needs to be configured with a corresponding 480. 800 pixels 480 There are 800 storage spaces (storage addresses), and each storage space corresponds to one pixel.
[0024] For example, 110 is 480 for display screen 101. 3 out of 800 pixels 5 pixels. Corresponding to 110, memory 100 requires storage space 111, which contains 3... There are 5 storage spaces, and the memory value of each storage space is used to store the pixel value of one pixel.
[0025] According to the above scheme, by mapping the storage space to all the pixels of the display screen, the display screen can display the image loaded in memory. Furthermore, by changing the data value stored at the storage address, the state of the corresponding pixel on the display screen can be changed, thereby changing the image displayed on the display screen.
[0026] However, the above solution requires memory to occupy enough storage space to map all the pixels of the display screen. As the number of pixels on the display screen increases, the storage space required to map all the pixels of the display screen also increases. When the memory cannot provide enough storage space to map all the pixel values of the screen, the display screen cannot be driven to display normally.
[0027] Furthermore, in the scheme of mapping memory to all pixels of the display screen, it is necessary to always maintain the storage space of all pixels of the corresponding display screen in memory. The memory allocation method is fixed and cannot be dynamically adjusted according to the actual display needs, resulting in low memory resource utilization.
[0028] To address the aforementioned problems, a display method is proposed in one embodiment of this application. In this method, instead of mapping memory to all pixels of the display screen, the display screen is divided into multiple sub-regions, and memory is mapped to each sub-region in turn. At any given time, memory only needs to be mapped to one sub-region. During the period when memory is mapped to a sub-region, the data stored in memory is changed to the data of the image to be displayed in that sub-region, so that the sub-region displays the image stored in memory. Thus, when memory completes the mapping of one sub-region, the display screen has also completed the refresh of one frame of image across all display pixels.
[0029] Specifically, the display method of this application embodiment is applied to an electronic device, which includes a memory, a display screen, and a display port for driving the display screen to display.
[0030] This application does not impose specific limitations on the application scenarios of the display method of this application, nor on the electronic devices that apply the display method of this application.
[0031] In one embodiment, the display method of this application is applied to the vehicle field. The electronic device using the display method of this application can be an in-vehicle electronic instrument or other in-vehicle electronic device (e.g., vehicle infotainment system, in-vehicle monitoring equipment, in-vehicle navigation equipment, in-vehicle entertainment equipment, etc.).
[0032] In another embodiment, the display method of this application is applied to other fields (e.g., engineering field, outdoor field, etc.). The electronic device that applies the display method of this application can be an industrial control device, a production line control device, a mobile phone, a tablet computer, a personal digital assistant (PDA), a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, and wearable devices, etc.
[0033] In this embodiment of the application, the memory of the electronic device can be used to store image data of the image to be displayed and support the mapping of storage space to pixels of the display screen to drive the display screen to display the image.
[0034] Electronic devices include memory (also known as video memory) for mapping pixels on a display screen, and may also include memory for other purposes (e.g., for logical data processing).
[0035] In one embodiment, different types of memory can be integrated into the same physical memory hardware. For example, an electronic device includes a memory in which a portion of the storage space is used to map pixels of the display screen (video memory), and a portion of the storage space is used to cache data during logical data processing (memory memory).
[0036] In another embodiment, the different functional memories can be different physical memory hardware. For example, the electronic device includes a first memory (RAM) for caching data during logical data processing. The electronic device also includes a second memory (video memory) for mapping pixels on the display screen.
[0037] In this embodiment of the application, the image data stored in the memory is output to the display port of the electronic device, which can drive the corresponding pixels on the display screen of the electronic device to refresh the pixel status.
[0038] This application does not limit the specific method of driving the display screen through the display port. Those skilled in the art can design the implementation method of driving the display screen through the display port according to actual needs.
[0039] Furthermore, in order to implement the display method of the embodiments of this application, one embodiment of this application also provides a display device, which is applied to an electronic device.
[0040] Figure 2 The diagram shown is a schematic diagram of a display device structure according to an embodiment of this application.
[0041] like Figure 2 As shown, the display device 200 includes: The first data transmission module 201 is used to save multiple sub-image data into a memory one by one; The second data transmission module 202 is used to send multiple sub-image data stored in the memory to the display port one by one.
[0042] In the description of the embodiments of this application, for the sake of convenience, the device is described by dividing it into various modules according to its functions. The division of each module is only a logical functional division. When implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware.
[0043] Specifically, the apparatus proposed in this application can be fully or partially integrated onto a single physical entity (e.g., a GPU or other type of processor), or it can be physically separated. These modules can be implemented entirely in software via processing element calls; entirely in hardware; or some modules can be implemented in software via processing element calls, while others are implemented in hardware. For example, the detection module can be a separate processing element or integrated into a chip in an electronic device. The implementation of other modules is similar. Furthermore, these modules can be fully or partially integrated together or implemented independently. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0044] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs). Alternatively, these modules can be integrated together as a system-on-a-chip (SOC).
[0045] The embodiments of this application do not limit the specific manner in which the device is implemented. Those skilled in the art can design the implementation manner of the device according to the actual situation.
[0046] For example, in one embodiment, the device is installed on the electronic device in hardware (e.g., a functional chip). In another embodiment, the device is installed in the operating system of the electronic device as software code. Yet another embodiment, the device is installed on the electronic device as a combination of hardware and software.
[0047] Figure 3 The diagram shown is a flowchart of a display method according to an embodiment of this application.
[0048] In one embodiment, the electronic device performs as follows: Figure 3 The following process is shown to achieve image display on the display screen.
[0049] S310 saves multiple sub-image data one by one to the memory of the electronic device.
[0050] In one embodiment, a display device 200 is installed in the electronic device, and S310 is executed by the first data transmission module 201.
[0051] Specifically, the collection of multiple sub-image data constitutes the data of the image to be displayed. For example, the image to be displayed corresponds to all pixels of the display screen. The display screen is divided into multiple sub-regions, and the image to be displayed is divided into multiple sub-images based on the sub-region division of the display screen, with each sub-image corresponding to a sub-region of the display screen.
[0052] For example, the display screen contains (m1) m2) (n1) n² pixels. The display screen can be divided into m1... n1 subregions (numbered 1, 2, 3... m1) n1), each subregion contains m2 n2 pixels.
[0053] The image to be displayed corresponding to the entire display screen includes (m1) m2) (n1) n2) pixels, corresponding to the sub-region division of the display screen, divide the image to be displayed into m1. n1 sub-images (numbered 1, 2, 3... m1) n1), the data for each sub-image (sub-image data) contains m2 n2 pixels of data (m2) (pixel values of n2 pixels).
[0054] This application does not impose specific restrictions on the source of the data for the image to be displayed.
[0055] For example, in one embodiment, the image data of the image to be displayed is stored in other storage space of the same memory, or in other memory of the electronic device (e.g., in the data cache (memory) during logical data processing).
[0056] S311 sends multiple sub-image data stored in the memory to the display port one by one. After receiving each sub-image data, the display port drives the corresponding pixel on the display screen to display the image corresponding to the received sub-image data.
[0057] In one embodiment, a display device 200 is installed in the electronic device, and S311 is executed by the second data transmission module 202.
[0058] In S311, after receiving each sub-image data, the display port refreshes the pixels of the display screen corresponding to that sub-image data. Thus, after all the sub-image data of the image to be displayed are sent to the display port, the display port refreshes all the pixels of the display screen corresponding to the image to be displayed, so that the display screen displays the image to be displayed.
[0059] For example, the sub-image data numbered 1 is sent to the display port, and the display port refreshes the pixels of the sub-region numbered 1 on the display screen, so that the pixels of the sub-region numbered 1 display the image corresponding to the sub-image data numbered 1.
[0060] The sub-image data of number 2 is sent to the display port. The display port refreshes the pixels of the sub-region of number 2 on the display screen, so that the pixels of the sub-region of number 2 display the image corresponding to the sub-image data of number 2. At this time, the pixels of the sub-regions of number 1 and number 2 display the images corresponding to the sub-image data of number 1 and number 2, respectively. ...... Number m1 The sub-image data of n1 is sent to the display port, and the display port corresponds to the number m1 on the display screen. The pixels of the sub-region n1 are refreshed once, so that the number m1 The pixel display number m1 in the sub-region of n1 The images corresponding to sub-image data of n1, where numbers 1, 2... m1 The pixels in the sub-region of n1 are numbered 1, 2, and m1 respectively. The image corresponding to the sub-image data of n1, that is, the image to be displayed on the screen.
[0062] In S310, the multiple sub-image data includes at least the first sub-image data. In S311, after the first sub-image data is sent to the display port and the display port drives the corresponding pixels on the display screen to display the image corresponding to the first sub-image data, the image display task for the first sub-image data is completed. Therefore, it is not necessary to send the first sub-image data to the display port again, and the memory no longer needs to store the first sub-image data. Thus, subsequent sub-image data stored in memory can use the storage space previously used to store the first sub-image data, thereby reducing the storage space occupied during the implementation of S310.
[0063] Specifically, in one embodiment, the memory of the electronic device includes at least a first storage space, and the plurality of sub-image data includes at least first sub-image data and second sub-image data. S310 includes saving the first sub-image data to the first storage space; S311 includes sending the first sub-image data saved in the first storage space to a display port. Furthermore, S310 also includes saving the second sub-image data to the first storage space after sending the first sub-image data saved in the first storage space to the display port.
[0064] According to the above process, the second sub-image data shares the first storage space with the second sub-image data, so that it is not necessary to allocate separate storage spaces for the second sub-image data and the second sub-image data in the memory.
[0065] Based on the above process, in S310, when saving sub-image data in memory, the sub-image data saved later can use the storage space occupied by the previously saved sub-image data that has been sent to the display port, so that the sub-image data saved later does not need to occupy new storage space.
[0066] For example, in one embodiment, in S311 each time a sub-image data is sent to the display port, in S310 a new sub-image data is saved to the memory, overwriting the sub-image data previously sent to the display port.
[0067] For example, the sub-image data numbered 1 is saved to the memory, occupying the first storage space. Then, the sub-image data numbered 1 saved in the first storage space is sent to the display port. Next, the sub-image data numbered 2 is saved to the memory, occupying the first storage space and overwriting the sub-image data numbered 1. Then, the sub-image data numbered 2 saved in the first storage space is sent to the display port. Finally, the sub-image data numbered 3 is saved to the memory, occupying the first storage space and overwriting the sub-image data numbered 2. ...... Number m1 The sub-image data of n1 is saved to the memory, occupying the first storage space and overwriting the number (m1). The sub-image data of n1-1). Then the sub-image data numbered m1. The sub-image data of n1 is sent to the display port.
[0069] Ultimately, in S310, the storage space occupied by the sub-image data stored in the memory is the first storage space.
[0070] According to the method of the embodiments of this application, multiple sub-image data share the same storage space, eliminating the need to allocate storage space in the memory for storing the complete image to be displayed, thus saving storage space and enabling the memory to support display screens with larger pixels.
[0071] Furthermore, in memory read / write scenarios, simultaneous data read and write operations are not supported for the same memory address. Therefore, in S310 and S311, it is not possible to simultaneously save sub-image data to the first memory space (S310) and read sub-image data from the first memory space and send it to the display port (S311). This means that in S310 and S311, before reading sub-image data from the first memory space and sending it to the display port (S311), it is necessary to wait for the operation of saving sub-image data to the first memory space (S310) to complete. This results in a relatively long delay between saving sub-image data to memory and sending sub-image data to the display port, ultimately leading to slow image refresh on the display screen.
[0072] In response to the above situation, in one embodiment of this application, two storage spaces (a first storage space and a second storage space) are divided in the memory to store sub-image data, and each storage space is used to store one sub-image data.
[0073] In S310, during the process of saving sub-image data to memory one by one, the two memory spaces are used alternately to save the sub-image data. In S311, during the process of sending sub-image data to the display port one by one, the sub-image data saved in the two memory spaces are sent to the display port alternately. Furthermore, while saving one sub-image data to one memory space, the sub-image data saved in the other memory space is sent to the display port, thereby enabling the operation of saving sub-image data to memory and the operation of sending sub-image data from memory to the display port to be executed in parallel.
[0074] Specifically, in one embodiment, the multiple sub-image data also includes third sub-image data; S310 further includes saving the third sub-image data to a second storage space, wherein saving the third sub-image data to the second storage space is performed synchronously with sending the first sub-image data saved in the first storage space to the display port.
[0075] In one embodiment, S310 further includes, after sending the first sub-image data stored in the first storage space to the display port, saving the second sub-image data to the first storage space, overwriting the first sub-image data stored in the first storage space; and S311 further includes, after sending the first sub-image data stored in the first storage space to the display port, sending the third sub-image data stored in the second storage space to the display port, wherein saving the second sub-image data to the first storage space and sending the third sub-image data stored in the second storage space to the display port are performed synchronously.
[0076] Figure 4 The diagram shown is a schematic flowchart of a display method according to an embodiment of this application.
[0077] In one embodiment, the display screen includes (m1) m2) (n1) The image to be displayed contains (n2) pixels, and the image to be displayed contains (m1) pixels. m2) (n1) n2) pixels.
[0078] Electronic devices perform such Figure 4 The following process is shown to achieve (m1) m2) (n1) The image displayed on the screen is n2 pixels.
[0079] S400 divides the image to be displayed into m1 n1 sub-images (numbered 1, 2, ... m1 respectively) n1), the data for each sub-image (sub-image data) contains m2 Data for n2 pixels.
[0080] S401, save the sub-image data numbered 1 to the first storage space of the memory.
[0081] First storage space mapping m2 n2 pixels.
[0082] S402, the sub-image data numbered 1 stored in the first storage space is sent to the display port.
[0083] S403, save the sub-image data numbered 2 to the second storage space of the memory.
[0084] Second storage space mapping m2 n2 pixels.
[0085] S402 and S403 are executed in parallel.
[0086] S404, save the sub-image data numbered 3 to the first storage space of the memory, overwriting the sub-image data numbered 1 in the first storage space.
[0087] S405, sends the sub-image data numbered 2 stored in the second storage space to the display port.
[0088] S404 and S405 are executed in parallel.
[0089] S406, send the sub-image data numbered 3 stored in the first storage space to the display port.
[0090] S407, save the sub-image data numbered 4 to the second storage space of the memory, overwriting the sub-image data numbered 2 in the second storage space.
[0091] S406 and S407 are executed in parallel. ...... Following the above process, the sub-image data is alternately saved to the first storage space and the second storage space, and the sub-image data in the first storage space and the second storage space is alternately sent to the display port until all the sub-image data is sent to the display port, at which point the current image refresh ends.
[0093] according to Figure 4 The process shown alternately uses the first storage space and the second storage space to save sub-image data, and alternately uses the second storage space and the first storage space to send data to the display port. This enables the parallel execution of saving sub-image data to the memory and sending sub-image data to the display port, thereby reducing data processing waiting time and improving image refresh efficiency.
[0094] Furthermore, in image display scenarios, there are cases where the image to be displayed occupies only a portion of the display screen. To address this, in one embodiment, during the process of refreshing the pixels of the display screen, the positional correspondence between the image to be displayed and the display screen is recorded; during the process of saving the sub-image data of the image to be displayed to the memory, the method includes saving the sub-image data to the corresponding address in the memory according to the previously recorded positional correspondence.
[0095] Specifically, in one embodiment, information such as the position of the image to be displayed (small image) on the display screen and the position of the sub-area of the display screen occupied by the image to be displayed (small image) are recorded during the refresh interval of each frame (position correspondence). When updating to the corresponding sub-area of the display screen, the sub-image data of the image to be displayed is saved to the corresponding address of the corresponding storage space.
[0096] Furthermore, since there may be cases where the image to be displayed only occupies a portion of the display screen, when updating the sub-image data stored in the storage space, not all data in the storage space is updated each time. This leads to different usage rates at different addresses in the memory. To address this issue, in one embodiment, in S310, the sizes of the first and second storage spaces are adjusted based on the memory's storage space usage rate, and / or, the allocation ratio for storing sub-image data in the first and second storage spaces is determined.
[0097] In one embodiment, the sizes of the first storage space and the second storage space are dynamically adjusted according to the actual application scenario and display requirements, and / or the allocation ratio for saving sub-image data to the first storage space and the second storage space is adjusted.
[0098] Specifically, in one embodiment, a memory monitoring mechanism is introduced to detect memory usage in real time and dynamically adjust the allocation of storage space in the memory as needed. During system operation, if the utilization rate of one storage space is too high (e.g., exceeding 80%) and close to full load, while the utilization rate of another storage space is low (e.g., below 30%), the size of the two storage spaces is adjusted according to a preset strategy, and / or the allocation ratio of saving sub-image data to the two storage spaces is adjusted, so that when subsequent sub-image data is saved, more data is allocated to the memory address with low utilization rate for storage, thereby balancing the load of different memory addresses on the memory and improving the overall resource utilization of the memory.
[0099] The storage space adjustment strategy can be preset according to the specific application scenario and the characteristics of the displayed content. For example, the memory address of the storage space can be allocated according to the update frequency or importance of different areas of the screen. In one embodiment, the adjustment strategy is as follows: Within each monitoring period, the proportion of currently used storage space in the first and second storage spaces to the total space is calculated and denoted as Ua and Ub, respectively. A high-load threshold Th = 0.8 and a low-load threshold Tl = 0.3 are set.
[0100] If Ua > Th and Ub < Tl, then: calculate the amount of data D that needs to be transferred from the first storage space to the second storage space. Assuming the size of the current data block (sub-image data) to be transferred is S, we can use the formula D = min(S, (Ua - Th)). The transfer amount is determined by SizeA, where SizeA is the total size of the first storage space.
[0101] The next data allocation is adjusted, moving a portion of the data (quantity D) originally planned for the first storage space to the second storage space. Specifically, in the transmission task queue for sending S311 sub-image data to the display port, the target address of the corresponding transmission task is modified to the address of the second storage space. Conversely, if Ub > Th and Ua < Tl, a similar reverse adjustment is performed.
[0102] Furthermore, in the process of implementing pixel refresh on the display screen, a clock signal (CLK) and a valid data strobe signal (DE) are required. CLK and DE are used by the display port to refresh the displayed image; specifically, DE indicates when valid image data can be transmitted.
[0103] In one embodiment, a clock signal (CLK) and an effective data strobe signal (DE) are provided based on a pulse-width modulation (PWM) function.
[0104] For example, Figure 5 The diagram shown is a schematic diagram of the DE signal generation logic according to an embodiment of this application.
[0105] Specifically, in one embodiment, PWM1 is used to provide a CLK signal to the display screen. The period of PWM2 is related to the number of overflow trigger outputs (thermally reduced graphene oxide, TRGO) of PWM1. For example, 900 overflow TRGOs of PWM1 are used as the period of PWM2, and the duty cycle is set to 800 / 900.
[0106] The period of PWM3 is related to the number of overflow TRGOs of PWM2. For example, the period of PWM3 can be set to 512 overflow TRGOs of PWM2, with a duty cycle of 480 / 512.
[0107] like Figure 5 As shown, the waveforms of PWM2 and PWM3 are input into the AND gate, and the result is the DE signal displayed on the screen.
[0108] Furthermore, in one embodiment, S310 and S311 are implemented based on Direct Memory Access (DMA). Specifically, in one embodiment, in S310, a first Direct Memory Access (DMA) channel is used to save multiple sub-image data into memory one by one; and in S311, a second Direct Memory Access (DMA) channel is used to send the multiple sub-image data saved in memory to the display port one by one.
[0109] For example, refer to Figure 4As shown, in S401, DMA0 (first DMA channel) is used to transfer the sub-image data of the image to be displayed, number 1, stored in other storage spaces to the first storage space of the memory.
[0110] After S401 is completed, in S402, DMA1 (second DMA channel) is used to transfer the data in the first memory space to the PORT pin of the display port. The data in the first memory space is then transmitted to the display screen through changes in the PORT pin.
[0111] In S402, while DMA1 is transferring data from the first storage space to the port PORT, S403 is executed in parallel. In S403, DMA0 is used to transfer the sub-image data of the image to be displayed (number 2) stored in other storage spaces to the second storage space of the memory. After the data transfer in the first storage space is completed (after S402 is completed), DMA1 is used to transfer the data from the second storage space to the pin port PORT (S405).
[0112] In the above process, DMA0 (first DMA channel) and DMA1 (second DMA channel) are transmitted in parallel to reduce data latency.
[0113] In one embodiment, to further reduce the impact of latency during data transmission, a smart start-stop strategy for DMA transmission is adopted. Specifically, in one embodiment, when switching between the first and second storage spaces or starting and stopping DMA transmission, the data and status required for the next transmission are predicted and prepared in advance, reducing unnecessary waiting time.
[0114] Specifically, in one embodiment, the intelligent start / stop strategy for DMA transfer is as follows: Input: Current transmission task parameters (block size S, transmission rate R, hardware latency D, etc.) Output: Optimized transmission task scheduling (1) Predicted transmission completion time: a. Calculate the estimated completion time Tc of the current transmission task = current time + (S / R) + D.
[0115] (2) Prefetch data: a. When the current transfer begins, start the prefetch thread or interrupt service routine to read the next block of data from storage into the cache.
[0116] (3) Address calculation: a. When the current transfer is nearing completion (e.g., the remaining time is less than the threshold Th), calculate the memory address for the next transfer.
[0117] b. Address calculation formula: Next address = Current address + S.
[0118] (4) State preparation: a. Set the status parameters required for DMA transfer, including source address, destination address, transfer size, etc.
[0119] b. State preparation completion time Ts = Current time + State setting time.
[0120] (5) Seamless switching: a. Initiate the next DMA transfer within a short time window before the current transfer completes (e.g., between Ts and Tc). 4.6 Monitoring and Adjustment: a. Monitor the transmission status in real time. If a delay or error is detected, recalculate and adjust the transmission parameters.
[0121] b. Adjustment strategy: If the current transmission delay ΔT > the threshold, re-predict the completion time and adjust the amount of prefetched data.
[0122] Furthermore, to further improve efficiency, in one embodiment, run-length encoding (RLE) is used to compress the sub-image data. Specifically, in one embodiment, in S310, run-length encoding (RLE) is used to compress multiple sub-image data, and the compressed data is saved to the memory.
[0123] For example, Figure 6 The diagram shown is a schematic diagram of the encoding logic of the RLE algorithm according to an embodiment of this application.
[0124] During the process of using RLE to compress sub-image data (RLE encoding), electronic devices perform actions such as... Figure 6 The following process is shown.
[0125] S600, initialize the current pixel and counter.
[0126] S601, Traverse the data blocks of the sub-image data to be compressed.
[0127] During the execution of S601, S602~S604 are executed.
[0128] S602, determine whether the pixels are the same and the counter is less than 255.
[0129] If the pixels are the same and the counter is less than 255, execute S603.
[0130] S603, add a counter.
[0131] If the pixels are not the same or the counter is greater than or equal to 255, execute S604.
[0132] S604, save the run and reset the counter.
[0133] After completing S601, execute S605 and S606.
[0134] S605, save the last itinerary.
[0135] S606, convert to byte stream.
[0136] For example, Figure 7 The diagram shown is a schematic diagram of the RLE algorithm decoding logic according to an embodiment of this application.
[0137] During the decompression of sub-image data compressed using RLE (RLE decoding), the electronic device performs actions such as... Figure 7 The following process is shown.
[0138] S700, initialize the data pointer.
[0139] S701, reads pixels and counts.
[0140] S702, repeating pixels to output.
[0141] S703, determine whether to end.
[0142] If the process is not complete, return to step S701.
[0143] If it has already ended, execute S704.
[0144] S704, convert to byte stream.
[0145] Since the content displayed on the screen often contains large areas of a single color (such as background color or fixed icons), according to the method of this application embodiment, using RLE to compress these areas can significantly reduce the amount of data in the sub-image data, thereby reducing the load of data transmission (DMA transmission) in S310 and S311 and improving data transmission efficiency.
[0146] Furthermore, according to the method of this application embodiment, the RLE-compressed data occupies less storage space, enabling more efficient use of memory resources. For example, when the utilization rate of a certain storage space is too high, RLE compression can reduce the amount of data in that storage space, thereby alleviating storage space pressure and providing greater flexibility for dynamically adjusting the size of the first and second storage spaces, and / or adjusting the allocation ratio of saving sub-image data to the first and second storage spaces.
[0147] According to the method in the embodiments of this application, when displaying small patches of image locally, RLE compression can reduce the amount of data that needs to be updated. For example, when a local area of the display screen needs to update the image, only the compressed data block needs to be transmitted, instead of reloading the data of the entire display screen, thereby speeding up the response speed of local updates.
[0148] According to the method in the embodiments of this application, by reducing the amount of data transmission and storage space occupied, RLE compression can reduce the power consumption of the system, especially in low-power scenarios (such as standby mode or low brightness display), which can further optimize the energy efficiency of the system.
[0149] Figure 8 The diagram shown is a schematic diagram of the implementation logic of a display method according to an embodiment of this application.
[0150] In one embodiment, the electronic device is based on Figure 8 The logic flow shown implements the display on the screen.
[0151] The S800 divides the display screen into multiple sub-regions.
[0152] S801 divides the image to be displayed into multiple sub-images according to the division of the display screen.
[0153] In S801, processing is performed on the image to be displayed (small image) that is partially displayed on the display screen (S8011).
[0154] The S802 provides CLK and DE signals based on PWM functionality.
[0155] S803 is executed based on S801 and S802.
[0156] S803, based on the DMA0 channel, transmits sub-image data to the first storage space or the second storage space; and based on the DMA1 channel, transmits sub-image data from the first storage space or the second storage space to the PORT.
[0157] The implementation of S803 can be referenced. Figure 4 .
[0158] During the execution of S803, the display screen shows an image. After one round of S803 is completed, the display screen displays one of the images to be displayed.
[0159] During the execution of S803, S804~S806 are executed.
[0160] S804 introduces a storage space monitoring mechanism; S805, real-time monitoring of storage space usage; S806, dynamically adjusts the size of the first storage space and the second storage space according to the storage space usage, and / or adjusts the allocation ratio of saving sub-image data to the first storage space and the second storage space.
[0161] Furthermore, during the execution of S803, S807 is executed.
[0162] S807 optimizes data transmission based on the RLE algorithm.
[0163] S807 includes using RLE to encode compressed sub-image data and using RLE to decode and decompress sub-image data.
[0164] According to the method of this application embodiment, the efficient operation of the instrument display screen driver is achieved by means of storing the image to be displayed in blocks, dynamic video memory allocation, PWM signal generation, DMA data transmission, local display processing, and RLE algorithm optimization.
[0165] The method according to the embodiments of this application can significantly reduce the chip storage space occupation, free up more storage space resources for other core program functions, and improve the overall chip utilization efficiency.
[0166] The method according to the embodiments of this application optimizes the data transmission process, effectively reduces latency and waiting time, improves the efficiency and smoothness of screen refresh, provides strong support for the application of large-size, high-resolution screens in automotive electronic instruments, and enhances the user experience.
[0167] The following describes the implementation process of a display method according to an embodiment of this application, using a specific implementation scenario as an example.
[0168] In one embodiment, the resolution of the display screen is 800. 480. The display screen will be vertically divided into 15 equal sub-regions. The width of each sub-region is the same as the display screen, and the sub-region has a pixel count of 800. 32.
[0169] Figure 9 The image shown is a schematic diagram of an image to be displayed according to an embodiment of this application.
[0170] like Figure 9 As shown, based on the sub-region division of the display screen, the image to be displayed corresponding to the entire display screen is divided into 15 sub-images (numbered 1 to 15), with each sub-image having a pixel count of 800. 32.
[0171] The image data of the image to be displayed is saved to other storage space (e.g., hard drive, memory) in RGB565 format. Furthermore, before storage, each sub-image data block is compressed using the RLE algorithm to reduce data volume and improve storage efficiency.
[0172] The memory (video memory) is divided into two storage spaces (video memory A (first storage space) and video memory B (second storage space)).
[0173] Figure 10 The diagram shown is a schematic diagram of the data storage state of the video memory space according to an embodiment of this application.
[0174] like Figure 10 As shown, the space data of memory A and memory B is 800 pixels long, and the data at the end of the line is 100 pixels long. The default value is 0, and the width is 32 lines wide.
[0175] The size of a single memory block in memory A and memory B is 900. 32 2 = 57600 bytes, so the total space is 57600 bytes. 2 = 115200 bytes.
[0176] When dynamically adjusting the size of video memory A and video memory B, and / or adjusting the allocation ratio of saving sub-image data to video memory A and video memory B, the amount of data after RLE compression should be considered to make more efficient use of video memory resources.
[0177] The processor of the electronic device (e.g., a microcontroller MCU) enables the PWM1 function, which uses a frequency of 20MHz with a duty cycle of 50%.
[0178] Including the leading and trailing edge times of the uplink and the leading and trailing edge times of the frame, one frame of an image has (800+100). (480+32)=460800 pixels. At a CLK frequency of 20MHz, the time taken to refresh one frame of the image is 460800 / 20MHz=23.04ms.
[0179] Since the image has been divided into 15 parts and frame leading and trailing edges have been added, the DMA transfer time for each sub-image data is within 1.44ms. The period of PWM2 is calculated using 900 overflow TRGO cycles of PWM1, with a duty cycle set to 800 / 900. The period of PWM3 is calculated using 512 overflow TRGO cycles of PWM2, with a duty cycle set to 480 / 512. The waveforms of PWM2 and PWM3 are then input into an AND gate, and the result is the DE signal of the screen (see reference). Figure 5 ).
[0180] Figure 11 The diagram shown is a schematic diagram of the data storage state of the video memory space according to an embodiment of this application.
[0181] Use the DMA0 function to Figure 9 The sub-image data of the first sub-image block is transferred to video memory A, resulting in... Figure 11 .
[0182] Before transmission, the sub-image data of the first sub-image block is compressed using RLE to reduce the amount of data transmitted.
[0183] Meanwhile, an intelligent start-stop strategy is adopted. When the current transmission task starts, the transmission completion time is predicted, a prefetch thread is started to read the next block of data from the storage space into the cache, and the memory address of the next transmission is calculated when the current transmission is close to completion. The state parameters required for DMA transmission are set, so as to start the next DMA transmission within a small time window before the current transmission is completed, thereby reducing latency.
[0184] In putting Figure 9 After the first sub-image block's sub-image data is transferred to video memory A, the data in video memory A is transferred to port PORT via DMA1 within 1.44ms, with each pixel being transferred until the entire video memory block is transferred to the screen. During the transfer process, the RLE-compressed data is decoded to restore the original data.
[0185] Figure 12 The diagram shown is a schematic diagram of the data storage state of the video memory space according to an embodiment of this application.
[0186] During the process of transferring data from video memory A to port PORT via DMA1, DMA0 is used to... Figure 9 The sub-image data of the second sub-image block is transferred to video memory B, resulting in... Figure 12 .
[0187] Before transmission, the sub-image data of the second sub-image block is also compressed using RLE, and an intelligent start-stop strategy is adopted to prefetch the next block of data, calculate the address, and prepare the status parameters to achieve seamless switching. Then, after waiting for DMA1 to transfer the data from memory A to the PORT, DMA1 is started again to transfer the data from memory B to the PORT.
[0188] Figure 13 The diagram shown is a schematic diagram of the data storage state of the video memory space according to an embodiment of this application.
[0189] During the process of transferring data from video memory B to port PORT via DMA1, DMA0 is used to... Figure 9 The sub-image data of the third sub-image block is transferred to video memory A, resulting in... Figure 13 .
[0190] The data transmission continues alternately until all sub-image data for the entire image to be displayed has been transmitted. During each transmission, the RLE algorithm and intelligent start-stop strategy are combined to optimize data transmission and video memory utilization. After completion, the DE signal will shut down the refresh time of one block, which serves as the leading and trailing edge time of the screen's frame interval.
[0191] Figure 14 The image shown is a schematic diagram of an image to be displayed according to an embodiment of this application.
[0192] For images that need to be displayed in a partial manner, the image's position information needs to be recorded during the image's display refresh interval.
[0193] like Figure 14 As shown, the starting position of the arrow, the horizontal length of the image to be displayed, and the vertical length of the image within the current sub-region of the display screen are recorded. When the next frame of the image begins to refresh and data is transferred using DMA, the memory at the recorded positions is modified to contain the data of the current image to be displayed, with the data offset based on the position of the first pixel value. During partial display, the data in the area that needs to be updated is compressed using RLE to reduce the amount of data transferred and speed up the update process.
[0194] An embodiment of this application also proposes an electronic device. This electronic device is used to execute the method flow or part of the method flow described in the embodiments of this application. This electronic device is a terminal device, base station device, or server device as described in the embodiments of this specification.
[0195] Figure 15 This is a schematic diagram of an electronic device structure according to an embodiment of this application.
[0196] like Figure 15 As shown, the electronic device 2500 includes a memory 2502 for storing computer program instructions and a processor 2501 for executing the program instructions. When the computer program instructions are executed by the processor 2501, the electronic device 2500 is triggered to execute the method steps performed by the terminal device, base station device, or server device as described in the embodiments of this application.
[0197] Specifically, in one embodiment of this application, the aforementioned one or more computer programs are stored in the aforementioned memory 2502. The aforementioned one or more computer programs include instructions that, when executed by the aforementioned electronic device 2500, cause the aforementioned electronic device 2500 to perform the method steps described in the embodiments of this application.
[0198] It is understood that the structural description of the electronic device 2500 in this application does not constitute a specific limitation on the electronic device 2500. In other embodiments of this application, the electronic device 2500 may include other components besides the processor 2501 and the memory 2502.
[0199] The processor 2501 may be an on-chip device (SoC) or other architecture. The processor 2501 may include a central processing unit (CPU) and may further include other types of processors.
[0200] Processor 2501 may include one or more processing units. For example, the processing units of processor 2501 may include any combination of one or more of the following: Central Processing Unit (CPU), Digital Signal Processor (DSP), Microcontroller Unit (MCU), Digital Signal Processor (DSP), Application Processor (AP), Graphics Processing Unit (GPU), Neural-network Processing Units (NPU), Image Signal Processing (ISP), Modem Processor, Controller, Video Codec, and Baseband Processor. Processing units of processor 2501 may also include other processing units besides those described above.
[0201] In processor 2501, different processing units can be independent devices or integrated into one or more processors. The controller can generate operation control signals based on the instruction opcode and timing signals to control instruction fetching and execution.
[0202] The processor may also include necessary hardware accelerators or logic processing hardware circuitry, such as an ASIC, or one or more integrated circuits for controlling the execution of the program in this application. Furthermore, the processor may have the capability to operate one or more software programs, which may be stored in a storage medium.
[0203] The processor 2501 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 2501 is a cache memory. This memory can store instructions or data that the processor 2501 has just used or is recurring. If the processor 2501 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 2501, and thus improves the efficiency of the system.
[0204] In some embodiments, processor 2501 may include one or more interfaces.
[0205] The interfaces of the processor 2501 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.
[0206] The memory 2502 can be used to store computer executable program code, which includes instructions.
[0207] The memory 2502 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.). The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.).
[0208] The memory 2502 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. The processor 2501 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the memory 2502 and / or instructions stored in memory disposed in the processor.
[0209] The memory 2502 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of dynamic storage devices that can store information and instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices. Alternatively, it may be any computer-readable medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer.
[0210] Processor 2501 and memory 2502 can be combined into a single processing device, but more commonly they are separate components.
[0211] An embodiment of this application also provides an electronic chip. This electronic chip is used to execute the method flow or part of the method flow described in the embodiments of this application.
[0212] Specifically, the electronic chip includes a processor for executing program instructions. When the computer program instructions are executed by the processor, the electronic chip is triggered to perform the steps described in the embodiments of this application. The processor of the electronic chip can refer to the processor of the above-described electronic device.
[0213] Optionally, the devices, apparatuses, and modules described in the embodiments of this application may be implemented by computer chips or physical entities, or by products with certain functions.
[0214] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media containing computer-usable program code.
[0215] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0216] Specifically, one embodiment of this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method provided in the embodiment of this application.
[0217] An embodiment of this application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method provided in the embodiment of this application.
[0218] The embodiments described in this application are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0219] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0220] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0221] It should also be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0222] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0223] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0224] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0225] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments of this application can be implemented using electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0226] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0227] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A display method, characterized in that, The method is applied to an electronic device, the electronic device including a memory and a display port, the memory including at least a first storage space, the method comprising: Multiple sub-image data are saved to the memory one by one, wherein the set of multiple sub-image data is the data of the image to be displayed, and the multiple sub-image data includes at least first sub-image data and second sub-image data; The plurality of sub-image data stored in the memory are sent to the display port one by one. After the display port receives each sub-image data, it drives the corresponding pixel on the display screen to display the image corresponding to the received sub-image data. in: The step of saving multiple sub-image data to the memory one by one includes saving the first sub-image data to the first storage space; Sending the plurality of sub-image data stored in the memory to the display port one by one includes sending the first sub-image data stored in the first storage space to the display port; The step of saving multiple sub-image data into the memory one by one further includes saving the second sub-image data into the first storage space after sending the first sub-image data saved in the first storage space to the display port.
2. The method according to claim 1, characterized in that, The storage space also includes a second storage space, and the plurality of sub-image data also includes a third sub-image data; The step of saving multiple sub-image data to the memory one by one further includes saving a third sub-image data to the second storage space, wherein saving the third sub-image data to the second storage space is performed synchronously with sending the first sub-image data saved in the first storage space to the display port.
3. The method according to claim 2, characterized in that, The step of saving multiple sub-image data to the memory one by one also includes: Based on the storage space utilization rate of the memory, adjust the size of the first storage space and the second storage space, and / or determine the allocation ratio for saving the sub-image data to the first storage space and the second storage space.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: A clock signal (CLK) and a valid data strobe signal (DE) are provided based on the pulse width modulation (PWM) function. The clock signal (CLK) and the valid data strobe signal (DE) are used to refresh the display image on the display port.
5. The method according to any one of claims 1-3, characterized in that, The method further includes: The plurality of sub-image data are saved to the memory one by one using the first direct memory access (DMA) channel; as well as, The multiple sub-image data stored in the memory are sent one by one to the display port using a second direct memory access (DMA) channel.
6. The method according to any one of claims 1-3, characterized in that, The image to be displayed is an image that occupies a portion of the display screen area; The method further includes recording the positional correspondence between the image to be displayed and the display screen; The process involves saving multiple sub-image data into the memory one by one. This includes storing the multiple sub-image data at corresponding addresses in the memory according to the location correspondence.
7. The method according to any one of claims 1-3, characterized in that, The step of saving multiple sub-image data to the memory one by one includes compressing the multiple sub-image data using run-length encoding (RLE) and saving the compressed data to the memory.
8. A display device, characterized in that, The device is applied to an electronic device, the electronic device including a memory and a display port, the memory including at least a first storage space, and the device comprising: The first data transmission module is used to save multiple sub-image data into the memory one by one, wherein the set of multiple sub-image data is the data of the image to be displayed, and the multiple sub-image data includes at least first sub-image data and second sub-image data; The second data transmission module is used to send the plurality of sub-image data stored in the memory to the display port one by one, and the display port refreshes the display image once each time it receives a sub-image data; in: The first data transmission module is used to save the first sub-image data to the first storage space; The second data transmission module is used to send the first sub-image data stored in the first storage space to the display port; The first data transmission module is further configured to, after sending the first sub-image data stored in the first storage space to the display port, save the second sub-image data to the first storage space.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor; The processor is configured to execute instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a computer system, perform the method as described in any one of claims 1-7.