CN110362518B - Method for drawing graph and smoothly transitioning to kernel during system boot - Google Patents

Method for drawing graph and smoothly transitioning to kernel during system boot Download PDF

Info

Publication number
CN110362518B
CN110362518B CN201910300192.0A CN201910300192A CN110362518B CN 110362518 B CN110362518 B CN 110362518B CN 201910300192 A CN201910300192 A CN 201910300192A CN 110362518 B CN110362518 B CN 110362518B
Authority
CN
China
Prior art keywords
kernel
isp
register
serial interface
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910300192.0A
Other languages
Chinese (zh)
Other versions
CN110362518A (en
Inventor
郑泽群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN201910300192.0A priority Critical patent/CN110362518B/en
Publication of CN110362518A publication Critical patent/CN110362518A/en
Application granted granted Critical
Publication of CN110362518B publication Critical patent/CN110362518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/32Handling requests for interconnection or transfer for access to input/output bus using combination of interrupt and burst mode transfer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Abstract

The technical scheme of the invention comprises a method for drawing a graph and smoothly transitioning to a kernel during system boot, which is characterized by comprising the following steps: initializing a sensor and a camera serial interface before a system booting stage, and previewing a picture after butt joint display; after the system kernel is loaded, smoothly docking the serial interface of the camera to the system kernel stage by the system guide; after the application is started, the application is enabled to take over the camera serial interface. The invention has the beneficial effects that: the invention has the beneficial effects that: and initializing a camera serial interface at the stage of a system boot stage of booting the kernel to achieve the effect of rapid drawing, and then realizing smooth transition to the system kernel to ensure that a picture can be always previewed.

Description

Method for drawing graph and smoothly transitioning to kernel during system boot
Technical Field
The invention relates to a method for drawing a graph and smoothly transitioning to a kernel during system boot, and belongs to the field of computers.
Background
In a traditional camera image making mode, when one image is required to be captured and displayed by a camera, software can be started to control the input of the camera after the system kernel is completely loaded, and finally a data image is output. The method has the defects that the plotting time is too long, and the requirements cannot be met in some scenes needing rapid plotting, for example, in a rapid reversing scene in a vehicle-mounted system, a user needs to reverse after starting a vehicle, and the image of the rear camera can be seen after the system kernel is started.
The prior art discloses an approximate technical scheme 1, and particularly relates to a method for displaying animation at startup and an electronic device (patent number: CN 201210523632).
The prior art discloses an approximate technical scheme 2, in particular to a device and a method for rapidly displaying a reversing video through cold start (patent number: CN201711231125), the scheme is that a video input and output device is started through system boot, smooth transition to a system kernel stage is also realized, but three or more buffers are needed to complete data acquisition and display of a camera serial interface.
Disclosure of Invention
The invention provides a method for drawing images and smoothly transiting to a kernel during system boot, which initializes a camera and a control interface of a film terminal camera in advance at a system boot stage and realizes display butt joint; the real-time picture of the display camera is uninterrupted in the starting process of the system guide kernel, namely, the smooth transition to the system kernel is realized; if the camera serial interface is required to be started in the application program finally, the driver needs to be configured, namely the camera serial interface is taken over after the application program is loaded.
The technical scheme of the invention comprises a method for drawing a graph and smoothly transitioning to a kernel during system boot, which is characterized by comprising the following steps: s100, initializing a sensor and a camera serial interface before a system boot stage, and previewing a picture after butt joint display; s200, after the system kernel is loaded, smoothly docking the serial interface of the camera to the system kernel by guiding the system; and S300, after the application program is started, enabling the application program to take over the camera serial interface.
According to the method for system boot time mapping and smooth transition to kernel, S100 specifically includes: s110, in the system guide stage, a polling mode is used for searching whether a reversing function needs to be entered, if so, the display is initialized, and an image display interface is realized; s120, acquiring a clock required by the working of the camera serial interface from the decoding time tag, and initializing the clock according to an initial value; s130, analyzing the configuration file, and acquiring hardware resources required by the sensor and the serial interface sub-equipment number of the camera; s140, initializing the used TWI number; s150, registering each sub-device of the camera serial interface; s160, creating a DMA interrupt processing function, directly sending and displaying the data of the previous frame after acquiring the data of the previous frame in the frame header interrupt, and simultaneously setting the address of the data of the next frame; s170, performing power-on operation on the sensor; and S180, initializing each sub-device register of the camera serial interface, and opening the overall data stream.
According to the method for system boot time mapping and smooth transition to kernel, S110 specifically includes: s111, after the system is booted, the system enters a polling state, namely whether the GPIO port is pulled up is judged, if so, the system enters a reversing state, namely a camera serial interface is initialized, and a snapshot picture is displayed; and S112, when the kernel is started in the system boot stage, the polling is finished, if the user needs to back up at the moment, the user does not respond immediately, and after the camera serial interface in the kernel is initialized, the original kernel response rapid back-up mode is used.
According to the method for system boot time mapping and smooth transition to kernel, S120 specifically includes: s121, acquiring a node number by setting a node alias of the decoding time tag; s122, traversing all clock nodes through address offset, and storing the nodes in an array; s123, sequentially acquiring each clock, and sequentially setting a clock source corresponding to the clock according to the relationship between the clocks; and S124, initializing the clock required to be used according to the interface mounted by the sensor.
According to the method for system boot time mapping and smooth transition to kernel, S180 specifically includes: the method comprises the steps of calling an I2C interface to initialize a register of a sensor, and initializing a MIPI register, an ISP register, a SCALER register, a DMA register and a PARSER register at a time according to configuration information, wherein the MIPI register, the ISP register and the PARSER register are shared registers and are provided with flag bits, and the flag bits are used for avoiding repeated initialization.
According to the method for system boot time mapping and smooth transition to kernel, S180 further comprises: the initialization of the ISP register according to the configuration information comprises the following steps: running an ISP library in a system kernel to obtain an appointed ISP parameter and storing the ISP parameter in an array a; allocating a load register address and two addresses for storing ISP parameters to an ISP; using MEMCPY to take charge of the data in the array a to the distributed load register address and two addresses for storing ISP parameters in turn; setting an ISP register according to the configuration information; before the ISP data flow is started, the load register address and the cache corresponding to the two addresses for storing the ISP parameters are refreshed.
According to the method for system boot time mapping and smooth transition to kernel, S200 specifically includes: s21, closing the DMA interruption and shielding the DMA interruption processing function; s22, before the data flow is opened, acquiring a frame of data memory address, writing the memory address into the DMA register, and sending the memory posture to the display device for display; s23, acquiring a LOWMEM address, and reserving a block address for the camera serial interface and the ISP from the high order to the low order of the LOWMEM address; s24, calculating the sum of the cache address, the address of the loading register and the two addresses for storing ISP parameters according to the size of the picture and the statistic value required by the ISP; s25, reserving a reserved area of the device tree decoding time tag memory; s26, using the reserved address as an image buffer address.
According to the method for system boot time mapping and smooth transition to kernel, S300 specifically includes: s310, after the loading and starting of the kernel are finished, when a file of a camera serial interface is loaded, shielding corresponding operations of powering on and powering off a clock and a sensor; s320, when the application is started for the first time, except for resource application, link establishment and the like, the operations of shielding relevant sensor electrification and configuring registers of various sub-devices are shielded; s330, resetting each sub-device enabling register function to complete the interruption of enabling the DMA and the ISP; s340, after the application program is started, the camera serial interface graph mode is not automatically moved by hardware, but is changed into a cache polling management mode in a system kernel interrupt processing function, and the camera serial interface is formally taken over by the application program.
According to the method for system boot time mapping and smooth transition to kernel, S310 specifically includes: s311, shielding available clock functions and sensor power-on functions; s312, checking whether the sensor is linked with the I2C or not, and directly returning to be correct so as to create a video node; s313, the unavailable clock function and the sensor power-down function are shielded.
According to the method for system boot time mapping and smooth transition to kernel, S330 specifically includes: s331, setting enabling registers of the sub-devices to be in an unavailable state; s332, setting the enabling register of each piece of sub-equipment to be in an available state; s333, before setting the DMA and ISP enable registers to be available, the DMA and ISP interrupt enable registers are enabled.
The invention has the beneficial effects that: and initializing a camera serial interface at the stage of a system boot stage of booting the kernel to achieve the effect of rapid drawing, and then realizing smooth transition to the system kernel to ensure that a picture can be always previewed.
Drawings
FIG. 1 is a schematic flow chart of the structure of the present invention according to the embodiment of the present invention;
FIG. 2 is a flow diagram illustrating the flow of data frames between a camera serial interface and a display according to an embodiment of the present invention;
FIG. 3 is a data flow diagram of a four-way intelligent rearview mirror fast reverse encoding path according to an embodiment of the invention;
FIG. 4 is a flow diagram illustrating a smooth transition of a kernel phase according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention discloses a method for drawing a graph and smoothly transitioning to a kernel during system boot, which is suitable for an embedded operating system based on a Linux kernel. The conception, the specific structure and the technical effects of the present invention will be clearly and completely described in conjunction with the embodiments and the accompanying drawings to fully understand the objects, the schemes and the effects of the present invention.
It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to the other feature or indirectly fixed or connected to the other feature. Furthermore, the descriptions of upper, lower, left, right, etc. used in the present disclosure are only relative to the mutual positional relationship of the constituent parts of the present disclosure in the drawings. As used in this disclosure, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any combination of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element of the same type from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present disclosure. The use of any and all examples, or exemplary language ("e.g.," such as "or the like") provided herein, is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed.
Fig. 1 is a schematic structural flow diagram of the present invention according to an embodiment of the present invention. The U-boot phase implements the basic function (S1): initializing a sensor and CSI (camera serial interface) in advance in a u-boot stage, and previewing a picture after butt joint display; the Kernel phase achieves a smooth transition (S2): after kernel is loaded, smoothly docking a u-boot stage camera serial interface to a kernel stage; the application layer phase implements a work takeover (S3): after an application program (such as an android camera APK) gets up, the takeover operation of the application program to the camera serial interface needs to be realized;
the present invention is applicable to an embedded operating system based on a Linux kernel, so the application program mentioned in the step (S3) may be a Linux application layer program or an android APK.
FIG. 2 is a flow chart illustrating the flow of data frames between a camera serial interface and a display according to an embodiment of the present invention. The figure is a data flow block diagram of a four-path intelligent rearview mirror fast reversing coding path, four cameras are interwoven into one path through a sensor (MIPI chip) and input into MIPI sub-equipment, the four paths are de-interwoven into four paths at PARSER sub-equipment and sent to four paths of DMA, and finally four paths of data output are formed. The drawing parameters of the intelligent rearview mirror are assumed as follows: the four-way path ultimately displays data of type NV12, a frame rate of 25fps, and a resolution of 480p (640 × 480). The intelligent rearview mirror acquires data through four cameras in a u-boot stage, then a camera serial interface is in butt joint with DE, and finally the data are displayed on a screen, so that the purpose of rapid reversing is achieved.
Fig. 3 is a data flow diagram of a four-way intelligent rearview mirror fast reverse encoding path according to an embodiment of the invention. The four cameras are interwoven into one path through a sensor (MIPI chip) and input into MIPI sub-equipment, and are de-interwoven into four paths at PARSER sub-equipment and sent to four paths of DMA, and finally four paths of data output are formed. The drawing parameters of the intelligent rearview mirror are assumed as follows: the four-way path ultimately displays data of type NV12, a frame rate of 25fps, and a resolution of 480p (640 × 480). The intelligent rearview mirror acquires data through four cameras in a u-boot stage, then a camera serial interface is in butt joint with DE, and finally the data are displayed on a screen, so that the purpose of rapid reversing is achieved.
Specifically, the step (S1) includes the steps of:
(S11) in the u-boot phase, using a polling mode to search whether the reversing function needs to be entered, if so, initializing the display, and realizing the image display interface.
(S12) acquiring a clock required for the operation of the camera serial interface from the DTS, and initializing the clock according to the initial value.
(S13) parsing the configuration file, acquiring the hardware resources required by the sensor and the sub device number of the camera serial interface.
(S14) the used TWI number is initialized.
(S15) the camera serial interface registers each sub-device.
(S16) writing a DMA interrupt processing function, directly sending and displaying the data of the previous frame after acquiring the data of the previous frame in the frame header interrupt, and simultaneously setting the address of the data of the next frame.
(S17) a power-on operation of the sensor.
(S18) initializing the respective sub-device registers of the camera serial interface, opening the entire data stream.
Firstly, the hardware resource information of the sensor needs to be noted in the configuration file, and finally, the configuration file information is obtained to perform the following two steps on the sensor. Secondly, writing a sensor driver, wherein two main points of attention of the sensor driver are as follows: (1) a sensor power-on step, which is the basis of communication with the outside (communication with the CPU through I2C) after the sensor works; (2) the sensor is configured with a register list with fixed resolution and frame rate, and then the sensor is subjected to register writing operation through I2C.
Further, the step (S11) includes the steps of:
(S111) after the u-boot is started, the u-boot enters a polling state, namely whether the GPIO port is pulled high is judged, if so, the u-boot enters a reversing state, namely a camera serial interface is initialized, and a snapshot picture is displayed.
(S112) when the u-boot kernel starts, the polling is finished. If the user needs to back up at this moment, the user does not immediately respond, and after the serial interface of the camera in the kernel is initialized, the kernel correspondingly backs up quickly, namely, the original kernel response quick backing up mode is used.
Further, the step (S12) includes the steps of:
(S121) acquiring a node number by setting a node alias of the DTS.
(S122) traversing all clock nodes through address offset and saving the clock nodes in an array.
(S123) acquiring the clocks in sequence, and setting the clock sources corresponding to the clocks in sequence according to the relationship among the clocks.
(S124) initializing a clock to be used according to the sensor mounted interface.
Further, the step (S13) includes the following steps.
(S131) packaging and analyzing the configuration file information function, wherein the configuration file information function comprises an integer number, a character string and a GPIO port.
(S132) sequentially acquiring hardware resources required by the sensor and the sub-device number of the camera serial interface.
Further, the step (S15) includes the steps of:
(S151) MIPI child device registration.
(S152) PARSER sub-device registration.
(S153) DMA child device registration.
(S154) ISP sub-equipment registration.
(S155) the SCALER sub-device registration.
As shown in fig. three, we need to register the sub-devices on four paths, but it should be noted that MIPI, PARSER, and ISP belong to a shared part, and only need to register once, so that a flag needs to be added for judgment, and repeated registration is avoided. The so-called flag, i.e. a count for each kid device, is only de-registered if the count equals 1, and is ignored for other values.
Further, the step (S18) includes the steps of:
(S181) call the I2C interface to initialize the register of the sensor.
(S182) initializing the MIPI register according to the configuration information.
(S183) initializing the ISP register according to the configuration information.
(S184) initializing the SCALER register according to the configuration information.
(S185) initializing the DMA register according to the configuration information.
(S186) initializing the PARSER register according to the configuration information.
Similar to step (S15), we need to initialize registers of the sub-devices on four paths, but it is noted that MIPI, PARSER, and ISP belong to a shared part, and only need to be initialized once, so it needs to add a flag bit for judgment, and avoid repeated initialization. The so-called flag, i.e. a count for each sub-device, is only de-initialized if the count equals 1, and is ignored for other values.
Further, the step (S183) includes the steps of:
(S1831) get the correct ISP parameters (which need to be specific to the sensor) in the kernel running ISP library and store them in the array a.
(S1832) assign the load register address and two addresses for storing ISP parameters to the ISP.
(S1833) the data in the array a is sequentially assigned to the allocated load register address and the two addresses storing ISP parameters using MEMCPY.
(S1834) setting the ISP register according to the configuration information.
(S1835) before the ISP data flow is started, the cache corresponding to the address of the loading register and the addresses for storing the ISP parameters is refreshed, and the cache data is prevented from not being updated into the applied address in time after the MEMCPY.
FIG. 4 is a flow diagram illustrating a smooth transition of a kernel phase according to an embodiment of the present invention. The step (S2) includes the steps of:
(S21) closing the DMA interrupt, and masking the DMA interrupt processing function.
(S22) before the data flow is opened, a frame data memory address is applied and written into the DMA register, and the DMA register is simultaneously sent to the display, the camera serial interface can continuously store the data frame into the block address after the data flow is opened, and the display can continuously take out the data frame for display, thus the hardware can automatically move the frame data from the camera serial interface to the display.
(S23) acquiring the LOWMEM address, reserving a block address for the camera serial interface and the ISP from the upper bit to the lower bit of the LOWMEM address, and avoiding the kernel crash caused by the fact that the camera serial interface and the ISP operate to the used address after transition to the kernel.
(S24) according to the size of the picture and the sum of the statistical value buffer address, the loading register address and the two addresses for storing ISP parameters, the size of the memory required to be reserved is calculated.
(S25) in order to avoid the reserved address being applied for use by other modules after the kernel gets up, the reserved address needs to be reserved in the device tree DTS memory reserved area.
(S26) the BUFFER address of the image and (S1832) the BUFFER address required by the ISP do not need to be applied any more, and the reserved address can be used directly.
Suppose we acquire the address range of LOWMEM as 0xc0000000-0xe1800000, and the reserved address is reserved from high to low, i.e. from 0xe18000000 to low. The size of the four-way 480p image and the size of the memory required by the ISP are: 640*480*
1.5 × 4+0x12C00 ═ 0x1C2000+0x12C00 ═ 1D4C 00. We get the whole as 0x200000 ═ 2M. The address range that needs to be reserved is 0xe1600000-0xe 1800000.
Further, the step (S3) includes the steps of:
(S31) when the camera serial interface ko file is loaded after the kernel loading is started, operations related to powering on and off of the clock and the sensor require masking.
(S32) when the application is first started, the operations related to powering on the sensor and configuring the registers of each sub-device need to be masked except for the creation of resource application and link.
(S33) since it is necessary to enable interrupts of DMA and ISP, it is necessary to implement resetting of each kid device enable register function.
(S34) after the application program is started, the camera serial interface graph mode is changed into a buffer polling management mode in a kernel interrupt processing function instead of the automatic hardware moving process, and the camera serial interface is formally taken over by the application program.
Further, the step (S31) includes the steps of:
(S311) masking the enable clock function and the sensor power-on function.
(S312) removing the check whether the sensor is linked with the I2C, and directly returning to be correct to create the video node.
(S313) masking the disable clock function and the sensor power-down function.
Further, the step (S33) includes the steps of:
(S331) first disabling the enable registers of the respective sub-devices.
(S332) enabling enable the enable registers of the respective sub-devices.
(S333) before the enable DMA and ISP enable registers, the DMA and ISP interrupt enable registers are enabled.
The method is suitable for the embedded operating system based on the Linux kernel, so that the method is also suitable for the intelligent rearview mirror android system. The android system can start the android only after the u-boot system and the kernel system are started, and the android camera APK is started finally. Therefore, the method for shortening the drawing time is extremely important on the android system.
The u-boot in the scheme of the present invention only represents the program for booting the kernel, so it is an alternative scheme as long as the above step (S1) is completed in BootLoader and the smooth transition to the system requiring booting is realized by using the above step (S2). Wherein BootLoaders can be u-boot, e-boot, redboot and vivi.
For coded products: the motion camera needs 1s cold start to map, the mapping time of the camera serial interface is about 80ms through actual calculation, and compared with the mapping time of the kernel phase, the mapping time of the camera serial interface needs 220ms (1080p), and about 140ms is optimized for a pure camera serial interface.
For the vehicle products: the vehicle-mounted device has the advantages that the requirement for rapid backing is met, namely, a picture output by a camera behind the vehicle can be rapidly obtained when backing is needed after the vehicle is started, and the customer experience effect is met.
It should be recognized that embodiments of the present invention can be realized and implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The methods may be implemented in a computer program using standard programming techniques, including a non-transitory computer-readable storage medium configured with the computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner, according to the methods and figures described in the detailed description. Each program may be implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
Further, the operations of processes described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and/or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) collectively executed on one or more processors, by hardware, or combinations thereof. The computer program includes a plurality of instructions executable by one or more processors.
Further, the method may be implemented in any type of computing platform operatively connected to a suitable interface, including but not limited to a personal computer, mini computer, mainframe, workstation, networked or distributed computing environment, separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of the invention may be embodied in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optically read and/or write storage medium, RAM, ROM, or the like, such that it may be read by a programmable computer, which when read by the storage medium or device, is operative to configure and operate the computer to perform the procedures described herein. Further, the machine-readable code, or portions thereof, may be transmitted over a wired or wireless network. The invention described herein includes these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. The invention also includes the computer itself when programmed according to the methods and techniques described herein.
A computer program can be applied to input data to perform the functions described herein to transform the input data to generate output data that is stored to non-volatile memory. The output information may also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including particular visual depictions of physical and tangible objects produced on a display.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.

Claims (9)

1. A method for graph generation and smooth transition to kernel at system boot time, the method comprising:
s100, initializing a sensor and a camera serial interface in a system booting stage, and previewing a picture after butt joint display;
s200, after the system kernel is loaded, the system guides the phase that the serial interface of the camera is smoothly connected to the system kernel;
s300, after the application program is started, the application program takes over the camera serial interface;
wherein, the S300 specifically includes:
s310, after the loading and starting of the kernel are finished, when a file of a camera serial interface is loaded, shielding corresponding operations of powering on and powering off a clock and a sensor;
s320, when the application is started for the first time, except for the establishment of a resource application and a link, shielding the electrification of a related sensor and the operation of configuring registers of each piece of sub-equipment;
s330, resetting each sub-device enabling register function to complete the interruption of enabling the DMA and the ISP;
s340, after the application program is started, the camera serial interface graph mode is not automatically moved by hardware, but is changed into a cache polling management mode in a system kernel interrupt processing function, and the camera serial interface is formally taken over by the application program.
2. The method for system boot time graph and smooth transition to kernel as in claim 1,
the S100 specifically includes:
s110, in the system guide stage, a polling mode is used for searching whether a reversing function needs to be entered, if so, the display is initialized, and an image display interface is realized;
s120, acquiring a clock required by the working of the camera serial interface from the DTS, and initializing the clock according to an initial value;
s130, analyzing the configuration file, and acquiring hardware resources required by the sensor and the serial interface sub-equipment number of the camera;
s140, initializing the used TWI number;
s150, registering each sub-device of the camera serial interface;
s160, creating a DMA interrupt processing function, directly sending and displaying the data of the previous frame after acquiring the data of the previous frame in the frame header interrupt, and simultaneously setting the address of the data of the next frame;
s170, performing power-on operation on the sensor;
and S180, initializing each sub-device register of the camera serial interface, and opening the overall data stream.
3. The method according to claim 2, wherein the S110 specifically includes:
s111, after the system is booted, the system enters a polling state, judges whether the GPIO port is pulled high, and enters a reversing state if the GPIO port is pulled high, initializes a serial interface of a camera, and captures a picture for displaying;
and S112, when the kernel is started in the system boot stage, the polling is finished, if the user needs to back up at the moment, the user does not respond immediately, and after the camera serial interface in the kernel is initialized, the original kernel response rapid back-up mode is used.
4. The method according to claim 2, wherein the S120 specifically comprises:
s121, acquiring a node number by setting a node alias of the DTS;
s122, traversing all clock nodes through address offset, and storing the nodes in an array;
s123, sequentially acquiring each clock, and sequentially setting a clock source corresponding to the clock according to the relationship between the clocks;
and S124, initializing the clock required to be used according to the interface mounted by the sensor.
5. The method for system boot time graph and smooth transition to kernel as claimed in claim 2, wherein said S180 specifically comprises:
the method comprises the steps of calling an I2C interface to initialize a register of a sensor, and initializing a MIPI register, an ISP register, a SCALER register, a DMA register and a PARSER register at a time according to configuration information, wherein the MIPI register, the ISP register and the PARSER register are shared registers and are provided with flag bits, and the flag bits are used for avoiding repeated initialization.
6. The method for system boot time graph and smooth transition to kernel as claimed in claim 5, wherein said S180 further comprises:
the initialization of the ISP register according to the configuration information comprises the following steps:
running an ISP library in a system kernel to obtain an appointed ISP parameter and storing the ISP parameter in an array a;
allocating a load register address and two addresses for storing ISP parameters to an ISP;
using MEMCPY to take charge of the data in the array a to the distributed load register address and two addresses for storing ISP parameters in turn;
setting an ISP register according to the configuration information;
before the ISP data flow is started, the load register address and the cache corresponding to the two addresses for storing the ISP parameters are refreshed.
7. The method according to claim 1, wherein the S200 specifically comprises:
s21, closing the DMA interruption and shielding the DMA interruption processing function;
s22, before the data flow is opened, a frame of data memory address is obtained, the memory address is written into the DMA register, and the memory address is sent to the display device for display;
s23, acquiring a LOWMEM address, and reserving a block address for the camera serial interface and the ISP from the high order to the low order of the LOWMEM address;
s24, calculating the memory size needed to be reserved according to the size of the picture and the memory size needed by the ISP;
s25, reserving in a device tree DTS memory reserved area;
s26, using the reserved address as an image buffer address.
8. The method for system boot time graph and smooth transition to kernel as claimed in claim 1, wherein said S310 specifically comprises:
s311, shielding available clock functions and sensor power-on functions;
s312, removing the link between the inspection sensor and the I2C, and directly returning to be correct to create a video node;
s313, the unavailable clock function and the sensor power-down function are shielded.
9. The method for system boot time graph and smooth transition to kernel as claimed in claim 1, wherein said S330 specifically comprises:
s331, setting enabling registers of the sub-devices to be in an unavailable state;
s332, setting the enabling register of each piece of sub-equipment to be in an available state;
s333, before setting the DMA and ISP enable registers to be available, the DMA and ISP interrupt enable registers are enabled.
CN201910300192.0A 2019-04-15 2019-04-15 Method for drawing graph and smoothly transitioning to kernel during system boot Active CN110362518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910300192.0A CN110362518B (en) 2019-04-15 2019-04-15 Method for drawing graph and smoothly transitioning to kernel during system boot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910300192.0A CN110362518B (en) 2019-04-15 2019-04-15 Method for drawing graph and smoothly transitioning to kernel during system boot

Publications (2)

Publication Number Publication Date
CN110362518A CN110362518A (en) 2019-10-22
CN110362518B true CN110362518B (en) 2020-12-15

Family

ID=68215208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910300192.0A Active CN110362518B (en) 2019-04-15 2019-04-15 Method for drawing graph and smoothly transitioning to kernel during system boot

Country Status (1)

Country Link
CN (1) CN110362518B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500936A (en) * 2021-12-30 2022-05-13 深圳市广和通无线股份有限公司 Video data processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101790088A (en) * 2003-06-13 2010-07-28 苹果公司 Device and method for sending synchronized audio and video data
CN101866324A (en) * 2009-04-16 2010-10-20 罗姆股份有限公司 Semiconductor device and the drive recorder that has utilized this semiconductor device
CN106696827A (en) * 2016-12-30 2017-05-24 广州路派电子科技有限公司 Intelligent backup track and image assisting method
CN108268940A (en) * 2017-01-04 2018-07-10 意法半导体股份有限公司 For creating the tool of reconfigurable interconnection frame

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103522949B (en) * 2012-12-21 2016-04-13 Tcl康钛汽车信息服务(深圳)有限公司 A kind of method of quick display reverse image and car machine system
CN104281461B (en) * 2013-07-09 2018-05-22 合肥杰发科技有限公司 A kind of starting-up display control and device
CN105187791B (en) * 2015-09-08 2019-01-15 深圳市安普尔科技有限公司 Vehicle-mounted back-up video display methods and device
CN105282510A (en) * 2015-10-21 2016-01-27 畅索软件科技(上海)有限公司 Method and device for starting reverse image
CN105635668A (en) * 2015-12-24 2016-06-01 东软集团股份有限公司 Image displaying method and device
CN105657369B (en) * 2016-01-08 2018-10-12 福州瑞芯微电子股份有限公司 The video frequency monitoring method and system of quick response based on linux system
US10061594B2 (en) * 2016-02-06 2018-08-28 Verizon Patent And Licensing Inc. Protecting and verifying contents of files on mobile computing devices
CN105760201B (en) * 2016-02-29 2019-05-28 华为技术有限公司 A kind of starting method and apparatus of embedded equipment
CN107920204B (en) * 2017-11-29 2020-04-24 珠海亿智电子科技有限公司 Device and method for rapidly displaying reversing video in cold start
CN108248509A (en) * 2018-01-17 2018-07-06 深圳市路畅科技股份有限公司 A kind of method, apparatus that reverse image is controlled to show and automatic navigator
CN109032680B (en) * 2018-08-16 2021-12-14 成都国科微电子有限公司 Real-time operating system quick start method and real-time operating system
CN109532721A (en) * 2018-12-12 2019-03-29 珠海全志科技股份有限公司 A method of fast implementing the cold start-up panorama reversing of Android vehicle device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101790088A (en) * 2003-06-13 2010-07-28 苹果公司 Device and method for sending synchronized audio and video data
CN101866324A (en) * 2009-04-16 2010-10-20 罗姆股份有限公司 Semiconductor device and the drive recorder that has utilized this semiconductor device
CN106696827A (en) * 2016-12-30 2017-05-24 广州路派电子科技有限公司 Intelligent backup track and image assisting method
CN108268940A (en) * 2017-01-04 2018-07-10 意法半导体股份有限公司 For creating the tool of reconfigurable interconnection frame

Also Published As

Publication number Publication date
CN110362518A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
US20180063361A1 (en) Electronic device and method of providing image acquired by image sensor to application
US9025066B2 (en) Fill with camera ink
JP6695320B2 (en) Low power computer imaging
CN109040523B (en) Artifact eliminating method and device, storage medium and terminal
US11895423B2 (en) Method of producing triggering signals for a control of a multimedia interface
EP3571670A1 (en) Mixed reality object rendering
CN110362518B (en) Method for drawing graph and smoothly transitioning to kernel during system boot
JP7350655B2 (en) Surround view and method with seamless transition to 3D viewing system
US11842673B2 (en) Control method and system for display switching, electronic device and storage medium
US20220179657A1 (en) Apparatus, systems, and methods for low power computational imaging
CN116419049A (en) Image processing method, image processing system, device and electronic equipment
US20220417382A1 (en) Buffer management for plug-in architectures in computation graph structures
Fernández et al. Performance characterization of mobile phones in augmented reality marker tracking
US11748911B2 (en) Shader function based pixel count determination
CN110290422B (en) Timestamp superposition method and device, shooting device and storage device
CN114285957A (en) Image processing circuit and data transmission method
CN116075804A (en) Image data processing device and method
CN115698952A (en) Scalable hardware thread scheduler
CN111563956A (en) Three-dimensional display method, device, equipment and medium for two-dimensional picture
Talvala The Frankencamera: building a programmable camera for computational photography
CN108696670A (en) Tile reuse is carried out in imaging
CN113038004B (en) Multi-window image previewing method and device, computer equipment and storage medium
CN114520898B (en) Projection device control method and device, projection device and storage medium
EP4207047A1 (en) Rendering method and apparatus
CN113313800A (en) Texture-based pixel count determination

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant