| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 16 | 4 | * |
|---|
| 17 | 5 | * Authors: |
|---|
| 18 | 6 | * Eric Anholt <eric@anholt.net> |
|---|
| .. | .. |
|---|
| 21 | 9 | */ |
|---|
| 22 | 10 | |
|---|
| 23 | 11 | #include <linux/i2c.h> |
|---|
| 24 | | -#include <drm/drmP.h> |
|---|
| 12 | +#include <linux/pm_runtime.h> |
|---|
| 13 | + |
|---|
| 14 | +#include <drm/drm_simple_kms_helper.h> |
|---|
| 25 | 15 | |
|---|
| 26 | 16 | #include "intel_bios.h" |
|---|
| 17 | +#include "power.h" |
|---|
| 27 | 18 | #include "psb_drv.h" |
|---|
| 28 | 19 | #include "psb_intel_drv.h" |
|---|
| 29 | 20 | #include "psb_intel_reg.h" |
|---|
| 30 | | -#include "power.h" |
|---|
| 31 | | -#include <linux/pm_runtime.h> |
|---|
| 32 | 21 | |
|---|
| 33 | 22 | /* |
|---|
| 34 | 23 | * LVDS I2C backlight control macros |
|---|
| .. | .. |
|---|
| 634 | 623 | .destroy = psb_intel_lvds_destroy, |
|---|
| 635 | 624 | }; |
|---|
| 636 | 625 | |
|---|
| 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 | | - |
|---|
| 649 | 626 | /** |
|---|
| 650 | 627 | * psb_intel_lvds_init - setup LVDS connectors on this device |
|---|
| 651 | 628 | * @dev: drm device |
|---|
| .. | .. |
|---|
| 696 | 673 | &psb_intel_lvds_connector_funcs, |
|---|
| 697 | 674 | DRM_MODE_CONNECTOR_LVDS); |
|---|
| 698 | 675 | |
|---|
| 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); |
|---|
| 702 | 677 | |
|---|
| 703 | 678 | gma_connector_attach_encoder(gma_connector, gma_encoder); |
|---|
| 704 | 679 | gma_encoder->type = INTEL_OUTPUT_LVDS; |
|---|