From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
David Airlie <airlied@linux.ie>,
virtualization@lists.linux-foundation.org (open list:VIRTIO GPU
DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/8] drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpufb_create()
Date: Mon, 1 Oct 2018 12:32:15 +0200 [thread overview]
Message-ID: <20181001103222.11924-2-kraxel@redhat.com> (raw)
In-Reply-To: <20181001103222.11924-1-kraxel@redhat.com>
Drop pointless resid variable in virtio_gpufb_create(), just use
the hw_res_handle field in virtio_gpu_object directly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_fb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_fb.c b/drivers/gpu/drm/virtio/virtgpu_fb.c
index cea749f4ec..b1f37cba76 100644
--- a/drivers/gpu/drm/virtio/virtgpu_fb.c
+++ b/drivers/gpu/drm/virtio/virtgpu_fb.c
@@ -214,7 +214,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
struct drm_framebuffer *fb;
struct drm_mode_fb_cmd2 mode_cmd = {};
struct virtio_gpu_object *obj;
- uint32_t resid, format, size;
+ uint32_t format, size;
int ret;
mode_cmd.width = sizes->surface_width;
@@ -231,8 +231,8 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
if (IS_ERR(obj))
return PTR_ERR(obj);
- virtio_gpu_resource_id_get(vgdev, &resid);
- virtio_gpu_cmd_create_resource(vgdev, resid, format,
+ virtio_gpu_resource_id_get(vgdev, &obj->hw_res_handle);
+ virtio_gpu_cmd_create_resource(vgdev, obj->hw_res_handle, format,
mode_cmd.width, mode_cmd.height);
ret = virtio_gpu_object_kmap(obj);
@@ -242,7 +242,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
}
/* attach the object to the resource */
- ret = virtio_gpu_object_attach(vgdev, obj, resid, NULL);
+ ret = virtio_gpu_object_attach(vgdev, obj, obj->hw_res_handle, NULL);
if (ret)
goto err_obj_attach;
--
2.9.3
next parent reply other threads:[~2018-10-01 10:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181001103222.11924-1-kraxel@redhat.com>
2018-10-01 10:32 ` Gerd Hoffmann [this message]
2018-10-01 10:32 ` [PATCH 2/8] drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_mode_dumb_create() Gerd Hoffmann
2018-10-01 10:32 ` [PATCH 3/8] drm/virtio: use virtio_gpu_object->hw_res_handle in virtio_gpu_resource_create_ioctl() Gerd Hoffmann
2018-10-01 10:32 ` [PATCH 4/8] drm/virtio: drop resource_id argument from virtio_gpu_object_attach() Gerd Hoffmann
2018-10-01 10:32 ` [PATCH 5/8] drm/virtio: track created object state Gerd Hoffmann
2018-10-18 1:25 ` Dave Airlie
2018-10-18 5:57 ` Gerd Hoffmann
2018-10-01 10:32 ` [PATCH 6/8] drm/virtio: fix resource id handling Gerd Hoffmann
2018-10-01 10:32 ` [PATCH 7/8] drm/virtio: move virtio_gpu_object_{attach,detach} calls Gerd Hoffmann
2018-10-18 1:41 ` [PATCH 7/8] drm/virtio: move virtio_gpu_object_{attach, detach} calls Dave Airlie
2018-10-18 6:10 ` Gerd Hoffmann
2018-10-18 6:36 ` Dave Airlie
2018-10-18 7:00 ` Gerd Hoffmann
2018-10-19 0:33 ` Dave Airlie
2018-10-01 10:32 ` [PATCH 8/8] drm/virtio: move objects to TTM_PL_TT after creation Gerd Hoffmann
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=20181001103222.11924-2-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/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).