From: Juergen Gross <jgross@suse.com> To: xen-devel@lists.xenproject.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Juergen Gross <jgross@suse.com>, David Airlie <airlied@linux.ie>, Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Subject: [PATCH v3 07/21] xen/drm: switch xen_drm_front to use INVALID_GRANT_REF Date: Thu, 5 May 2022 10:16:26 +0200 [thread overview] Message-ID: <20220505081640.17425-8-jgross@suse.com> (raw) In-Reply-To: <20220505081640.17425-1-jgross@suse.com> Instead of using a private macro for an invalid grant reference use the common one. Signed-off-by: Juergen Gross <jgross@suse.com> --- drivers/gpu/drm/xen/xen_drm_front.h | 9 --------- drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h index cefafe859aba..a987c78abe41 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.h +++ b/drivers/gpu/drm/xen/xen_drm_front.h @@ -80,15 +80,6 @@ struct drm_pending_vblank_event; /* timeout in ms to wait for backend to respond */ #define XEN_DRM_FRONT_WAIT_BACK_MS 3000 -#ifndef GRANT_INVALID_REF -/* - * Note on usage of grant reference 0 as invalid grant reference: - * grant reference 0 is valid, but never exposed to a PV driver, - * because of the fact it is already in use/reserved by the PV console. - */ -#define GRANT_INVALID_REF 0 -#endif - struct xen_drm_front_info { struct xenbus_device *xb_dev; struct xen_drm_front_drm_info *drm_info; diff --git a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c index 08b526eeec16..4006568b9e32 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c +++ b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c @@ -147,7 +147,7 @@ static void evtchnl_free(struct xen_drm_front_info *front_info, xenbus_free_evtchn(front_info->xb_dev, evtchnl->port); /* end access and free the page */ - if (evtchnl->gref != GRANT_INVALID_REF) + if (evtchnl->gref != INVALID_GRANT_REF) gnttab_end_foreign_access(evtchnl->gref, page); memset(evtchnl, 0, sizeof(*evtchnl)); @@ -168,7 +168,7 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index, evtchnl->index = index; evtchnl->front_info = front_info; evtchnl->state = EVTCHNL_STATE_DISCONNECTED; - evtchnl->gref = GRANT_INVALID_REF; + evtchnl->gref = INVALID_GRANT_REF; page = get_zeroed_page(GFP_NOIO | __GFP_HIGH); if (!page) { -- 2.35.3
WARNING: multiple messages have this Message-ID (diff)
From: Juergen Gross <jgross@suse.com> To: xen-devel@lists.xenproject.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Juergen Gross <jgross@suse.com>, Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch> Subject: [PATCH v3 07/21] xen/drm: switch xen_drm_front to use INVALID_GRANT_REF Date: Thu, 5 May 2022 10:16:26 +0200 [thread overview] Message-ID: <20220505081640.17425-8-jgross@suse.com> (raw) In-Reply-To: <20220505081640.17425-1-jgross@suse.com> Instead of using a private macro for an invalid grant reference use the common one. Signed-off-by: Juergen Gross <jgross@suse.com> --- drivers/gpu/drm/xen/xen_drm_front.h | 9 --------- drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h index cefafe859aba..a987c78abe41 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.h +++ b/drivers/gpu/drm/xen/xen_drm_front.h @@ -80,15 +80,6 @@ struct drm_pending_vblank_event; /* timeout in ms to wait for backend to respond */ #define XEN_DRM_FRONT_WAIT_BACK_MS 3000 -#ifndef GRANT_INVALID_REF -/* - * Note on usage of grant reference 0 as invalid grant reference: - * grant reference 0 is valid, but never exposed to a PV driver, - * because of the fact it is already in use/reserved by the PV console. - */ -#define GRANT_INVALID_REF 0 -#endif - struct xen_drm_front_info { struct xenbus_device *xb_dev; struct xen_drm_front_drm_info *drm_info; diff --git a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c index 08b526eeec16..4006568b9e32 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c +++ b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c @@ -147,7 +147,7 @@ static void evtchnl_free(struct xen_drm_front_info *front_info, xenbus_free_evtchn(front_info->xb_dev, evtchnl->port); /* end access and free the page */ - if (evtchnl->gref != GRANT_INVALID_REF) + if (evtchnl->gref != INVALID_GRANT_REF) gnttab_end_foreign_access(evtchnl->gref, page); memset(evtchnl, 0, sizeof(*evtchnl)); @@ -168,7 +168,7 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index, evtchnl->index = index; evtchnl->front_info = front_info; evtchnl->state = EVTCHNL_STATE_DISCONNECTED; - evtchnl->gref = GRANT_INVALID_REF; + evtchnl->gref = INVALID_GRANT_REF; page = get_zeroed_page(GFP_NOIO | __GFP_HIGH); if (!page) { -- 2.35.3
next prev parent reply other threads:[~2022-05-05 8:16 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-05 8:16 [PATCH v3 00/21] xen: simplify frontend side ring setup Juergen Gross 2022-05-05 8:16 ` Juergen Gross 2022-05-05 8:16 ` [PATCH v3 01/21] xen: update grant_table.h Juergen Gross 2022-05-05 8:16 ` [PATCH v3 02/21] xen/grant-table: never put a reserved grant on the free list Juergen Gross 2022-05-05 8:16 ` [PATCH v3 03/21] xen/blkfront: switch blkfront to use INVALID_GRANT_REF Juergen Gross 2022-05-09 8:20 ` Roger Pau Monné 2022-05-05 8:16 ` [PATCH v3 04/21] xen/netfront: switch netfront " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 05/21] xen/scsifront: remove unused GRANT_INVALID_REF definition Juergen Gross 2022-05-05 8:16 ` [PATCH v3 06/21] xen/usb: switch xen-hcd to use INVALID_GRANT_REF Juergen Gross 2022-05-05 8:16 ` Juergen Gross [this message] 2022-05-05 8:16 ` [PATCH v3 07/21] xen/drm: switch xen_drm_front " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 08/21] xen/sound: switch xen_snd_front " Juergen Gross 2022-05-05 8:16 ` Juergen Gross 2022-05-05 8:16 ` [PATCH v3 09/21] xen/dmabuf: switch gntdev-dmabuf " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 10/21] xen/shbuf: switch xen-front-pgdir-shbuf " Juergen Gross 2022-05-09 8:47 ` Oleksandr 2022-05-05 8:16 ` [PATCH v3 11/21] xen: update ring.h Juergen Gross 2022-05-05 8:16 ` [PATCH v3 12/21] xen/xenbus: add xenbus_setup_ring() service function Juergen Gross 2022-05-05 8:16 ` [PATCH v3 13/21] xen/blkfront: use xenbus_setup_ring() and xenbus_teardown_ring() Juergen Gross 2022-05-09 8:42 ` Roger Pau Monné 2022-05-05 8:16 ` [PATCH v3 14/21] xen/netfront: " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 15/21] xen/tpmfront: " Juergen Gross 2022-05-06 22:32 ` Jarkko Sakkinen 2022-05-18 9:41 ` Juergen Gross 2022-05-18 14:57 ` Jarkko Sakkinen 2022-05-05 8:16 ` [PATCH v3 16/21] xen/drmfront: " Juergen Gross 2022-05-05 8:16 ` Juergen Gross 2022-05-05 8:16 ` [PATCH v3 17/21] xen/pcifront: " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 18/21] xen/scsifront: " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 19/21] xen/usbfront: " Juergen Gross 2022-05-05 8:16 ` [PATCH v3 20/21] xen/sndfront: " Juergen Gross 2022-05-05 8:16 ` Juergen Gross 2022-05-05 8:16 ` [PATCH v3 21/21] xen/xenbus: eliminate xenbus_grant_ring() Juergen Gross 2022-05-06 0:12 ` [PATCH v3 00/21] xen: simplify frontend side ring setup Boris Ostrovsky 2022-05-06 0:12 ` Boris Ostrovsky 2022-05-09 13:23 ` Oleksandr 2022-05-09 13:23 ` Oleksandr 2022-05-09 13:23 ` Oleksandr
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=20220505081640.17425-8-jgross@suse.com \ --to=jgross@suse.com \ --cc=airlied@linux.ie \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=oleksandr_andrushchenko@epam.com \ --cc=xen-devel@lists.xenproject.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.