From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 31 Jan 2024 03:29:01 +0000 Subject: [PATCH] add lvds1024*800 --- kernel/drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 24 +++++++----------------- 1 files changed, 7 insertions(+), 17 deletions(-) diff --git a/kernel/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/kernel/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index fc66167..03556db 100644 --- a/kernel/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/kernel/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -1,25 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * shmob_drm_crtc.c -- SH Mobile DRM CRTCs * * Copyright (C) 2012 Renesas Electronics Corporation * * Laurent Pinchart (laurent.pinchart@ideasonboard.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #include <linux/backlight.h> #include <linux/clk.h> -#include <drm/drmP.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h> +#include <drm/drm_probe_helper.h> +#include <drm/drm_simple_kms_helper.h> +#include <drm/drm_vblank.h> #include "shmob_drm_backlight.h" #include "shmob_drm_crtc.h" @@ -560,15 +559,6 @@ .mode_set = shmob_drm_encoder_mode_set, }; -static void shmob_drm_encoder_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs encoder_funcs = { - .destroy = shmob_drm_encoder_destroy, -}; - int shmob_drm_encoder_create(struct shmob_drm_device *sdev) { struct drm_encoder *encoder = &sdev->encoder.encoder; @@ -578,8 +568,8 @@ encoder->possible_crtcs = 1; - ret = drm_encoder_init(sdev->ddev, encoder, &encoder_funcs, - DRM_MODE_ENCODER_LVDS, NULL); + ret = drm_simple_encoder_init(sdev->ddev, encoder, + DRM_MODE_ENCODER_LVDS); if (ret < 0) return ret; -- Gitblit v1.6.2