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]
Date:   Fri, 25 May 2018 16:48:59 +0100
From:   Brian Starkey <brian.starkey@....com>
To:     Ayan Kumar Halder <ayan.halder@....com>
Cc:     liviu.dudau@....com, alexandru-cosmin.gheorghe@....com,
        gustavo@...ovan.org, maarten.lankhorst@...ux.intel.com,
        seanpaul@...omium.org, airlied@...ux.ie,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        nd@....com
Subject: Re: [PATCH] drm: check_pixel_format() should return true if no
 modifiers are passed for a supported pixel format

Hi Ayan,

On Fri, May 25, 2018 at 04:35:41PM +0100, Ayan Kumar Halder wrote:
>If a plane supports a pixel format and the framebuffer does not pass any
>modifiers, then drm_plane_check_pixel_format() should always return true
>for the given format regardless of whether the plane supports any
>modifiers or not.
>
>Signed-off-by: Ayan Kumar Halder <ayan.halder@....com>
>---
> drivers/gpu/drm/drm_plane.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
>index 6d2a6e4..873c084 100644
>--- a/drivers/gpu/drm/drm_plane.c
>+++ b/drivers/gpu/drm/drm_plane.c
>@@ -564,6 +564,9 @@ int drm_plane_check_pixel_format(struct drm_plane *plane,
> 	if (!plane->modifier_count)
> 		return 0;
>
>+	if (modifier == DRM_FORMAT_MOD_NONE)
>+		return 0;
>+

There can be drivers which have formats which are only supported when
a modifier is used - so I don't think this check is right to have in
the core.

Drivers need to check if they support the format with no modifier
(same as DRM_FORMAT_MOD_LINEAR) in their format_mod_supported()
callback.

Thanks,
-Brian

> 	for (i = 0; i < plane->modifier_count; i++) {
> 		if (modifier == plane->modifiers[i])
> 			break;
>-- 
>2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ