Received: by 10.223.176.46 with SMTP id f43csp1982856wra; Thu, 25 Jan 2018 03:07:49 -0800 (PST) X-Google-Smtp-Source: AH8x226KyeA9BA/RUBTYIrPtDJXXUz5m4+VP+tcP6dmD/ZyuLk83Byq7+XWX88I1I8YTdwXIbZM3 X-Received: by 2002:a17:902:b195:: with SMTP id s21-v6mr5977059plr.253.1516878469070; Thu, 25 Jan 2018 03:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516878469; cv=none; d=google.com; s=arc-20160816; b=u50YWEawnqKzh0Yi1JpBbPY1oOT99CsbDALnLxZG4L2ckEWglW9fRVq8V4SA0+qUUh V1QcFfB4PzEfesuVfVYLsIrejn5+5S+crPEk7dV3vMeIWWmiBJr9gmtDEL/6lS2DGS5s t69N6qYZ6z5JJlNynSLfJ4hgOnQvldnrSIDx+NwNTvhJ7+PpWLIZ9lQmH0lY8cPWe6+G DKZxE6ELEciMXDpvg683Ps/18qWqXSGOgUvRDXHdb85Tup4KPwIDx6s0GD30vr6vxUNG Zd25r0GmojCfaHgDibvOfRqaCQLHZGJHbbsNFUPM8+KY2e8e3HKRyC1z6jXxJXcRJpsp g8Eg== 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:user-agent:date:message-id :from:cc:to:subject:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=KZjOumq6jE0qnEI/NiR+lduezI2y2htPe3LMep7cjlw=; b=QUidQrLxDPU4AjYrUsLP4tJi8KqSw2j5lFyo6MlL04eNYYvMd78wTjN9wAAfzBDx0s xMglDVuPASom7+cZtKxZi63MmH8BYDlezWv3Reybw8KLFHAYtWPJjDfs0zcrQRb7Lqt4 LeLsRslPPvtboaiFE1MnMHXklgQRQiZ3aVy1TQCyK6JymPArZC2kXBPVeIhix4Ajrml+ 9EfU4WboDYqbb4rF8TT7xi0GYRfxEoBLuvzET0I1fhBWVEiPJ1H9GKDTgI1wWcCFj1Aa Qeu6EtHoLN0kxcKWaRRjFMQxDngsv9SsumwOzt5FXjac1O1gG3sX8ANQXRJMAgw4vsfi I5qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HaBsMgbr; 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 c24-v6si1806718plo.608.2018.01.25.03.07.34; Thu, 25 Jan 2018 03:07:49 -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=HaBsMgbr; 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 S1751480AbeAYLHN (ORCPT + 99 others); Thu, 25 Jan 2018 06:07:13 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:56614 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbeAYLHL (ORCPT ); Thu, 25 Jan 2018 06:07:11 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180125110708euoutp015a2745ac101e7070dc1d1b6b81d1e312~NCOTkJ57_0446704467euoutp01M; Thu, 25 Jan 2018 11:07:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180125110708euoutp015a2745ac101e7070dc1d1b6b81d1e312~NCOTkJ57_0446704467euoutp01M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516878428; bh=KZjOumq6jE0qnEI/NiR+lduezI2y2htPe3LMep7cjlw=; h=Subject:To:Cc:From:Date:In-reply-to:References:From; b=HaBsMgbr28tcWzyCKCoo+Ue91qQ5rLDHXcoMFm+91BmDCLQHr8DZNTx1G1iIqGlbG 6oIZYUqkqHtav9unvF5WK+IwZmqEOhsSrG332LU3GB24aaU1UrC8R6+XeT8Oshf/zI KnmzGuPPOoYZv8C3/pKLFWRqHZ9DPn9r+UDBsp4c= Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180125110707eucas1p1d0f22ae90538da157b9403362921acf2~NCOS3T6Pf2240122401eucas1p1Y; Thu, 25 Jan 2018 11:07:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 49.0E.12867.B5AB96A5; Thu, 25 Jan 2018 11:07:07 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180125110707eucas1p2bd16916a5c89e2b1336900c932c73c45~NCOSE3uwE2431124311eucas1p23; Thu, 25 Jan 2018 11:07:07 +0000 (GMT) X-AuditID: cbfec7f2-f793b6d000003243-12-5a69ba5bc41e Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D3.1C.20118.A5AB96A5; Thu, 25 Jan 2018 11:07:07 +0000 (GMT) MIME-version: 1.0 Content-type: text/plain; charset="utf-8" Received: from [106.120.43.17] by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P3300560YVUETC0@eusync1.samsung.com>; Thu, 25 Jan 2018 11:07:06 +0000 (GMT) Subject: Re: [PATCH] drm/bridge/synopsys: dsi: use common mipi_dsi_create_packet() To: Philippe CORNU , Brian Norris Cc: Archit Taneja , Laurent Pinchart , David Airlie , Yannick FERTRE , Vincent ABRIOU , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Sean Paul , Nickey Yang , "hl@rock-chips.com" , "linux-rockchip@lists.infradead.org" , "mka@chromium.org" , "hoegsberg@gmail.com" , "zyw@rock-chips.com" , "xbl@rock-chips.com" From: Andrzej Hajda Message-id: <7dd644f0-697d-1545-cdc3-30e0708c93df@samsung.com> Date: Thu, 25 Jan 2018 12:07:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 In-reply-to: Content-transfer-encoding: 8bit Content-language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01SaUhUYRTtm7fMc2jqOZpdNBKnIgyyRaMPNwoqXmDUj6KaKBvy4VhuzKgt P2ost2Zc0rHU0fbNImjSdEywTMtxKUscNQNNkTQLc0uZyiXHN4H/zv3Ouffcc/kYQjZIuTMR 0XG8OloZKaclZHnd7w/rj1RGKDYONXjhjOYGEb6YNkThktFhClsnhmlsMzUSeHIqlcKXs++J cWtlEY3HemYJPG7qQ/j+358I9yR9o3CX6T3C79qqSdz+aViEUy8n0/hmTwWxzZkr1LaQXGtm hoh7YewSc4VpBRRnnuyhuC96i4grvXeBmza+IrmvtiqCGy9ZuU+ikASG8ZERCbx6Q/Bxiepl dSEVe0N+xjZZSmrRdQ8dYhhg/eDNiFqHnOagG3zsfkrrkISRsfcR2L4mk0IxjuC7uZcSVH6Q 2/tQJBAPEFwteya2E1LWGWyGbtKOCdYbvv3KcXT3I0gsHKXtdi7sfhh4vNWucWUPQKa1ed6O YK0U1BrTCTtBzzVPl3bSwtBg6LhbPD+UZNdA8+wUsuNl7CHQ9VfOb+TE+sNM5x+HsSe8tg44 8HK4lNw5vwSwdWIwpVeRQoQd0FdgcMRxge+W52IBr4BWg97RoEcwll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q1KL 8uOLSnNSiw8xSnOwKInz9u5ZHSkkkJ5YkpqdmlqQWgSTZeLglGpgdMpIE3p4WMuO8/Hplue6 go+5M3fN5V330nDvycZlV0uSs1t5/dbFeNtsVsp7fqmxI6/uvK46Z1NaxlzmuiNLTDdnTdnA tvPBj7hDEw9/St3Hu1Pxp+pUkX2RPD+mSUX4pKt63zqxQVnjwqPWvO9efmf3Nfg5/Nubn3L4 9GIG2y2PPI9N3vhNXImlOCPRUIu5qDgRAEKhF97PAgAA X-CMS-MailID: 20180125110707eucas1p2bd16916a5c89e2b1336900c932c73c45 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180124095152epcas2p3c1ece403435d3b6093b46954da8cd66e X-RootMTR: 20180124095152epcas2p3c1ece403435d3b6093b46954da8cd66e References: <20180106003813.4816-1-briannorris@chromium.org> <715bb58c-efa6-7944-f186-c186d7fae569@st.com> <20180109185512.GA73309@google.com> <023c159e-0a7f-7d1b-a2d8-8ef19033a1b3@st.com> <20180123211505.xvpu3putjjbqnl2b@ban.mtv.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24.01.2018 10:51, Philippe CORNU wrote: > Hi Brian, > > On 01/23/2018 10:15 PM, Brian Norris wrote: >> Hi Philippe, >> >> On Thu, Jan 18, 2018 at 11:40:48AM +0000, Philippe CORNU wrote: >>> On 01/11/2018 12:16 PM, Philippe CORNU wrote: >>>> To be honest, I do not really like the memcpy here too and I agree with >>>> you regarding the BE issue. >>>> >>>> My first "stm" driver (ie. before using this "freescale/rockchip" >>>> dw-mipi-dsi driver with the memcpy) used the "exact" same code as the >>>> Tegra dsi tegra_dsi_writesl() function with the 2 loops. >>>> >>>> https://elixir.free-electrons.com/linux/v4.14/source/drivers/gpu/drm/tegra/dsi.c#L1248 >>>> >>>> >>>> IMHO, it is better than memcpy... >>>> I added these 3 "documentation" lines, maybe we may reuse them or >>>> something similar... >>>> >>>> /* >>>>  * Write 8-bit payload data into the 32-bit payload data register. >>>>  * ex: payload data "0x01, 0x02, 0x03, 0x04, 0x05, 0x06" will become >>>>  * "0x04030201 0x00000605" 32-bit writes >>>>  */ >>>> >>>> Not sure it helps to fix the BE issue but we may add a TODO stating that >>>> "this loop has not been tested on BE"... >>>> >>>> What is your opinion? >> I'm sorry, I don't think I noticed your reply here. I'm trying to unbury >> some email, but that's sometimes a losing battle... >> >> That code actually does look correct, and it's perhaps marginally >> better-looking in my opinion. It's up to you if you want to propose >> another patch :) At this point, it's only a matter of nice code, not >> correctness I believe. >> >>> As your patch has been merged, I have few short questions and for each >>> related new patch, I would like to know if you prefer that I implement >>> it or if you prefer to do it by yourself, it's really like you want, on >>> my side, no problem to make them all, some or none, I don't want us to >>> implement these in parallel :-) >>> >>> * Do you have any opinion regarding Tegra-like loops vs the memcpy? (see >>> my comment above) If you think the Tegra-like loops is a better approach >>> than memcpy, there is a small patch to write. >> My opinion is above. >> > I do not know yet if I will send a patch but several reasons may push me > to do it: > * Andrzej proposed a nicer code in his last review so it means the > actual code with memcpy's is "not so nice" (even if it works fine) I was not against memcpy, I have just suggested to abstract the code out to some helper function. Regarding memcpy vs loop I would prefer memcpy - simpler code, but it is looks less important that abstracting out. Regards Andrzej > * Several dsi drivers use the Tegra-like loops (Tegra, intel,... ) and > in vc4/exynos/mtk drivers memcpy is not used, msm uses memcpy... well, > not sure it is then a good argument, different solutions for different hw... > * Coming cadence dsi bridge driver uses Tegra-like loops. > * I think my read function will also have Tegra-like loops, if it is the > case, it could be nice to have something homogeneous... > > Anyway, it is not an important point : ) > >>> * Returned value with number of bytes received/transferred: there is a >>> small patch to write >> I don't think I followed that one very well. I'm not sure my opinion >> really matters, as long as you get someone else to agree. I do not plan >> to write any such patch in the near term. >> >>> * Regarding read operations: I propose to add a TODO + DRM_WARN in case >>> someone want to use the API for read operations. Note that I plan to >>> implement the read feature but I do not know yet when and maybe Rockchip >>> people already have something ~ready? >> The warning would be nice to do now, regardless. >> >> Rockchip folks wrote up something for read support here [1], but it's >> based on a semi-forked version of the driver (we're trying to clean up >> the divergence, but it's not there yet). Perhaps it would provide useful >> fodder for your work. I don't think Rockchip is immediately working on >> upstreaming this particular patch, so it's totally fair to handle it >> yourself. It's got the GPL sign-off ;) >> >> Brian >> >> [1] https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/863347 >> > Very good information, I will have a look, > many thanks > Philippe :-)