Skip to content

Commit aa5f29b

Browse files
committed
mipi: Also ignore weird SET_MAXIMUM_RETURN_PACKET_SIZE
lenovo-a6010 has that in one of its panel definitions for some reason...
1 parent e686a73 commit aa5f29b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mipi.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ def _generate_peripheral(t: Transaction, payload: bytes, options: Options) -> st
219219
raise ValueError(t)
220220

221221

222-
def _generate_null_packet(t: Transaction, payload: bytes, options: Options) -> str:
223-
return "\t// WARNING: Ignoring weird NULL_PACKET (dummy packet)"
222+
def _generate_ignore(t: Transaction, payload: bytes, options: Options) -> str:
223+
print(f"WARNING: Ignoring weird {t.name}")
224+
return f"\t// WARNING: Ignoring weird {t.name}"
224225

225226

226227
def _generate_fallback(t: Transaction, payload: bytes, options: Options) -> str:
@@ -256,11 +257,11 @@ class Transaction(Enum):
256257
DCS_COMPRESSION_MODE = 0x07,
257258
PPS_LONG_WRITE = 0x0A,
258259

259-
SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37,
260+
SET_MAXIMUM_RETURN_PACKET_SIZE = 0x37, -1, _generate_ignore
260261

261262
END_OF_TRANSMISSION = 0x08,
262263

263-
NULL_PACKET = 0x09, -1, _generate_null_packet
264+
NULL_PACKET = 0x09, -1, _generate_ignore
264265
BLANKING_PACKET = 0x19,
265266
GENERIC_LONG_WRITE = 0x29, -1, _generate_generic_write
266267
DCS_LONG_WRITE = 0x39, -1, _generate_dcs_write

0 commit comments

Comments
 (0)