Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4448048ybz; Tue, 28 Apr 2020 11:28:18 -0700 (PDT) X-Google-Smtp-Source: APiQypJqpRb/RU9we/Dvq92oGd9sDFqirwCj4ZZywvPnLh3S/3V5blwiXpE/AJMmxiNe0M47YvFq X-Received: by 2002:a17:906:804a:: with SMTP id x10mr26986464ejw.86.1588098498087; Tue, 28 Apr 2020 11:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588098498; cv=none; d=google.com; s=arc-20160816; b=eCHFpifHdoYwT5OsCQiGj0LtElh95NQdQTuJ9piERw7aG2lPl0hSJh8wBeQFrFbIc1 uOmjeJwGgOYmBXIwfqjE40Z1PK+mI8ahQ7N9Waqr+44C45cEN6vBwzu9CtNdXMMRbV0p DFQY/DfYiFuBCdstCvmLltSglzgdZOrMR2qoePPjupBraepjSL9LcBeyVSVfkwXZkX4i pNsN6UgBS7TcSz04uFZsutiMZWQuRh9r4FeFyWjJN6uA0/UEEIc2heMzOC9Dz2H7Yy6N 5SuW0YlM/dOcmBDZiN8SWichXueUoNNZZhuVi9yHUTVYI3Slzi3zaQkQY0TZ1mJjLmgE Lj5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yapWDRx779ckSqgMIBMBGv/AtSqd2oJJ7veQfIYkrpA=; b=zxGnNa/DmGhgTYA2XxEjlWf69yg13XRj/bXtDt5S+IZr/nLRKvDvXNBEtYrIBKHD0+ 02SRljHOed1OMxqvDOliJBPcGyaFJozoi0wmgO8M3xrSAEeLPsNGKhq0W8bAFPX7rY6s kTAZ1DTjVhowndwgVld5zZegEtfXgQWIAN/0FGOSbIIN4zWjLD1RDxVfDLy0SLAymeBi zBIet8zAUydl7B2dqt5Gi+YJmMF4BVyqrpyOJ8zYpYgaaIKXKYVb/n1oXS+3c4CCLKoq uzUqZAw4OH+B4nQYViVRwU3zVlY75Dwdn4WeaqwkVt0IB/dkgLKja2ICpOZBHapqjhpW qLFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=fzhkcsVy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si2035430edv.284.2020.04.28.11.27.54; Tue, 28 Apr 2020 11:28:18 -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=@ffwll.ch header.s=google header.b=fzhkcsVy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728619AbgD1SYF (ORCPT + 99 others); Tue, 28 Apr 2020 14:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728601AbgD1SYF (ORCPT ); Tue, 28 Apr 2020 14:24:05 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 089BCC03C1AB for ; Tue, 28 Apr 2020 11:24:05 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id g14so34313577otg.10 for ; Tue, 28 Apr 2020 11:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yapWDRx779ckSqgMIBMBGv/AtSqd2oJJ7veQfIYkrpA=; b=fzhkcsVyFYwn/xj8vpcoKjatIROfg/YWy63jL+Yo+54fIKo7t2wcC8KjjZRfKvPrDZ i4DBNwDRZQfmXoSFW8gqnAcK34PWN14OM7olRcUUeQMCrUgj7l3BlPLvNjVSmJWV+gQH Zr1QUGdskDilzcldfqHbHA94dcjMCzeqGt9TI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yapWDRx779ckSqgMIBMBGv/AtSqd2oJJ7veQfIYkrpA=; b=bYjqvtVnMPUHq8AECMZZuSZfIbHdiCF5woiaN6tBu3gAADm7zZsGTfTZhl50W0q2Pq 1JIgDeoef366Pw3JIkVdUP/lOVT6babzwhJX/+cHoM3y73y62zeKS3Rb0C00Zcouw8XG VHYdtOcUFaGVvuaQcEeLZddABjyjsBcj2FW69czjQNGIgh0Lfu04G2TkwbD8QpQctPdW EoytjAO/QwqJGVYVAqA2/AV0Jq0teiiveeGhGVjChRS5pcyzWziuQUAFT9xsAyRGnKxP bwlTiQ85mGkmsRRIFB+3ymHzI4wCpZpHUyi3LkLex7XlU+JZPis3iMdfcHQM7BdwZjSj GBgg== X-Gm-Message-State: AGi0PuZ9pE6lBjlKoZwp/2tx1uQmix4gVv5ZLkeZB6hellCYlwcSwTli t/Gql1YPYoUOPYrxA8xVr9eCnUU6BorSDXMVR9zW+Q== X-Received: by 2002:a05:6830:1d0:: with SMTP id r16mr22640365ota.303.1588098243967; Tue, 28 Apr 2020 11:24:03 -0700 (PDT) MIME-Version: 1.0 References: <1587975709-2092-1-git-send-email-gareth.williams.jx@renesas.com> <1587975709-2092-2-git-send-email-gareth.williams.jx@renesas.com> <20200428181845.GD27234@ravnborg.org> In-Reply-To: <20200428181845.GD27234@ravnborg.org> From: Daniel Vetter Date: Tue, 28 Apr 2020 20:23:52 +0200 Message-ID: Subject: Re: [PATCH 1/3] drm/db9000: Add Digital Blocks DB9000 LCD Controller To: Sam Ravnborg Cc: Gareth Williams , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Phil Edworthy , Linux Kernel Mailing List , dri-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 8:18 PM Sam Ravnborg wrote: > > Hi Gareth. > > On Mon, Apr 27, 2020 at 09:21:47AM +0100, Gareth Williams wrote: > > Add DRM support for the Digital Blocks DB9000 LCD Controller > > with the Renesas RZ/N1 specific changes. > > > > Signed-off-by: Gareth Williams > > --- > > drivers/gpu/drm/Kconfig | 2 + > > drivers/gpu/drm/Makefile | 1 + > > drivers/gpu/drm/digital-blocks/Kconfig | 13 + > > drivers/gpu/drm/digital-blocks/Makefile | 3 + > > drivers/gpu/drm/digital-blocks/db9000-du.c | 953 +++++++++++++++++++++++++++++ > > drivers/gpu/drm/digital-blocks/db9000-du.h | 192 ++++++ > > 6 files changed, 1164 insertions(+) > > create mode 100644 drivers/gpu/drm/digital-blocks/Kconfig > > create mode 100644 drivers/gpu/drm/digital-blocks/Makefile > > create mode 100644 drivers/gpu/drm/digital-blocks/db9000-du.c > > create mode 100644 drivers/gpu/drm/digital-blocks/db9000-du.h > > The general impression is a well written driver. > It looks like it was wrtten some tiem ago and thus fail to take full > benefit from the improvements impemented the last year or so. > > The driver has a size so it is a candidate to belong in the tiny/ > directory. > If you do not see any other DRM drivers for digital-blocks or that this > driver should be extended, then please consider a move to tiny/ > > If you do so embed the header file in the .c file so it is a single file > driver. > > Other general comments: > The driver looks like a one plane - one crtc - one encoder driver. > Please use drm_simple - or explain why you cannot use drm_simple. > > For the encoder use drm_simple_encoder_init > > A small intro to the driver would be good. > For example that is includes a pwm etc. One more since I just landed my series: Please use devm_drm_dev_alloc. There's a ton of examples now in-tree. -Daniel > > I provided a mix of diverse comments in the following. > > Looks forward for the next revision! > > Sam > > > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > > index 3c88420..159832d 100644 > > --- a/drivers/gpu/drm/Kconfig > > +++ b/drivers/gpu/drm/Kconfig > > @@ -280,6 +280,8 @@ source "drivers/gpu/drm/mgag200/Kconfig" > > > > source "drivers/gpu/drm/cirrus/Kconfig" > > > > +source "drivers/gpu/drm/digital-blocks/Kconfig" > > + > > source "drivers/gpu/drm/armada/Kconfig" > > > > source "drivers/gpu/drm/atmel-hlcdc/Kconfig" > > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile > > index 9f0d2ee..f525807 100644 > > --- a/drivers/gpu/drm/Makefile > > +++ b/drivers/gpu/drm/Makefile > > @@ -72,6 +72,7 @@ obj-$(CONFIG_DRM_MGAG200) += mgag200/ > > obj-$(CONFIG_DRM_V3D) += v3d/ > > obj-$(CONFIG_DRM_VC4) += vc4/ > > obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/ > > +obj-$(CONFIG_DRM_DB9000) += digital-blocks/ > > obj-$(CONFIG_DRM_SIS) += sis/ > > obj-$(CONFIG_DRM_SAVAGE)+= savage/ > > obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ > > diff --git a/drivers/gpu/drm/digital-blocks/Kconfig b/drivers/gpu/drm/digital-blocks/Kconfig > > new file mode 100644 > > index 0000000..436a7c0 > > --- /dev/null > > +++ b/drivers/gpu/drm/digital-blocks/Kconfig > > @@ -0,0 +1,13 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +config DRM_DB9000 > > + bool "DRM Support for DB9000 LCD Controller" > > + depends on DRM && (ARCH_MULTIPLATFORM || COMPILE_TEST) > > + select DRM_KMS_HELPER > > + select DRM_GEM_CMA_HELPER > > + select DRM_KMS_CMA_HELPER > > + select DRM_PANEL_BRIDGE > > + select VIDEOMODE_HELPERS > > + select FB_PROVIDE_GET_FB_UNMAPPED_AREA if FB > > + > > + help > > + Enable DRM support for the DB9000 LCD controller. > > diff --git a/drivers/gpu/drm/digital-blocks/Makefile b/drivers/gpu/drm/digital-blocks/Makefile > > new file mode 100644 > > index 0000000..9f78492 > > --- /dev/null > > +++ b/drivers/gpu/drm/digital-blocks/Makefile > > @@ -0,0 +1,3 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > + > > +obj-$(CONFIG_DRM_DB9000) += db9000-du.o > > diff --git a/drivers/gpu/drm/digital-blocks/db9000-du.c b/drivers/gpu/drm/digital-blocks/db9000-du.c > > new file mode 100644 > > index 0000000..d84d446 > > --- /dev/null > > +++ b/drivers/gpu/drm/digital-blocks/db9000-du.c > > @@ -0,0 +1,953 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* Copyright (C) 2019 Renesas Electronics Europe Ltd. > 2020? > > > + * > > + * Author: Gareth Williams > > + * > > + * Based on ltdc.c > > + * Copyright (C) STMicroelectronics SA 2017 > > + * > > + * Authors: Philippe Cornu > > + * Yannick Fertre > > + * Fabien Dessenne > > + * Mickael Reulier > > + */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include