From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: tzimmermann@suse.de, Gerd Hoffmann <kraxel@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/2] drm/vram: store dumb bo dimensions.
Date: Wed, 26 Jun 2019 08:55:50 +0200 [thread overview]
Message-ID: <20190626065551.12956-2-kraxel@redhat.com> (raw)
In-Reply-To: <20190626065551.12956-1-kraxel@redhat.com>
Store width and height of the bo. Needed in case userspace
sets up a framebuffer with fb->width != bo->width..
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)
--
2.18.1
next parent reply other threads:[~2019-06-26 6:56 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 ` Gerd Hoffmann [this message]
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
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=20190626065551.12956-2-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime.ripard@bootlin.com \
--cc=sean@poorly.run \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®