Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp553343imm; Sat, 8 Sep 2018 04:25:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYzKpMis+5rCh8XkIBxfNE+9Lo1UkiQsI40ufBaFDHMfotNH2QCmczveIODHzoayiZi0Nj/ X-Received: by 2002:a62:490e:: with SMTP id w14-v6mr13376387pfa.213.1536405945748; Sat, 08 Sep 2018 04:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536405945; cv=none; d=google.com; s=arc-20160816; b=a30Mx9DjhbgFhpztiROI82m0np8HxTdpbVXD0ADGDgBY+e+NgAAdPgePevRaG6gwlf +nk8O1azZnmy0SedSot49GjDuXpDcUAK8AtQ8pg+9jUWecs+V2/mC6XmtIWBcDaBI7Sb 4JOa/uI9KxCJ+FCOEi6sWRoyOc6x+TsVZm2lEsV4h3ePfK84rxwlyMXqci3K9zgrgXqJ ZUnKLbPMLRwF1eAGif11P40a7/l22m4+BxL6cx3vvtBYaFp7mFBOn4xPFWpgyB896ksu SCja/xrdfKrsEP4/WkCRP5Y767lnsd0G17hDCJBzs88zx3kkKtSOkRMq11y3/7PLY5lH ezgg== 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=fxdtw5x3ELhBj6AYRmq/GBIx9tWgMbokULJKsq+otFs=; b=Yrvt+a42PvGZCCtj4PcY9RjU08RX0uvkz0YUQklSPpQ9cH9SpBKHhliE9r+vgVdTiR HgxpCBIWMEcMdOWAcTTnr2uVWdYgUb5N+w+6vwfHKKIRfKd7W13/YsHmzRIGg1nHXauF 3JJgd1+BemWkXndAl6+3AEdIqB233YB+d39jp4nqZdsQbdJPaIGVbf9AXD3TjrckdMRp ZPSOqltpUzgJAqwtX8LO3PX5ZIJp/U1RPhhfZ8EnMb7L0jElOWmSf/iLl2Kg3FRaUb93 jiWqR5VKc9DrWV+115CI9qIC6YGSds560rs9hrvqFIZX1D9fwzN2/MkAsTgoOhj0BVT8 9ZLw== 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 t32-v6si10980726pgl.484.2018.09.08.04.25.29; Sat, 08 Sep 2018 04:25:45 -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 S1726609AbeIHQJu (ORCPT + 99 others); Sat, 8 Sep 2018 12:09:50 -0400 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:53022 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbeIHQJt (ORCPT ); Sat, 8 Sep 2018 12:09:49 -0400 Received: from [192.168.2.10] ([212.251.195.8]) by smtp-cloud8.xs4all.net with ESMTPA id ybLZfmGeQxO9BybLdfE1hs; Sat, 08 Sep 2018 13:24:20 +0200 Subject: Re: [PATCH 0/2] Follow-up patches for Cedrus v9 To: Chen-Yu Tsai Cc: Paul Kocialkowski , linux-kernel , Linux Media Mailing List , devel@driverdev.osuosl.org, linux-arm-kernel , Maxime Ripard , Paul Kocialkowski , 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> From: Hans Verkuil Message-ID: <3c4e5a98-4dbd-9a8c-8dab-612a923f0eb9@xs4all.nl> Date: Sat, 8 Sep 2018 13:24:13 +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: 7bit X-CMAE-Envelope: MS4wfHYz3nCte9cMtscFrsrcsJDEdV6FVFFdGA4BRFpMFU+ge920snOOzmO3ZulyO0t+9lISgYOWuVaDo8MHaQ/LuPWrFT1ZXeXWKwXOEvLL5N5NMAdCRp4z tZSXlS22d6+ebWgo0rcmprQklXvO+fHRompUGy+bOT75+io5pIdnhynL/mjdgIlNw9g/jCzI7CDWoQpse9Ev1t19zUyMkWuyIEQ9zsStRQQFJDODivl01w6z wDOpH4swWQ4KFKwY6TZfH7ss9pzsUAPhE9ev8jEJOKQg7kpakW0349mfFeKLTDufm7ySesg97/nAiI3OCkZ4G1oE3HWdHJ65BpZnuJiVds/ZwpN0adV5Mj/E PLiTsWWL0Gw6deeZPPnSvF4KuSM/XQB9PjlGreoXV2Ee3xGqo6CSGnkbDRSFLyD6m1U26boIm497G9WSL1QwJX6Uvx4/D1dMOIohnesp+0WeT8aIC+dQoEBQ wyYMT9xIFnxOBfyn9HGtCuRWD7NUDtnZXiTkHmLci4gdVmMG+vNwyRA7QcyOY2BxQYyqa6/Ua5A7jKi7qGt2a0OxFmRVxe7Hz4D3I+wRZetYCUo5IS3+qoXZ tkA26ko4u80ERsbntM4ntFLs3lP/8uEjGzQDbCV6IP33gc4DxvBNclTT6BLXYhROnhutTkVhK9KUNFIlVCjZpXRwcSaj969IDjscH1NtBNpLJgdynW1TSKGL sfuHx+4SbmYkNlyE4wbDnqOVx3PautfvmlsSua5kShIfz4OjoN/f3QKsxUtAOw3D+b5KKgFjfLKG0RrHi0UQc5BGBl4WNehuJIY0UIdXS+3uo3gqcCKSHQ+t O/FQ+6Cc0UBzODyopxk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Regards, Hans