All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm: merge device setup into drm_dev_register()
Date: Thu, 3 Oct 2013 15:15:12 +0200	[thread overview]
Message-ID: <20131003131512.GF31334@phenom.ffwll.local> (raw)
In-Reply-To: <1380705818-4065-3-git-send-email-dh.herrmann@gmail.com>

On Wed, Oct 02, 2013 at 11:23:35AM +0200, David Herrmann wrote:
> All bus drivers do device setup themselves. This requires us to adjust all
> of them if we introduce new core features. Thus, merge all these into a
> uniform drm_dev_register() helper.
> 
> Note that this removes the drm_lastclose() error path for AGP as it is
> horribly broken. Moreover, no bus driver called this in any other error
> path either. Instead, we use the recently introduced AGP cleanup helpers.
> 
> We also keep a DRIVER_MODESET condition around pci_set_drvdata() to keep
> semantics.
> 
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>

[snip]

> +int drm_dev_register(struct drm_device *dev)
> +{
> +	int ret;
> +
> +	mutex_lock(&drm_global_mutex);
> +
> +	if (dev->driver->bus->agp_init) {
> +		ret = dev->driver->bus->agp_init(dev);
> +		if (ret)
> +			goto out_unlock;
> +	}

Imo this should stay in drm_get_pci_dev since its pci specific - no other
bus type should ever bother with this really.

Looks good otherwise.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-10-03 13:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02  9:23 [PATCH 0/5] DRM device-alloc cleanup David Herrmann
2013-10-02  9:23 ` [PATCH 1/5] drm: add drm_dev_alloc() helper David Herrmann
2013-10-02  9:23 ` [PATCH 2/5] drm: merge device setup into drm_dev_register() David Herrmann
2013-10-03 13:15   ` Daniel Vetter [this message]
2013-10-03 13:19     ` David Herrmann
2013-10-03 13:21       ` Daniel Vetter
2013-10-02  9:23 ` [PATCH 3/5] drm: move drm_lastclose() to drm_fops.c David Herrmann
2013-10-02  9:23 ` [PATCH 4/5] drm: introduce drm_dev_free() to fix error paths David Herrmann
2013-10-02  9:23 ` [PATCH 5/5] drm: move device unregistration into drm_dev_unregister() David Herrmann
2013-10-03 13:18   ` Daniel Vetter
2013-10-09  5:31 ` [PATCH 0/5] DRM device-alloc cleanup Dave Airlie
2013-10-09  6:00   ` Dave Airlie
2013-10-09  8:05     ` Daniel Vetter

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=20131003131512.GF31334@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.