Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2729786imj; Mon, 11 Feb 2019 07:37:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IaoNFLJ5oJP73m3321u8zEqWCOTltTSb8hBsEODLW1OUrQVtZJuAC2W9xdbiFRKqPi4Vdve X-Received: by 2002:a63:100c:: with SMTP id f12mr33977698pgl.324.1549899472099; Mon, 11 Feb 2019 07:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899472; cv=none; d=google.com; s=arc-20160816; b=yQ2/h6dOFZBTjPtIHJlTpNfQ43ANXoSY348UsbxcWyRvBT7qeYzWZqolq0K6vs2dEN Qsw6126dy+4ZhGQv3A1ZoP7OH1aQ6GjiY03SmDYA12mPMbHlD0d6APo5Bt/PRJPHmHpM GLgH/VpssrNKS2r0rWjpKilrIbzyfINmUoF/m+rhBcNBN3kQOt7HEQaDkvguQ/TUbDH2 FomsSqFUvX+IpgT1gZ+Knzj7DpWjYEQ9g2UELBmeQ/YYx+SnJ2mPQkDtuD4MJPOmRyeg yeuxjEEQJx3b51qbjkqfxGIu2BfAUInaXspKMU9DVQMGUIOvDnD+MoVh/SPIiiIqyoHH ZC3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=9oPK8ftx0fRzln88NU3ZBp7GOHWw0ycRiIO2K8OrP9o=; b=xpo7IyuIgepVEtPG9rXYB7BuefG+vR+a8l/PAn9jYZqJIPSKBLyXGg/92XGCDYtrcb cOTC7S+cV81x2XK1aRWhGoCy5xm/ZlOwZeA4V+Mb/kEZIrjRkaexnA2hyjVnWji69/zZ zS04wRhw1CJw+9W6L+LXnLHEddf7vorPe6mcZWGVej6xtO+eKwtW1Fy7XO2msCXLdDrS XTaGbPOETD7TDLtvF7FlVrGB2XcLX1lMTA6/yScFDP08Ol6DGX28qa4cPQhdc+3AOVXM ya6sIWvVMRNObhF8eyRnVMh4cTcm8zHGOIe1oUr9HS1O6drhPOT+Uj7mNP5CYpsRQO7H 8pjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="HJe1C/KS"; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i90si11030722pli.135.2019.02.11.07.37.36; Mon, 11 Feb 2019 07:37:52 -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=@samsung.com header.s=mail20170921 header.b="HJe1C/KS"; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388534AbfBKPf0 (ORCPT + 99 others); Mon, 11 Feb 2019 10:35:26 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:46031 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730406AbfBKPfZ (ORCPT ); Mon, 11 Feb 2019 10:35:25 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190211153523euoutp02534a84278336ce9e2ae35aecaa83f855~CWTkL-km00638306383euoutp02I for ; Mon, 11 Feb 2019 15:35:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190211153523euoutp02534a84278336ce9e2ae35aecaa83f855~CWTkL-km00638306383euoutp02I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549899323; bh=9oPK8ftx0fRzln88NU3ZBp7GOHWw0ycRiIO2K8OrP9o=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=HJe1C/KSJi77ZXb81D3CEoOe18vMeHRv9fRZj7G3MHukSwSkppRyCHS8keStUH5oN LeGLAe5KShbaDtfbLygbuQ+Z62qVXWKZY8MQ/ZQx2kIH51RxZ+xBbJYN4j2mhhLS24 oRgc/sVLb6OkYvFzWd3hOv2VRMldulhI/ODIW4zg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190211153522eucas1p251d760a83bdb5b94fd2524423456f748~CWTjcdFEg3108131081eucas1p2R; Mon, 11 Feb 2019 15:35:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 5C.DB.04294.A36916C5; Mon, 11 Feb 2019 15:35:22 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190211153521eucas1p1e0fe8dabe15d0f65ac175e3cdcaa63cb~CWTimswvX0047200472eucas1p1Z; Mon, 11 Feb 2019 15:35:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190211153521eusmtrp13a5732d8f5ec7468762457f17f2c3748~CWTiX7xDn0408104081eusmtrp1i; Mon, 11 Feb 2019 15:35:21 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-48-5c61963aed34 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F1.DA.04284.936916C5; Mon, 11 Feb 2019 15:35:21 +0000 (GMT) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190211153520eusmtip2bb58db1e5c131b150d70dd1e76197422~CWTh4wDdZ2421424214eusmtip2F; Mon, 11 Feb 2019 15:35:20 +0000 (GMT) Subject: Re: [PATCH v3 2/2] drm/panel: Add driver for Samsung S6E63M0 panel To: =?UTF-8?Q?Pawe=c5=82_Chmiel?= , thierry.reding@gmail.com Cc: 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 From: Andrzej Hajda Message-ID: <82ccf31e-13c3-1cd5-d87a-0c3291eb0224@samsung.com> Date: Mon, 11 Feb 2019 16:35:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190202142748.6830-2-pawel.mikolaj.chmiel@gmail.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTYRjG/XbOzo7LyXEavppljiIM1Ar/OGpopeRKKgukMLGOelKZtzbn rZspifduprjGFMssM5R5HwSlsmnzStJFEUUkKtFZamSXlfMY+d/vfZ7n5Xsf+EhMrOc7k/FJ qaw8iUmQEEK8Tb8y5OFbzkTsqZnbRJcM9vHoqp5BPj26bCLooaEmAf1apyboZz0TArr27QiP /m4oxegbz3sE9IpOgx8QShs0DUjaqZoQSLX1BYS0/dsUXzpZZOBJS1vqkXRRuy1UEC7cH8Mm xKexci//88K4+cZ6fopegzJMjzrxbDSZVYisSaC8Qduu4RUiISmmHiMw/1Rj3LCEYKBJjXPD IoJKQy7+b0X98hPijDoEuQX9fG6YQ9Co6UGWlD0VAury25iFHahIGJ6uISwhjOpF8PD6U57F ICh3+N38nrCwiPKHkpkWvoVxaid09E+v8WbqDHSXzCMuYwd9lTNrZ1hTgZBzjzs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479nPzDsZL G4MPMQpwMCrx8FbkJ8YIsSaWFVfmHmKU4GBWEuFNmgIU4k1JrKxKLcqPLyrNSS0+xGgK9NxE ZinR5HxgIskriTc0NTS3sDQ0NzY3NrNQEuc9b1AZJSSQnliSmp2aWpBaBNPHxMEp1cAoXXI/ /bdu7M4YF0+NZvF1RXvSkh7V1d9a+u9Xe1bx9vvreS88k/rp/vzJ/pWP32l0Mjxm8xWNOTqj 3jmnqEm521Wj4OhiNccLUhHvVrL8XpXUe5bNSnZ/zJzPU2zYWsOcFBM/pS5d61RqeLDre9er hdI8ch8TNri6Boqk5kw/2ib+9t0fXy0lluKMREMt5qLiRAAc4O2X7AIAAA== X-CMS-MailID: 20190211153521eucas1p1e0fe8dabe15d0f65ac175e3cdcaa63cb X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190203153852epcas1p468a7bddbe5114856daab76a108b5a511 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190203153852epcas1p468a7bddbe5114856daab76a108b5a511 References: <20190202142748.6830-1-pawel.mikolaj.chmiel@gmail.com> <20190202142748.6830-2-pawel.mikolaj.chmiel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.02.2019 15:27, Paweł 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ł 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/Kconfig > 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 > > +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/Makefile > 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) += panel-samsung-ld9040.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o > +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o > obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o > obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/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ł Chmiel > + * Derived from drivers/gpu/drm/panel-samsung-ld9040.c > + * > + * Andrzej Hajda > + */ > + > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include