forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/gma500/psb_intel_lvds.c
....@@ -1,18 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright © 2006-2007 Intel Corporation
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms and conditions of the GNU General Public License,
6
- * version 2, as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope it will be useful, but WITHOUT
9
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
- * more details.
12
- *
13
- * You should have received a copy of the GNU General Public License along with
14
- * this program; if not, write to the Free Software Foundation, Inc.,
15
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
164 *
175 * Authors:
186 * Eric Anholt <eric@anholt.net>
....@@ -21,14 +9,15 @@
219 */
2210
2311 #include <linux/i2c.h>
24
-#include <drm/drmP.h>
12
+#include <linux/pm_runtime.h>
13
+
14
+#include <drm/drm_simple_kms_helper.h>
2515
2616 #include "intel_bios.h"
17
+#include "power.h"
2718 #include "psb_drv.h"
2819 #include "psb_intel_drv.h"
2920 #include "psb_intel_reg.h"
30
-#include "power.h"
31
-#include <linux/pm_runtime.h>
3221
3322 /*
3423 * LVDS I2C backlight control macros
....@@ -634,18 +623,6 @@
634623 .destroy = psb_intel_lvds_destroy,
635624 };
636625
637
-
638
-static void psb_intel_lvds_enc_destroy(struct drm_encoder *encoder)
639
-{
640
- drm_encoder_cleanup(encoder);
641
-}
642
-
643
-const struct drm_encoder_funcs psb_intel_lvds_enc_funcs = {
644
- .destroy = psb_intel_lvds_enc_destroy,
645
-};
646
-
647
-
648
-
649626 /**
650627 * psb_intel_lvds_init - setup LVDS connectors on this device
651628 * @dev: drm device
....@@ -696,9 +673,7 @@
696673 &psb_intel_lvds_connector_funcs,
697674 DRM_MODE_CONNECTOR_LVDS);
698675
699
- drm_encoder_init(dev, encoder,
700
- &psb_intel_lvds_enc_funcs,
701
- DRM_MODE_ENCODER_LVDS, NULL);
676
+ drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_LVDS);
702677
703678 gma_connector_attach_encoder(gma_connector, gma_encoder);
704679 gma_encoder->type = INTEL_OUTPUT_LVDS;