.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2017 Linaro Ltd. |
---|
3 | 4 | * Copyright 2017 ZTE Corporation. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License version 2 as |
---|
7 | | - * published by the Free Software Foundation. |
---|
8 | | - * |
---|
9 | 5 | */ |
---|
10 | 6 | |
---|
11 | 7 | #include <linux/clk.h> |
---|
12 | 8 | #include <linux/component.h> |
---|
13 | 9 | #include <linux/mfd/syscon.h> |
---|
| 10 | +#include <linux/module.h> |
---|
| 11 | +#include <linux/platform_device.h> |
---|
14 | 12 | #include <linux/regmap.h> |
---|
15 | 13 | |
---|
16 | 14 | #include <drm/drm_atomic_helper.h> |
---|
17 | | -#include <drm/drm_crtc_helper.h> |
---|
18 | | -#include <drm/drmP.h> |
---|
| 15 | +#include <drm/drm_print.h> |
---|
| 16 | +#include <drm/drm_probe_helper.h> |
---|
| 17 | +#include <drm/drm_simple_kms_helper.h> |
---|
19 | 18 | |
---|
20 | 19 | #include "zx_drm_drv.h" |
---|
21 | 20 | #include "zx_tvenc_regs.h" |
---|
.. | .. |
---|
220 | 219 | .mode_set = zx_tvenc_encoder_mode_set, |
---|
221 | 220 | }; |
---|
222 | 221 | |
---|
223 | | -static const struct drm_encoder_funcs zx_tvenc_encoder_funcs = { |
---|
224 | | - .destroy = drm_encoder_cleanup, |
---|
225 | | -}; |
---|
226 | | - |
---|
227 | 222 | static int zx_tvenc_connector_get_modes(struct drm_connector *connector) |
---|
228 | 223 | { |
---|
229 | 224 | struct zx_tvenc *tvenc = to_zx_tvenc(connector); |
---|
.. | .. |
---|
287 | 282 | */ |
---|
288 | 283 | encoder->possible_crtcs = BIT(1); |
---|
289 | 284 | |
---|
290 | | - drm_encoder_init(drm, encoder, &zx_tvenc_encoder_funcs, |
---|
291 | | - DRM_MODE_ENCODER_TVDAC, NULL); |
---|
| 285 | + drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TVDAC); |
---|
292 | 286 | drm_encoder_helper_add(encoder, &zx_tvenc_encoder_helper_funcs); |
---|
293 | 287 | |
---|
294 | 288 | connector->interlace_allowed = true; |
---|