Skip to content

Commit cb52163

Browse files
committed
xen/drm: switch xen_drm_front to use INVALID_GRANT_REF
Instead of using a private macro for an invalid grant reference use the common one. Signed-off-by: Juergen Gross <[email protected]> Reviewed-by: Oleksandr Tyshchenko <[email protected]> Tested-by: Oleksandr Tyshchenko <[email protected]> # Arm64 only Signed-off-by: Juergen Gross <[email protected]>
1 parent edd81e7 commit cb52163

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

drivers/gpu/drm/xen/xen_drm_front.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@ struct drm_pending_vblank_event;
8080
/* timeout in ms to wait for backend to respond */
8181
#define XEN_DRM_FRONT_WAIT_BACK_MS 3000
8282

83-
#ifndef GRANT_INVALID_REF
84-
/*
85-
* Note on usage of grant reference 0 as invalid grant reference:
86-
* grant reference 0 is valid, but never exposed to a PV driver,
87-
* because of the fact it is already in use/reserved by the PV console.
88-
*/
89-
#define GRANT_INVALID_REF 0
90-
#endif
91-
9283
struct xen_drm_front_info {
9384
struct xenbus_device *xb_dev;
9485
struct xen_drm_front_drm_info *drm_info;

drivers/gpu/drm/xen/xen_drm_front_evtchnl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void evtchnl_free(struct xen_drm_front_info *front_info,
147147
xenbus_free_evtchn(front_info->xb_dev, evtchnl->port);
148148

149149
/* end access and free the page */
150-
if (evtchnl->gref != GRANT_INVALID_REF)
150+
if (evtchnl->gref != INVALID_GRANT_REF)
151151
gnttab_end_foreign_access(evtchnl->gref, page);
152152

153153
memset(evtchnl, 0, sizeof(*evtchnl));
@@ -168,7 +168,7 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index,
168168
evtchnl->index = index;
169169
evtchnl->front_info = front_info;
170170
evtchnl->state = EVTCHNL_STATE_DISCONNECTED;
171-
evtchnl->gref = GRANT_INVALID_REF;
171+
evtchnl->gref = INVALID_GRANT_REF;
172172

173173
page = get_zeroed_page(GFP_NOIO | __GFP_HIGH);
174174
if (!page) {

0 commit comments

Comments
 (0)