Re: [PATCH 1/1] [tegra] Make syncpt routines accessible by drivers
From: Erik Gilling
Date: Mon Feb 14 2011 - 20:50:04 EST
On Mon, Feb 14, 2011 at 4:47 PM, Andrew Chew <AChew@xxxxxxxxxx> wrote:
>> Yeah, including the relative path was a bit of a hack since the nvhost
>> drivers needs some serious work before it's upstreamable. A "right"
>> way to do this is to have the syncpt functions take an nvhost_device
>> pointer (or create helper functions that do that,) then expose those
>> functions in mach/nvhost.h. This obviates the need for a global
>> nvhost_sycpt pointer.
>>
>> -Erik
>
> You're right about that global nvhost_syncpt pointer. That drives me nuts as well. Nevertheless, I'm not sure I'm knowledgeable enough to do the required work to do this the "right" way. As far as I know, nvhost is a guaranteed singleton in practice (not in implementation), so while this is ugly, it will work fine for existing projects.
If you feel uncomfortable making this change, I recommend you include
the private header file the way the dc does.
> Can we use nvmap as precedent and do it this way for now? I'd like to get the V4L2 camera host driver up to the Tegra community as soon as possible. When the problem is solved for the dc driver, I can adapt that to the V4L2 camera host driver.
nvmap (another piece of code that needs a lot of work before it's
upstream) is a horrible example to use as a precedent. This whole
discussion is somewhat moot as you're building your driver against two
pieces that have no clear path to being upstreamed. You are welcome
to make any changes you want in your own repository for supporing V4L2
but I won't be pulling this syncpt patch into
git://android.git.kernel.org/kernel/tegra.git.
-Erik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/