hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/drm/gma500/psb_intel_display.c
....@@ -1,33 +1,22 @@
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>
2412 #include <drm/drm_plane_helper.h>
13
+
2514 #include "framebuffer.h"
15
+#include "gma_display.h"
16
+#include "power.h"
2617 #include "psb_drv.h"
2718 #include "psb_intel_drv.h"
2819 #include "psb_intel_reg.h"
29
-#include "gma_display.h"
30
-#include "power.h"
3120
3221 #define INTEL_LIMIT_I9XX_SDVO_DAC 0
3322 #define INTEL_LIMIT_I9XX_LVDS 1
....@@ -443,6 +432,10 @@
443432 .gamma_set = gma_crtc_gamma_set,
444433 .set_config = gma_crtc_set_config,
445434 .destroy = gma_crtc_destroy,
435
+ .page_flip = gma_crtc_page_flip,
436
+ .enable_vblank = psb_enable_vblank,
437
+ .disable_vblank = psb_disable_vblank,
438
+ .get_vblank_counter = psb_get_vblank_counter,
446439 };
447440
448441 const struct gma_clock_funcs psb_clock_funcs = {
....@@ -543,14 +536,15 @@
543536
544537 struct drm_crtc *psb_intel_get_crtc_from_pipe(struct drm_device *dev, int pipe)
545538 {
546
- struct drm_crtc *crtc = NULL;
539
+ struct drm_crtc *crtc;
547540
548541 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
549542 struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
543
+
550544 if (gma_crtc->pipe == pipe)
551
- break;
545
+ return crtc;
552546 }
553
- return crtc;
547
+ return NULL;
554548 }
555549
556550 int gma_connector_clones(struct drm_device *dev, int type_mask)