[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-04 Thread Thierry Reding
On Mon, Dec 03, 2012 at 12:23:32PM -0700, Stephen Warren wrote: > On 12/01/2012 07:58 AM, Thierry Reding wrote: > > On Sat, Dec 01, 2012 at 01:31:02PM +0200, Terje Bergstr?m wrote: > ... > >> I was thinking of definitions like this: > >> > >> static inline u32 host1x_sync_cfpeek_ctrl_cfpeek_addr_f

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-04 Thread Thierry Reding
On Mon, Dec 03, 2012 at 12:23:32PM -0700, Stephen Warren wrote: > On 12/01/2012 07:58 AM, Thierry Reding wrote: > > On Sat, Dec 01, 2012 at 01:31:02PM +0200, Terje Bergström wrote: > ... > >> I was thinking of definitions like this: > >> > >> static inline u32 host1x_sync_cfpeek_ctrl_cfpeek_addr_f

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-04 Thread Mark Zhang
On 12/04/2012 05:03 AM, Thierry Reding wrote: [...] > > One other thing that such a design can help with is refactoring common > code or parameterizing code. Maybe newer generations are not compatible > but can easily be made to work with existing code by introducing a > variable such as register

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-04 Thread Mark Zhang
On 12/04/2012 05:03 AM, Thierry Reding wrote: [...] >> I think there's room for letting Terje's complete knowledge of future >> chips guide the design of the current code that's sent upstream. >> Certainly we shouldn't add a ton of unnecessary abstraction layers >> right now that aren't needed for

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-04 Thread Terje Bergström
On 03.12.2012 23:03, Thierry Reding wrote: > What's really difficult to follow is if an ops structure is accessed via > some global macro. It also breaks encapsulation because you have a > global ops structure. That may even work fine for now, but it will break > once you have more than a single ho

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Terje Bergström
On 03.12.2012 23:03, Thierry Reding wrote: > What's really difficult to follow is if an ops structure is accessed via > some global macro. It also breaks encapsulation because you have a > global ops structure. That may even work fine for now, but it will break > once you have more than a single ho

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Thierry Reding
On Mon, Dec 03, 2012 at 12:20:30PM -0700, Stephen Warren wrote: > On 11/30/2012 03:38 AM, Thierry Reding wrote: > > On Fri, Nov 30, 2012 at 10:56:39AM +0200, Terje Bergstr?m wrote: > >> On 29.11.2012 13:47, Thierry Reding wrote: > >>> On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m > >>>

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Mark Zhang
On 12/04/2012 05:03 AM, Thierry Reding wrote: [...] > > One other thing that such a design can help with is refactoring common > code or parameterizing code. Maybe newer generations are not compatible > but can easily be made to work with existing code by introducing a > variable such as register

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Mark Zhang
On 12/04/2012 05:03 AM, Thierry Reding wrote: [...] >> I think there's room for letting Terje's complete knowledge of future >> chips guide the design of the current code that's sent upstream. >> Certainly we shouldn't add a ton of unnecessary abstraction layers >> right now that aren't needed for

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Thierry Reding
On Mon, Dec 03, 2012 at 12:20:30PM -0700, Stephen Warren wrote: > On 11/30/2012 03:38 AM, Thierry Reding wrote: > > On Fri, Nov 30, 2012 at 10:56:39AM +0200, Terje Bergström wrote: > >> On 29.11.2012 13:47, Thierry Reding wrote: > >>> On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström > >>>

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Stephen Warren
On 12/01/2012 07:58 AM, Thierry Reding wrote: > On Sat, Dec 01, 2012 at 01:31:02PM +0200, Terje Bergstr?m wrote: ... >> I was thinking of definitions like this: >> >> static inline u32 host1x_sync_cfpeek_ctrl_cfpeek_addr_f(u32 v) { >> return (v & 0x1ff) << 0; } >> >> versus >> >> #define host1x

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Stephen Warren
On 11/30/2012 03:38 AM, Thierry Reding wrote: > On Fri, Nov 30, 2012 at 10:56:39AM +0200, Terje Bergstr?m wrote: >> On 29.11.2012 13:47, Thierry Reding wrote: >>> On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m >>> wrote: Tegra20 and Tegra30 are compatible, but future chips are not.

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Stephen Warren
On 12/01/2012 07:58 AM, Thierry Reding wrote: > On Sat, Dec 01, 2012 at 01:31:02PM +0200, Terje Bergström wrote: ... >> I was thinking of definitions like this: >> >> static inline u32 host1x_sync_cfpeek_ctrl_cfpeek_addr_f(u32 v) { >> return (v & 0x1ff) << 0; } >> >> versus >> >> #define host1x

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Stephen Warren
On 11/30/2012 03:38 AM, Thierry Reding wrote: > On Fri, Nov 30, 2012 at 10:56:39AM +0200, Terje Bergström wrote: >> On 29.11.2012 13:47, Thierry Reding wrote: >>> On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström >>> wrote: Tegra20 and Tegra30 are compatible, but future chips are not.

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-03 Thread Terje Bergström
On 02.12.2012 22:55, Thierry Reding wrote: > FWIW I'm convinced that you're genuinely trying to make this work and > nobody welcomes this more than me. However it is only natural if you > dump such a large body of code on the community that people will > disagree with some of the design decisions.

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-02 Thread Terje Bergström
On 02.12.2012 22:55, Thierry Reding wrote: > FWIW I'm convinced that you're genuinely trying to make this work and > nobody welcomes this more than me. However it is only natural if you > dump such a large body of code on the community that people will > disagree with some of the design decisions.

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-02 Thread Thierry Reding
On Sun, Dec 02, 2012 at 01:24:13PM +0200, Terje Bergstr?m wrote: > On 01.12.2012 23:42, Dave Airlie wrote: > > Guys I think you guys might be overthniking things here. > > > > I know you have some sort of upstream/downstream split, but really in > > the upstream kernel, we don't care about that, s

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-02 Thread Terje Bergström
On 01.12.2012 23:42, Dave Airlie wrote: > Guys I think you guys might be overthniking things here. > > I know you have some sort of upstream/downstream split, but really in > the upstream kernel, we don't care about that, so don't make it our > problem. I am not trying to make anything your probl

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-02 Thread Thierry Reding
On Sun, Dec 02, 2012 at 01:24:13PM +0200, Terje Bergström wrote: > On 01.12.2012 23:42, Dave Airlie wrote: > > Guys I think you guys might be overthniking things here. > > > > I know you have some sort of upstream/downstream split, but really in > > the upstream kernel, we don't care about that, s

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-02 Thread Dave Airlie
Guys I think you guys might be overthniking things here. I know you have some sort of upstream/downstream split, but really in the upstream kernel, we don't care about that, so don't make it our problem. There is no need for any sort of stable API between host1x and the sub drivers, we change API

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-02 Thread Terje Bergström
On 01.12.2012 23:42, Dave Airlie wrote: > Guys I think you guys might be overthniking things here. > > I know you have some sort of upstream/downstream split, but really in > the upstream kernel, we don't care about that, so don't make it our > problem. I am not trying to make anything your probl

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Thierry Reding
On Sun, Dec 02, 2012 at 07:42:06AM +1000, Dave Airlie wrote: > Guys I think you guys might be overthniking things here. > > I know you have some sort of upstream/downstream split, but really in > the upstream kernel, we don't care about that, so don't make it our > problem. > > There is no need f

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 19:34, Lucas Stach wrote: > This would certainly make life easier, but personally I don't think it's > the right thing to do. The separation of the Linux kernel into different > subsystems was done for a reason and just because the specific hardware > at hands happens to work a bit di

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 16:58, Thierry Reding wrote: > I don't know where you see politics in what I said. All I'm saying is > that we shouldn't be making things needlessly complex. In my experience > the technically cleanest solution is usually the one with the least > complexity. Let me come up with a pro

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 17:10, Thierry Reding wrote: > On Sat, Dec 01, 2012 at 01:44:41PM +0200, Terje Bergstr?m wrote: >> host1x module being in DRM directory hinders using nvhost from anywhere >> outside DRM in both upstream and downstream. > > That's not true. Nothing keeps the rest of the kernel from us

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Lucas Stach
Am Samstag, den 01.12.2012, 18:55 +0200 schrieb Terje Bergstr?m: > On 01.12.2012 17:10, Thierry Reding wrote: > > On Sat, Dec 01, 2012 at 01:44:41PM +0200, Terje Bergstr?m wrote: > >> host1x module being in DRM directory hinders using nvhost from anywhere > >> outside DRM in both upstream and downs

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 15:42, Daniel Vetter wrote: > Out of sheer curiosity: What are you using the coverage data of these > register definitions for? When I looked into coverage analysis the > resulting data seemed rather useless to me, since the important thing > is how well we cover the entire dynamic st

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Thierry Reding
On Sat, Dec 01, 2012 at 01:44:41PM +0200, Terje Bergstr?m wrote: > On 30.11.2012 10:50, Lucas Stach wrote: > > I'm with Thierry here. I think there is a fair chance that we won't get > > the API right from the start, even when trying to come up with something > > that sounds sane to everyone. It's

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Thierry Reding
On Sat, Dec 01, 2012 at 01:31:02PM +0200, Terje Bergstr?m wrote: > On 30.11.2012 12:38, Thierry Reding wrote: > > * PGP Signed by an unknown key > > The above implies that when you submit code it shouldn't contain pieces > > that prepare for possible future extensions which may or may not be > > su

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Daniel Vetter
On Sat, Dec 1, 2012 at 12:31 PM, Terje Bergstr?m wrote: > We must've talked about a bit different things. For pure register defs, > I can accommodate changing to #defines. We'd lose the code coverage > analysis, though, but if the parentheses are a make-or-break question to > upstreaming, I can c

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Thierry Reding
On Sun, Dec 02, 2012 at 07:42:06AM +1000, Dave Airlie wrote: > Guys I think you guys might be overthniking things here. > > I know you have some sort of upstream/downstream split, but really in > the upstream kernel, we don't care about that, so don't make it our > problem. > > There is no need f

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 30.11.2012 10:50, Lucas Stach wrote: > I'm with Thierry here. I think there is a fair chance that we won't get > the API right from the start, even when trying to come up with something > that sounds sane to everyone. It's also not desirable to delay gr2d > going into mainline until we are all c

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Dave Airlie
Guys I think you guys might be overthniking things here. I know you have some sort of upstream/downstream split, but really in the upstream kernel, we don't care about that, so don't make it our problem. There is no need for any sort of stable API between host1x and the sub drivers, we change API

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 30.11.2012 12:38, Thierry Reding wrote: > * PGP Signed by an unknown key > The above implies that when you submit code it shouldn't contain pieces > that prepare for possible future extensions which may or may not be > submitted (the exception being if such changes are part of a series > where s

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 19:34, Lucas Stach wrote: > This would certainly make life easier, but personally I don't think it's > the right thing to do. The separation of the Linux kernel into different > subsystems was done for a reason and just because the specific hardware > at hands happens to work a bit di

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Lucas Stach
Am Samstag, den 01.12.2012, 18:55 +0200 schrieb Terje Bergström: > On 01.12.2012 17:10, Thierry Reding wrote: > > On Sat, Dec 01, 2012 at 01:44:41PM +0200, Terje Bergström wrote: > >> host1x module being in DRM directory hinders using nvhost from anywhere > >> outside DRM in both upstream and downs

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 16:58, Thierry Reding wrote: > I don't know where you see politics in what I said. All I'm saying is > that we shouldn't be making things needlessly complex. In my experience > the technically cleanest solution is usually the one with the least > complexity. Let me come up with a pro

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 17:10, Thierry Reding wrote: > On Sat, Dec 01, 2012 at 01:44:41PM +0200, Terje Bergström wrote: >> host1x module being in DRM directory hinders using nvhost from anywhere >> outside DRM in both upstream and downstream. > > That's not true. Nothing keeps the rest of the kernel from us

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 01.12.2012 15:42, Daniel Vetter wrote: > Out of sheer curiosity: What are you using the coverage data of these > register definitions for? When I looked into coverage analysis the > resulting data seemed rather useless to me, since the important thing > is how well we cover the entire dynamic st

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Thierry Reding
On Sat, Dec 01, 2012 at 01:44:41PM +0200, Terje Bergström wrote: > On 30.11.2012 10:50, Lucas Stach wrote: > > I'm with Thierry here. I think there is a fair chance that we won't get > > the API right from the start, even when trying to come up with something > > that sounds sane to everyone. It's

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Thierry Reding
On Sat, Dec 01, 2012 at 01:31:02PM +0200, Terje Bergström wrote: > On 30.11.2012 12:38, Thierry Reding wrote: > > * PGP Signed by an unknown key > > The above implies that when you submit code it shouldn't contain pieces > > that prepare for possible future extensions which may or may not be > > su

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Daniel Vetter
On Sat, Dec 1, 2012 at 12:31 PM, Terje Bergström wrote: > We must've talked about a bit different things. For pure register defs, > I can accommodate changing to #defines. We'd lose the code coverage > analysis, though, but if the parentheses are a make-or-break question to > upstreaming, I can ch

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 30.11.2012 10:50, Lucas Stach wrote: > I'm with Thierry here. I think there is a fair chance that we won't get > the API right from the start, even when trying to come up with something > that sounds sane to everyone. It's also not desirable to delay gr2d > going into mainline until we are all c

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-12-01 Thread Terje Bergström
On 30.11.2012 12:38, Thierry Reding wrote: > * PGP Signed by an unknown key > The above implies that when you submit code it shouldn't contain pieces > that prepare for possible future extensions which may or may not be > submitted (the exception being if such changes are part of a series > where s

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Thierry Reding
On Fri, Nov 30, 2012 at 10:56:39AM +0200, Terje Bergstr?m wrote: > On 29.11.2012 13:47, Thierry Reding wrote: > > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m wrote: > >> Tegra20 and Tegra30 are compatible, but future chips are not. I was > >> hoping we would be ready in upstream kerne

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Terje Bergström
On 29.11.2012 13:47, Thierry Reding wrote: > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m wrote: >> Tegra20 and Tegra30 are compatible, but future chips are not. I was >> hoping we would be ready in upstream kernel for future chips. > > I think we should ignore that problem for now. G

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Lucas Stach
Am Donnerstag, den 29.11.2012, 11:38 -0700 schrieb Stephen Warren: > On 11/29/2012 04:47 AM, Thierry Reding wrote: > > I agree. But I also fear that there will be changes eventually and > > having both go in via different tree requires those trees to be > > merged in a specific order to avoid brea

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Terje Bergström
On 29.11.2012 20:34, Stephen Warren wrote: > On 11/29/2012 03:21 AM, Terje Bergstr?m wrote: >> True. I might also as well delete the general interrupt altogether, as >> we don't use it for any real purpose. > > Do make sure the interrupts still are part of the DT binding though, so > that the bind

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Thierry Reding
On Fri, Nov 30, 2012 at 08:54:32AM +0200, Terje Bergstr?m wrote: > On 29.11.2012 20:34, Stephen Warren wrote: > > On 11/29/2012 03:21 AM, Terje Bergstr?m wrote: > >> True. I might also as well delete the general interrupt altogether, as > >> we don't use it for any real purpose. > > > > Do make su

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Thierry Reding
On Thu, Nov 29, 2012 at 11:38:11AM -0700, Stephen Warren wrote: > On 11/29/2012 04:47 AM, Thierry Reding wrote: > > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m wrote: > >> On 28.11.2012 23:23, Thierry Reding wrote: > >>> This could be problematic. Since drivers/video and > >>> drivers

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Thierry Reding
On Fri, Nov 30, 2012 at 10:56:39AM +0200, Terje Bergström wrote: > On 29.11.2012 13:47, Thierry Reding wrote: > > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström wrote: > >> Tegra20 and Tegra30 are compatible, but future chips are not. I was > >> hoping we would be ready in upstream kerne

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Terje Bergström
On 29.11.2012 13:47, Thierry Reding wrote: > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström wrote: >> Tegra20 and Tegra30 are compatible, but future chips are not. I was >> hoping we would be ready in upstream kernel for future chips. > > I think we should ignore that problem for now. G

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Lucas Stach
Am Donnerstag, den 29.11.2012, 11:38 -0700 schrieb Stephen Warren: > On 11/29/2012 04:47 AM, Thierry Reding wrote: > > I agree. But I also fear that there will be changes eventually and > > having both go in via different tree requires those trees to be > > merged in a specific order to avoid brea

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Thierry Reding
On Fri, Nov 30, 2012 at 08:54:32AM +0200, Terje Bergström wrote: > On 29.11.2012 20:34, Stephen Warren wrote: > > On 11/29/2012 03:21 AM, Terje Bergström wrote: > >> True. I might also as well delete the general interrupt altogether, as > >> we don't use it for any real purpose. > > > > Do make su

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Thierry Reding
On Thu, Nov 29, 2012 at 11:38:11AM -0700, Stephen Warren wrote: > On 11/29/2012 04:47 AM, Thierry Reding wrote: > > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström wrote: > >> On 28.11.2012 23:23, Thierry Reding wrote: > >>> This could be problematic. Since drivers/video and > >>> drivers

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-30 Thread Terje Bergström
On 29.11.2012 20:34, Stephen Warren wrote: > On 11/29/2012 03:21 AM, Terje Bergström wrote: >> True. I might also as well delete the general interrupt altogether, as >> we don't use it for any real purpose. > > Do make sure the interrupts still are part of the DT binding though, so > that the bind

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Thierry Reding
On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m wrote: > On 28.11.2012 23:23, Thierry Reding wrote: > > This could be problematic. Since drivers/video and drivers/gpu/drm are > > separate trees, this would entail a continuous burden on keeping both > > trees synchronized. While I realize

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Terje Bergström
On 28.11.2012 23:23, Thierry Reding wrote: > This could be problematic. Since drivers/video and drivers/gpu/drm are > separate trees, this would entail a continuous burden on keeping both > trees synchronized. While I realize that eventually it might be better > to put the host1x driver in a separa

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Stephen Warren
On 11/29/2012 04:47 AM, Thierry Reding wrote: > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergstr?m wrote: >> On 28.11.2012 23:23, Thierry Reding wrote: >>> This could be problematic. Since drivers/video and >>> drivers/gpu/drm are separate trees, this would entail a >>> continuous burden on

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Stephen Warren
On 11/29/2012 03:21 AM, Terje Bergstr?m wrote: > On 28.11.2012 23:23, Thierry Reding wrote: ... >>> + regs = platform_get_resource(dev, IORESOURCE_MEM, 0); >>> + intr0 = platform_get_resource(dev, IORESOURCE_IRQ, 0); >>> + intr1 = platform_get_resource(dev, IORESOURCE_IRQ, 1); >>> + >>>

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Stephen Warren
On 11/29/2012 04:47 AM, Thierry Reding wrote: > On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström wrote: >> On 28.11.2012 23:23, Thierry Reding wrote: >>> This could be problematic. Since drivers/video and >>> drivers/gpu/drm are separate trees, this would entail a >>> continuous burden on

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Stephen Warren
On 11/29/2012 03:21 AM, Terje Bergström wrote: > On 28.11.2012 23:23, Thierry Reding wrote: ... >>> + regs = platform_get_resource(dev, IORESOURCE_MEM, 0); >>> + intr0 = platform_get_resource(dev, IORESOURCE_IRQ, 0); >>> + intr1 = platform_get_resource(dev, IORESOURCE_IRQ, 1); >>> + >>>

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Thierry Reding
On Thu, Nov 29, 2012 at 12:21:04PM +0200, Terje Bergström wrote: > On 28.11.2012 23:23, Thierry Reding wrote: > > This could be problematic. Since drivers/video and drivers/gpu/drm are > > separate trees, this would entail a continuous burden on keeping both > > trees synchronized. While I realize

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-29 Thread Terje Bergström
On 28.11.2012 23:23, Thierry Reding wrote: > This could be problematic. Since drivers/video and drivers/gpu/drm are > separate trees, this would entail a continuous burden on keeping both > trees synchronized. While I realize that eventually it might be better > to put the host1x driver in a separa

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-28 Thread Thierry Reding
On Mon, Nov 26, 2012 at 03:19:07PM +0200, Terje Bergstrom wrote: [...] > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index fb9a14e..94c861b 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -2463,4 +2463,6 @@ config FB_SH_MOBILE_MERAM > Up to 4 memory

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-28 Thread Thierry Reding
On Mon, Nov 26, 2012 at 03:19:07PM +0200, Terje Bergstrom wrote: [...] > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index fb9a14e..94c861b 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -2463,4 +2463,6 @@ config FB_SH_MOBILE_MERAM > Up to 4 memory

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-27 Thread Sivaram Nair
On Mon, Nov 26, 2012 at 02:19:07PM +0100, Terje Bergstrom wrote: > + > +struct nvhost_chip_support *nvhost_chip_ops; should be static? > +static int __devinit nvhost_alloc_resources(struct nvhost_master *host) > +{ > + int err; > + > + err = nvhost_init_chip_support(host); > + i

Re: [RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-27 Thread Sivaram Nair
On Mon, Nov 26, 2012 at 02:19:07PM +0100, Terje Bergstrom wrote: > + > +struct nvhost_chip_support *nvhost_chip_ops; should be static? > +static int __devinit nvhost_alloc_resources(struct nvhost_master *host) > +{ > + int err; > + > + err = nvhost_init_chip_support(host); > + i

[RFC v2 1/8] video: tegra: Add nvhost driver

2012-11-26 Thread Terje Bergstrom
Add nvhost, the driver for host1x. This patch adds support for reading and incrementing sync points and dynamic power management. Signed-off-by: Terje Bergstrom --- drivers/video/Kconfig |2 + drivers/video/Makefile |2 + drivers/v