From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935760AbcJZX0D (ORCPT ); Wed, 26 Oct 2016 19:26:03 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:36084 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933921AbcJZX0B (ORCPT ); Wed, 26 Oct 2016 19:26:01 -0400 Subject: Re: [PATCH 0/3] add ION driver for STIh4xx SoC To: Benjamin Gaignard , Sumit Semwal References: <1477488748-10065-1-git-send-email-benjamin.gaignard@linaro.org> Cc: Greg Kroah-Hartman , yudongbin@hisilicon.com, Chen Feng , LKML , "linaro-kernel@lists.linaro.org" , kernel@stlinux.com From: Laura Abbott Message-ID: Date: Wed, 26 Oct 2016 16:25:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/2016 08:05 AM, Benjamin Gaignard wrote: > 2016-10-26 16:44 GMT+02:00 Sumit Semwal : >> On 26 October 2016 at 20:11, Benjamin Gaignard >> wrote: >>> 2016-10-26 15:51 GMT+02:00 Sumit Semwal : >>>> Hello Benjamin, >>>> >>>> On 26 October 2016 at 19:02, Benjamin Gaignard >>>> wrote: >>>>> It is more or less a copy of Hisilicon driver but with a heap definition >>>>> fitting with STIH4xx SoC needs. >>>>> I have just chnage the some function prefix from "hi6220" to "sti". >>>>> >>>> Thanks for your patches! >>>> >>>> I was just wondering if you couldn't convert the HiSilicon driver into >>>> something like a 'simple-ion' driver, and have just the DT definitions >>>> as specifics? This would save a lot of code duplication, and keep it >>>> as a simple interface for common heaps like cma. >>> >>> Create a simple-ion driver is a good idea but it means that heaps >>> (configuration, name, etc..) >>> will have to be describe into devicetree. I'm not sure if that will is >>> acceptable. >>> >>>> >>>> If there are any ST-specific requirements that are incompatible with >>>> the existing driver, it should be clearly documented out here I think. >>> >>> heaps names and Ids aren't the same so I can't reuse hisilicon driver. >>> >> But I'd suspect both these are solvable with using something like >> 'generic,cma' instead of 'hisi,cma' or 'st,cma'? > > yes, but it requires to describe the heaps in devicetree. > Hisilicon driver was doing like that until last month but Laura > convert it to common platform: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/staging/android/ion/hisilicon?id=b6e336dbeda85585c3ba6d935753d8240e18baf1 > > I bet she got good reasons do to that so I have implemented sti ION > driver in this mindset. > I agree that having common code would be useful. There are some generic bindings listed in drivers/staging/android/ion/devicetree.txt so we could go with linux,ion-heap-dma. The changes got merged and there were never mailing list objections but that's because the devicetree maintainers got busy and never actually looked at them and Arnd at least still didn't like the idea of Ion in devicetree. I'd like to wait until after plumbers next week to decide what to do. >>> >> Best, >> Sumit. > > > Thanks, Laura