Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3413270ybt; Sat, 4 Jul 2020 16:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKTnQtn8FBGAPJm/dprAFDi2TSvP0DXbBLcO6DV6EyZ45IXdKliCnrBlFjZd/s9Ek4IzdH X-Received: by 2002:a50:d0cc:: with SMTP id g12mr48767292edf.57.1593906323790; Sat, 04 Jul 2020 16:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593906323; cv=none; d=google.com; s=arc-20160816; b=PdivnJT3luveU82PY1A7fdlIklCgmpshtMTPHzaKQUSm3HWxDyw0AzlDZecbI9Ax8E Xo/ACMGZwc1DAfBskYHA0nFLq83QTFTQXX3trvJQVuWcT6uzpMMSqJYXiirCpzvAiaK0 Gp51elWfAvWuAriKb76Wa2WFGISmIAIrh/LO2QSduKX3GZq4QGVZKNPXpFl5rBG8vf2t ec1FZXT3FIi54+/REWYRQWBYgV75wIyzlQU5aiCKMnG3y1YXrvi89mUuEmlGB4X6+lJl V/STMvZR0pMY3SzffEW5D/B4OhxVIEmZ2P5XcOJZM7zf8rY20PZc6MrebdY6sV1OCQeu QPDQ== 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=TsP/dJ/i4Hvx2XJSQ8AlItX3AYrkG0VZkHFO+F/z3ow=; b=RAl45xEmul15d+QWKJKn0WamJ6WsKrRP5DQ9tp8nfgweVuZPu5qkYKePtd1z3H980Q LZCgS4DnvQNdUclJw1jf+QRQxV/mRhYJG3JNu/jns36sRne5+Doil2Jjl8nvU9936Lzd 2yOaRbl1cUMYlxvr5ktfbP+ZOVgBXdZ4uB27c9IF4RFCtrBh6FK+CA7MaUbmnp1f07KU c3u6HVWzmVLyP0yn2xuTk0riQLeyfBfC1WCtyoL3OJSvHACy3+u0zydCPGH+g4XZsChS QEf28luFPvDBKM71a6QoBfQOwZpW3/59Rph2IIbNMJwCpBz9o+WO1ch5KBj+wqi5h428 TWGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XOTnF7WF; 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 r24si1361474edx.94.2020.07.04.16.45.01; Sat, 04 Jul 2020 16:45:23 -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=XOTnF7WF; 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 S1728080AbgGDXml (ORCPT + 99 others); Sat, 4 Jul 2020 19:42:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:46698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727994AbgGDXmk (ORCPT ); Sat, 4 Jul 2020 19:42:40 -0400 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 CC9A8214D8 for ; Sat, 4 Jul 2020 23:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593906160; bh=tKeXckq/cljxhi5PiM5Dr9pzZi/BIbGaNVQdbwe/LTw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XOTnF7WFbN+I3+4XbpNUfQdU9F2XN8kWx2sQS96lM0g+xtAJffleOtqFCHmgYwUyw 8mmAP1WBG857Srm8CXxA6AQXXLRl+bAa+Cek+IuM9wmJz8JvEUGQYHKSM7KUshNJ6j N4X77ofJAoIvqifk6YTo2zEE5epKUYsfe2G1PyoQ= Received: by mail-ej1-f43.google.com with SMTP id l12so38573413ejn.10 for ; Sat, 04 Jul 2020 16:42:39 -0700 (PDT) X-Gm-Message-State: AOAM5329FZkoD2Q2iXju9aH4uWhYAtWvmKpziyN7/OxOw+yXEMHTzHCg IFG0U995wqN2JTqgbWZ3AANCtHZs3xP7d9FvyA== X-Received: by 2002:a17:906:1e83:: with SMTP id e3mr23048914ejj.7.1593906158358; Sat, 04 Jul 2020 16:42:38 -0700 (PDT) MIME-Version: 1.0 References: <20200615203108.786083-1-enric.balletbo@collabora.com> <20200615203108.786083-6-enric.balletbo@collabora.com> In-Reply-To: <20200615203108.786083-6-enric.balletbo@collabora.com> From: Chun-Kuang Hu Date: Sun, 5 Jul 2020 07:42:27 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RESEND PATCH v4 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 , Sam Ravnborg , 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= =B46=E6=9C=8816=E6=97=A5 =E9=80=B1=E4=BA=8C =E4=B8=8A=E5=8D=884:31=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. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/= log/?h=3Dmediatek-drm-next Regards, Chun-Kuang. > > 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/mediate= k/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 *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); > > @@ -1127,8 +1118,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.27.0 >