IP Library Granted Patent US 9,176,857
Granted Patent B2
US 9,176,857 · App. 13/585,022 · Granted Nov 3, 2015

Method and apparatus for managing video memory in embedded device

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,176,857
App. No.
13/585,022
Granted
Nov 3, 2015
Kind
B2
Abstract

A method for managing an image memory in an embedded device is provided. A node is obtained from a linked list of the image memory. It is judged whether valid data is present in a memory block corresponding to the node. When no valid data is present, it is judged whether valid data is present in a memory block corresponding to a previous node of the node. When valid data is present in the previous node, it is further judged whether the valid data is movable. When the valid data is movable, memory block information described in the two nodes is exchanged, and the valid data previously stored in the memory block corresponding to the previous node is moved to the memory block corresponding to the node.

Claims (40)

1. A method for managing an image memory in an embedded device, comprising:

obtaining a node from a linked list of the image memory;

judging whether valid data is present in a memory block corresponding to the node in the image memory;

judging whether valid data is present in a memory block corresponding to a previous node in the image memory when no valid data is present in the memory block corresponding to the node;

judging whether the valid data is movable when valid data is present in the memory block corresponding to the previous node;

when the valid data stored in the memory block corresponding to the previous node is movable, exchanging memory block information in the node with memory block information in the previous node, and moving the valid data stored in the memory block corresponding to the previous node to the memory block corresponding to the node,

after the step of judging whether valid data is present in the memory block corresponding to the node, the method further comprising, when valid data is present in the memory block corresponding to the node, obtaining a previous node of the node and performing the step of judging whether valid data is present in the memory block corresponding to the previous node until a first node in the linked list of the image memory is obtained; and

after the step of judging whether the valid data stored in the memory block corresponding to the previous node is movable, the method further comprising, when it is judged the valid data stored in the memory block corresponding to the previous node is immovable, obtaining a previous node of the previous node and performing the step of judging whether valid data is present in the memo T block corresponding to the obtained node until the first node in the linked list of the image memory is obtained,

wherein the step of judging whether the valid data stored in the memory block corresponding to the previous node is movable comprises judging whether the memory block corresponding to the previous node is a layer surface; wherein when the memory block corresponding to the previous node is the layer surface, the valid data stored in the memory block corresponding to the previous node is immovable; and

when the memory block corresponding to the previous node is not the layer surface, judging whether the memory block corresponding to the previous node is locked; wherein, when the memory block corresponding to the previous node is locked, the valid data stored in the memory block corresponding to the previous node is immovable.

2. The method according to claim 1 , wherein the step of obtaining the node from the linked list of the image memory comprises:

obtaining the node from a first node counting from backwards in the linked list of the image memory.

3. The method according to claim 1 , further comprising:

when the memory block corresponding to the previous node is not locked, judging whether the memory block corresponding to the previous node is recently accessed by a graphic processing unit (GPU);

when the memory block corresponding to the previous node is recently accessed by the GPU, waiting for the GPU to complete accessing, and performing the step of exchanging the memory block information described in the node and the memory block information described in the previous node and moving the valid data stored in the memory block corresponding to the previous node to the memory block corresponding to the node.

4. The method according to claim 3 , after the step of judging whether valid data is present in the previous node, further comprising:

merging the node with the previous node when no valid data is present in the previous node.

5. The method according to claim 4 , wherein the step of merging the node with the previous node comprises:

changing a starting address of the node to a starting address of the previous node, changing a pointer of the node pointing to the previous node to pointing to a previous node of the previous node, and deleting the node.

6. The method according to claim 4 , wherein the step of merging the node with the previous node comprises:

changing an end address of the previous node to an end address of the node, changing a pointer of the previous node pointing to a next node to pointing to a next node of the node, and deleting the node.

7. An apparatus for managing an image memory in an embedded device, comprising:

a first obtaining module, for obtaining a node from a linked list of the image memory;

a first judging module, for judging whether valid data is present in a memory block corresponding to the node obtained by the first obtaining module;

a second judging module, for judging whether valid data is present in a memory block corresponding to a previous node when no valid data is present in the memory block corresponding to the node obtained by the first obtaining module;

a third judging module, for judging whether the valid data is movable when valid data is present in the memory block corresponding to the previous node; and

an exchange module, when the valid data stored in the memory block corresponding to the previous node is movable, for exchanging memory block information in the node with memory block information in the previous node, and moving the valid data stored in the memory block corresponding to the previous node to the memory block corresponding to the node;

a second obtaining module, when the first judging module judges valid data is present in the memory block corresponding to the node, for obtaining the previous node of the node;

wherein the second judging module judges whether valid data is present in the memory block corresponding to the previous node until a first node of the linked list is obtained,

wherein when the first judging module judges no valid data is present in the memory block corresponding to the node, the second judging module judges valid data is present in the memory block corresponding to the previous node and the third judging module judges the valid data stored in the memory block corresponding to the previous node is immovable, the second obtaining module obtains a previous node of the previous node; and the second judging module judges whether valid data is present in the memory block corresponding to the obtained node until the first node of the linked list is obtained,

wherein the third judging module comprises:

a first judging unit, for judging whether the memory block corresponding to the previous node of the obtained node is a layer surface; wherein the valid data stored in the memory block corresponding to the previous node is immovable when the memory block corresponding to the previous node is the layer surface;

a second judging unit, for judging whether the memory block corresponding to the previous node is locked when the first judging unit judges the memory block corresponding to the previous node is not the layer surface; wherein when the memory block corresponding to the previous node is locked, the valid data stored in the memory block corresponding to the previous node is immovable; and

a third judging unit, for judging whether the memory block corresponding to the previous node is recently accessed by a GPU when the first judging module judges the memory block corresponding to the previous node is not the layer surface and the second judging module judges the memory block corresponding to the previous node is not locked; wherein when the memory block corresponding to the previous node is recently accessed by the GPU, the valid data stored in the memory block corresponding to the previous node is only moved after the GPU completes accessing.

8. The apparatus according to claim 7 , further comprising:

a merging module, for merging the node with the previous node when the second judging module judges no valid data is present in the previous node.

9. The apparatus according to claim 8 , wherein the merging module comprises:

a merging unit, for changing a starting address of the node to a starting address of the previous node, and changing a pointer of the node pointing to the previous node to pointing to a previous node of the previous node; and

a deleting unit, for deleting the node.

10. The apparatus according to claim 9 , wherein the merging unit further changes an end address of the previous node to an end address of the node, and changes the pointer of the previous node pointing to a next node to pointing to a next node of the node.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 3, 2021
From: MEDIATEK INC.
To: XUESHAN TECHNOLOGIES INC.
Reel/Frame 055486/0870 →
MERGER Recorded Jun 8, 2020
From: MSTAR SEMICONDUCTOR, INC.
To: MEDIATEK INC.
Reel/Frame 052871/0833 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 14, 2012
From: HE, HU
To: MSTAR SEMICONDUCTOR, INC.
Reel/Frame 028781/0918 →