[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drm: Allow platform devices to register as DRM devices
On Mon, Mar 01, 2010 at 09:00:09AM -0700, Jordan Crouse wrote:
> Allow platform devices without PCI resources to be DRM devices.

I really dislike the fact that drm has bus specific junk all over the
generic code. Some ideas how to clean that up:

Add 'struct device *dev' into drm_device so you don't have to go through
the pdev/platformdev to get it every time. Also use dev_name() instead
of pci_name() and whatever you used for the platform device case.

Add 'int irq' into struct drm_device instead of adding more bus specific
hoops to get at the irq. Not sure I like the generic code mucking about
with the irq directly though but baby steps are easier to handle.

Get rid of the drm_resource_start/len wrappers. AFAICS they're all called
from the low level driver code anyway and the driver knows the bus type
so there's no need for the wrappers.

It would be nice to get the struct pci_driver out of the the drm_driver
structure. Since you now have a new pci specific drm_get_dev() thing
could you also pass the pci_driver as a function parameter instead
of having it live inside the drm_driver?

Also all cases where there's some PCI specific stuff (the busid stuff
mostly) you could just check the drm_device.pdev pointer instead of
having to add another driver flags to identify non-PCI devices. Although
I don't really like having the pdev/platformdev pointers in there at all.

That's sort of my secret drm TODO list but so far didn't have the time
to actually do the coding part.

Ville Syrjälä
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2010-03-15 20:31    [W:0.046 / U:7.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site