Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2766115imj; Mon, 11 Feb 2019 08:09:21 -0800 (PST) X-Google-Smtp-Source: AHgI3Iaxi/7DVOiVs/LHmp9stReje7H3Xk84gekW+CI0Yxi26c9pzZsgM53i7sK/HlCPKnHbyBqN X-Received: by 2002:a17:902:50e3:: with SMTP id c32mr38279010plj.318.1549901361072; Mon, 11 Feb 2019 08:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901361; cv=none; d=google.com; s=arc-20160816; b=glaA2/2OHzeR+JQmnuZlB5HPHhFnEd6e8QDQa/gcUpbgR8rttJ35rd1DQyVhgT37ns cv4YKWICTWXoP/c9U2jARE3FDQfymSB8WhGUVWiOFlPR84SNV5qqrwH1PVgf3XbNSvs+ N5tBcs1ei0U8OqmampYS1tJY9ntNg+BaVofHBKEiYgu/A9uAIbKgnsMXbinn6iK7BC/q CMtz8dTnxE98Cz1V+nrU04KAn5OlDzCAxqpeuPBEaea4rRhZTx7M4C4m3Pv9JzKksJUk yRnmNASQmmCgOutsR5Ae5gTnwzwkXdwCohwKeNQh/c4ah9PpN3rM/aOca2ePGnNLZ2Xf LqNw== 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 :dkim-signature; bh=+2RpYKE6AoZfM2oyTIn54uYtFYA406+LkMirlxNaEtA=; b=oweXj29p++7xmM3BmYqSddy/BG9Hf/ljwJmxvP+JmUAFZz0rR+3lZvpQdLcDIGQnW3 B0F0Yqofn9xNyxwyfe5MWUh7oStVQ1xzJmv+IM0UmVKnbl8/rcpWGVWCDwMqZT9rNLa1 65GYW6e8OUGXlgSyESt+ZTNExC1xwBuPr829wzSvbaafAoUrO3oQpvuzCuJOL/9a61WB 7ypXXobvclu6L1f+IbQDiuMZqtx0cd5Di2SXnATQaqdcKQOhEolBK2xLpsabOQcHbJZS y2cxk7/LNMdfDmreH3otJC0k3kzpbJS07Dal+Jo3sRC49KBrIZRjIDDz74OVp/n5GqB/ jp5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SxlFmadz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 123si10771194pfx.109.2019.02.11.08.09.04; Mon, 11 Feb 2019 08:09:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SxlFmadz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730187AbfBKQH4 (ORCPT + 99 others); Mon, 11 Feb 2019 11:07:56 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34378 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729767AbfBKQHy (ORCPT ); Mon, 11 Feb 2019 11:07:54 -0500 Received: by mail-lf1-f68.google.com with SMTP id u21so2732393lfu.1; Mon, 11 Feb 2019 08:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+2RpYKE6AoZfM2oyTIn54uYtFYA406+LkMirlxNaEtA=; b=SxlFmadzhDsbXkYcEsiO9ATYVsq4QQejAqwKMIoZdDqDDwGobLjVslfoNG4IVbMdQ0 THpgzl27gDkyPkhD3OqTsPdSyjO0N/V4X7/1AUSvZgsWmvEonKHxkjLiyHDN5xxInP/f XaM2w3+n3r6H6aFKVXfRxIc40RTwbSajXRkK3iOBSmbgyfciOPySiHnGha5hujgQ2Bio GbAjfxLfDDYIo/Nz7vT/uaTuLyYvCPB/8A03169xr11Z8OofBfANHLWJqYn+tHJxJLCY MS0ASKgdFwm/75Cm0skwHaWErvBC53fPVpY9vt4BU1zJ4Wz3gGqyDKpHcf3JpshswPsY isvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+2RpYKE6AoZfM2oyTIn54uYtFYA406+LkMirlxNaEtA=; b=NKrRsbZIRt0d8IvLTaYNBP1ejj7KdwQGCNVStVtXMsH5TmNyrfSDPoltUY/ZOJ/dSa TWITg3OxSIIvHILQV5VwrGYnFO95GCX4ZJ1GmaTHCKcXoh3Wue7R8Csery3pezo3OVne 5LPVwdh5TyxDJiffTJG58rc7QcV6hQHfm5Txzq8eWuSAuYGgJTRl3VwjTnkVnotzSJ/p kJOtAQP1oeZyEEm2Jbe8G++rymuFgKIWQQkSZNNIAQFGVHzCiM5sSsv4urnbskVg0rhS wt5k/V6fLde7sAh6CFHNdOexGFeayzchpOsPLH5tV+g0R8s3mqpvcj+2/satqRNVa3RA VZ2Q== X-Gm-Message-State: AHQUAubYG23s04zOKg7jgEn7pW6cBIEa30D+gJrQhkEE/a1qo21qzN5O 0G4kz4rGnqBdlkQuug26qcU= X-Received: by 2002:ac2:54b4:: with SMTP id w20mr9166834lfk.24.1549901271787; Mon, 11 Feb 2019 08:07:51 -0800 (PST) Received: from acerlaptop.localnet ([2a02:a315:5445:5300:340b:b9c7:fa94:cf7]) by smtp.gmail.com with ESMTPSA id s12sm2386326lfs.37.2019.02.11.08.07.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 08:07:50 -0800 (PST) From: =?utf-8?B?UGF3ZcWC?= Chmiel To: Andrzej Hajda Cc: thierry.reding@gmail.com, mark.rutland@arm.com, devicetree@vger.kernel.org, airlied@linux.ie, linux-kernel@vger.kernel.org, krzk@kernel.org, robh+dt@kernel.org, dri-devel@lists.freedesktop.org, m.szyprowski@samsung.com Subject: Re: [PATCH v3 2/2] drm/panel: Add driver for Samsung S6E63M0 panel Date: Mon, 11 Feb 2019 17:07:49 +0100 Message-ID: <1958995.aBsZzC1X05@acerlaptop> In-Reply-To: <82ccf31e-13c3-1cd5-d87a-0c3291eb0224@samsung.com> References: <20190202142748.6830-1-pawel.mikolaj.chmiel@gmail.com> <20190202142748.6830-2-pawel.mikolaj.chmiel@gmail.com> <82ccf31e-13c3-1cd5-d87a-0c3291eb0224@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 poniedzia=C5=82ek, 11 lutego 2019 16:35:19 CET Andrzej Hajda wrote: > On 02.02.2019 15:27, Pawe=C5=82 Chmiel wrote: > > This patch adds Samsung S6E63M0 AMOLED LCD panel driver, connected over > > spi. It's based on already removed, non dt s6e63m0 driver and > > panel-samsung-ld9040. It can be found for example in some of Samsung > > Aries based phones. > > > > Signed-off-by: Pawe=C5=82 Chmiel > > Reviewed-by: Sam Ravnborg > > --- > > Changes from v2: > > - VIDEOMODE_HELPERS is not needed in Kconfig > > - Added help text to Kconfig > > - Remove unneeded videomode includes/fields > > - Add sentinel comment in s6e63m0_of_match struct > > - Handle errors during registration of backlight device. We shouldn't > > register panel if we fail to register backlight device > > - Added Reviewed-by > > > > Changes from v1: > > - Correct order of Kconfig/Makefile entry > > - Fix SPDX tag, so it matches value of MODULE_LICENSE > > - Remove inclusion of drmP.h > > - Fix code formatting > > - Use DRM_DEV_ERROR/DEBUG > > - Extract hardcoded values > > - Remove possibility to change gamma through sysfs, leaving only one > > gamma table values > > - Fix reset_gpio handling, so it'll be asserted in power_on and > > deasserted in power_off. Also do it before turning voltage on. > > - Disable backlight and enter sleep mode in disable callback. > > Previously it was done in unprepare > > - Enable display and backlight in enable callback. Previously it was > > done in prepare > > - Hardcode display timings and delays. Previously they were readed > > from device tree > > - We're using SPDX, so we don't need to have license body > > - Use MIPI_DCS_EXIT_SLEEP_MODE and MIPI_DCS_SET_DISPLAY_ON > > - Rename MAX_GAMMA_LEVEL to NUM_GAMMA_LEVELS > > - Ommit get_brightness callback > > - Use backlight_enable/disable API, like it's done in other panel > > drivers (for example panel-simple) > > - Make set_brightness called only from backlight api, like it's done > > in other panel drivers (for example panel-simple). > > - Reset gpio should be set to GPIOD_OUT_HIGH. It's declared as active > > low in device tree > > - Don't call power_off in remove callback > > --- > > drivers/gpu/drm/panel/Kconfig | 9 + > > drivers/gpu/drm/panel/Makefile | 1 + > > drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 517 ++++++++++++++++++ > > 3 files changed, 527 insertions(+) > > create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c > > > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kcon= fig > > index 3f3537719beb..45e9ab4b7857 100644 > > --- a/drivers/gpu/drm/panel/Kconfig > > +++ b/drivers/gpu/drm/panel/Kconfig > > @@ -158,6 +158,15 @@ config DRM_PANEL_SAMSUNG_S6E63J0X03 > > depends on BACKLIGHT_CLASS_DEVICE > > select VIDEOMODE_HELPERS > > =20 > > +config DRM_PANEL_SAMSUNG_S6E63M0 > > + tristate "Samsung S6E63M0 RGB/SPI panel" > > + depends on OF > > + depends on SPI > > + depends on BACKLIGHT_CLASS_DEVICE > > + help > > + Say Y here if you want to enable support for Samsung s6e63m0 > > + AMOLED LCD panel. > > + > > config DRM_PANEL_SAMSUNG_S6E8AA0 > > tristate "Samsung S6E8AA0 DSI video mode panel" > > depends on OF > > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Mak= efile > > index 4396658a7996..4507a2d253ac 100644 > > --- a/drivers/gpu/drm/panel/Makefile > > +++ b/drivers/gpu/drm/panel/Makefile > > @@ -16,6 +16,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) +=3D panel-sam= sung-ld9040.o > > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) +=3D panel-samsung-s6d16d0.o > > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) +=3D panel-samsung-s6e3ha2.o > > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) +=3D panel-samsung-s6e63j0x= 03.o > > +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) +=3D panel-samsung-s6e63m0.o > > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) +=3D panel-samsung-s6e8aa0.o > > obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) +=3D panel-seiko-43wvf1g.o > > obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) +=3D panel-sharp-lq101r1sx01= =2Eo > > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gp= u/drm/panel/panel-samsung-s6e63m0.c > > new file mode 100644 > > index 000000000000..4312aa3e4386 > > --- /dev/null > > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c > > @@ -0,0 +1,517 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * S6E63M0 AMOLED LCD drm_panel driver. > > + * > > + * Copyright (C) 2019 Pawe=C5=82 Chmiel > > + * Derived from drivers/gpu/drm/panel-samsung-ld9040.c > > + * > > + * Andrzej Hajda > > + */ > > + > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include