jpeg: probe registers more thoroughly

Signed-off-by: R <rqou@berkeley.edu>
This commit is contained in:
R 2022-03-25 03:33:24 -07:00 committed by Hector Martin
parent c6169c1c15
commit 49cdf7fe22

View file

@ -22,7 +22,7 @@ class E_CODEC(IntEnum):
class R_CODEC(Register32):
CODEC = 31, 0, E_CODEC # FIXME actual width
CODEC = 2, 0, E_CODEC
class E_ENCODE_PIXEL_FORMAT(IntEnum):
@ -35,7 +35,7 @@ class E_ENCODE_PIXEL_FORMAT(IntEnum):
class R_ENCODE_PIXEL_FORMAT(Register32):
FORMAT = 31, 0, E_ENCODE_PIXEL_FORMAT # FIXME actual width
FORMAT = 4, 0, E_ENCODE_PIXEL_FORMAT
class E_SCALE(IntEnum):
@ -46,7 +46,7 @@ class E_SCALE(IntEnum):
class R_SCALE_FACTOR(Register32):
SCALE = 31, 0, E_SCALE # FIXME actual width
SCALE = 1, 0, E_SCALE
class E_DECODE_PIXEL_FORMAT(IntEnum):
@ -61,7 +61,7 @@ class E_DECODE_PIXEL_FORMAT(IntEnum):
class R_DECODE_PIXEL_FORMAT(Register32):
FORMAT = 31, 0, E_DECODE_PIXEL_FORMAT # FIXME actual width
FORMAT = 3, 0, E_DECODE_PIXEL_FORMAT
class E_JPEG_IO_FLAGS_SUBSAMPLING(IntEnum):
@ -102,6 +102,11 @@ class JPEGRegs(RegMap):
MODE = 0x8, Register32
REG_0xc = 0xc, Register32
REG_0x10 = 0x10, Register32
REG_0x14 = 0x14, Register32
REG_0x18 = 0x18, Register32
# REG_0x1c = 0x1c, Register32
REG_0x20 = 0x20, Register32
STATUS = 0x24, R_STATUS
@ -204,11 +209,11 @@ class JPEGRegs(RegMap):
# REG_0x180 = 0x180, Register32
TIMEOUT = 0x184, Register32
HWREV = 0x188, Register32
# REG_0x18c = 0x18c, Register32
# REG_0x190 = 0x190, Register32
# REG_0x194 = 0x194, Register32
# REG_0x198 = 0x198, Register32
REG_0x18c = 0x18c, Register32
REG_0x190 = 0x190, Register32
REG_0x194 = 0x194, Register32
REG_0x198 = 0x198, Register32
REG_0x19c = 0x19c, Register32
ENABLE_RST_LOGGING = 0x1a0, Register32
@ -216,65 +221,75 @@ class JPEGRegs(RegMap):
REG_0x1a8 = 0x1a8, Register32
REG_0x1ac = 0x1ac, Register32
REG_0x1b0 = 0x1b0, Register32
REG_0x1b4 = 0x1b4, Register32
# REG_0x1b8 = 0x1b8, Register32
REG_0x1b8 = 0x1b8, Register32
REG_0x1bc = 0x1bc, Register32
REG_0x1c0 = 0x1c0, Register32
REG_0x1c4 = 0x1c4, Register32
REG_0x1c8 = 0x1c8, Register32
REG_0x1cc = 0x1cc, Register32
REG_0x1c8 = 0x1c8, Register32
REG_0x1cc = 0x1cc, Register32
REG_0x1d0 = 0x1d0, Register32
REG_0x1d4 = 0x1d4, Register32
# REG_0x1d8 = 0x1d8, Register32
# REG_0x1dc = 0x1dc, Register32
REG_0x1d8 = 0x1d8, Register32
# REG_0x1e0 = 0x1e0, Register32
# REG_0x1e4 = 0x1e4, Register32
# REG_0x1e8 = 0x1e8, Register32
# REG_0x1ec = 0x1ec, Register32
REG_0x1dc = 0x1dc, Register32
REG_0x1e0 = 0x1e0, Register32
REG_0x1e4 = 0x1e4, Register32
REG_0x1e8 = 0x1e8, Register32
REG_0x1ec = 0x1ec, Register32
REG_0x1f0 = 0x1f0, Register32
REG_0x1f4 = 0x1f4, Register32
REG_0x1f8 = 0x1f8, Register32
# REG_0x1f0 = 0x1f0, Register32
# REG_0x1f4 = 0x1f4, Register32
# REG_0x1f8 = 0x1f8, Register32
REG_0x1fc = 0x1fc, Register32
REG_0x200 = 0x200, Register32
REG_0x204 = 0x204, Register32
REG_0x208 = 0x208, Register32
REG_0x20c = 0x20c, Register32
REG_0x20c = 0x20c, Register32
REG_0x210 = 0x210, Register32
REG_0x214 = 0x214, Register32
REG_0x218 = 0x218, Register32
REG_0x21c = 0x21c, Register32
REG_0x21c = 0x21c, Register32
REG_0x220 = 0x220, Register32
REG_0x224 = 0x224, Register32
REG_0x228 = 0x228, Register32
REG_0x22c = 0x22c, Register32
REG_0x22c = 0x22c, Register32
REG_0x230 = 0x230, Register32
REG_0x234 = 0x234, Register32
# REG_0x238 = 0x238, Register32
REG_0x23c = 0x23c, Register32
REG_0x238 = 0x238, Register32
REG_0x23c = 0x23c, Register32
REG_0x240 = 0x240, Register32
REG_0x244 = 0x244, Register32
REG_0x248 = 0x248, Register32
REG_0x24c = 0x24c, Register32
REG_0x24c = 0x24c, Register32
REG_0x250 = 0x250, Register32
REG_0x254 = 0x254, Register32
REG_0x258 = 0x258, Register32
REG_0x25c = 0x25c, Register32
REG_0x260 = 0x260, Register32
REG_0x264 = 0x264, Register32
REG_0x268 = 0x268, Register32
REG_0x26c = 0x26c, Register32
REG_0x280 = 0x280, Register32
JPEG_IO_FLAGS = 0x1000, R_JPEG_IO_FLAGS
REG_0x1004 = 0x1004, Register32
# REG_0x1008 = 0x1008, Register32
REG_0x1008 = 0x1008, Register32
QTBL_SEL = 0x100c, R_QTBL_SEL
# fixme what _exactly_ does this control
@ -293,6 +308,21 @@ class JPEGRegs(RegMap):
# REG_0x1038 = 0x1038, Register32
# REG_0x103c = 0x103c, Register32
REG_0x1080 = 0x1080, Register32
REG_0x1084 = 0x1084, Register32
# REG_0x1088 = 0x1088, Register32
REG_0x108c = 0x108c, Register32
REG_0x1090 = 0x1090, Register32
SHIKINO_VERSION_MAGIC0 = 0x10e0, Register32
SHIKINO_VERSION_MAGIC1 = 0x10e4, Register32
SHIKINO_VERSION_MAGIC2 = 0x10e8, Register32
SHIKINO_VERSION_MAGIC3 = 0x10ec, Register32
SHIKINO_VERSION_MAGIC4 = 0x10f0, Register32
# REG_0x10f4 = 0x10f4, Register32
# REG_0x10f8 = 0x10f8, Register32
# REG_0x10fc = 0x10fc, Register32
QTBL = irange(0x1100, 64, 4), Register32
# todo what's the format?