Received: by 10.213.65.68 with SMTP id h4csp702875imn; Tue, 13 Mar 2018 19:03:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELsLMS53dldDzCGahM8+oZex64Dr+r6nWQ8ymDTIlfycW3s3Yfsqq3WTZCX8Elz382GjMqRf X-Received: by 2002:a17:902:3303:: with SMTP id a3-v6mr2388955plc.399.1520992997814; Tue, 13 Mar 2018 19:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520992997; cv=none; d=google.com; s=arc-20160816; b=ve//4w30z0zGIjLUXbKWz3Xu7/1DsVgcbe9ch4IAX+5ueQh8hmqH8RUZAmbKpKbTM4 P9b9OgwmV5Zp6ApVWE2R9chbKGvbWNoX80br5mg39LZ0FmmtLAEeo852C8QoBSfXQBnV //MhQ4Joi1YQV/mQxwNyNPYRaO2VdmnylLQnkvH5ok/AAck+EOxFss5tqhKOkugylqJ8 uuN1hApsMRRUy6aFneOfSPz8U1TZ+Jy6Su55yxufHYC3vvRTEKD3ifho6LrF7gk6vgYj cH0wDFkPVe7uja7f9IDPO9mataPQIQ/2I8Ebekk77fEhPYmfC5Kf8hWDgE4IZ47Vuo0Z XXlA== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=bwDf0t9bfx44yZkoPlZPCKEZI+dxRm7ZWZunSSh+RCI=; b=f06uiHDZHozGshvTgq9wkZlWD1zT5SMxBiByfDqX++L5ACJ0zxC2fAcLeW8AJJA0xZ ReeoIYHVcLKHXIS3sZktD3WOkFQbcJ6W0s0XZ6BNnAYUVrrcQBbl7VH7pKGkx6CODhaB pCb3yHCF8GRdjw6KJULqx1WuUA2xLXOR2ZCHZDBu6kYnN32UA2VwPnJOcnB+QTNhIsri LHzNBZnQKsxOE9MGfv7zQzCeRQNfQQ4ASbXd0ZU4p6SPUkLf8fqfX5UzJuFdyZqvROWT Gkk6QzhbBuM4sPxP86wiRQBEGU8FhbpsOjxTwYSzNjSDjYFSbvMC+Q1ryzhVp+wT4Udg fw9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=Nn9pxX82; 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 j2si1157571pff.214.2018.03.13.19.03.03; Tue, 13 Mar 2018 19:03:17 -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; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=Nn9pxX82; 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 S933130AbeCNCCK (ORCPT + 99 others); Tue, 13 Mar 2018 22:02:10 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:42571 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932937AbeCNCCI (ORCPT ); Tue, 13 Mar 2018 22:02:08 -0400 Received: by mail-qk0-f171.google.com with SMTP id b198so1878922qkg.9 for ; Tue, 13 Mar 2018 19:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=bwDf0t9bfx44yZkoPlZPCKEZI+dxRm7ZWZunSSh+RCI=; b=Nn9pxX82W2o0XBNYs0/UTvqPQ36g00UqC7IkqEkDAljCCXfAXOeZVmXjlooIyg9ta1 mgoCid+/AfNB2qZB2DpAeSEahnh2BB392L92sTTj9KvKpQi5DRNvhKYTWiA9HEZ4spIi vro5sMte7vkYlWp69T8a18+AycWAWk95G+6dINIR1U7D4J79ovLf6faIx72AjvtDg609 BwaGmNChPNcU3LwfDM4Xlvj0ApfWunoOnFy9b5REXBfKwl/tOHqxjA0+VKHf/tJz0TSe tvGun44pYZYQAGcTAQc/sng0RXZ+IS6zep8SsNs8hE2zBfLc/WwcGzeAQCLSmbtJ+t80 XtAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=bwDf0t9bfx44yZkoPlZPCKEZI+dxRm7ZWZunSSh+RCI=; b=Hr8uXW65l9ifObgLreBfn3y+gWErKiRFaSdToV1wIA1croQRGHqjW6Mr/oN4L6YlYi AAshfKcez5+M2XQBM1G1w272Ls10RBqbK7tLWVrr8W8islJTM7+G7tT38HiUR/CAECJK KaI39YAWkxSqSB+pwtEEt774+cn3zvuwZfrV8saV6IjHJmQZmZwc4h4KCXodIhk9q2BJ OlfSyaAP84X1Bd00s0UCHHbV9Eis9EEq1VoAyUSUyiRB7l+BgzmI9X8W4KRRF58OExXd hAsfpLBTNPlRGk2I1yXJ3s2AgEOGocwlwJhwpnX6yW7sIGBOo6SWUOyT69mHTr6EB+7L XD8A== X-Gm-Message-State: AElRT7FQ8zfNjSOKfMAQIlOTc5jl03CPSUe3cSGCV+bmqfWbfL5sDsef ueWfWjpl/gDQGR+YVSACrKziig== X-Received: by 10.55.198.3 with SMTP id b3mr4177997qkj.196.1520992927894; Tue, 13 Mar 2018 19:02:07 -0700 (PDT) Received: from skullcanyon (cable-192.222.221.38.electronicbox.net. [192.222.221.38]) by smtp.gmail.com with ESMTPSA id u42sm786777qtb.23.2018.03.13.19.02.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Mar 2018 19:02:07 -0700 (PDT) Message-ID: <1520992925.5128.18.camel@ndufresne.ca> Subject: Re: [PATCH] media: vb2: unify calling of set_page_dirty_lock From: Nicolas Dufresne To: Stanimir Varbanov , Sakari Ailus Cc: Mauro Carvalho Chehab , Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 13 Mar 2018 22:02:05 -0400 In-Reply-To: <1520989785.5128.16.camel@ndufresne.ca> References: <20170829112603.32732-1-stanimir.varbanov@linaro.org> <1507650010.2784.11.camel@ndufresne.ca> <20171015204014.2awhhygw6hi3lxas@valkosipuli.retiisi.org.uk> <1508108964.4502.6.camel@ndufresne.ca> <20171017101420.5a5cvyhkadmcqgfy@valkosipuli.retiisi.org.uk> <1508249953.19297.4.camel@ndufresne.ca> <8f1eda59-fc51-b77e-ae43-9603b5759b14@linaro.org> <1520988249.5128.13.camel@ndufresne.ca> <1520989785.5128.16.camel@ndufresne.ca> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5 (3.26.5-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mardi 13 mars 2018 à 21:09 -0400, Nicolas Dufresne a écrit : > > I've looked into this again. I have hit the same issue but with CPU > > to > > DRM, using DMABuf allocated from DRM Dumb buffers. In that case, > > using > > DMA_BUF_IOCTL_SYNC fixes the issues. > > > > This raises a lot of question around the model used in V4L2. As you > > mention, prepare/finish are missing in dma-vmalloc mem_ops. I'll > > give > > a > > try implementing that, it should cover my initial use case, but > > then > > I > > believe it will fail if my pipeline is: > > > > UVC -> in plane CPU modification -> DRM > > > > Because we don't implement begin/end_cpu_access on our exported > > DMABuf. > > It should also fail for the following use case: > > > > UVC (importer) -> DRM > > > > UVC driver won't call the remote dmabuf being/end_cpu_access > > method. > > This one is difficult because UVC driver and vivid don't seem to be > > aware of being an importer, exported or simply exporting to CPU > > (through mmap). I believe what we have now pretty much assumes the > > what > > we export as vmalloc is to be used by CPU only. Also, the usual > > direction used by prepare/finish ops won't work for drivers like > > vivid > > and UVC that write into the buffers using the cpu. > > > > To be continued ... > > While I was writing that, I was already outdated, as of now, we only > have one ops, called sync. This implements the to_cpu direction only. Replying to myself again, obviously looking at the old videobuf code can only get one confused. Nicolas