Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5306AC433E0 for ; Tue, 23 Feb 2021 17:30:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F36EB64EC1 for ; Tue, 23 Feb 2021 17:30:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F36EB64EC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 606A8895E1; Tue, 23 Feb 2021 17:30:11 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 608C4895E1 for ; Tue, 23 Feb 2021 17:30:10 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id B85C264E85; Tue, 23 Feb 2021 17:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614101408; bh=0sov8GotWsBDdlLayNbjA2epe830T2G9FtT8QS8zYxs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UX492ZtzutLmQXcQymKcC+ZlGihNg9kUBARJmIwwfVTRXEuflcUwn/rpCL6vWAG8d rnt04Q6rCx8qCf5NsDLtGcY8i3eHPqVD3JGmm2w5F2cl84qYvRnmTCYV+LdpiddEnH BLFQAujOP0PZbTfpXu6XAsfMYWY6qd3GbFVnFmYk= Date: Tue, 23 Feb 2021 18:30:05 +0100 From: Greg KH To: Alan Stern Subject: Re: [PATCH v3] drm: Use USB controller's DMA mask when importing dmabufs Message-ID: References: <20210223105842.27011-1-tzimmermann@suse.de> <20210223160054.GC1261797@rowland.harvard.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210223160054.GC1261797@rowland.harvard.edu> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathias Nyman , hdegoede@redhat.com, Sebastian Andrzej Siewior , Oliver Neukum , Johan Hovold , dri-devel@lists.freedesktop.org, christian.koenig@amd.com, airlied@linux.ie, stable@vger.kernel.org, Thomas Zimmermann , Thomas Gleixner , Andy Shevchenko , sean@poorly.run, Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Feb 23, 2021 at 11:00:54AM -0500, Alan Stern wrote: > On Tue, Feb 23, 2021 at 03:06:07PM +0100, Thomas Zimmermann wrote: > > Hi > > > > Am 23.02.21 um 14:44 schrieb Takashi Iwai: > > > > Aside from the discussion whether this "workaround" is needed, the use > > > of udev->bus->controller here looks a bit suspicious. As the old USB > > > code (before the commit 6eb0233ec2d0) indicated, it was rather > > > usb->bus->sysdev that was used for the DMA mask, and it's also the one > > > most of USB core code refers to. A similar question came up while > > > fixing the same kind of bug in the media subsystem, and we concluded > > > that bus->sysdev is a better choice. > > > > Good to hear that we're not the only ones affected by this. Wrt the original > > code, using sysdev makes even more sense. > > Hmmm, I had forgotten about this. So DMA masks aren't inherited after > all, thanks to commit 6eb0233ec2d0. That leas me to wonder how well > usb-storage is really working these days... > > The impression I get is that Greg would like the USB core to export a > function which takes struct usb_interface * as argument and returns the > appropriate DMA mask value. Then instead of messing around with USB > internals, drm_gem_prime_import_usb could just call this new function. > > Adding such a utility function would be a sufficiently small change that > it could go into the -stable kernels with no trouble. Yes, sorry for not being clear, that is what I think would make the most sense, then all USB drivers could use it easily and it can be changed in one location if the DMA logic ever changes. thanks, greg k-h _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel