linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <syrjala@sci.fi>
To: Jordan Crouse <jcrouse@codeaurora.org>
Cc: dri-devel@lists.sourceforge.net, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: Allow platform devices to register as DRM devices
Date: Mon, 15 Mar 2010 21:27:54 +0200	[thread overview]
Message-ID: <20100315192754.GE4536@sci.fi> (raw)
In-Reply-To: <4B8BE489.7020402@codeaurora.org>

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ä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

  parent reply	other threads:[~2010-03-15 19:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4B8BE42C.1090401@codeaurora.org>
     [not found] ` <4B8BE489.7020402@codeaurora.org>
2010-03-15  0:56   ` [PATCH] drm: Allow platform devices to register as DRM devices Dave Airlie
2010-03-15 18:04     ` Jordan Crouse
2010-03-16  3:05       ` Dave Airlie
2010-03-16  2:41     ` Paul Mundt
2010-03-15 19:27   ` Ville Syrjälä [this message]
2010-05-27 19:40   ` [PATCH v2] DRM platform device support jcrouse
2010-08-04 20:48     ` [PATCH v3] " Jordan Crouse
2010-08-04 20:48     ` [PATCH 1/4] drm: Remove drm_resource wrappers Jordan Crouse
2010-08-04 20:53       ` Matt Turner
2010-08-04 20:48     ` [PATCH 2/4] drm: Add support for platform devices to register as DRM devices Jordan Crouse
2010-08-04 20:48     ` [PATCH 3/4] drm: Add __arm defines to DRM Jordan Crouse
2010-08-04 20:48     ` [PATCH 4/4] drm: Make sure the DRM offset matches the CPU Jordan Crouse
2010-05-27 19:40   ` [PATCH 1/4] drm: Remove drm_resource wrappers jcrouse
2010-05-27 21:15     ` Matt Turner
2010-05-27 19:40   ` [PATCH 2/4] drm: Add support for platform devices to register as DRM devices jcrouse
2010-05-27 19:40   ` [PATCH 3/4] drm: Add __arm defines to DRM jcrouse
2010-05-27 19:40   ` [PATCH 4/4] drm: Make sure the DRM offset matches the CPU jcrouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100315192754.GE4536@sci.fi \
    --to=syrjala@sci.fi \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=jcrouse@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).