Atomic page flip and mode setting Hardware structure and abstraction - - PowerPoint PPT Presentation

atomic page flip and mode setting hardware structure and
SMART_READER_LITE
LIVE PREVIEW

Atomic page flip and mode setting Hardware structure and abstraction - - PowerPoint PPT Presentation

Atomic page flip and mode setting Hardware structure and abstraction Atomic page flip The hardware will compose the final image from two layers. Atomic page flip Animating the scene Atomic page flip There are problems with


slide-1
SLIDE 1

Atomic page flip and mode setting

slide-2
SLIDE 2

Hardware structure and abstraction

slide-3
SLIDE 3

Atomic “page flip”

The hardware will compose the final image from two layers.

slide-4
SLIDE 4

Atomic “page flip”

Animating the scene

slide-5
SLIDE 5

Atomic “page flip”

There are problems with animating the scene

slide-6
SLIDE 6

Double buffered registers

◮ Hardware maintains two register files ◮ First register file is written by the CPU ◮ Second register file is latched from the first one at vblank start

slide-7
SLIDE 7

Double buffered registers

Problem: Hardware doesn’t guarantee atomicity

slide-8
SLIDE 8

Double buffered registers

Solution: Prevent CPU from writing to registers near vblank start

slide-9
SLIDE 9

Kernel API

Transactional vs. one-shot

slide-10
SLIDE 10

Kernel API

Possible issues with transactional API

slide-11
SLIDE 11

Kernel API

slide-12
SLIDE 12

Kernel internal API

begin(); set(); set(); set(); ... check(); commit(); end();

slide-13
SLIDE 13

Completion events

fps ≤ vertical refresh rate

slide-14
SLIDE 14

Completion events

fps > vertical refresh rate

slide-15
SLIDE 15

Atomic mode setting

◮ Total shared resource available: 3N

Starting conditions:

◮ Display 1 resource requirement: N ◮ Display 2 resource requirement: N

N + N <= 3N

slide-16
SLIDE 16

Atomic mode setting

Step 1: Change mode on display 1

◮ Display 1 resource requirement: 2N ◮ Display 2 resource requirement: N

2N + N <= 3N

slide-17
SLIDE 17

Atomic mode setting

Step 2: Change mode on display 2

◮ Display 1 resource requirement: 2N ◮ Display 2 resource requirement: 2N

2N + 2N > 3N Need to roll back mode change on display 1.

slide-18
SLIDE 18

Atomic mode setting

Solution: Combine steps 1 and 2 into a single step. The final state can be checked before the hardware state is clobbered, and thus there is no need for rolling back.