hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/gpu/drm/rockchip/rockchip_drm_tve.c
....@@ -11,10 +11,10 @@
1111 #include <linux/pm_runtime.h>
1212 #include <linux/regmap.h>
1313
14
-#include <drm/drmP.h>
1514 #include <drm/drm_atomic_helper.h>
1615 #include <drm/drm_crtc_helper.h>
1716 #include <drm/drm_of.h>
17
+#include <drm/drm_probe_helper.h>
1818
1919 #include <uapi/linux/videodev2.h>
2020
....@@ -29,13 +29,13 @@
2929 816, 864, 0, 576, 580, 586, 625, 0,
3030 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
3131 DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
32
- .vrefresh = 50, 0, },
32
+ 0, },
3333
3434 { DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 13500, 720, 753,
3535 815, 858, 0, 480, 480, 486, 525, 0,
3636 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
3737 DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
38
- .vrefresh = 60, 0, },
38
+ 0, },
3939 };
4040
4141 struct env_config {
....@@ -421,8 +421,6 @@
421421 static void rockchip_tve_encoder_disable(struct drm_encoder *encoder)
422422 {
423423 struct rockchip_tve *tve = encoder_to_tve(encoder);
424
- struct drm_crtc *crtc = encoder->crtc;
425
- struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc->state);
426424
427425 mutex_lock(&tve->suspend_lock);
428426
....@@ -430,8 +428,6 @@
430428 cvbs_set_disable(tve);
431429
432430 mutex_unlock(&tve->suspend_lock);
433
-
434
- s->output_if &= ~VOP_OUTPUT_IF_TV;
435431 }
436432
437433 static void rockchip_tve_encoder_mode_set(struct drm_encoder *encoder,
....@@ -487,8 +483,6 @@
487483 */
488484 if (tve->soc_type == SOC_RK3528)
489485 s->output_if |= VOP_OUTPUT_IF_BT656;
490
- else
491
- s->output_if |= VOP_OUTPUT_IF_TV;
492486 s->color_space = V4L2_COLORSPACE_SMPTE170M;
493487 s->tv_state = &conn_state->tv;
494488
....@@ -849,7 +843,7 @@
849843 }
850844
851845 tve->dev = &pdev->dev;
852
- tve_data = device_get_match_data(dev);
846
+ tve_data = of_device_get_match_data(dev);
853847 if (tve_data) {
854848 tve->soc_type = tve_data->soc_type;
855849 tve->input_format = tve_data->input_format;
....@@ -957,8 +951,8 @@
957951 check_uboot_logo(tve);
958952 tve->tv_format = TVOUT_CVBS_PAL;
959953 encoder = &tve->encoder;
960
- encoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,
961
- dev->of_node);
954
+ encoder->possible_crtcs = rockchip_drm_of_find_possible_crtcs(drm_dev,
955
+ dev->of_node);
962956 dev_dbg(tve->dev, "possible_crtc:%d\n", encoder->possible_crtcs);
963957
964958 ret = drm_encoder_init(drm_dev, encoder, &rockchip_tve_encoder_funcs,