lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZmCuVtXrwDxbkqAR@lizhi-Precision-Tower-5810>
Date: Wed, 5 Jun 2024 14:28:38 -0400
From: Frank Li <Frank.li@....com>
To: Dave Stevenson <dave.stevenson@...pberrypi.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Ray Jui <rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
	Vinod Koul <vkoul@...nel.org>, Maxime Ripard <mripard@...nel.org>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Mark Brown <broonie@...nel.org>, Christoph Hellwig <hch@....de>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Robin Murphy <robin.murphy@....com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	Vladimir Murzin <vladimir.murzin@....com>,
	Phil Elwell <phil@...pberrypi.com>,
	Stefan Wahren <wahrenst@....net>,
	Serge Semin <Sergey.Semin@...kalelectronics.ru>,
	devicetree@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	dmaengine@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	linux-mmc@...r.kernel.org, linux-spi@...r.kernel.org,
	iommu@...ts.linux.dev, linux-sound@...r.kernel.org
Subject: Re: [PATCH 16/18] drm/vc4: Use phys addresses for slave DMA config

On Fri, May 24, 2024 at 07:27:00PM +0100, Dave Stevenson wrote:
> From: Phil Elwell <phil@...pberrypi.com>
> 
> Slave addresses for DMA are meant to be supplied as physical addresses
> (contrary to what struct snd_dmaengine_dai_dma_data does).

Can you use the same content for patch 14-17?

Frank

> 
> Signed-off-by: Phil Elwell <phil@...pberrypi.com>
> Signed-off-by: Dave Stevenson <dave.stevenson@...pberrypi.com>
> ---
>  drivers/gpu/drm/vc4/vc4_hdmi.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index d30f8e8e8967..c2afd72bd96e 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -2696,7 +2696,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
>  	struct snd_soc_card *card = &vc4_hdmi->audio.card;
>  	struct device *dev = &vc4_hdmi->pdev->dev;
>  	struct platform_device *codec_pdev;
> -	const __be32 *addr;
> +	struct resource *iomem;
>  	int index, len;
>  	int ret;
>  
> @@ -2732,22 +2732,15 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
>  	}
>  
>  	/*
> -	 * Get the physical address of VC4_HD_MAI_DATA. We need to retrieve
> -	 * the bus address specified in the DT, because the physical address
> -	 * (the one returned by platform_get_resource()) is not appropriate
> -	 * for DMA transfers.
> -	 * This VC/MMU should probably be exposed to avoid this kind of hacks.
> +	 * Get the physical address of VC4_HD_MAI_DATA.
>  	 */
>  	index = of_property_match_string(dev->of_node, "reg-names", "hd");
>  	/* Before BCM2711, we don't have a named register range */
>  	if (index < 0)
>  		index = 1;
> +	iomem = platform_get_resource(vc4_hdmi->pdev, IORESOURCE_MEM, index);
>  
> -	addr = of_get_address(dev->of_node, index, NULL, NULL);
> -	if (!addr)
> -		return -EINVAL;
> -
> -	vc4_hdmi->audio.dma_data.addr = be32_to_cpup(addr) + mai_data->offset;
> +	vc4_hdmi->audio.dma_data.addr = iomem->start + mai_data->offset;
>  	vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
>  	vc4_hdmi->audio.dma_data.maxburst = 2;
>  
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ