Re: [PATCH 1/4] drm/vram: Set GEM object functions for PRIME

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 28, 2019 at 02:26:56PM +0200, Thomas Zimmermann wrote:
> PRIME functionality is now provided via the callback functions in
> struct drm_gem_object_funcs. The driver-structure functions are obsolete.
> As a side effect of this patch, VRAM-based drivers get basic PRIME
> support automatically without having to set any flags or additional
> fields.

> +static void drm_gem_vram_object_free(struct drm_gem_object *gem)
> +static int drm_gem_vram_object_funcs_pin(struct drm_gem_object *gem)
> +static void drm_gem_vram_object_funcs_unpin(struct drm_gem_object *gem)
> +static void *drm_gem_vram_object_funcs_vmap(struct drm_gem_object *gem)
> +static void drm_gem_vram_object_funcs_vunmap(struct drm_gem_object *gem,
> +					     void *vaddr)

> +static const struct drm_gem_object_funcs drm_gem_vram_object_funcs = {
> +	.free	= drm_gem_vram_object_free,
> +	.pin	= drm_gem_vram_object_funcs_pin,
> +	.unpin	= drm_gem_vram_object_funcs_unpin,
> +	.vmap	= drm_gem_vram_object_funcs_vmap,
> +	.vunmap	= drm_gem_vram_object_funcs_vunmap
> +};

Why new functions?  Can't you just hook up the existing prime functions?

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux