Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp664558ybz; Fri, 1 May 2020 06:26:43 -0700 (PDT) X-Google-Smtp-Source: APiQypLsFwrXG+XjTh/OcQ/0NdB48Pq86eA2rm4c/R7J8XoylJ7kz7BuoCMlHIS3r4fVXghHBdLr X-Received: by 2002:aa7:cb43:: with SMTP id w3mr3417242edt.95.1588339603017; Fri, 01 May 2020 06:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588339603; cv=none; d=google.com; s=arc-20160816; b=FYZ6f1YgGJL2Ti0AY0+Vo3oxjX8DfExOSYjUOYBfjCW/LZG1GYdnvJ9WSct6DktCHU ZP5CgHCODM9tSfiAvnQ6FhufW9LoBq31tKIt0UjqfWo1lCe3igZCMjU2eL30k27YgWp3 KJvRA/qMy80YPmxjrYgdJQMvK2BTBkQPSh+A/ZN1YiJZ29jFpeOWla60EHdqNEze+jE7 QxQYIW0DMijky0wFBostoHdT9eWs/qFM9KZbtEBpv37Kye07el+nDhPYMAuB22KfHiVG FCfNHTga++o86mbvJUPU76jEZcXP3y8FkEyZJRZxp4cFrynyiFMxkBDzgyu1CbNmpNFg bXCA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7nEH635zKOiLwyVwLF29Qr+498fVk+mMnlcsVRo0uzE=; b=jH8SBsCekCUMEa0Jolm91hKhJ8opHdWe4qvPWr/DDr6Wi6ZXgYByGK4e87Scod+Drh hoVKVN0AFIOnBEDz8j4W/Hs2qUy8FkyRSXXwLy+3NCNw/gsb+XqJHPsqEDvNbFfrx5US 3SI/V+Tfo3uZd2WmA6eXfp8qRpEEK8mTTJplk2WYmXEA+JeQ4vILu/60HUqYlFMF/jCN EqI37NLiyWCGcAXMtprjOW3shULVKkR2gJD/aPvDFaYe4eSLv9u1V0tVxbsM6RCOO1c1 wvPZvfcGhr0ZFIiUGt6qcCwra4GoRUeNZmA3HV/n2wB1My6BYfrCEKp9quy/jpuiWv/D 7WWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oRiwD0Q+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si1754423eds.496.2020.05.01.06.26.20; Fri, 01 May 2020 06:26:42 -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; dkim=pass header.i=@kernel.org header.s=default header.b=oRiwD0Q+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728896AbgEANYw (ORCPT + 99 others); Fri, 1 May 2020 09:24:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:45214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728586AbgEANYu (ORCPT ); Fri, 1 May 2020 09:24:50 -0400 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8FBB924962 for ; Fri, 1 May 2020 13:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588339489; bh=d8OPxjX6yuJbdOTlfUXM7Zvc614YcSXkktA7q5/FxRY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oRiwD0Q+jvvpP6sMUM7uXKK++I/eOZnt6Ikrp6rtJBAPD/6vZl/OFq4Uxzqg573dr HXTT0bMxoz2GibxZPq00kqvlqfP1GYpMyc+LbA3Tf2Ofs9mJFJf4NsfNvEueN0i/ZY ldEXuawf8h0p2ODo+BCBInJ2O4GxSh/bcIMpNLxQ= Received: by mail-ed1-f48.google.com with SMTP id d16so7243606edq.7 for ; Fri, 01 May 2020 06:24:49 -0700 (PDT) X-Gm-Message-State: AGi0PuasxmQsQBR9LCu9jSA8Z5VWB85Yu4U60lUafAeVWEGt3KMD0npZ fN+Y0kwW/oPsCyfLXXnTYIe/KIPcuglQCbYD+g== X-Received: by 2002:aa7:dd95:: with SMTP id g21mr3461314edv.148.1588339487975; Fri, 01 May 2020 06:24:47 -0700 (PDT) MIME-Version: 1.0 References: <20200417150614.2631786-1-enric.balletbo@collabora.com> <20200417150614.2631786-6-enric.balletbo@collabora.com> In-Reply-To: <20200417150614.2631786-6-enric.balletbo@collabora.com> From: Chun-Kuang Hu Date: Fri, 1 May 2020 21:24:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 5/7] drm/mediatek: mtk_dsi: Use simple encoder To: Enric Balletbo i Serra Cc: linux-kernel , Collabora Kernel ML , Matthias Brugger , Nicolas Boichat , Hsin-Yi Wang , Laurent Pinchart , Chun-Kuang Hu , Daniel Vetter , David Airlie , Philipp Zabel , DRI Development , Linux ARM , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Enric: Enric Balletbo i Serra =E6=96=BC 2020=E5=B9= =B44=E6=9C=8817=E6=97=A5 =E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=8811:06=E5=AF= =AB=E9=81=93=EF=BC=9A > > The mtk_dsi driver uses an empty implementation for its encoder. Replace > the code with the generic simple encoder. Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Enric Balletbo i Serra > Reviewed-by: Laurent Pinchart > --- > > 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/mediate= k/mtk_dsi.c > index 869ae0a2e9f8..d68694ff00dc 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 *d= si) > dsi->enabled =3D 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 =3D { > - .destroy =3D mtk_dsi_encoder_destroy, > -}; > - > static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_ds= i *dsi); > static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi); > > @@ -1140,8 +1132,8 @@ static int mtk_dsi_encoder_init(struct drm_device *= drm, struct mtk_dsi *dsi) > { > int ret; > > - ret =3D drm_encoder_init(drm, &dsi->encoder, &mtk_dsi_encoder_fun= cs, > - DRM_MODE_ENCODER_DSI, NULL); > + ret =3D 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 >