From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [RFC v2 6/8] gpu: drm: tegra: Remove redundant host1x Date: Thu, 20 Dec 2012 10:55:43 -0700 Message-ID: <50D3511F.2090308@wwwdotorg.org> References: <50BF345A.8050201@nvidia.com> <20121205120429.GA29943@avionic-0098.adnet.avionic-design.de> <50C5CAB5.3040000@nvidia.com> <20121212160829.GA30278@avionic-0098.adnet.avionic-design.de> <50C99677.6090306@nvidia.com> <20121213085750.GA14740@avionic-0098.adnet.avionic-design.de> <50CA175F.60002@wwwdotorg.org> <50CAC2AC.1010704@nvidia.com> <50CB5205.1030303@wwwdotorg.org> <50CB850F.9090704@nvidia.com> <20121216121603.GA31780@avionic-0098.adnet.avionic-design.de> <50D2D792.1050401@nvidia.com> <50D34775.5010606@wwwdotorg.org> <50D34F00.4080308@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <50D34F00.4080308-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?UTF-8?B?VGVyamUgQmVyZ3N0csO2bQ==?= Cc: Thierry Reding , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Arto Merilainen List-Id: linux-tegra@vger.kernel.org On 12/20/2012 10:46 AM, Terje Bergstr=C3=B6m wrote: > On 20.12.2012 19:14, Stephen Warren wrote: >> 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. >=20 > This is tegradrm's own data, and it's tegradrm which accesses the > pointer. So it's entirely something that the driver takes care of its= elf. So it's fine for the tegradrm driver to manipulate the tegradrm (virtual) device's drvdata pointer. It's not fine for tegradrm to manipulate the drvdata pointer of other devices; the host1x children. The drvdata pointer for other devices is reserved for those devices' driver's use only.