forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/rockchip/rk618/rk618_vif.c
....@@ -15,7 +15,7 @@
1515 #include <linux/regmap.h>
1616
1717 #include <drm/drm_of.h>
18
-#include <drm/drmP.h>
18
+#include <drm/drm_drv.h>
1919 #include <video/videomode.h>
2020
2121 #define RK618_VIF0_REG0 0x0000
....@@ -145,15 +145,16 @@
145145 }
146146
147147 static void rk618_vif_bridge_mode_set(struct drm_bridge *bridge,
148
- struct drm_display_mode *mode,
149
- struct drm_display_mode *adjusted)
148
+ const struct drm_display_mode *mode,
149
+ const struct drm_display_mode *adjusted)
150150 {
151151 struct rk618_vif *vif = bridge_to_vif(bridge);
152152
153153 drm_mode_copy(&vif->mode, adjusted);
154154 }
155155
156
-static int rk618_vif_bridge_attach(struct drm_bridge *bridge)
156
+static int rk618_vif_bridge_attach(struct drm_bridge *bridge,
157
+ enum drm_bridge_attach_flags flags)
157158 {
158159 struct rk618_vif *vif = bridge_to_vif(bridge);
159160 struct device *dev = vif->dev;
....@@ -174,7 +175,7 @@
174175 if (!vif->bridge)
175176 return -EPROBE_DEFER;
176177
177
- ret = drm_bridge_attach(bridge->encoder, vif->bridge, bridge);
178
+ ret = drm_bridge_attach(bridge->encoder, vif->bridge, bridge, 0);
178179 if (ret) {
179180 dev_err(dev, "failed to attach bridge\n");
180181 return ret;