From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034734AbdAJBQA (ORCPT ); Mon, 9 Jan 2017 20:16:00 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:48722 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965774AbdAJBP4 (ORCPT ); Mon, 9 Jan 2017 20:15:56 -0500 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: b6c32a2c-f79bc6d000003a68-57-587435c9b3ff Content-transfer-encoding: 8BIT Message-id: <587435C8.2040901@samsung.com> Date: Tue, 10 Jan 2017 10:15:52 +0900 From: Inki Dae User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Andrzej Hajda , Andi Shyti Cc: Hoegeun Kwon , robh@kernel.org, thierry.reding@gmail.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, cw00.choi@samsung.com, jh80.chung@samsung.com, Donghwa Lee , Hyungwon Hwang Subject: Re: [PATCH v7 3/4] drm/panel: Add support for S6E3HA2 panel driver on TM2 board In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBJsWRmVeSWpSXmKPExsWy7bCmpu5J05IIg75OEYtb686xWvSeO8lk sf3IM1aL61+es1rMPwIUu37ezuLK1/dsFu+Xd7FZLJ3Rx2px41cbq0X/49fMFufPb2C3uLxr DpvFjPP7mCz+79nBbvFz1zwWBwGPnbPusntsWtXJ5rH92wNWj/vdx5k8+rasYvT4vEkugC0q 1SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH6G4lhbLE nFKgUEBicbGSvp1NUX5pSapCRn5xia1StKGhkZ6hgbmekZGRnolxrJWRKVBJQmpG44t3r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pdAQN10LJYW8xNxUW6UIXd+QICWFssScUiDPyAANODgHuAcr 6dsluGU0vnjHWrBIo2Lf9e2MDYynFboYOTkkBEwk7sz8xQhhi0lcuLeerYuRi0NIYBajxNUH F5hBErwCghI/Jt9j6WLk4GAWkJc4cikbwlSXmDIlF6L8AaPEgk2f2UHivAJaEhuPpIJ0sgio SjQdbmYHsdmA7Ikr7rOBlIgKREh0n6gECYsI+Eg0nn/CAjKGWWACs8SK769ZQWqEBaIk3l6P AqkREpjAIvHomSOIzSlgL/Hz2wb2CYxAJyLcNgvhtlkIty1gZF7FKJFakFxQnJSea5SXWq5X nJhbXJqXrpecn7uJERy7z6R3MB7e5X6IUYCDUYmHN2JCcYQQa2JZcWXuIUYJDmYlEd5kg5II Id6UxMqq1KL8+KLSnNTiQ4ymQN9NZJYSTc4HppW8knhDE3MTc2MDC3NLSxMjJXHextnPwoUE 0hNLUrNTUwtSi2D6mDg4pRoYO1LYTLrFCz95ZHyO0eTjdw54VhER5PXRODXQ5KMj4xHvaYtv N6tt4ZqaGjj5uO0KtYP6b36KfrzDv1+MLY/BdqqxhM7FbDuukksnxC+2v3Jc9zOmJv1ryyLH EIk5KY7OkZHvWR+rv2iS2KIWwZrCW/sj4qxdd8ClZjnT/j97n77+8ZGTVVCJpTgj0VCLuag4 EQCUF8Eb8wIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170110011553epcas5p101f6ec0a05d58ab407e2f1144f920706 X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?64yA7J246riwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbUzUo7LGF7J6EKS/ssYXsnoQ=?= X-Global-Sender: =?UTF-8?B?SW5raSBEYWUbVGl6ZW4gUGxhdGZvcm0gTGFiLhtTYW1zdW5n?= =?UTF-8?B?IEVsZWN0cm9uaWNzG1M1L1NlbmlvciBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170105102012epcas1p4ddeb577ea84b5c2cdf7029666b2091c1 X-RootMTR: 20170105102012epcas1p4ddeb577ea84b5c2cdf7029666b2091c1 References: <1483611609-23522-1-git-send-email-hoegeun.kwon@samsung.com> <1483611609-23522-4-git-send-email-hoegeun.kwon@samsung.com> <20170106052239.5prkyj3v4x4qcc46@gangnam.samsung> <586F2BF3.8080400@samsung.com> <20170106081806.h4y7o57kjbibau6l@gangnam.samsung> <586F5728.1010800@samsung.com> <5df95abe-0d5d-0c48-2840-5996260201de@samsung.com> <587355B8.2050701@samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017년 01월 09일 18:53에 Andrzej Hajda 이(가) 쓴 글: > On 09.01.2017 10:19, Inki Dae wrote: >> >> 2017년 01월 09일 16:37에 Andrzej Hajda 이(가) 쓴 글: >>> On 06.01.2017 09:36, Inki Dae wrote: >>>> 2017년 01월 06일 17:18에 Andi Shyti 이(가) 쓴 글: >>>>> Hi Inki, >>>>> >>>>> Thanks for the reply, but... >>>>> >>>>>>>> +static const struct drm_display_mode default_mode = { >>>>>>>> + .clock = 222372, >>>>>>>> + .hdisplay = 1440, >>>>>>>> + .hsync_start = 1440 + 1, >>>>>>>> + .hsync_end = 1440 + 1 + 1, >>>>>>>> + .htotal = 1440 + 1 + 1 + 1, >>>>>>>> + .vdisplay = 2560, >>>>>>>> + .vsync_start = 2560 + 1, >>>>>>>> + .vsync_end = 2560 + 1 + 1, >>>>>>>> + .vtotal = 2560 + 1 + 1 + 15, >>>>>>>> + .vrefresh = 60, >>>>>>>> + .flags = 0, >>>>>>>> +}; >>>>>>> how is this working with tm2e? Are these values valid for both >>>>>>> the boards? >>>>>> We don't need to consider tm2e board with two reasones, >>>>>> 1. there is no tm2e board support in mainline >>>>>> 2. the panel on tm2 would be a little bit different from one on tm2e >>>>> ... this display in the Tizen Kernel is supported by both: >>>>> tm2 [1] and tm2e [2]. The only differences are: >>>> Why tm2e dts file is in mainline? Seems communication miss with Chanwoo. :( >>>> >>>>> TM2: >>>>> clock-frequency = <14874444>; >>>>> hactive = <1440>; >>>>> >>>>> TM2E: >>>>> clock-frequency = <16523724>; >>>>> hactive = <1600>; >>>>> >>>>> I don't know much about the differences you mention in point 2, >>>>> but it's a pity to drop support only because we don't want to put >>>>> in the dts the 'hactive', and 'clock-frequency' properties. >>>> Anyway, tm2e board is already in mainline so Panel driver may need to identify what kinds of panel is probed to decide porch values. I think there are relevant registers in MCU of the Panel device to check version or similar thing. >>> I think we can safely use different compatible string for tm2e - it uses >>> different display IC controller - s6e3hf2, driver will provide timings >>> based on it. >> Using compatable string wouldn't be a good idea because Panel is a device not specific to board. > > But both panels are different devices: > TM2 has: AMS567DJ01 panel on S6E3HA2 interface (called LDI/IC) > TM2E has AMB559DE01 panel on S6E3HF2 interface (called LDI/IC) > > Why assigning different compatibles to different devices is not a good idea? Oops, I didn't know that these two panels are different so I thought using different compatiable string for same panel device is not good idea. This panel driver is no problem as-is. For tm2e board, it can be considered with a separated patch later. For this, these two boards have different MCU modules but just a little bit different so we could do either just adding compatible string to tm2e dts file and panel driver - maybe not reasonable due to different hardware name - or creating new panel driver even though source code is duplicated. Thanks. > >> >>> As far as I examined available specs/docs there is no reliable register >>> which can be used to safely distinguish it on runtime, but the docs I >>> have are far from completeness. >> The data sheet I am seeing says a RDDIDS register describes manufacturer and module version information. With this we could identify the Panel device. >> Of course, we may need to check the register has really different values according to board. >> >> Below is the version information Hoegeun checked, >> >> TM2 >> [ 4.908666] panel_s6e3ha2 13900000.dsi.0: Manufacture date: 2014-10-31 06:41 >> [ 5.035768] panel_s6e3ha2 13900000.dsi.0: Id: 50 20 09 >> >> TM2e >> [ 4.929265] panel_s6e3ha2 13900000.dsi.0: Manufacture date: 2014-09-03 06:30 >> [ 5.056287] panel_s6e3ha2 13900000.dsi.0: Id: 40 40 14 > > There is description of ID1, ID2, ID3 registers in specs of both panels, > I see no reliable bits to distinguish panels. > And relying on read values of random devices does not seems to me proper > solution. > > Regards > Andrzej > > >> >> >> Thanks. >> >>> Regards >>> Andrzej >>> >>>> Thanks. >>>> >>>>> Andi >>>>> >>>>> [1] https://git.tizen.org/cgit/platform/kernel/linux-exynos/tree/arch/arm64/boot/dts/exynos/exynos5433-tm2.dts?h=tizen#n1284 >>>>> [2] https://git.tizen.org/cgit/platform/kernel/linux-exynos/tree/arch/arm64/boot/dts/exynos/exynos5433-tm2e.dts?h=tizen#n1270 >>>>> -- >>>>> To unsubscribe from this list: send the line "unsubscribe devicetree" in >>>>> the body of a message to majordomo@vger.kernel.org >>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>>>> >>>>> . >>>>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe devicetree" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >>> >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >