[PATCH 1/2] omap2+: add drm device

Gross, Andy andy.gross at ti.com
Fri Feb 17 13:14:52 PST 2012


On Mon, Jan 23, 2012 at 11:24 AM, Cousson, Benoit <b-cousson at ti.com> wrote:

>
>> +       if (oh) {
>> +               dmm_platdata.base = omap_hwmod_get_mpu_rt_va(oh);
>> +               dmm_platdata.irq = oh->mpu_irqs[0].irq;
>>
>
> These are internal hwmod attributes that should not be retrieved here.
> They are included in the device resources and this is up to the driver to
> get them using the platform_get_resource.


Yeah this can be removed and I can switch to platform_get_resource.



>  +
>> +               if (dmm_platdata.base)
>> +                       omapdrm_platdata.dmm_pdata =&dmm_platdata;
>>
>
> pdata is supposed to be used for storing board level information, and we
> are in the process of removing all of them for device tree adaptation. So
> you should not use that at all in this case if this is not strictly needed.


Noted.  I'll just remove it.  I was planning ahead when I added this, but I
can cross that bridge when I get there.


>
>  +       }
>> +
>> +       return platform_device_register(&**omap_drm_device);
>>
>
> This is not the proper way to init a device nowadays.
>
> If you want to take advantage of the pm functionality, you should create
> an omap_device.
> Please have a look at the other OMAP devices creation code (GPIO, UART...).


It was my understanding that you needed a hwmod entry that corresponded to
the device if you wanted to use omap_device_build().  In the case of
omap_drm, we don't have a hwmod entry.  We do have an entry for DMM.


Regards,

Andy Gross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20120217/584af0f5/attachment.html>


More information about the dri-devel mailing list