Skip to content

Commit 2f7e4a6

Browse files
Marek Vasutsuperna9999
authored andcommitted
drm/panel: ilitek-ili9881c: Allow configuration of the number of lanes
Not all panels use all 4 data lanes, so allow configuration based on the compatible string. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 808d26a commit 2f7e4a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/panel/panel-ilitek-ili9881c.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ struct ili9881c_desc {
4343
const struct drm_display_mode *mode;
4444
const unsigned long mode_flags;
4545
u8 default_address_mode;
46+
unsigned int lanes;
4647
};
4748

4849
struct ili9881c {
@@ -1548,7 +1549,7 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
15481549

15491550
dsi->mode_flags = ctx->desc->mode_flags;
15501551
dsi->format = MIPI_DSI_FMT_RGB888;
1551-
dsi->lanes = 4;
1552+
dsi->lanes = ctx->desc->lanes;
15521553

15531554
return mipi_dsi_attach(dsi);
15541555
}
@@ -1566,13 +1567,15 @@ static const struct ili9881c_desc lhr050h41_desc = {
15661567
.init_length = ARRAY_SIZE(lhr050h41_init),
15671568
.mode = &lhr050h41_default_mode,
15681569
.mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
1570+
.lanes = 4,
15691571
};
15701572

15711573
static const struct ili9881c_desc k101_im2byl02_desc = {
15721574
.init = k101_im2byl02_init,
15731575
.init_length = ARRAY_SIZE(k101_im2byl02_init),
15741576
.mode = &k101_im2byl02_default_mode,
15751577
.mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
1578+
.lanes = 4,
15761579
};
15771580

15781581
static const struct ili9881c_desc kd050hdfia020_desc = {
@@ -1598,6 +1601,7 @@ static const struct ili9881c_desc w552946aba_desc = {
15981601
.mode = &w552946aba_default_mode,
15991602
.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
16001603
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET,
1604+
.lanes = 4,
16011605
};
16021606

16031607
static const struct ili9881c_desc am8001280g_desc = {

0 commit comments

Comments
 (0)