From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756994AbcC2LlH (ORCPT ); Tue, 29 Mar 2016 07:41:07 -0400 Received: from lucky1.263xmail.com ([211.157.147.130]:42472 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbcC2LlD (ORCPT ); Tue, 29 Mar 2016 07:41:03 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: linux-arm-kernel@lists.infradead.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <1418fbee55c5bc10c225e11308e3d6d5> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [RFC PATCH v1 0/4] Add Rockchip RGA support To: Emil Velikov , Heiko Stuebner References: <1458552518-25527-1-git-send-email-ykk@rock-chips.com> <1511371.I0NIYzh3kP@diego> <56EFE66A.8020404@rock-chips.com> <1867694.1mDULrSexE@phil> Cc: David Airlie , Mark Yao , Joonyoung Shim , Kumar Gala , Ian Campbell , Rob Herring , Pawel Moll , Russell King , devicetree , "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel , linux-rockchip , LAKML From: Yakir Yang Message-ID: <56FA69C5.5090602@rock-chips.com> Date: Tue, 29 Mar 2016 19:40:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Emil, On 03/28/2016 08:21 PM, Emil Velikov wrote: > On 22 March 2016 at 00:42, Heiko Stuebner wrote: >> Hi Yakir, >> >> Am Montag, 21. März 2016, 20:17:46 schrieb Yakir Yang: >>> On 03/21/2016 07:29 PM, Heiko Stübner wrote: >>>> Am Montag, 21. März 2016, 17:28:38 schrieb Yakir Yang: >>>>> This patch set would add the RGA direct rendering based 2d graphics >>>>> acceleration module. >>>> very cool to see that. >>> ;) >>> >>>>> This patch set is based on git repository below: >>>>> git://people.freedesktop.org/~airlied/linux drm-next >>>>> commit id: 568d7c764ae01f3706085ac8f0d8a8ac7e826bd7 >>>>> >>>>> And the RGA driver is based on Exynos G2D driver, it only manages the >>>>> command lists received from user, so user should make the command list >>>>> to data and registers needed by operation to use. >>>>> >>>>> I have prepared an userspace demo application for testing: >>>>> https://github.com/yakir-Yang/libdrm-rockchip >>>>> >>>>> That is a rockchip libdrm library, and I have write a simple test case >>>>> "rockchip_rga_test" that would test the below RGA features: >>>>> - solid >>>>> - copy >>>>> - rotation >>>>> - flip >>>>> - window clip >>>>> - dithering >>>> Did you submit your libdrm changes as well? >>>> >>>> Userspace-interfaces need to be stable so the other side must also get >>>> accepted - even before the kernel change if I remember correctly. >>> Got it, and I just saw exynos_fimg2d already landed at mainline libdrm. >>> But I don't find the way to submit patches to libdrm, would you like >>> share some helps here ;) >> Looking at the libdrm sources on cgit.freedesktop.org, I did not find any >> specific manual on submitting patches. >> >> But looking at the dri-list archive, dri-devel@lists.freedesktop.org is the >> right list and looking at the libdrm history it looks like Emil Velikov >> seems to be doing maintenance-stuff in libdrm. >> And as a 3rd recipient, please also include the linux-rockchip list. >> >> @Emil, please shout if I read that wrong :-) >> > You got it spot on Heiko. There are a few notes though... > > As one reuses the existing hardware/IP block, it would be better to > avoid copy/pasting code around. > Namely: > - (if possible) factor out the exynos g2d kernel functionality to a > separate kernel module and wire up the rockhip (via dt ?) to use it > - factor out the g2d specifics out of exynos_drm.h (into > exynos_g2d_drm.h perhaps ?) and make sure exynos_drm.h includes the > new header > - if neither of these are possible, then please ensure that the new > header uses correct types (see the docs [1]), use MIT/X11 license (if > possible) and link where upstream userspace is happy with the > interface (ideally more than a simple test app like libdrm) Whops... you have provided the third choice, nice :-D And I got little idea about license, where should I use the MIT/X11 license, should I declare the MIT/X11 license in kernel uapi head file, but Andreas just remind that kernel do not allow to no GUN license. Or may be I can: 1. Use GUN license in kernel rockchip_drm.h uapi head file 2. Use MIT/X11 license in libdrm rockchip_drm.h head file. And I don't understand the "link where upstream userspace is happy with the interface", could you reference small example here. Thanks, - Yakir > These might sound like an overkill, although getting UAPI right and > maintaining it forever forces us to do so. > > Regards, > Emil > > [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ioctl/botching-up-ioctls.txt > > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yakir Yang Subject: Re: [RFC PATCH v1 0/4] Add Rockchip RGA support Date: Tue, 29 Mar 2016 19:40:53 +0800 Message-ID: <56FA69C5.5090602@rock-chips.com> References: <1458552518-25527-1-git-send-email-ykk@rock-chips.com> <1511371.I0NIYzh3kP@diego> <56EFE66A.8020404@rock-chips.com> <1867694.1mDULrSexE@phil> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Emil Velikov , Heiko Stuebner Cc: devicetree , Russell King , Pawel Moll , Ian Campbell , "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel , linux-rockchip , Rob Herring , Kumar Gala , LAKML List-Id: devicetree@vger.kernel.org SGkgRW1pbCwKCk9uIDAzLzI4LzIwMTYgMDg6MjEgUE0sIEVtaWwgVmVsaWtvdiB3cm90ZToKPiBP biAyMiBNYXJjaCAyMDE2IGF0IDAwOjQyLCBIZWlrbyBTdHVlYm5lciA8aGVpa29Ac250ZWNoLmRl PiB3cm90ZToKPj4gSGkgWWFraXIsCj4+Cj4+IEFtIE1vbnRhZywgMjEu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HB5CndpdGggdGhlIGludGVyZmFjZSIsIGNvdWxkIHlvdSByZWZlcmVuY2Ug c21hbGwgZXhhbXBsZSBoZXJlLgoKVGhhbmtzLAotIFlha2lyCgo+IFRoZXNlIG1pZ2h0IHNvdW5k IGxpa2UgYW4gb3ZlcmtpbGwsIGFsdGhvdWdoIGdldHRpbmcgVUFQSSByaWdodCBhbmQKPiBtYWlu dGFpbmluZyBpdCBmb3JldmVyIGZvcmNlcyB1cyB0byBkbyBzby4KPgo+IFJlZ2FyZHMsCj4gRW1p bAo+Cj4gWzFdIGh0dHBzOi8vZ2l0Lmtlcm5lbC5vcmcvY2dpdC9saW51eC9rZXJuZWwvZ2l0L3Rv cnZhbGRzL2xpbnV4LmdpdC90cmVlL0RvY3VtZW50YXRpb24vaW9jdGwvYm90Y2hpbmctdXAtaW9j dGxzLnR4dAo+Cj4KPgoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fCmRyaS1kZXZlbCBtYWlsaW5nIGxpc3QKZHJpLWRldmVsQGxpc3RzLmZyZWVkZXNrdG9w Lm9yZwpodHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1k ZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: ykk@rock-chips.com (Yakir Yang) Date: Tue, 29 Mar 2016 19:40:53 +0800 Subject: [RFC PATCH v1 0/4] Add Rockchip RGA support In-Reply-To: References: <1458552518-25527-1-git-send-email-ykk@rock-chips.com> <1511371.I0NIYzh3kP@diego> <56EFE66A.8020404@rock-chips.com> <1867694.1mDULrSexE@phil> Message-ID: <56FA69C5.5090602@rock-chips.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Emil, On 03/28/2016 08:21 PM, Emil Velikov wrote: > On 22 March 2016 at 00:42, Heiko Stuebner wrote: >> Hi Yakir, >> >> Am Montag, 21. M?rz 2016, 20:17:46 schrieb Yakir Yang: >>> On 03/21/2016 07:29 PM, Heiko St?bner wrote: >>>> Am Montag, 21. M?rz 2016, 17:28:38 schrieb Yakir Yang: >>>>> This patch set would add the RGA direct rendering based 2d graphics >>>>> acceleration module. >>>> very cool to see that. >>> ;) >>> >>>>> This patch set is based on git repository below: >>>>> git://people.freedesktop.org/~airlied/linux drm-next >>>>> commit id: 568d7c764ae01f3706085ac8f0d8a8ac7e826bd7 >>>>> >>>>> And the RGA driver is based on Exynos G2D driver, it only manages the >>>>> command lists received from user, so user should make the command list >>>>> to data and registers needed by operation to use. >>>>> >>>>> I have prepared an userspace demo application for testing: >>>>> https://github.com/yakir-Yang/libdrm-rockchip >>>>> >>>>> That is a rockchip libdrm library, and I have write a simple test case >>>>> "rockchip_rga_test" that would test the below RGA features: >>>>> - solid >>>>> - copy >>>>> - rotation >>>>> - flip >>>>> - window clip >>>>> - dithering >>>> Did you submit your libdrm changes as well? >>>> >>>> Userspace-interfaces need to be stable so the other side must also get >>>> accepted - even before the kernel change if I remember correctly. >>> Got it, and I just saw exynos_fimg2d already landed at mainline libdrm. >>> But I don't find the way to submit patches to libdrm, would you like >>> share some helps here ;) >> Looking at the libdrm sources on cgit.freedesktop.org, I did not find any >> specific manual on submitting patches. >> >> But looking at the dri-list archive, dri-devel at lists.freedesktop.org is the >> right list and looking at the libdrm history it looks like Emil Velikov >> seems to be doing maintenance-stuff in libdrm. >> And as a 3rd recipient, please also include the linux-rockchip list. >> >> @Emil, please shout if I read that wrong :-) >> > You got it spot on Heiko. There are a few notes though... > > As one reuses the existing hardware/IP block, it would be better to > avoid copy/pasting code around. > Namely: > - (if possible) factor out the exynos g2d kernel functionality to a > separate kernel module and wire up the rockhip (via dt ?) to use it > - factor out the g2d specifics out of exynos_drm.h (into > exynos_g2d_drm.h perhaps ?) and make sure exynos_drm.h includes the > new header > - if neither of these are possible, then please ensure that the new > header uses correct types (see the docs [1]), use MIT/X11 license (if > possible) and link where upstream userspace is happy with the > interface (ideally more than a simple test app like libdrm) Whops... you have provided the third choice, nice :-D And I got little idea about license, where should I use the MIT/X11 license, should I declare the MIT/X11 license in kernel uapi head file, but Andreas just remind that kernel do not allow to no GUN license. Or may be I can: 1. Use GUN license in kernel rockchip_drm.h uapi head file 2. Use MIT/X11 license in libdrm rockchip_drm.h head file. And I don't understand the "link where upstream userspace is happy with the interface", could you reference small example here. Thanks, - Yakir > These might sound like an overkill, although getting UAPI right and > maintaining it forever forces us to do so. > > Regards, > Emil > > [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ioctl/botching-up-ioctls.txt > > >