mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
drm/rockchip: dsi2: havle dsc pps pic_width in dual channel dsi
two dsc encoder slices which is equal to pic_width / slice_width
will also halve whith pic_width
<-HxV-> <------------- H/2 x V --------------> <-H x V->
┌───────┐ ┌───────┐ ┌───────────┐
│ DSC0 ├───►│dsi0 tx├──►│lcd dsi0 rx│\ ┌───────┐
┌─────┐ /└───────┘ └───────┘ └───────────┘ \│ │
│ │/ /│lcd DSC│
│ VP │\ ┌───────┐ ┌───────┐ ┌───────────┐/ │ │
└─────┘ \│ DSC1 ├───►│dsi1 tx├──►│lcd dsi1 rx│ └───────┘
└───────┘ └───────┘ └───────────┘
Change-Id: I65e65f969f9b1e81bee1a7343b386f577255a2f5
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
This commit is contained in:
@@ -1214,6 +1214,9 @@ static int dw_mipi_dsi2_get_dsc_params_from_sink(struct dw_mipi_dsi2 *dsi2,
|
||||
dsi2->slave->dsc_enable = dsi2->dsc_enable;
|
||||
}
|
||||
|
||||
if (!dsi2->dsc_enable)
|
||||
return 0;
|
||||
|
||||
of_property_read_u32(np, "slice-width", &dsi2->slice_width);
|
||||
of_property_read_u32(np, "slice-height", &dsi2->slice_height);
|
||||
of_property_read_u8(np, "version-major", &dsi2->version_major);
|
||||
@@ -1249,8 +1252,21 @@ static int dw_mipi_dsi2_get_dsc_params_from_sink(struct dw_mipi_dsi2 *dsi2,
|
||||
len -= header->payload_length;
|
||||
}
|
||||
|
||||
if (!pps) {
|
||||
dev_err(dsi2->dev, "not found dsc pps definition\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dsi2->pps = pps;
|
||||
|
||||
if (dsi2->slave) {
|
||||
u16 pic_width = be16_to_cpu(pps->pic_width) / 2;
|
||||
|
||||
dsi2->pps->pic_width = cpu_to_be16(pic_width);
|
||||
dev_info(dsi2->dev, "dsc pic_width change from %d to %d\n",
|
||||
pic_width * 2, pic_width);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user