Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1027341ybb; Wed, 8 Apr 2020 14:59:22 -0700 (PDT) X-Google-Smtp-Source: APiQypLsLegwAjO4jI9pfV5E4OrIycJqEXBfXiF3WI8v/ucVjs0I2vCNuJ4BKSWAvho8G2I+gDGt X-Received: by 2002:aca:1b14:: with SMTP id b20mr4236971oib.18.1586383162432; Wed, 08 Apr 2020 14:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586383162; cv=none; d=google.com; s=arc-20160816; b=u8aroFGPKwpvlqfZb0a0d0ofdqpM8g280V/YRqkocqc3CvitL9M0rMDsNyUOWDP0Kv 21AX+k7gy2s/d2WIrOmmAHtAHydQUmGg7R+kahZoHlnRrEnyhCRIxcesRdm8RdaZbEOj 9ZXRpq4RwKl16tW6uZj1g8ZTdLH/DYizCJSFSmfJVaWOlLpWefhjt//pEP1voQB8q0wj jQi00ewaqmXUDsQcfo1IUhuErz6gZWogds599ep8cwCX1B1qj0xtEWLlCdeZ9AvFMIS5 EjGoyCBFRFUswC+cSSVek3Sz3l/6GVc6j5eP5YBHg8vk3lie/LQiHVMkp9ftIfDtLnip jdtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2d+JT616uuw1c03pzGpghimekJbPN/wjJ50Im9mue1s=; b=j4obmfe/k5hMJfYPJzKpb703L5ZKokec//yu8elFDATmLl0FbTU+r0KeczaYld+jzI V+ATulicjF3CAd8aKqSLc0+joMecKP58CGWgTIVuXE5mq3cr7rGu31xyDBSwTG65ogQj U7TiG7pM721m3a9uLpl5HwJpVqqU7GkdDnYCFzD/G/IcTUv44eP+h0NVZU3jdovi2r9Q DxsDJBCeLZdoh1QJSyWCCJIPDvBJr/IeSA59GNneKvRKMpTFtDClV2gCVdO1b/DHXxxa arAp0iNLu1LG/J0Jkl3Ez1spVfaORPbNNkfjc8xOBsZEOzCQZnvuc87n/JescLZhiBtt 55BQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si1786751oog.4.2020.04.08.14.59.10; Wed, 08 Apr 2020 14:59:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728731AbgDHVLk (ORCPT + 99 others); Wed, 8 Apr 2020 17:11:40 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57354 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730055AbgDHVLi (ORCPT ); Wed, 8 Apr 2020 17:11:38 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 0F61229748B From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, Collabora Kernel ML , matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, Chun-Kuang Hu , Daniel Vetter , David Airlie , Philipp Zabel , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 5/7] drm/mediatek: mtk_dsi: Use simple encoder Date: Wed, 8 Apr 2020 23:11:18 +0200 Message-Id: <20200408211120.1407512-6-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408211120.1407512-1-enric.balletbo@collabora.com> References: <20200408211120.1407512-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mtk_dsi driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Enric Balletbo i Serra --- drivers/gpu/drm/mediatek/mtk_dsi.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 3400d6686c85..48361c1e9f34 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "mtk_drm_ddp_comp.h" @@ -788,15 +789,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi) dsi->enabled = false; } -static void mtk_dsi_encoder_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs mtk_dsi_encoder_funcs = { - .destroy = mtk_dsi_encoder_destroy, -}; - static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi); static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi); @@ -1126,8 +1118,8 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi) { int ret; - ret = drm_encoder_init(drm, &dsi->encoder, &mtk_dsi_encoder_funcs, - DRM_MODE_ENCODER_DSI, NULL); + ret = drm_simple_encoder_init(drm, &dsi->encoder, + DRM_MODE_ENCODER_DSI); if (ret) { DRM_ERROR("Failed to encoder init to drm\n"); return ret; -- 2.25.1