| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /************************************************************************** |
|---|
| 2 | 3 | * Copyright (c) 2007-2011, Intel Corporation. |
|---|
| 3 | 4 | * All Rights Reserved. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 7 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 12 | | - * more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 15 | | - * this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 16 | | - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 17 | 5 | * |
|---|
| 18 | 6 | **************************************************************************/ |
|---|
| 19 | 7 | |
|---|
| .. | .. |
|---|
| 23 | 11 | #include <linux/kref.h> |
|---|
| 24 | 12 | #include <linux/mm_types.h> |
|---|
| 25 | 13 | |
|---|
| 26 | | -#include <drm/drmP.h> |
|---|
| 27 | | -#include <drm/drm_global.h> |
|---|
| 28 | | -#include <drm/gma_drm.h> |
|---|
| 29 | | -#include "psb_reg.h" |
|---|
| 30 | | -#include "psb_intel_drv.h" |
|---|
| 14 | +#include <drm/drm_device.h> |
|---|
| 15 | + |
|---|
| 31 | 16 | #include "gma_display.h" |
|---|
| 32 | | -#include "intel_bios.h" |
|---|
| 33 | 17 | #include "gtt.h" |
|---|
| 34 | | -#include "power.h" |
|---|
| 35 | | -#include "opregion.h" |
|---|
| 36 | | -#include "oaktrail.h" |
|---|
| 18 | +#include "intel_bios.h" |
|---|
| 37 | 19 | #include "mmu.h" |
|---|
| 20 | +#include "oaktrail.h" |
|---|
| 21 | +#include "opregion.h" |
|---|
| 22 | +#include "power.h" |
|---|
| 23 | +#include "psb_intel_drv.h" |
|---|
| 24 | +#include "psb_reg.h" |
|---|
| 38 | 25 | |
|---|
| 39 | 26 | #define DRIVER_AUTHOR "Alan Cox <alan@linux.intel.com> and others" |
|---|
| 40 | 27 | |
|---|
| .. | .. |
|---|
| 242 | 229 | #define KSEL_BYPASS_25 6 |
|---|
| 243 | 230 | #define KSEL_BYPASS_83_100 7 |
|---|
| 244 | 231 | |
|---|
| 232 | +struct drm_fb_helper; |
|---|
| 233 | + |
|---|
| 245 | 234 | struct opregion_header; |
|---|
| 246 | 235 | struct opregion_acpi; |
|---|
| 247 | 236 | struct opregion_swsci; |
|---|
| .. | .. |
|---|
| 445 | 434 | struct pci_dev *lpc_pdev; /* Currently only used by mrst */ |
|---|
| 446 | 435 | const struct psb_ops *ops; |
|---|
| 447 | 436 | const struct psb_offset *regmap; |
|---|
| 448 | | - |
|---|
| 437 | + |
|---|
| 449 | 438 | struct child_device_config *child_dev; |
|---|
| 450 | 439 | int child_dev_num; |
|---|
| 451 | 440 | |
|---|
| .. | .. |
|---|
| 553 | 542 | |
|---|
| 554 | 543 | /* Oaktrail HDMI state */ |
|---|
| 555 | 544 | struct oaktrail_hdmi_dev *hdmi_priv; |
|---|
| 556 | | - |
|---|
| 545 | + |
|---|
| 557 | 546 | /* Register state */ |
|---|
| 558 | 547 | struct psb_save_area regs; |
|---|
| 559 | 548 | |
|---|
| .. | .. |
|---|
| 585 | 574 | uint32_t blc_adj1; |
|---|
| 586 | 575 | uint32_t blc_adj2; |
|---|
| 587 | 576 | |
|---|
| 588 | | - void *fbdev; |
|---|
| 577 | + struct drm_fb_helper *fb_helper; |
|---|
| 589 | 578 | |
|---|
| 590 | 579 | /* 2D acceleration */ |
|---|
| 591 | 580 | spinlock_t lock_2d; |
|---|
| .. | .. |
|---|
| 692 | 681 | extern void psb_irq_uninstall_islands(struct drm_device *dev, int hw_islands); |
|---|
| 693 | 682 | extern int psb_vblank_wait2(struct drm_device *dev, unsigned int *sequence); |
|---|
| 694 | 683 | extern int psb_vblank_wait(struct drm_device *dev, unsigned int *sequence); |
|---|
| 695 | | -extern int psb_enable_vblank(struct drm_device *dev, unsigned int pipe); |
|---|
| 696 | | -extern void psb_disable_vblank(struct drm_device *dev, unsigned int pipe); |
|---|
| 684 | +extern int psb_enable_vblank(struct drm_crtc *crtc); |
|---|
| 685 | +extern void psb_disable_vblank(struct drm_crtc *crtc); |
|---|
| 697 | 686 | void |
|---|
| 698 | 687 | psb_enable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask); |
|---|
| 699 | 688 | |
|---|
| 700 | 689 | void |
|---|
| 701 | 690 | psb_disable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask); |
|---|
| 702 | 691 | |
|---|
| 703 | | -extern u32 psb_get_vblank_counter(struct drm_device *dev, unsigned int pipe); |
|---|
| 692 | +extern u32 psb_get_vblank_counter(struct drm_crtc *crtc); |
|---|
| 704 | 693 | |
|---|
| 705 | 694 | /* framebuffer.c */ |
|---|
| 706 | 695 | extern int psbfb_probed(struct drm_device *dev); |
|---|