From patchwork Mon Jun 15 20:31:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 11606663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EAE466A2 for ; Tue, 16 Jun 2020 07:09:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D433A2082F for ; Tue, 16 Jun 2020 07:09:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D433A2082F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B98B6E7DC; Tue, 16 Jun 2020 07:09:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 098E96E505 for ; Mon, 15 Jun 2020 20:31:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 144402A2CFB From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org, Collabora Kernel ML Subject: [RESEND PATCH v4 5/7] drm/mediatek: mtk_dsi: Use simple encoder Date: Mon, 15 Jun 2020 22:31:06 +0200 Message-Id: <20200615203108.786083-6-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615203108.786083-1-enric.balletbo@collabora.com> References: <20200615203108.786083-1-enric.balletbo@collabora.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 16 Jun 2020 07:09:12 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , drinkcat@chromium.org, David Airlie , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, laurent.pinchart@ideasonboard.com, hsinyi@chromium.org, matthias.bgg@gmail.com, Sam Ravnborg , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Reviewed-by: Chun-Kuang Hu --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/mediatek/mtk_dsi.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 759a5b37fb4d2..e02d16a086ac0 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -789,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); @@ -1127,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;