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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61edb9d3-11f5-42de-633d-6e6253ce021f@suse.de>
Date:   Thu, 20 Apr 2023 10:57:40 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Jammy Huang <jammy_huang@...eedtech.com>, airlied@...hat.com
Cc:     airlied@...il.com, daniel@...ll.ch,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/ast: Fix ARM compatibility

Hi

Am 20.04.23 um 10:09 schrieb Jammy Huang:
> ARM architecture only has 'memory', so all devices are accessed by
> MMIO if possible.
> 
> Signed-off-by: Jammy Huang <jammy_huang@...eedtech.com>
> ---
>   v2 changes:
>    - Use MMIO after AST2500 which enable MMIO by default.
> ---
>   drivers/gpu/drm/ast/ast_main.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
> index f83ce77127cb..d384e810fa4d 100644
> --- a/drivers/gpu/drm/ast/ast_main.c
> +++ b/drivers/gpu/drm/ast/ast_main.c
> @@ -425,11 +425,12 @@ struct ast_private *ast_device_create(const struct drm_driver *drv,
>   		return ERR_PTR(-EIO);
>   
>   	/*
> -	 * If we don't have IO space at all, use MMIO now and
> -	 * assume the chip has MMIO enabled by default (rev 0x20
> -	 * and higher).
> +	 * After AST2500, MMIO is enabled by default, and it should be adapted

By 'adapted', you mean 'adopted'?

Apart from that:

Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>

I also ran this patch on an AST2100, which still works as before.

Best regards
Thomas

> +	 * to be compatible with Arm.
>   	 */
> -	if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) {
> +	if (pdev->revision >= 0x40) {
> +		ast->ioregs = ast->regs + AST_IO_MM_OFFSET;
> +	} else if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) {
>   		drm_info(dev, "platform has no IO space, trying MMIO\n");
>   		ast->ioregs = ast->regs + AST_IO_MM_OFFSET;
>   	}
> 
> base-commit: e62252bc55b6d4eddc6c2bdbf95a448180d6a08d

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ