Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp781199ybz; Fri, 1 May 2020 08:25:50 -0700 (PDT) X-Google-Smtp-Source: APiQypL01Io0KHIieEfHrjWqu9asHXBjK/dqY8owp5H5ktviqutPYyRLVW3hR+9KEJRZTQ/Ca2Qd X-Received: by 2002:a05:6402:3125:: with SMTP id dd5mr4166575edb.208.1588346749979; Fri, 01 May 2020 08:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588346749; cv=none; d=google.com; s=arc-20160816; b=p3ohsbxiqkJzRlX6yTBPCX5zuw5VWXJR1mjfvDrJBIoXdHLIfIGGUggVZ1A4zrfDxL kgE7g07WUWxuny5rcDDDBDey+cD7fJO0X78hSU8KqZxr0tGKQpg1tvzZdjJODfu0YFZx 3sloZiTtNDDqkEyIPse5bnMVnp8QugF+9NFCJofP4Otuu0oGblNlYKuF9Wc+S1AV1bdo FOXTWx0USN1eswheYMVQaojlRGZcbSS14e9QOd6OBIgY46n6+nJv8IRQ0MeuyyFD1d28 MR+aDEjzTKZ019Pwc3RTCBlzsk+nxo7xEhYcjKu3k+ATO2CV5zGevaw3KLm+82ugteQS GI4A== 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=VWeZt0DpJJP4gU9zKaC94bFBywo+2c/NVKTVC57renQ=; b=ErI/bXDDOCPIAjsbDsaU9xjIj6qjLqXTx1Rux3ia6wQwrDVIVeIg4hWl0lCofUS3cY CYtUKCjuLh47mIRSCSh5K0Gxfq972A55qg2Ydn3moO9cFmh7BatxL72IVrQkhhourGRE MhW8Ns6E0T7ibAwRjxCmMBeQruIodl05wfwTIVY7kzqiDVq/mhkdFjmXdphoTunzqVKe XzGP0Ds2O1+FMuMX/z0qzD2EXLfjb4fA3M84hvyoD8y2R9MHKMBujNMreiUrYrJpb4KQ BJ6ZEDOv9mL86wKWcvp273S0U/j8MZhgz20WGrrTt5axyTHvs4RkDkLl+hu+A/4W0ow6 yp3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c22si1944263eja.230.2020.05.01.08.25.27; Fri, 01 May 2020 08:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729484AbgEAPX5 (ORCPT + 99 others); Fri, 1 May 2020 11:23:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729413AbgEAPX4 (ORCPT ); Fri, 1 May 2020 11:23:56 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B028C061A0C for ; Fri, 1 May 2020 08:23:56 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id D52482A3118 From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org, Collabora Kernel ML Cc: matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, laurent.pinchart@ideasonboard.com, Sam Ravnborg , 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 v4 5/7] drm/mediatek: mtk_dsi: Use simple encoder Date: Fri, 1 May 2020 17:23:33 +0200 Message-Id: <20200501152335.1805790-6-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200501152335.1805790-1-enric.balletbo@collabora.com> References: <20200501152335.1805790-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 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 | 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 38cbdcb15fff..e02d16a086ac 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.26.2