Received: by 10.192.165.148 with SMTP id m20csp1921429imm; Thu, 26 Apr 2018 04:14:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+LN6szqLgFtoVrqKG1xRBZXFaSwSKFbwyM2UFBOTb0yhKIdHfxtARku0K0Z/xKhK2XgkL1 X-Received: by 2002:a17:902:6b02:: with SMTP id o2-v6mr33325328plk.6.1524741266528; Thu, 26 Apr 2018 04:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524741266; cv=none; d=google.com; s=arc-20160816; b=vVGZ6ndkZkR0TOuwbd/y2ZGk3OhRURoOhE7HaNK5EjhL4YDADzqmfHH2UWse7LuP+m rYF7TbRHcScZ7rREpLwx/yL69hG62HAUZuDTYCBUtt1Qrx63toc0nJr9i3krwz5jjvnB OTCLKiqFJOOPo+bu2p3hcJFtqt/Og1E/lAsIm2nEMekpfA95/CW2ReaLJA9tUgF/pVBQ B3XzPArH1DzzJUluiYz+TOXiVbP0yYUjEheywWVMe97O5PzpfWvUEsRe8MALkPisRMB8 A5OOAOQn5nuh+4mAHCPPAx+2cXV8+dEmY9j1Gh6LPnRwqThV3LSHbAWcbeOMbbTqenVZ GCoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=A3B+GpEml78G2m42Xr6uQD2IbNwziL7HMAHIHTImj3o=; b=CG+/J6vBXTDyRopjTYe1G5YVFQUi1Xeyx3iTZGG/qLaBqQCV8M9EDaK7E+yTiTsF2X ai75nXZ6GFqWbUVv47w6AxovuQ2VEgctuUvZtRAPhcUTHV7HD2nExgmKuXhCCm5pOfPD 6lj60kImQh51AbZVhJiLUE2a/2/E32iGwPhACayHh1CjwSF2+1VD3RdylbmcfySxSFOc BDNyvdd6h4lMFOCx8+guqhh+Wwj0xVHZv+aRb/ngM/W/3UmysaPLZkMyoXsATckB1Ru2 Tn+hnCby/TdsGlJ123VCMQ+oB3i8B6wrKHEgsnvb9OabriRj2+Ey5YXlpEBykwRsUQ7v FSWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=StPupyT0; 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=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si15750856pgb.134.2018.04.26.04.14.11; Thu, 26 Apr 2018 04:14:26 -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=fail header.i=@armlinux.org.uk header.s=pandora-2014 header.b=StPupyT0; 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=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755029AbeDZLNE (ORCPT + 99 others); Thu, 26 Apr 2018 07:13:04 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:58524 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754277AbeDZLNB (ORCPT ); Thu, 26 Apr 2018 07:13:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=A3B+GpEml78G2m42Xr6uQD2IbNwziL7HMAHIHTImj3o=; b=StPupyT0XgKy+zZYLGKW5KyOk 1pqsjyazC6kqIZSYMffVVzCo5DMQ5VUJhd7HXAdEyMCXmurPRpNyLnUlocTa3V0kJEmxmjh78TSF6 81s16GmZ/woy0sbTO2Xp98/wcEQOOgcI62Wm2teh4amRDc6alue5XIWN2XOKeWB5yFwGU=; Received: from n2100.armlinux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:48110) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fBepQ-0005yk-TC; Thu, 26 Apr 2018 12:12:45 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1fBepO-00007U-92; Thu, 26 Apr 2018 12:12:42 +0100 Date: Thu, 26 Apr 2018 12:12:41 +0100 From: Russell King - ARM Linux To: Christoph Hellwig Cc: Daniel Vetter , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Linux Kernel Mailing List , amd-gfx list , Jerome Glisse , iommu@lists.linux-foundation.org, dri-devel , Dan Williams , Thierry Reding , Logan Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: noveau vs arm dma ops Message-ID: <20180426111240.GS16141@n2100.armlinux.org.uk> References: <20180425054855.GA17038@infradead.org> <20180425064335.GB28100@infradead.org> <20180425074151.GA2271@ulmo> <20180425085439.GA29996@infradead.org> <20180425100429.GR25142@phenom.ffwll.local> <20180425153312.GD27076@infradead.org> <20180426090942.GA18811@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180426090942.GA18811@infradead.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (While there's a rain shower...) On Thu, Apr 26, 2018 at 02:09:42AM -0700, Christoph Hellwig wrote: > synopsis: > > drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c: pdevinfo.dma_mask = DMA_BIT_MASK(32); > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c: pdevinfo.dma_mask = DMA_BIT_MASK(32); This is for the AHB audio driver, and is a correct default on two counts: 1. It is historically usual to initialise DMA masks to 32-bit, and leave it to the device drivers to negotiate via the DMA mask functions if they wish to use higher orders of bits. 2. The AHB audio hardware in the HDMI block only supports 32-bit addresses. What I've missed from the AHB audio driver is calling the DMA mask functions... oops. Patch below. > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c: pdevinfo.dma_mask = DMA_BIT_MASK(32); This is for the I2S audio driver, and I suspect is wrong - I doubt that the I2S sub-device itself does any DMA what so ever. 8<=== From: Russell King Subject: drm: bridge: dw-hdmi: Negotiate dma mask with DMA API DMA drivers are supposed to negotiate the DMA mask with the DMA API, but this was missing from the AHB audio driver. Add the necessary call. Signed-off-by: Russell King --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c index cf3f0caf9c63..16c45b6cd6af 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c @@ -539,6 +539,10 @@ static int snd_dw_hdmi_probe(struct platform_device *pdev) unsigned revision; int ret; + ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); + if (ret) + return ret; + writeb_relaxed(HDMI_IH_MUTE_AHBDMAAUD_STAT0_ALL, data->base + HDMI_IH_MUTE_AHBDMAAUD_STAT0); revision = readb_relaxed(data->base + HDMI_REVISION_ID); -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up