[Mesa-dev] [PATCH 3/5] panfrost: Mark BOs as NOEXEC
Tomeu Vizoso
tomeu.vizoso at collabora.com
Tue Aug 6 11:14:38 UTC 2019
On Mon, 5 Aug 2019 at 19:06, Alyssa Rosenzweig <alyssa at rosenzweig.io> wrote:
>
> > + if (screen->kernel_version >= 1) {
>
> Maybe have some #defines for kernel versions instead of magic numbers?
> Also, maybe make it clear that this is a minor version -- what does
> happen if we bump the major version at some point...?
In that case we would need to change Mesa to also take into account
the major field. I cannot see why we would do it, though.
> > panfrost_create_screen(int fd, struct renderonly *ro)
> > {
> > struct panfrost_screen *screen = rzalloc(NULL, struct panfrost_screen);
> > + drmVersionPtr version;
> >
> > pan_debug = debug_get_option_pan_debug();
> >
> > @@ -618,6 +619,17 @@ panfrost_create_screen(int fd, struct renderonly *ro)
> > return NULL;
> > }
> >
> > + version = drmGetVersion(fd);
> > + if (version->version_major != 1) {
> > + debug_printf("panfrost: Unsupported version: %u.%u.%u",
> > + version->version_major, version->version_minor,
> > + version->version_patchlevel);
> > + drmFreeVersion(version);
> > + return NULL;
> > + }
> > + screen->kernel_version = version->version_minor;
> > + drmFreeVersion(version);
> > +
> > util_dynarray_init(&screen->transient_bo, screen);
> >
>
> I don't really care *too* much but spacing is all over the place.
Will check before v2.
Thanks,
Tomeu
More information about the mesa-dev
mailing list