forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
....@@ -629,7 +629,7 @@
629629
630630 dsi->format = format;
631631 bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
632
- if (bpp < 0) {
632
+ if (bpp <= 0) {
633633 DRM_DEV_ERROR(dsi->dev,
634634 "failed to get bpp for pixel format %d\n",
635635 dsi->format);
....@@ -1101,6 +1101,15 @@
11011101 return 0;
11021102 }
11031103
1104
+static void
1105
+dw_mipi_dsi_rockchip_stream_standby(void *priv_data, bool standby)
1106
+{
1107
+ struct dw_mipi_dsi_rockchip *dsi = priv_data;
1108
+ struct drm_encoder *encoder = &dsi->encoder;
1109
+
1110
+ rockchip_drm_crtc_standby(encoder->crtc, standby);
1111
+}
1112
+
11041113 static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
11051114 {
11061115 struct device *dev = &pdev->dev;
....@@ -1209,6 +1218,10 @@
12091218 dsi->pdata.max_data_lanes = dsi->cdata->max_data_lanes;
12101219 dsi->pdata.phy_ops = &dw_mipi_dsi_rockchip_phy_ops;
12111220 dsi->pdata.priv_data = dsi;
1221
+
1222
+ if (dsi->cdata->soc_type == RK3568)
1223
+ dsi->pdata.stream_standby = dw_mipi_dsi_rockchip_stream_standby;
1224
+
12121225 platform_set_drvdata(pdev, dsi);
12131226
12141227 dsi->dmd = dw_mipi_dsi_probe(pdev, &dsi->pdata);