Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3597136imj; Tue, 12 Feb 2019 01:12:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IaHJ3YMZl+gTiUonocbhyoJ1jeFPmDLHMTwP33y3bohcnDxtmeTj8S2e+cOEBI0RQIyL14o X-Received: by 2002:a65:488a:: with SMTP id n10mr2713574pgs.261.1549962737676; Tue, 12 Feb 2019 01:12:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549962737; cv=none; d=google.com; s=arc-20160816; b=RzNunb1fQJndvDxg3cCEETa+dFRJjE1cnsUz2oxa6IIOCrQ3f1wIetRy2bXXsqemxI dLW9t76Y8fl8QfY36rm0T5/JzcrjzJd20TDTjqtS6NVqa3maMxbYmGZ7YnKddQDGgcPF yi6peyqPWr+C6pBixNVAnTSrr5pu7ryrkYYr0oVwL4G+NPxefby+X8VvniP+mPYihWQJ t0oyhqKPOyK8OAwjiiw99azTMtcfSQp+ezTPCIsUat/F3Wqii3k9OLOSq6r8tDhPZc3D MQOQ6ZUyLCWcRdTu8WqTXKsOKHLjZ7gCsawIGQip/u5D+B2FvRgyDQzB5Zp6ncW//Vb1 bH2A== 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=aeh0xMON6rMbyDViEheoDiasDsnHeCCwuogVHf8y/Qc=; b=y1nnEB47c0fDvAh6Zpaq6hkTFhfS2Sb6OOmo3B7U85fOJaXCsZ9Iip/cWsGHXgkst8 Oy2n+Wi2FdHaa4gYFBzLJ3mvecCClxri0Ai1cCi951athqh9HUIOpRJv817sk+gcbwzC 7zbhEStlqYr7kMfCHKi1i9h4Xe66YNeFEsBlbvvUD9V8TASZYN+6w/p43MCCdizYauww L9ooPeRiWLZlfqEzKBhFHOkZPu0or+XHRIybDApeA3xlMFo4p8xJIZ6v8zFzWDmybtb5 dWn44anii76SYghgoUpAUurwX1Qem5RhOvTx1oGjSAOighNuyHFm5NqU43BDeYtCRZQT xU6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rQ0ZUDh6; 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 j10si1491136plk.238.2019.02.12.01.12.01; Tue, 12 Feb 2019 01:12:17 -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=rQ0ZUDh6; 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 S1728654AbfBLJLZ (ORCPT + 99 others); Tue, 12 Feb 2019 04:11:25 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:35933 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728289AbfBLJLY (ORCPT ); Tue, 12 Feb 2019 04:11:24 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190212091122euoutp023b5b47a88cff673d45b88a68a03450ab~CktjxrAkC2674426744euoutp02p for ; Tue, 12 Feb 2019 09:11:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190212091122euoutp023b5b47a88cff673d45b88a68a03450ab~CktjxrAkC2674426744euoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549962682; bh=aeh0xMON6rMbyDViEheoDiasDsnHeCCwuogVHf8y/Qc=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=rQ0ZUDh60JXBxetn08iNkT0ZUqxI2FzIn0dRfNEjFoAg7ab/qzHchf39sSJsGvt98 Fc0/mIozyxyUmeRJOH+6W7WR4XhbTwRaL5og2TDkhT4OUTwoF4hYJhLfe902E/8ZW9 aPYYKVObYyTFENjNEzz23Bix7MGD6IAqBbHpsDDs= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190212091121eucas1p2c4501060ad741d384e9eef858e90aead~CktjBeJcn2022920229eucas1p2Y; Tue, 12 Feb 2019 09:11:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 9E.44.04806.9BD826C5; Tue, 12 Feb 2019 09:11:21 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190212091120eucas1p28742c5997e23b7712fa72b90338a0f84~Ckth-yLZZ2022920229eucas1p2W; Tue, 12 Feb 2019 09:11:20 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190212091120eusmtrp2400449f31b05518542b3ede70cd60a02~CkthxRFYR0773307733eusmtrp2N; Tue, 12 Feb 2019 09:11:20 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-79-5c628db9296d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id FF.45.04284.7BD826C5; Tue, 12 Feb 2019 09:11:19 +0000 (GMT) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190212091119eusmtip133951ad22abe2493e773359e0a1b7569~CkthOsJPF2556625566eusmtip1-; Tue, 12 Feb 2019 09:11:19 +0000 (GMT) Subject: Re: [PATCH v3 2/2] drm/panel: Add driver for Samsung S6E63M0 panel To: =?UTF-8?Q?Pawe=c5=82_Chmiel?= 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 From: Andrzej Hajda Message-ID: <3fc37ef2-181f-6268-756f-634a4355db61@samsung.com> Date: Tue, 12 Feb 2019 10:11:17 +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: <1958995.aBsZzC1X05@acerlaptop> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01Se0hTcRjtt7vd3Y0m16n4YS8aZGW+wogbiliELJOI8I+ykV3zopJT2VVT E5LM12pWQxSnqTTFMEvz2cxMfDSlfKVWlqLBLFS0wtTMrLZdJf875zvnexz4CEzaJXAiIqPj GFU0HSXDxfzGlyt9bgZNqMLzRhlBafp6eFRJZ5+AGl78ilP9/TVCaqi5CKcedY4LqfJ3gzzq pzEHo9KfdwqpleZivp9YXlVcheQG3bhQXluZjcubliYF8ombRp48p74SyRdqd54WBot9wpio yARG5eF7URxR0ZuBx2pbUOKA+kAqas5FaiQigDwECx2vcTUSE1LyAYK0tOV18gPB6rNRHkcW EDwx1fM2WsoLhtZdFQha9IWII3MIcttnBRaXHXkSivLuYhZsTx4DTcMMZjFhpAnByK0BvkXA yf2wVjeKW7CE9IXRpo9CC+aTe6DthdbqcSDPQodmHnEeW+gpMFnrItIVxrInrMswchekNRRi HHaED6YS691AvhVC1dy0uZkwk+OQvubHRbCDGWO9kMPb4a+hZD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KMEG9KYmVValF+fFFpTmrxIUZToOcm MkuJJucDE0leSbyhqaG5haWhubG5sZmFkjjveYPKKCGB9MSS1OzU1ILUIpg+Jg5OqQbGhv4o zdBMubyHdRvrp3xKr9i1xVpjmzY/a41dScCFFIFDHrzdSyUK5bTVb9x+e2L1YYXndpb2JTLP Z4raVJy9JeMcHzrJ/MxH24UZVy8xxds8MVX/nZiinBL61YJ/ddzaP1Mqd25NN3hwxFng5OdF K/Z+Lor8fzrSYK6RaswJnsdWa65o/dBTYinOSDTUYi4qTgQAzCBZLOwCAAA= X-CMS-MailID: 20190212091120eucas1p28742c5997e23b7712fa72b90338a0f84 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190211160813epcas4p32d0309c86ee5716a278522fbd4363d16 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190211160813epcas4p32d0309c86ee5716a278522fbd4363d16 References: <20190202142748.6830-1-pawel.mikolaj.chmiel@gmail.com> <20190202142748.6830-2-pawel.mikolaj.chmiel@gmail.com> <82ccf31e-13c3-1cd5-d87a-0c3291eb0224@samsung.com> <1958995.aBsZzC1X05@acerlaptop> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.02.2019 17:07, Paweł Chmiel wrote: > On poniedziałek, 11 lutego 2019 16:35:19 CET Andrzej Hajda wrote: >> 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