| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 16 | 4 | * |
|---|
| 17 | 5 | * Authors: |
|---|
| 18 | 6 | * Eric Anholt <eric@anholt.net> |
|---|
| 19 | 7 | */ |
|---|
| 20 | 8 | |
|---|
| 9 | +#include <linux/delay.h> |
|---|
| 21 | 10 | #include <linux/i2c.h> |
|---|
| 22 | 11 | |
|---|
| 23 | | -#include <drm/drmP.h> |
|---|
| 24 | 12 | #include <drm/drm_plane_helper.h> |
|---|
| 13 | + |
|---|
| 25 | 14 | #include "framebuffer.h" |
|---|
| 15 | +#include "gma_display.h" |
|---|
| 16 | +#include "power.h" |
|---|
| 26 | 17 | #include "psb_drv.h" |
|---|
| 27 | 18 | #include "psb_intel_drv.h" |
|---|
| 28 | 19 | #include "psb_intel_reg.h" |
|---|
| 29 | | -#include "gma_display.h" |
|---|
| 30 | | -#include "power.h" |
|---|
| 31 | 20 | |
|---|
| 32 | 21 | #define INTEL_LIMIT_I9XX_SDVO_DAC 0 |
|---|
| 33 | 22 | #define INTEL_LIMIT_I9XX_LVDS 1 |
|---|
| .. | .. |
|---|
| 443 | 432 | .gamma_set = gma_crtc_gamma_set, |
|---|
| 444 | 433 | .set_config = gma_crtc_set_config, |
|---|
| 445 | 434 | .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, |
|---|
| 446 | 439 | }; |
|---|
| 447 | 440 | |
|---|
| 448 | 441 | const struct gma_clock_funcs psb_clock_funcs = { |
|---|
| .. | .. |
|---|
| 543 | 536 | |
|---|
| 544 | 537 | struct drm_crtc *psb_intel_get_crtc_from_pipe(struct drm_device *dev, int pipe) |
|---|
| 545 | 538 | { |
|---|
| 546 | | - struct drm_crtc *crtc = NULL; |
|---|
| 539 | + struct drm_crtc *crtc; |
|---|
| 547 | 540 | |
|---|
| 548 | 541 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
|---|
| 549 | 542 | struct gma_crtc *gma_crtc = to_gma_crtc(crtc); |
|---|
| 543 | + |
|---|
| 550 | 544 | if (gma_crtc->pipe == pipe) |
|---|
| 551 | | - break; |
|---|
| 545 | + return crtc; |
|---|
| 552 | 546 | } |
|---|
| 553 | | - return crtc; |
|---|
| 547 | + return NULL; |
|---|
| 554 | 548 | } |
|---|
| 555 | 549 | |
|---|
| 556 | 550 | int gma_connector_clones(struct drm_device *dev, int type_mask) |
|---|