linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: jose.exposito89@gmail.com, javierm@redhat.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@linux.ie, daniel@ffwll.ch, noralf@tronnes.org,
	drawat.floss@gmail.com, lucas.demarchi@intel.com,
	david@lechnology.com, kraxel@redhat.com,
	linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH v2 01/14] iosys-map: Add IOSYS_MAP_INIT_VADDR_IOMEM()
Date: Mon, 8 Aug 2022 20:37:21 +0200	[thread overview]
Message-ID: <YvFX4eSZ8/PU4+RL@ravnborg.org> (raw)
In-Reply-To: <20220808125406.20752-2-tzimmermann@suse.de>

On Mon, Aug 08, 2022 at 02:53:53PM +0200, Thomas Zimmermann wrote:
> Add IOSYS_MAP_INIT_VADDR_IOMEM() for static init of variables of type
> struct iosys_map.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  include/linux/iosys-map.h | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
> index a533cae189d7..cb71aa616bd3 100644
> --- a/include/linux/iosys-map.h
> +++ b/include/linux/iosys-map.h
> @@ -46,10 +46,13 @@
>   *
>   *	iosys_map_set_vaddr(&map, 0xdeadbeaf);
>   *
> - * To set an address in I/O memory, use iosys_map_set_vaddr_iomem().
> + * To set an address in I/O memory, use IOSYS_MAP_INIT_VADDR_IOMEM() or
> + * iosys_map_set_vaddr_iomem().
>   *
>   * .. code-block:: c
>   *
> + *	struct iosys_map map = IOSYS_MAP_INIT_VADDR_IOMEM(0xdeadbeaf);
> + *
>   *	iosys_map_set_vaddr_iomem(&map, 0xdeadbeaf);
>   *
>   * Instances of struct iosys_map do not have to be cleaned up, but
> @@ -121,6 +124,16 @@ struct iosys_map {
>  		.is_iomem = false,	\
>  	}
>  
> +/**
> + * IOSYS_MAP_INIT_VADDR_IOMEM - Initializes struct iosys_map to an address in I/O memory
> + * @vaddr_iomem_:	An I/O-memory address
> + */
> +#define IOSYS_MAP_INIT_VADDR_IOMEM(vaddr_iomem_)	\
> +	{						\
> +		.vaddr_iomem = (vaddr_iomem_),		\
> +		.is_iomem = true,			\
> +	}
> +
>  /**
>   * IOSYS_MAP_INIT_OFFSET - Initializes struct iosys_map from another iosys_map
>   * @map_:	The dma-buf mapping structure to copy from
> -- 
> 2.37.1

  parent reply	other threads:[~2022-08-08 18:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 12:53 [PATCH v2 00/14] drm/format-helper: Move to struct iosys_map Thomas Zimmermann
2022-08-08 12:53 ` [PATCH v2 01/14] iosys-map: Add IOSYS_MAP_INIT_VADDR_IOMEM() Thomas Zimmermann
2022-08-08 14:36   ` Lucas De Marchi
2022-08-08 18:37   ` Sam Ravnborg [this message]
2022-08-08 12:53 ` [PATCH v2 02/14] drm/format-helper: Provide drm_fb_blit() Thomas Zimmermann
2022-08-08 12:53 ` [PATCH v2 03/14] drm/format-helper: Merge drm_fb_memcpy() and drm_fb_memcpy_toio() Thomas Zimmermann
2022-08-08 18:43   ` Sam Ravnborg
2022-08-08 12:53 ` [PATCH v2 04/14] drm/format-helper: Convert drm_fb_swab() to struct iosys_map Thomas Zimmermann
2022-08-08 18:45   ` Sam Ravnborg
2022-08-08 12:53 ` [PATCH v2 05/14] drm/format-helper: Rework XRGB8888-to-RGBG332 conversion Thomas Zimmermann
2022-08-08 12:53 ` [PATCH v2 06/14] drm/format-helper: Rework XRGB8888-to-RGBG565 conversion Thomas Zimmermann
2022-08-08 12:53 ` [PATCH v2 07/14] drm/format-helper: Rework XRGB8888-to-RGB888 conversion Thomas Zimmermann
2022-08-08 12:54 ` [PATCH v2 08/14] drm/format-helper: Rework RGB565-to-XRGB8888 conversion Thomas Zimmermann
2022-08-08 12:54 ` [PATCH v2 09/14] drm/format-helper: Rework RGB888-to-XRGB8888 conversion Thomas Zimmermann
2022-08-08 12:54 ` [PATCH v2 10/14] drm/format-helper: Rework XRGB8888-to-XRGB2101010 conversion Thomas Zimmermann
2022-08-08 12:54 ` [PATCH v2 11/14] drm/format-helper: Rework XRGB8888-to-GRAY8 conversion Thomas Zimmermann
2022-08-08 12:54 ` [PATCH v2 12/14] drm/format-helper: Rework XRGB8888-to-MONO conversion Thomas Zimmermann
2022-08-08 12:54 ` [PATCH v2 13/14] drm/format-helper: Move destination-buffer handling into internal helper Thomas Zimmermann
2022-08-08 18:48   ` Sam Ravnborg
2022-08-08 12:54 ` [PATCH v2 14/14] drm/format-helper: Rename parameter vmap to src Thomas Zimmermann
2022-08-08 18:49   ` Sam Ravnborg
2022-08-08 18:51 ` [PATCH v2 00/14] drm/format-helper: Move to struct iosys_map Sam Ravnborg
2022-08-08 20:00 ` Noralf Trønnes
2022-08-10  7:07 ` Thomas Zimmermann

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=YvFX4eSZ8/PU4+RL@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=david@lechnology.com \
    --cc=drawat.floss@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jose.exposito89@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=noralf@tronnes.org \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux-foundation.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: 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;
as well as URLs for NNTP newsgroup(s).