@@ -1,6 +1,6 @@
-====================================
-Xen para-virtualized frontend driver
-====================================
+====================================================
+ drm/xen-front Xen para-virtualized frontend driver
+====================================================
This frontend driver implements Xen para-virtualized display
according to the display protocol described at
@@ -186,8 +186,10 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index,
sring, XEN_PAGE_SIZE);
ret = xenbus_grant_ring(xb_dev, sring, 1, &gref);
- if (ret < 0)
+ if (ret < 0) {
+ free_page(page);
goto fail;
+ }
handler = evtchnl_interrupt_ctrl;
} else {
@@ -195,8 +197,10 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index,
ret = gnttab_grant_foreign_access(xb_dev->otherend_id,
virt_to_gfn((void *)page), 0);
- if (ret < 0)
+ if (ret < 0) {
+ free_page(page);
goto fail;
+ }
gref = ret;
handler = evtchnl_interrupt_evt;
@@ -107,12 +107,13 @@ static void send_pending_event(struct xen_drm_front_drm_pipeline *pipeline)
}
static void display_enable(struct drm_simple_display_pipe *pipe,
- struct drm_crtc_state *crtc_state)
+ struct drm_crtc_state *crtc_state,
+ struct drm_plane_state *plane_state)
{
struct xen_drm_front_drm_pipeline *pipeline =
to_xen_drm_pipeline(pipe);
struct drm_crtc *crtc = &pipe->crtc;
- struct drm_framebuffer *fb = pipe->plane.state->fb;
+ struct drm_framebuffer *fb = plane_state->fb;
int ret, idx;
if (!drm_dev_enter(pipe->crtc.dev, &idx))
@@ -273,7 +274,7 @@ static void display_update(struct drm_simple_display_pipe *pipe,
drm_dev_exit(idx);
}
-enum drm_mode_status display_mode_valid(struct drm_crtc *crtc,
+static enum drm_mode_status display_mode_valid(struct drm_crtc *crtc,
const struct drm_display_mode *mode)
{
struct xen_drm_front_drm_pipeline *pipeline =
On 03/29/2018 12:22 PM, Oleksandr Andrushchenko wrote: > Changes since v4: For your convenience I am attaching diff between v4..v5