[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5663141-ebee-db14-30cc-f0b3f90fe6bb@suse.de>
Date: Thu, 27 Jun 2019 09:57:28 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Gerd Hoffmann <kraxel@...hat.com>, dri-devel@...ts.freedesktop.org
Cc: Maxime Ripard <maxime.ripard@...tlin.com>,
open list <linux-kernel@...r.kernel.org>,
David Airlie <airlied@...ux.ie>, Sean Paul <sean@...rly.run>
Subject: Re: [PATCH 1/2] drm/vram: store dumb bo dimensions.
Hi
Am 26.06.19 um 08:55 schrieb Gerd Hoffmann:
> Store width and height of the bo. Needed in case userspace
> sets up a framebuffer with fb->width != bo->width..
This seems like bug. I'd rather return an error to userspace if the BO
is incompatible.
For the Gnome issue, a fix would be to program the display HW's line
pitch to the correct value.
Best regards
Thomas
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
> ---
> include/drm/drm_gem_vram_helper.h | 1 +
> drivers/gpu/drm/drm_gem_vram_helper.c | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h
> index 1a0ea18e7a74..3692dba167df 100644
> --- a/include/drm/drm_gem_vram_helper.h
> +++ b/include/drm/drm_gem_vram_helper.h
> @@ -39,6 +39,7 @@ struct drm_gem_vram_object {
> struct drm_gem_object gem;
> struct ttm_buffer_object bo;
> struct ttm_bo_kmap_obj kmap;
> + unsigned int width, height;
>
> /* Supported placements are %TTM_PL_VRAM and %TTM_PL_SYSTEM */
> struct ttm_placement placement;
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index 4de782ca26b2..c02bf7694117 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -377,6 +377,8 @@ int drm_gem_vram_fill_create_dumb(struct drm_file *file,
> gbo = drm_gem_vram_create(dev, bdev, size, pg_align, interruptible);
> if (IS_ERR(gbo))
> return PTR_ERR(gbo);
> + gbo->width = args->width;
> + gbo->height = args->height;
>
> ret = drm_gem_handle_create(file, &gbo->gem, &handle);
> if (ret)
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists