Enumerations

enum SyncRegs
Name Value Comments
SYNC_REG_BATCH_COMMAND 0x00

host->guest batch commands

SYNC_REG_BATCH_GUESTCOMMAND 0x04

guest->host batch commands

SYNC_REG_BATCH_COMMAND_ADDR 0x08

communicate physical address of host->guest batch commands

SYNC_REG_BATCH_COMMAND_ADDR_HIGH 0x0C

64-bit part

SYNC_REG_BATCH_GUESTCOMMAND_ADDR 0x10

communicate physical address of guest->host commands

SYNC_REG_BATCH_GUESTCOMMAND_ADDR_HIGH 0x14

64-bit part

SYNC_REG_INIT 0x18

signals that the device has been probed

The definitions below (command codes, register layout)

need to be in sync with the following files:

Host-side (AOSP platform/external/qemu repository):

- android/emulation/goldfish_sync.h

- hw/misc/goldfish_sync.c

Guest-side (AOSP device/generic/goldfish-opengl repository):

- system/egl/goldfish_sync.h

Defined at line 24 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_common_defs.h

enum CommandId
Name Value Comments
CMD_SYNC_READY 0

Ready signal - used to mark when irq should lower

CMD_CREATE_SYNC_TIMELINE 1

Create a new timeline. writes timeline handle

CMD_CREATE_SYNC_FENCE 2

Create a fence object. reads timeline handle and time argument.
Writes fence fd to the SYNC_REG_HANDLE register.

CMD_SYNC_TIMELINE_INC 3

Increments timeline. reads timeline handle and time argument

CMD_DESTROY_SYNC_TIMELINE 4

Destroys a timeline. reads timeline handle

CMD_TRIGGER_HOST_WAIT 5

Starts a wait on the host with the given glsync object and
sync thread handle.

Defined at line 43 of file ../../src/graphics/drivers/misc/goldfish_sync/sync_common_defs.h

Records