[Mesa-dev] [RFC] etnaviv: native fence fd support

Rob Clark robdclark at gmail.com
Thu Apr 6 14:46:42 UTC 2017


On Thu, Apr 6, 2017 at 10:23 AM, Philipp Zabel <p.zabel at pengutronix.de> wrote:
> On Wed, 2017-04-05 at 19:46 +0200, Christian Gmeiner wrote:
> [...]
>> > --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
>> > +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
>> > @@ -137,6 +137,9 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>> >     case PIPE_CAP_TGSI_TEXCOORD:
>> >     case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
>> >        return 1;
>> > +   case PIPE_CAP_NATIVE_FENCE_FD:
>> > +      return screen->drm_major > 1 ||
>> > +             (screen->drm_major == 1 && screen->drm_minor >= 1);
>> >
>>
>> I would like to see a etna_device_version(..) in libdrm-etnaviv and used like:
>>     return etna_device_version(screen->dev) >= ETNA_VERSION_FENCE_FD;
>
> I suppose. Wouldn't that just partially duplicate drmGetVersion though?

whether wrapping drmGetVersion() or not, I'm kinda partial to having
#defines (or enums or whatever) to mark which versions some new
feature popped up in, rather than open-coding.

(esp. if that version # changes between when you start working on some
feature and it is merged.. easier to just change the #define)

Possibly if you aren't dealing with abstracting multiple different
kernel interfaces in libdrm, then those #defines could come straight
from kernel uapi header.

BR,
-R

> regards
> Philipp
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list