Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp146747imm; Thu, 30 Aug 2018 10:22:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1hZ5pz5c7ZUd0HJNQB0Y0V6CU3Y7WR+7YL2o89/hgD6oxeFnGbVKaal3dS+0Dc1ttUkjo X-Received: by 2002:a17:902:7b96:: with SMTP id w22-v6mr10990976pll.24.1535649743225; Thu, 30 Aug 2018 10:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535649743; cv=none; d=google.com; s=arc-20160816; b=FLAiIPyqjYBwsZiKBdCuSfyUs4qzoCP01Bio+n7yQzN+4wk+X7ZrRjBPhTQTyKv9P+ kuXwWcxcugc0WK9peQHvH9rHl5xBx6gGSaFbJurXJM4kAB/DfUBykcPHXoMSL4btKY64 alz/HbbXUanIc0Ga0ZBRBMGwwfzmpb0E6RS98Y/NdddARIknritn/067zhg6RQZWUNnv QPK/6EWwGzV5sssgQTAJSybdZtYPqix6zZL4xonAc0QiQZtS5RjHrfK62sXk1HfxoCsX cZkafEPRfgnwsyaZGlLl6ZrwWvrAbOy/jtV/1ePlVJl+6WZcEhPxs2rN4dzkq//BrSEt cTlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=wdxe4G1NmGhikrQhHOGLiPApHbjNtiQqzUI9tqsPbiI=; b=LNETjsjvO+3R/G8f6bY5sP8D/CxxPARWUeaYH8mYT6EvZZfL+AfYHr9NkRdCbpyZAe ePkC0fFVlYY5JV5aJLRq/ADHvPIZlRQ/G35YSglDVic5DjjJrc2ejxCw+KBsi/K9FV09 vb3SpHq2mOTnMwUW7VRlOr5msQD0py7JZoyrzg/GkEscJTpqZmEie9OQMjFw/k3UNhJ2 Ce8T3ZqtWsqfvKgxo6JpUkq2+pIAsQRH2hpjG+UM8VL7Zygfz93xl86TzTBXIApl56Uw KgOj6JT3iuBAPxRsJ+Wf2w8rS9WJ+HTTPWdcP+SEr1eBSxpo7CCMoXaoM3tUuvN6w5p0 VBVA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si6846769plo.377.2018.08.30.10.22.07; Thu, 30 Aug 2018 10:22:23 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727178AbeH3VYL (ORCPT + 99 others); Thu, 30 Aug 2018 17:24:11 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38030 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725836AbeH3VYL (ORCPT ); Thu, 30 Aug 2018 17:24:11 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 5904126C052 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Laurent Pinchart , Tomasz Figa , "Matwey V . Kornilov" , Alan Stern , kernel@collabora.com, Keiichi Watanabe , Ezequiel Garcia Subject: [RFC 0/3] Introduce usb_{alloc,free}_noncoherent API Date: Thu, 30 Aug 2018 14:20:27 -0300 Message-Id: <20180830172030.23344-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following the discussion on PWC [1] and UVC [2] drivers, where use non-consistent mappings for the URB transfer buffers was shown to improve transfer speed significantly, here's a proposal for a non-coherent USB helpers. With this pachset, it's possible to get 360x288 raw analog video using stk1160 and a AM335x Beaglebone Black board. This isn't possible in mainline, for the same reasons Matwey has explained [1]. First patch is a hack, obviously incomplete, to add support for non-consistent mappings on ARM. The second patch introduces the usb_{alloc,free}_noncoherent API, while the third patch is an example on stk1160. I'm sending this patchset as RFC, just to get the ball rolling. [1] https://lkml.org/lkml/2018/8/21/663 [2] https://lkml.org/lkml/2018/6/27/188 Ezequiel Garcia (3): HACK: ARM: dma-mapping: Get writeback memory for non-consistent mappings USB: core: Add non-coherent buffer allocation helpers stk1160: Use non-coherent buffers for USB transfers arch/arm/include/asm/pgtable.h | 3 ++ arch/arm/mm/dma-mapping.c | 9 ++-- drivers/media/usb/stk1160/stk1160-video.c | 22 +++------ drivers/usb/core/buffer.c | 29 +++++++----- drivers/usb/core/hcd.c | 5 +- drivers/usb/core/usb.c | 56 ++++++++++++++++++++++- include/linux/usb.h | 5 ++ include/linux/usb/hcd.h | 4 +- 8 files changed, 97 insertions(+), 36 deletions(-) -- 2.18.0