From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm: un-inline drm_legacy_findmap()
Date: Sun, 30 Dec 2018 20:57:10 +0200 [thread overview]
Message-ID: <2084343.fjVNMlTt42@avalon> (raw)
In-Reply-To: <20181228130446.22141-1-jani.nikula@intel.com>
Hi Jani,
Thank you for the patch.
On Friday, 28 December 2018 15:04:46 EET Jani Nikula wrote:
> Also include drm_hashtab.h and add struct drm_device forward declaration
> in drm_legacy.h to make it more self-contained. Make it easier to drop
> drmP.h includes.
>
> v2: avoid including drm_device.h by un-inlining (Daniel)
It would be nice to explain why you de-inline the function (I assume because
it's a bit too large).
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_bufs.c | 11 +++++++++++
> include/drm/drm_legacy.h | 14 ++++----------
> 2 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
> index d7d10cabb9bb..a39ab2193bfe 100644
> --- a/drivers/gpu/drm/drm_bufs.c
> +++ b/drivers/gpu/drm/drm_bufs.c
> @@ -377,6 +377,17 @@ int drm_legacy_addmap(struct drm_device *dev,
> resource_size_t offset, }
> EXPORT_SYMBOL(drm_legacy_addmap);
>
> +struct drm_local_map *drm_legacy_findmap(struct drm_device *dev,
> + unsigned int token)
> +{
> + struct drm_map_list *_entry;
> + list_for_each_entry(_entry, &dev->maplist, head)
> + if (_entry->user_token == token)
> + return _entry->map;
> + return NULL;
> +}
> +EXPORT_SYMBOL(drm_legacy_findmap);
> +
> /**
> * Ioctl to specify a range of memory that is available for mapping by a
> * non-root process.
> diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
> index 8fad66f88e4f..3e99ab69c122 100644
> --- a/include/drm/drm_legacy.h
> +++ b/include/drm/drm_legacy.h
> @@ -2,6 +2,9 @@
> #define __DRM_DRM_LEGACY_H__
>
> #include <drm/drm_auth.h>
> +#include <drm/drm_hashtab.h>
> +
> +struct drm_device;
>
> /*
> * Legacy driver interfaces for the Direct Rendering Manager
> @@ -156,6 +159,7 @@ struct drm_map_list {
> int drm_legacy_addmap(struct drm_device *d, resource_size_t offset,
> unsigned int size, enum drm_map_type type,
> enum drm_map_flags flags, struct drm_local_map **map_p);
> +struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, unsigned
> int token); void drm_legacy_rmmap(struct drm_device *d, struct
> drm_local_map *map); int drm_legacy_rmmap_locked(struct drm_device *d,
> struct drm_local_map *map); void drm_legacy_master_rmmaps(struct drm_device
> *dev,
> @@ -194,14 +198,4 @@ void drm_legacy_ioremap(struct drm_local_map *map,
> struct drm_device *dev); void drm_legacy_ioremap_wc(struct drm_local_map
> *map, struct drm_device *dev); void drm_legacy_ioremapfree(struct
> drm_local_map *map, struct drm_device *dev);
>
> -static inline struct drm_local_map *drm_legacy_findmap(struct drm_device
> *dev, - unsigned int token)
> -{
> - struct drm_map_list *_entry;
> - list_for_each_entry(_entry, &dev->maplist, head)
> - if (_entry->user_token == token)
> - return _entry->map;
> - return NULL;
> -}
> -
> #endif /* __DRM_DRM_LEGACY_H__ */
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-12-30 18:57 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-27 12:56 [PATCH 0/6] drm/i915: drmP.h include removal w/ drm prep work Jani Nikula
2018-12-27 12:56 ` [PATCH 1/6] drm: include drm_device.h from drm_legacy.h Jani Nikula
2018-12-27 16:04 ` Daniel Vetter
2018-12-27 16:08 ` Daniel Vetter
2018-12-28 8:23 ` Jani Nikula
2018-12-28 12:10 ` Daniel Vetter
2018-12-28 13:05 ` Jani Nikula
2018-12-28 13:04 ` [PATCH v2] drm: un-inline drm_legacy_findmap() Jani Nikula
2018-12-28 14:11 ` Daniel Vetter
2018-12-30 18:57 ` Laurent Pinchart [this message]
2018-12-27 12:56 ` [PATCH 2/6] drm: include kernel.h and agp_backend.h from intel-gtt.h Jani Nikula
2018-12-27 16:04 ` Daniel Vetter
2018-12-27 12:56 ` [PATCH 3/6] drm: include idr.h from drm_file.h Jani Nikula
2018-12-27 16:05 ` Daniel Vetter
2018-12-30 19:03 ` Laurent Pinchart
2018-12-27 12:56 ` [PATCH 4/6] drm: include types.h from drm_hdcp.h Jani Nikula
2018-12-27 16:07 ` Daniel Vetter
2018-12-30 19:12 ` Laurent Pinchart
2018-12-27 12:56 ` [PATCH 5/6] drm: include drm_file.h from drm_syncobj.h Jani Nikula
2018-12-27 16:08 ` Daniel Vetter
2018-12-28 8:28 ` [PATCH v2] drm: forward declare struct drm_file in drm_syncobj.h Jani Nikula
2018-12-30 19:16 ` Laurent Pinchart
2018-12-27 12:56 ` [PATCH 6/6] drm/i915: drop all drmP.h includes Jani Nikula
2018-12-27 16:12 ` Daniel Vetter
2018-12-27 16:27 ` Jani Nikula
2018-12-28 11:59 ` Daniel Vetter
2018-12-27 12:59 ` [PATCH 0/6] drm/i915: drmP.h include removal w/ drm prep work Jani Nikula
2018-12-27 15:05 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-12-27 16:01 ` [PATCH 0/6] " Daniel Vetter
2018-12-28 15:01 ` Jani Nikula
2019-01-02 7:47 ` Jani Nikula
2019-01-02 8:25 ` Laurent Pinchart
2019-01-02 9:45 ` Jani Nikula
2018-12-27 17:26 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-12-28 8:56 ` ✓ Fi.CI.BAT: success for drm/i915: drmP.h include removal w/ drm prep work (rev2) Patchwork
2018-12-28 10:12 ` ✓ Fi.CI.IGT: " Patchwork
2018-12-28 12:33 ` [PATCH 0/6] drm/i915: drmP.h include removal w/ drm prep work Sam Ravnborg
2018-12-28 13:20 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: drmP.h include removal w/ drm prep work (rev3) Patchwork
2018-12-28 13:39 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-28 14:49 ` ✓ Fi.CI.IGT: " Patchwork
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=2084343.fjVNMlTt42@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=sam@ravnborg.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