drm/panel: Change dlen from u16 to u8

U8_MAX payload length can meet most requirements

Change-Id: I77e5780bde72b4229ab36d961dc7498f7c78a468
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
WeiYong Bi
2017-04-14 14:49:21 +08:00
committed by Huang, Tao
parent 14c0ac3240
commit f99b018e7b
2 changed files with 11 additions and 12 deletions

View File

@@ -24,13 +24,13 @@ Optional properties when compatible is a dsi devices:
- panel-init-sequence: A byte stream formed by simple multiple dcs packets.
byte 0: dcs data type
byte 1: wait number of specified ms after dcs command transmitted
byte 2, 3: 16 bits length in network byte order
byte 4 and beyond: number byte of payload
byte 2: packet payload length
byte 3 and beyond: number byte of payload
- panel-exit-sequence: A byte stream formed by simple multiple dcs packets.
byte 0: dcs data type
byte 1: wait number of specified ms after dcs command transmitted
byte 2, 3: 16 bits length in network byte order
byte 4 and beyond: number byte of payload
byte 2: packet payload length
byte 3 and beyond: number byte of payload
Example:
@@ -64,16 +64,16 @@ Or:
dsi,lanes = <4>;
panel-init-sequence = [
39 00 00 10 b1 6c 15 15 24 E4 11 f1 80 e4
d7 23 80 c0 d2 58
39 00 10 b1 6c 15 15 24 E4 11 f1 80 e4
d7 23 80 c0 d2 58
...
05 78 00 01 11
05 00 00 01 29
05 78 01 11
05 00 01 29
];
panel-exit-sequence = [
05 00 00 01 28
05 78 00 01 10
05 00 01 28
05 78 01 10
];
display-timings {

View File

@@ -41,7 +41,7 @@
struct dsi_ctrl_hdr {
u8 dtype; /* data type */
u8 wait; /* ms */
u16 dlen; /* payload len */
u8 dlen; /* payload len */
} __packed;
struct dsi_cmd_desc {
@@ -151,7 +151,6 @@ static int panel_simple_dsi_parse_dcs_cmds(struct device *dev,
cnt = 0;
while (len > sizeof(*dchdr)) {
dchdr = (struct dsi_ctrl_hdr *)bp;
dchdr->dlen = ntohs(dchdr->dlen);
if (dchdr->dlen > len) {
dev_err(dev, "%s: error, len=%d", __func__,