forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
....@@ -1,25 +1,24 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * shmob_drm_crtc.c -- SH Mobile DRM CRTCs
34 *
45 * Copyright (C) 2012 Renesas Electronics Corporation
56 *
67 * Laurent Pinchart (laurent.pinchart@ideasonboard.com)
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
128 */
139
1410 #include <linux/backlight.h>
1511 #include <linux/clk.h>
1612
17
-#include <drm/drmP.h>
1813 #include <drm/drm_crtc.h>
1914 #include <drm/drm_crtc_helper.h>
2015 #include <drm/drm_fb_cma_helper.h>
16
+#include <drm/drm_fourcc.h>
2117 #include <drm/drm_gem_cma_helper.h>
2218 #include <drm/drm_plane_helper.h>
19
+#include <drm/drm_probe_helper.h>
20
+#include <drm/drm_simple_kms_helper.h>
21
+#include <drm/drm_vblank.h>
2322
2423 #include "shmob_drm_backlight.h"
2524 #include "shmob_drm_crtc.h"
....@@ -560,15 +559,6 @@
560559 .mode_set = shmob_drm_encoder_mode_set,
561560 };
562561
563
-static void shmob_drm_encoder_destroy(struct drm_encoder *encoder)
564
-{
565
- drm_encoder_cleanup(encoder);
566
-}
567
-
568
-static const struct drm_encoder_funcs encoder_funcs = {
569
- .destroy = shmob_drm_encoder_destroy,
570
-};
571
-
572562 int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
573563 {
574564 struct drm_encoder *encoder = &sdev->encoder.encoder;
....@@ -578,8 +568,8 @@
578568
579569 encoder->possible_crtcs = 1;
580570
581
- ret = drm_encoder_init(sdev->ddev, encoder, &encoder_funcs,
582
- DRM_MODE_ENCODER_LVDS, NULL);
571
+ ret = drm_simple_encoder_init(sdev->ddev, encoder,
572
+ DRM_MODE_ENCODER_LVDS);
583573 if (ret < 0)
584574 return ret;
585575