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: <65703839-5eca-4a82-d13a-7d1a68ec9bc2@nvidia.com>
Date:   Tue, 19 Jan 2021 07:52:48 -0800
From:   James Jones <jajones@...dia.com>
To:     Lyude Paul <lyude@...hat.com>, <nouveau@...ts.freedesktop.org>
CC:     Martin Peres <martin.peres@...e.fr>,
        Jeremy Cline <jcline@...hat.com>,
        Simon Ser <contact@...rsion.fr>, <stable@...r.kernel.org>,
        Ben Skeggs <bskeggs@...hat.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Christian König <christian.koenig@....com>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        "Nirmoy Das" <nirmoy.aiemd@...il.com>,
        "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" 
        <dri-devel@...ts.freedesktop.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] drivers/nouveau/kms/nv50-: Reject format modifiers
 for cursor planes

Gah, yes, good catch.

Reviewed-by: James Jones <jajones@...dia.com>

On 1/18/21 5:54 PM, Lyude Paul wrote:
> Nvidia hardware doesn't actually support using tiling formats with the
> cursor plane, only linear is allowed. In the future, we should write a
> testcase for this.
> 
> Fixes: c586f30bf74c ("drm/nouveau/kms: Add format mod prop to base/ovly/nvdisp")
> Cc: James Jones <jajones@...dia.com>
> Cc: Martin Peres <martin.peres@...e.fr>
> Cc: Jeremy Cline <jcline@...hat.com>
> Cc: Simon Ser <contact@...rsion.fr>
> Cc: <stable@...r.kernel.org> # v5.8+
> Signed-off-by: Lyude Paul <lyude@...hat.com>
> ---
>   drivers/gpu/drm/nouveau/dispnv50/wndw.c | 17 +++++++++++++----
>   1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> index ce451242f79e..271de3a63f21 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
> @@ -702,6 +702,11 @@ nv50_wndw_init(struct nv50_wndw *wndw)
>   	nvif_notify_get(&wndw->notify);
>   }
>   
> +static const u64 nv50_cursor_format_modifiers[] = {
> +	DRM_FORMAT_MOD_LINEAR,
> +	DRM_FORMAT_MOD_INVALID,
> +};
> +
>   int
>   nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
>   	       enum drm_plane_type type, const char *name, int index,
> @@ -713,6 +718,7 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
>   	struct nvif_mmu *mmu = &drm->client.mmu;
>   	struct nv50_disp *disp = nv50_disp(dev);
>   	struct nv50_wndw *wndw;
> +	const u64 *format_modifiers;
>   	int nformat;
>   	int ret;
>   
> @@ -728,10 +734,13 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
>   
>   	for (nformat = 0; format[nformat]; nformat++);
>   
> -	ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw,
> -				       format, nformat,
> -				       nouveau_display(dev)->format_modifiers,
> -				       type, "%s-%d", name, index);
> +	if (type == DRM_PLANE_TYPE_CURSOR)
> +		format_modifiers = nv50_cursor_format_modifiers;
> +	else
> +		format_modifiers = nouveau_display(dev)->format_modifiers;
> +
> +	ret = drm_universal_plane_init(dev, &wndw->plane, heads, &nv50_wndw, format, nformat,
> +				       format_modifiers, type, "%s-%d", name, index);
>   	if (ret) {
>   		kfree(*pwndw);
>   		*pwndw = NULL;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ