Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1443563imm; Sun, 9 Sep 2018 02:06:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZJpSF8uwLvzkFm/MACqj9Ezlckumy2/nsmmSq1uSy/n3wygma8N1tuj2KFse9RrU/cSoak X-Received: by 2002:a63:da04:: with SMTP id c4-v6mr17048097pgh.398.1536483985009; Sun, 09 Sep 2018 02:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536483984; cv=none; d=google.com; s=arc-20160816; b=CT17EbsTSaKeyzTmsoOlMWSffpceCzKqY/YJ8rI6OcNNq4jl7yFDT0O0Rs6fnq68Oo NPixMMjHgBIj422kbQL8bMnbqrwLh8sDDyQHkWZCIquC+VrfFZgeDvnu3D8St1VZV8w0 A4nBVl0b42l0g8+BTASK2c2mq6N9p7+LPCLmq4jYVaOWLSvDRQqAsYjs6oaQ0ALbVuGe uuNerHvp33RQNOTuCjA4rw7xtacX5H6cMyxTMwpdhURJTJ56grLtbWYHPA5BnzY05tRg KfA68wQb2CMix6M1rNm9N9uG+2IxpyYsGBxlMMtr95ppZT1/nd1xUVh2FFP4ehfZCoyX wRJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Sdjq+DK6YkF+NPZp9J/aLdLp9A9U0qLo3BlE7r1Xaaw=; b=A7+U20gLx6qlUpDsgmhZEVbFAPB23M2MEXwteiHsFKUiXf6aDGvvpYLubTkfS6gucH +7ecDuh/Nnc6Ffi0YHZyzqOf5cP0eErptvz7wg+RThvvZdgNDVqadc3ezy0/pktBIKDi DkI9QrO/n5z8c1cQPD2XINaIyllB5fZSCp1l796xc56W3iNNWLPvGRni6+5fC489xTMI ZHcyEXUp0Iw/BG49Fq+qjjkOeK0hGupoO2DpuTlQn5UKbs5GFLh0jfmmNY7Ns/ix4Qmb XY2oVrvaERHCdJBZdlR7+DgQ8siXHRgeIo5MDboRvu7OAHdm3W0/fWM37SM3qkaJ8fXo BI2w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7-v6si14556551pfb.227.2018.09.09.02.06.09; Sun, 09 Sep 2018 02:06:24 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726662AbeIINxz (ORCPT + 99 others); Sun, 9 Sep 2018 09:53:55 -0400 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:47829 "EHLO lb2-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbeIINxz (ORCPT ); Sun, 9 Sep 2018 09:53:55 -0400 Received: from [192.168.2.10] ([212.251.195.8]) by smtp-cloud9.xs4all.net with ESMTPA id yveEf5zx5MsEFyveHf7t4p; Sun, 09 Sep 2018 11:04:54 +0200 Subject: Re: [PATCH 0/2] Follow-up patches for Cedrus v9 To: Paul Kocialkowski , Chen-Yu Tsai Cc: linux-kernel , Linux Media Mailing List , devel@driverdev.osuosl.org, linux-arm-kernel , Maxime Ripard , Mauro Carvalho Chehab , Greg Kroah-Hartman , linux-sunxi , Randy Li , ezequiel@collabora.com, Tomasz Figa , Alexandre Courbot , Philipp Zabel , Laurent Pinchart , Sakari Ailus , Thomas Petazzoni References: <20180907163347.32312-1-contact@paulk.fr> <11104c03-97ac-8b36-7d75-dfecb8fcce10@xs4all.nl> <3c4e5a98-4dbd-9a8c-8dab-612a923f0eb9@xs4all.nl> From: Hans Verkuil Message-ID: <7386a631-1753-22cb-955e-fd0f1ca7a2d1@xs4all.nl> Date: Sun, 9 Sep 2018 11:04:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfN9WAFNe4FYraX8N3BfKIAfqjShjiBFK/Aghrhe6IuUHroApWIa0CTigop75rr2pVgO4ypw3PsgmNGaV17BUMTGb7GbsZiO2HMANyuHzYzgfKU7P8CGO svuxKmgc0zyqMlWGR4E0ZeTpA5L5hlszPIKekvSqt1SuqmE4VBF9RCoGHn9bOKmKfw9ei1EebxM2EZ/bShsNF24DxhcV5knYFM8aQfQnNcidg19BXRzQsKqz GZHtLBHKn57O6uNcfE3f4zymKscHRH6h2QolbA7GR/3pxdt87DKDkmdYoYmSTsW6PURJAcJ7tqr4lA1svq+KZpMkQhQofnsuXN+bwi28KSfGx+X1GaxwaL4t nZf3wEEYp1eOBpmw2OUKACjFtip5myoCg+QLOwRZeFMY75Ft0kqorGyACnXYCxUWAUXmAOJW+HYO8omlESPuiT3IG5QdnildFIn2DCIDbe0ZL/cEr/odeNMz 48ThGSuLIKw6caF1yInTfCC139ZGygwyw54Id0c8yKWQgiWu5FVAjtJgeLzO0KsI5/K+uoc1JzBVHPR4lVxfosmWJiGNgzq29roSotDcvo2qFraR6uVE6Q48 uKLNrSjFJ4+rXywbjBdEC1IXtxBmj459ENMQyHiqQysxMGUDXDz5EGfjKaa19cRFvWkkCOFAeCMjIp5HjoLwdq/6LZqAsBUO45ZjUqmwulxbRGcLiUA2sFpu os4sFpz9XtQCZ9nY6CAmoREhZ67APC6YKiSWZAtOfxsGqKEhQC3KxVqGo0vuAwlXR7riQ9MsWR/UK/7VnxVXZbSSc/5iyWpk Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/2018 09:42 PM, Paul Kocialkowski wrote: > Hi, > > Le samedi 08 septembre 2018 à 13:24 +0200, Hans Verkuil a écrit : >> On 09/08/2018 12:22 PM, Chen-Yu Tsai wrote: >>> On Sat, Sep 8, 2018 at 6:06 PM Hans Verkuil wrote: >>>> >>>> On 09/07/2018 06:33 PM, Paul Kocialkowski wrote: >>>>> This brings the requested modifications on top of version 9 of the >>>>> Cedrus VPU driver, that implements stateless video decoding using the >>>>> Request API. >>>>> >>>>> Paul Kocialkowski (2): >>>>> media: cedrus: Fix error reporting in request validation >>>>> media: cedrus: Add TODO file with tasks to complete before unstaging >>>>> >>>>> drivers/staging/media/sunxi/cedrus/TODO | 7 +++++++ >>>>> drivers/staging/media/sunxi/cedrus/cedrus.c | 15 ++++++++++++--- >>>>> 2 files changed, 19 insertions(+), 3 deletions(-) >>>>> create mode 100644 drivers/staging/media/sunxi/cedrus/TODO >>>>> >>>> >>>> So close... >>>> >>>> When compiling under e.g. intel I get errors since it doesn't know about >>>> the sunxi_sram_claim/release function and the PHYS_PFN_OFFSET define. >>>> >>>> Is it possible to add stub functions to linux/soc/sunxi/sunxi_sram.h >>>> if CONFIG_SUNXI_SRAM is not defined? That would be the best fix for that. >>>> >>>> The use of PHYS_PFN_OFFSET is weird: are you sure this is the right >>>> way? I see that drivers/of/device.c also sets dev->dma_pfn_offset, which >>>> makes me wonder if this information shouldn't come from the device tree. >>>> >>>> You are the only driver that uses this define directly, which makes me >>>> suspicious. >>> >>> On Allwinner platforms, some devices do DMA directly on the memory BUS >>> with the DRAM controller. In such cases, the DRAM has no offset. In all >>> other cases where the DMA goes through the common system bus and the DRAM >>> offset is either 0x40000000 or 0x20000000, depending on the SoC. Since the >>> former case is not described in the device tree (this is being worked on >>> by Maxime BTW), the dma_pfn_offset is not the value it should be. AFAIK >>> only the display and media subsystems (VPU, camera, TS) are wired this >>> way. >>> >>> In drivers/gpu/drm/sun4i/sun4i_backend.c (the display driver) we use >>> PHYS_OFFSET, which is pretty much the same thing. >>> >> >> OK, in that case just put #ifdef PHYS_PFN_OFFSET around that line together >> with a comment that this will eventually come from the device tree. > > That seems fine, although I'm less certain about what to do for the > SRAM situation. Other drivers that use SUNXI_SRAM have a Kconfig select > on it (that Cedrus lacks). Provided that the SRAM driver builds fine > for non-sunxi configs, bringing-in that select would remove the need > for dummy functions and also ensure that the actual implementation is > always used on sunxi. Otherwise, there'd be a risk of having the dummy > functions used (if the SRAM driver is not explicitly selected in the > config), causing a hang when accessing the VPU. You should certainly select this kernel config. But the real problem seems to to be drivers/soc/Makefile where it says: obj-$(CONFIG_ARCH_SUNXI) += sunxi/ I think this should be: obj-y += sunxi/ Now all compiles fine on i686 with the cedrus driver selecting SUNXI_SRAM. Regards, Hans