lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Feb 2011 16:47:34 -0800
From:	Andrew Chew <AChew@...dia.com>
To:	'Erik Gilling' <konkers@...roid.com>
CC:	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"ccross@...roid.com" <ccross@...roid.com>,
	"olof@...om.net" <olof@...om.net>
Subject: RE: [PATCH 1/1] [tegra] Make syncpt routines accessible by drivers

> 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.

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.

> On Mon, Feb 14, 2011 at 4:08 PM, Andrew Chew <AChew@...dia.com> wrote:
> >> If you want to use syncpts you should be an nvhost_driver 
> link the dc.
> >
> > Looking at drivers/video/tegra/dc, I notice that it gets 
> access to the syncpt functions by using a relative path 
> (../host/dev.h) to include dev.h, which in turn includes 
> nvhost_syncpt.h (in drivers/video/tegra/host).  Is this proper form?
> >
> > This syncpt access is for a Tegra V4L2 driver, which will 
> live in drivers/media/video.  I was trying to avoid using 
> relative paths for #includes.  I assumed that the header 
> files in drivers/video/tegra/host were not meant to be 
> publicly available to other drivers, which is why I looked 
> for some precedent in how nvhost functions were made 
> available to other kernel drivers, hence I modeled this after nvmap.
> --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ