[RFC,libdrm 1/3] tegra: Add stream library

Thierry Reding thierry.reding at avionic-design.de
Fri Dec 28 12:48:47 PST 2012


On Fri, Dec 28, 2012 at 09:45:48AM +0200, Arto Merilainen wrote:
> On 12/28/2012 08:47 AM, Mark Zhang wrote:
> >>+int tegra_fence_is_valid(const struct tegra_fence *fence)
> >>+{
> >>+    int valid = fence ? 1 : 0;
> >>+    valid = valid && fence->id != (uint32_t) -1;
> >>+    valid = valid && fence->id < 32;
> >
> >Hardcode here. Assume always has 32 syncpts.
> >Change to a micro wrapped with tegra version ifdef will be better.
> >
> 
> You are correct. I will fix this.

I disagree. We shouldn't be hiding this kind of detail behind an #ifdef.
Instead it should be detected at runtime. Otherwise you'll need to build
different versions of libdrm for every generation of Tegra. That may be
fine for NVIDIA provided BSPs, but distributions would have a very hard
time dealing with that. What we want is software that works unmodified
on as many generations of Tegra as possible.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20121228/57592198/attachment.pgp>


More information about the dri-devel mailing list