[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1532107051-31102-2-git-send-email-steve_longerbeam@mentor.com>
Date: Fri, 20 Jul 2018 10:17:30 -0700
From: Steve Longerbeam <slongerbeam@...il.com>
To: devel@...verdev.osuosl.org, dri-devel@...ts.freedesktop.org
Cc: Steve Longerbeam <steve_longerbeam@...tor.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans de Goede <hdegoede@...hat.com>,
Cihangir Akturk <cakturk@...il.com>,
Peter Rosin <peda@...ntia.se>,
Paolo Cretaro <paolocretaro@...il.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/2] staging: vboxvideo: Pass a new framebuffer to vbox_crtc_do_set_base
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@...tor.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
Powered by blists - more mailing lists