On Mon, 5 Aug 2019 at 19:06, Alyssa Rosenzweig <[email protected]> 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
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev