forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/gpu/drm/gma500/cdv_intel_display.c
....@@ -1,33 +1,23 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright © 2006-2011 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>
197 */
208
9
+#include <linux/delay.h>
2110 #include <linux/i2c.h>
2211
23
-#include <drm/drmP.h>
12
+#include <drm/drm_crtc.h>
13
+
14
+#include "cdv_device.h"
2415 #include "framebuffer.h"
16
+#include "gma_display.h"
17
+#include "power.h"
2518 #include "psb_drv.h"
2619 #include "psb_intel_drv.h"
2720 #include "psb_intel_reg.h"
28
-#include "gma_display.h"
29
-#include "power.h"
30
-#include "cdv_device.h"
3121
3222 static bool cdv_intel_find_dp_pll(const struct gma_limit_t *limit,
3323 struct drm_crtc *crtc, int target,
....@@ -592,8 +582,8 @@
592582 struct gma_clock_t clock;
593583 u32 dpll = 0, dspcntr, pipeconf;
594584 bool ok;
595
- bool is_crt = false, is_lvds = false, is_tv = false;
596
- bool is_hdmi = false, is_dp = false;
585
+ bool is_lvds = false, is_tv = false;
586
+ bool is_dp = false;
597587 struct drm_mode_config *mode_config = &dev->mode_config;
598588 struct drm_connector *connector;
599589 const struct gma_limit_t *limit;
....@@ -617,10 +607,7 @@
617607 is_tv = true;
618608 break;
619609 case INTEL_OUTPUT_ANALOG:
620
- is_crt = true;
621
- break;
622610 case INTEL_OUTPUT_HDMI:
623
- is_hdmi = true;
624611 break;
625612 case INTEL_OUTPUT_DISPLAYPORT:
626613 is_dp = true;
....@@ -989,6 +976,10 @@
989976 .gamma_set = gma_crtc_gamma_set,
990977 .set_config = gma_crtc_set_config,
991978 .destroy = gma_crtc_destroy,
979
+ .page_flip = gma_crtc_page_flip,
980
+ .enable_vblank = psb_enable_vblank,
981
+ .disable_vblank = psb_disable_vblank,
982
+ .get_vblank_counter = psb_get_vblank_counter,
992983 };
993984
994985 const struct gma_clock_funcs cdv_clock_funcs = {