Re: [PATCH v3 1/4] drm: add pgprot callback to drm_gem_object_funcs

From: Gerd Hoffmann
Date: Wed Dec 11 2019 - 08:10:22 EST


> > + /**
> > + * @pgprot:
> > + *
> > + * Tweak pgprot as needed, typically used to set cache bits.
> > + *
> > + * This callback is optional.
> > + *
> > + * If unset drm_gem_pgprot_wc() will be used.
> > + */
> > + pgprot_t (*pgprot)(struct drm_gem_object *obj, pgprot_t prot);
>
> I kinda prefer v1, mostly because this is a huge can of worms, and solving
> this properly is going to be real hard (and will necessarily involve
> dma-buf and dma-api and probably more). Charging ahead here just risks
> that we dig ourselves into a corner. You're v1 is maybe not the most
> clean, but just a few code bits here&there should be more flexible and
> easier to hack on and experiment around with.

Hmm. Second vote for v1.

Problem with v1 is that it covers mmap() only, not vmap() ...

cheers,
Gerd