linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Binding together tegradrm & nvhost
@ 2012-08-20 13:01 Terje Bergström
       [not found] ` <50323513.3090606-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Terje Bergström @ 2012-08-20 13:01 UTC (permalink / raw)
  To: Thierry Reding,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Zhang,
	Stephen Warren

Hi,

I've been trying to figure out the best way to bind together tegradrm
and nvhost. I assume that nvhost and tegradrm will live as separate
drivers, with tegradrm taking care of display controller, and nvhost
taking care of host1x and other client devices.

I've identified a bumps that we need to agree on. I've included here the
problem and my proposal:

1) Device & driver registration
tegradrm registers as platform_driver, and exports ioctl's. Here we
already have to agree on which device the platform_driver maps to.
Currently it maps to host1x, but we'll need to move control of host1x to
nvhost driver. We'll need to pass drm_platform_init() some
platform_device - I propose that we create a virtual device for this.

2) Device tree parsing
At bootup, we need to parse only host1x node and create a device for
that. host1x probe will need to dig into host1x to create the children.
This is something that we'll need to implement first in the internal
kernel. tegra-dc would get probed only after this sequence. If this is
ok, I'll take care of this part, and adjustments to tegradrm when this
becomes topical.

We include in device tree the register addresses. Some information that
would be needed is still clocks, clock gating behavior, power domain
ids, mapping of client devices to channels, and mapping of sync points
per channnel

3) The handling of ioctl's from user space
The ioctl's represent the needed synchronization and channel
functionality. I'll write the necessary glue. There would be two
categories of ioctl's:

3a) Simple operations such as synchronization:

Wait, signal, read, etc. are exported from nvhost as public APIs, and
tegradrm simply calls them. No big hurdle there. I already have concept
code to do this.

3b) Channel operations:

tegradrm needs to have a concept of logical channel. Channel open
creates a logical channel (/context) by calling nvhost. nvhost needs to
know which hw is going to be used by the channel to be able to control
power, and to map to physical channel, so that comes as a parameter in
ioctl.

Each channel operation needs to pass the channel id, and tegradrm passes
the calls to nvhost. Most important operation is submit, which sends a
command buffer to nvhost's queue.

4) Buffer management
We already know that this is a missing part. Hopefully we can get this
filled soon.

Terje

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-08-22 11:42 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 13:01 Binding together tegradrm & nvhost Terje Bergström
     [not found] ` <50323513.3090606-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-20 13:18   ` Thierry Reding
     [not found]     ` <20120820131800.GA13785-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-20 13:33       ` Terje Bergström
2012-08-21  3:50       ` Dennis Gilmore
2012-08-21  5:39       ` Mark Zhang
2012-08-21  5:42         ` Thierry Reding
     [not found]           ` <20120821054256.GA5325-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-21  6:16             ` Mark Zhang
2012-08-21  6:21               ` Thierry Reding
2012-08-21 14:57               ` Thierry Reding
     [not found]                 ` <20120821145709.GA701-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-22  2:29                   ` Mark Zhang
2012-08-22  8:42                   ` Terje Bergström
     [not found]                     ` <50349B58.4000809-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-22 10:33                       ` Thierry Reding
     [not found]                         ` <20120822103309.GB31448-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-08-22 11:42                           ` Terje Bergström
2012-08-21  4:57   ` Mark Zhang
2012-08-21  5:40     ` Terje Bergström
     [not found]       ` <50331F32.4040903-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-21  6:12         ` Mark Zhang
2012-08-21  6:35           ` Terje Bergström
     [not found]             ` <50332C22.7090009-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-21  7:12               ` Mark Zhang
2012-08-21 21:57               ` Stephen Warren
     [not found]                 ` <50340445.6010908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-08-22  5:54                   ` Thierry Reding
2012-08-21 21:53   ` Stephen Warren
     [not found]     ` <50340343.1050206-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-08-22  6:49       ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).