lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 6/8] gpu: drm: tegra: Remove redundant host1x
On 12/20/2012 02:17 AM, Terje Bergström wrote:
> On 16.12.2012 14:16, Thierry Reding wrote:
>> Okay, so we're back on the topic of using globals. I need to assert
>> again that this is not an option. If we were to use globals, then we
>> could just as well leave out the dummy device and just do all of that in
>> the tegra-drm driver's initialization function.
>
> I found a way of dropping the global in a straightforward way, and
> introduce dummy device for drm_platform_init().
>
> I added dummy device and driver, and moved the tegradrm global
> (previously called struct host1x *host1x) allocation to happen in the
> probe. In addition, probe calls device tree node traversal to do the
> tegra_drm_add_client() calls. The dummy device is owner for this global.
>
> I changed the device tree node traversal so that it goes actually
> through each host1x child, checks if it's supported by tegradrm, and if
> so, sets its drvdata to point to the tegradrm data.

I'm not sure that sounds right. drvdata is something that a driver
should manage itself.

What's wrong with just having each device ask the host1x (its parent)
for a pointer to the (dummy) tegradrm device. That seems extremely
simple, and doesn't require abusing existing stuff like drvdata for
non-standard purposes.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-12-20 18:41    [W:0.229 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site