Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp703466ybj; Tue, 5 May 2020 06:31:18 -0700 (PDT) X-Google-Smtp-Source: APiQypLapOpPTC7mHHusyuo/kBPrOKOSPPjxp9ISMTyScNaILV7Ri0zRAEffubnVhfgeB+z6nU3O X-Received: by 2002:a17:906:4810:: with SMTP id w16mr2660842ejq.226.1588685478002; Tue, 05 May 2020 06:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588685477; cv=none; d=google.com; s=arc-20160816; b=aEUhy4bEMAEsvIv17UfVYDqFKrNEAcWmqBNdB1h3OWeklEYoH1TqZE8Mn7Sbopnybz MjZ8NSoEb+f0KrN/hDWnxdYy7Ni5NwCIXA6lYqnLd1O3orJPj2ESoqxNRtCqPB5QS4Gk a5dr6/08r27cfHBCtHiyjxUZOw0bYgSaq2n5et5gtriPBzG8AG99BLKgS2fiyR8bF06m sets0A4CTGjoTxNaG+QUFVcqYeZLUhLtedrgo9qo7S6Vv55+J9uZJei1HidMo7qeJWMB IKnQv9p2f4r0gQHCNBqQ41P6t/poa6nMVKHUZSdy5iMnkdC6xGl2ae43MVXPCZdleSrl I/5Q== 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=Q9paV4CQlZEOESyMGv/+LudumOuUG7c3551gs3VRnxY=; b=P1vZykETo7otS5nztJCOl+IMtNLibV9BdKLT+etv9Q0vYhGjGEPB0sXv6G3vE8L7vw vG72trUfB6nhGOv2j47C2oOTDrxSgT9CUJakXXqCtaPlFzm4QOOSh6SPVJBAhGmxvKnl vEC03pG1xQnjmWrDgR0TT+L0kBvT8TFO0qYD/DawJGHQ4/4DmZQoB6xfItxWkowD7D5Y WKA0jNqrm0Ju0CYx8i7sHF+IL7i+Y0nbWjNk7BGxoiXji59cyKQ+pXKM1+0VBKxUljPX xf9MiN7bD2i8lJjny3DsZJ9EU7Hsi9FL+oupnkgkZBnL/aozlZFesSZR0/XUhYAr50MJ KLTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Jl6xMq65; 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 bq5si1157328ejb.356.2020.05.05.06.30.54; Tue, 05 May 2020 06:31:17 -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=Jl6xMq65; 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 S1729062AbgEEN0U (ORCPT + 99 others); Tue, 5 May 2020 09:26:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:41984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729000AbgEEN0T (ORCPT ); Tue, 5 May 2020 09:26:19 -0400 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 CF83E21775 for ; Tue, 5 May 2020 13:26:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588685179; bh=Cg3Aww/DWiRcPHXAAcy63wB+BBaJMxE4W5SjVqI52xM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Jl6xMq65m2X3WEe5EWx7+ejjvCPFF50UyIRkX3tbpEfiDyIj1915/uLUMrzdtJfaw 6iqUX04UY73+GzpazFnWSkIkB5sok0LeDe9adoCvV8vdgJ9jAbOWhaT/RPnEuGXDM0 FaX+THGQl4IkBFpR2xkMR512gckbveC1akdYSSOE= Received: by mail-ej1-f42.google.com with SMTP id rh22so1621998ejb.12 for ; Tue, 05 May 2020 06:26:18 -0700 (PDT) X-Gm-Message-State: AGi0PubsTDV9T/1n6pfzHTw4oXnKtjerOLR8xHjeAOGcs9CIeeU+wrWy mRb1ZyDjSa+2Nq222co79XPRNSRx54pYmfPUpA== X-Received: by 2002:a17:906:2ad4:: with SMTP id m20mr2786571eje.324.1588685177209; Tue, 05 May 2020 06:26:17 -0700 (PDT) MIME-Version: 1.0 References: <20200504141408.60877-1-enric.balletbo@collabora.com> <20200504141408.60877-4-enric.balletbo@collabora.com> In-Reply-To: <20200504141408.60877-4-enric.balletbo@collabora.com> From: Chun-Kuang Hu Date: Tue, 5 May 2020 21:26:03 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] drm/mediatek: mtk_dpi: 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= =B45=E6=9C=884=E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=8810:14=E5=AF=AB= =E9=81=93=EF=BC=9A > > The mtk_dpi 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 > --- > > drivers/gpu/drm/mediatek/mtk_dpi.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediate= k/mtk_dpi.c > index baad198c69eb..80778b2aac2a 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include "mtk_dpi_regs.h" > #include "mtk_drm_ddp_comp.h" > @@ -510,15 +511,6 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *= dpi, > return 0; > } > > -static void mtk_dpi_encoder_destroy(struct drm_encoder *encoder) > -{ > - drm_encoder_cleanup(encoder); > -} > - > -static const struct drm_encoder_funcs mtk_dpi_encoder_funcs =3D { > - .destroy =3D mtk_dpi_encoder_destroy, > -}; > - > static int mtk_dpi_bridge_attach(struct drm_bridge *bridge, > enum drm_bridge_attach_flags flags) > { > @@ -591,8 +583,8 @@ static int mtk_dpi_bind(struct device *dev, struct de= vice *master, void *data) > return ret; > } > > - ret =3D drm_encoder_init(drm_dev, &dpi->encoder, &mtk_dpi_encoder= _funcs, > - DRM_MODE_ENCODER_TMDS, NULL); > + ret =3D drm_simple_encoder_init(drm_dev, &dpi->encoder, > + DRM_MODE_ENCODER_TMDS); > if (ret) { > dev_err(dev, "Failed to initialize decoder: %d\n", ret); > goto err_unregister; > -- > 2.26.2 >