.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
---|
1 | 2 | /* |
---|
2 | 3 | * shmob_drm_crtc.c -- SH Mobile DRM CRTCs |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2012 Renesas Electronics Corporation |
---|
5 | 6 | * |
---|
6 | 7 | * Laurent Pinchart (laurent.pinchart@ideasonboard.com) |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
11 | | - * (at your option) any later version. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/backlight.h> |
---|
15 | 11 | #include <linux/clk.h> |
---|
16 | 12 | |
---|
17 | | -#include <drm/drmP.h> |
---|
18 | 13 | #include <drm/drm_crtc.h> |
---|
19 | 14 | #include <drm/drm_crtc_helper.h> |
---|
20 | 15 | #include <drm/drm_fb_cma_helper.h> |
---|
| 16 | +#include <drm/drm_fourcc.h> |
---|
21 | 17 | #include <drm/drm_gem_cma_helper.h> |
---|
22 | 18 | #include <drm/drm_plane_helper.h> |
---|
| 19 | +#include <drm/drm_probe_helper.h> |
---|
| 20 | +#include <drm/drm_simple_kms_helper.h> |
---|
| 21 | +#include <drm/drm_vblank.h> |
---|
23 | 22 | |
---|
24 | 23 | #include "shmob_drm_backlight.h" |
---|
25 | 24 | #include "shmob_drm_crtc.h" |
---|
.. | .. |
---|
560 | 559 | .mode_set = shmob_drm_encoder_mode_set, |
---|
561 | 560 | }; |
---|
562 | 561 | |
---|
563 | | -static void shmob_drm_encoder_destroy(struct drm_encoder *encoder) |
---|
564 | | -{ |
---|
565 | | - drm_encoder_cleanup(encoder); |
---|
566 | | -} |
---|
567 | | - |
---|
568 | | -static const struct drm_encoder_funcs encoder_funcs = { |
---|
569 | | - .destroy = shmob_drm_encoder_destroy, |
---|
570 | | -}; |
---|
571 | | - |
---|
572 | 562 | int shmob_drm_encoder_create(struct shmob_drm_device *sdev) |
---|
573 | 563 | { |
---|
574 | 564 | struct drm_encoder *encoder = &sdev->encoder.encoder; |
---|
.. | .. |
---|
578 | 568 | |
---|
579 | 569 | encoder->possible_crtcs = 1; |
---|
580 | 570 | |
---|
581 | | - ret = drm_encoder_init(sdev->ddev, encoder, &encoder_funcs, |
---|
582 | | - DRM_MODE_ENCODER_LVDS, NULL); |
---|
| 571 | + ret = drm_simple_encoder_init(sdev->ddev, encoder, |
---|
| 572 | + DRM_MODE_ENCODER_LVDS); |
---|
583 | 573 | if (ret < 0) |
---|
584 | 574 | return ret; |
---|
585 | 575 | |
---|