From: Steve Longerbeam <slongerbeam@gmail.com>
To: devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org
Cc: Steve Longerbeam <steve_longerbeam@mentor.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans de Goede <hdegoede@redhat.com>,
Cihangir Akturk <cakturk@gmail.com>,
Peter Rosin <peda@axentia.se>,
Paolo Cretaro <paolocretaro@gmail.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] staging: vboxvideo: Pass a new framebuffer to vbox_crtc_do_set_base
Date: Fri, 20 Jul 2018 10:17:30 -0700 [thread overview]
Message-ID: <1532107051-31102-2-git-send-email-steve_longerbeam@mentor.com> (raw)
In-Reply-To: <1532107051-31102-1-git-send-email-steve_longerbeam@mentor.com>
This modifies vbox_crtc_do_set_base() to take a new framebuffer to
be activated, instead of the existing framebuffer attached to the crtc.
This change allows the function to be given the new framebuffer from
a page-flip request.
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
drivers/staging/vboxvideo/vbox_mode.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c
index b265fe9..688e80d 100644
--- a/drivers/staging/vboxvideo/vbox_mode.c
+++ b/drivers/staging/vboxvideo/vbox_mode.c
@@ -222,7 +222,9 @@ static bool vbox_set_up_input_mapping(struct vbox_private *vbox)
}
static int vbox_crtc_do_set_base(struct drm_crtc *crtc,
- struct drm_framebuffer *old_fb, int x, int y)
+ struct drm_framebuffer *old_fb,
+ struct drm_framebuffer *new_fb,
+ int x, int y)
{
struct vbox_private *vbox = crtc->dev->dev_private;
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
@@ -245,7 +247,7 @@ static int vbox_crtc_do_set_base(struct drm_crtc *crtc,
vbox_bo_unreserve(bo);
}
- vbox_fb = to_vbox_framebuffer(CRTC_FB(crtc));
+ vbox_fb = to_vbox_framebuffer(new_fb);
obj = vbox_fb->obj;
bo = gem_to_vbox_bo(obj);
@@ -281,7 +283,7 @@ static int vbox_crtc_do_set_base(struct drm_crtc *crtc,
static int vbox_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *old_fb)
{
- return vbox_crtc_do_set_base(crtc, old_fb, x, y);
+ return vbox_crtc_do_set_base(crtc, old_fb, CRTC_FB(crtc), x, y);
}
static int vbox_crtc_mode_set(struct drm_crtc *crtc,
--
2.7.4
next prev parent reply other threads:[~2018-07-20 17:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 17:17 [PATCH 0/2] staging: vboxvideo: Add page-flip support Steve Longerbeam
2018-07-20 17:17 ` Steve Longerbeam [this message]
2018-07-20 17:17 ` [PATCH 2/2] " Steve Longerbeam
2018-08-06 8:34 ` [PATCH 0/2] " Daniel Vetter
2018-08-07 21:57 ` Steve Longerbeam
2018-08-30 21:48 ` Steve Longerbeam
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=1532107051-31102-2-git-send-email-steve_longerbeam@mentor.com \
--to=slongerbeam@gmail.com \
--cc=cakturk@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paolocretaro@gmail.com \
--cc=peda@axentia.se \
--cc=steve_longerbeam@mentor.com \
/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