From: Thomas Zimmermann <tzimmermann@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>, dri-devel@lists.freedesktop.org
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
open list <linux-kernel@vger.kernel.org>,
David Airlie <airlied@linux.ie>, Sean Paul <sean@poorly.run>
Subject: Re: [PATCH 1/2] drm/vram: store dumb bo dimensions.
Date: Thu, 27 Jun 2019 09:57:28 +0200 [thread overview]
Message-ID: <a5663141-ebee-db14-30cc-f0b3f90fe6bb@suse.de> (raw)
In-Reply-To: <20190626065551.12956-2-kraxel@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1866 bytes --]
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@redhat.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)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-06-27 7:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190626065551.12956-1-kraxel@redhat.com>
2019-06-26 6:55 ` [PATCH 1/2] drm/vram: store dumb bo dimensions Gerd Hoffmann
2019-06-26 14:40 ` Sam Ravnborg
2019-06-26 16:27 ` Daniel Vetter
2019-07-08 13:39 ` Pekka Paalanen
2019-07-10 15:26 ` Daniel Vetter
2019-06-27 7:57 ` Thomas Zimmermann [this message]
2019-06-27 12:10 ` Gerd Hoffmann
2019-06-26 6:55 ` [PATCH 2/2] drm/bochs: fix framebuffer setup Gerd Hoffmann
2019-06-26 16:29 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a5663141-ebee-db14-30cc-f0b3f90fe6bb@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@bootlin.com \
--cc=sean@poorly.run \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).