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: <87bk3gm0pz.fsf@minerva.mail-host-address-is-not-set>
Date: Tue, 02 Jul 2024 14:34:32 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Thomas Huth <thuth@...hat.com>, dri-devel@...ts.freedesktop.org, Maarten
 Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
 <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, Geert
 Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-kernel@...r.kernel.org, David Airlie <airlied@...il.com>, Daniel
 Vetter <daniel@...ll.ch>, Thomas Huth <thuth@...hat.com>
Subject: Re: [PATCH] drm/fbdev-dma: Fix framebuffer mode for big endian devices

Thomas Huth <thuth@...hat.com> writes:

Hello Thomas,

> The drm_mode_legacy_fb_format() function only generates formats suitable
> for little endian devices. switch to drm_driver_legacy_fb_format() here
> instead to take the device endianness into consideration, too.
>
> Suggested-by: Thomas Zimmermann <tzimmermann@...e.de>
> Signed-off-by: Thomas Huth <thuth@...hat.com>
> ---
>  Note: Patch has only been compile-tested since I lack an environment
>        for testing it. But it's the same fix as I required for the
>        drm_mode_legacy_fb_format() in drm_fbdev_generic.c / drm_fbdev_ttm.c
>        so I think this should be fine.
>
>  drivers/gpu/drm/drm_fbdev_dma.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c
> index 97ef6300d47e..fdef4a2f883f 100644
> --- a/drivers/gpu/drm/drm_fbdev_dma.c
> +++ b/drivers/gpu/drm/drm_fbdev_dma.c
> @@ -101,7 +101,8 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
>  		    sizes->surface_width, sizes->surface_height,
>  		    sizes->surface_bpp);
>  
> -	format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
> +	format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp,
> +					     sizes->surface_depth);
>  	buffer = drm_client_framebuffer_create(client, sizes->surface_width,
>  					       sizes->surface_height, format);
>  	if (IS_ERR(buffer))

Makes sense to me.

Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ