From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 01/22] drm/i915: properly check for MODESET for kms driver ioctls
Date: Tue, 24 Apr 2012 09:19:17 +0200 [thread overview]
Message-ID: <20120424071917.GA4722@phenom.ffwll.local> (raw)
In-Reply-To: <1335219824_31493@CP5-2952>
On Mon, Apr 23, 2012 at 11:23:15PM +0100, Chris Wilson wrote:
> On Mon, 23 Apr 2012 16:50:48 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Also ditch the cargo-culted dev_priv checks - either we have a
> > giant hole in our setup code or this is useless. Plainly bogus
> > to check for it in either case.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 3 +++
> > drivers/gpu/drm/i915/intel_overlay.c | 12 ++++--------
> > drivers/gpu/drm/i915/intel_sprite.c | 10 ++++------
> > 3 files changed, 11 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 4c844c6..f17046c 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -6078,6 +6078,9 @@ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
> > struct drm_mode_object *drmmode_obj;
> > struct intel_crtc *crtc;
> >
> > + if (!drm_core_check_feature(dev, DRIVER_MODESET))
> > + return -ENODEV;
> > +
> > if (!dev_priv) {
> > DRM_ERROR("called with no initialization\n");
> > return -EINVAL;
>
> So why is it still here? What does this mean, we can reach this point
> without initialising the device? Yikes.
I've simply missed this one - when I've started cleaning up these checks
it took me a while to untangle it all ;-)
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-04-24 7:18 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 14:50 [PATCH 00/22] dri1 dragon slaughtering Daniel Vetter
2012-04-23 14:50 ` [PATCH 01/22] drm/i915: properly check for MODESET for kms driver ioctls Daniel Vetter
2012-04-23 22:23 ` Chris Wilson
2012-04-24 6:19 ` [PATCH] " Daniel Vetter
2012-04-24 8:21 ` Chris Wilson
2012-04-24 7:55 ` Daniel Vetter
2012-04-24 9:25 ` Chris Wilson
2012-04-24 9:41 ` Chris Wilson
2012-04-24 7:19 ` Daniel Vetter [this message]
2012-04-23 14:50 ` [PATCH 02/22] drm/i915: disallow gem ums init ioctl for kms Daniel Vetter
2012-04-23 22:25 ` Chris Wilson
2012-04-24 6:22 ` [PATCH] " Daniel Vetter
2012-04-23 14:50 ` [PATCH 03/22] drm/i915: rip out GEM drm feature checks Daniel Vetter
2012-04-23 22:28 ` Chris Wilson
2012-04-23 14:50 ` [PATCH 04/22] drm/i915: rip out dev_priv->has_gem Daniel Vetter
2012-04-23 22:29 ` Chris Wilson
2012-04-23 14:50 ` [PATCH 05/22] drm/i915: check for kms in dri1 ioctls Daniel Vetter
2012-04-23 22:31 ` Chris Wilson
2012-04-24 6:29 ` [PATCH] " Daniel Vetter
2012-04-25 9:56 ` Daniel Vetter
2012-04-23 14:50 ` [PATCH 06/22] drm/i915: move dri1 vblank stubs to i915_dma.c Daniel Vetter
2012-04-24 6:35 ` [PATCH] " Daniel Vetter
2012-04-23 14:50 ` [PATCH 07/22] drm/i915: create dev_priv->dri1 dragon dungeon^W^W sub-struct Daniel Vetter
2012-04-23 14:50 ` [PATCH 08/22] drm/i915 disallow physical batchbuffers for KMS Daniel Vetter
2012-04-23 14:50 ` [PATCH 09/22] drm/i915: rip out dev_priv->tex_lru_log_granularity Daniel Vetter
2012-04-23 14:50 ` [PATCH 10/22] drm/i915: remove LP_RING&friends from modeset code Daniel Vetter
2012-04-23 22:36 ` Chris Wilson
2012-04-23 14:50 ` [PATCH 11/22] drm/i915: kill intel_clear_scanline_wait Daniel Vetter
2012-04-23 22:39 ` Chris Wilson
2012-04-23 14:50 ` [PATCH 12/22] drm/i915: rip out dri1 breadcrumb updates from gen5+ irq handlers Daniel Vetter
2012-04-23 22:40 ` Chris Wilson
2012-04-23 14:51 ` [PATCH 13/22] drm/i915: move dri1 irq ioctl code to i915_dma.c Daniel Vetter
2012-04-23 22:41 ` Chris Wilson
2012-04-24 6:37 ` [PATCH] " Daniel Vetter
2012-04-23 14:51 ` [PATCH 14/22] drm/i915: extract dri1 breadcrumb update from irq handler Daniel Vetter
2012-04-23 22:41 ` Chris Wilson
2012-04-23 14:51 ` [PATCH 15/22] drm/i915: move LP_RING&friends to i915_dma.c Daniel Vetter
2012-04-23 22:44 ` Chris Wilson
2012-04-23 14:51 ` [PATCH 16/22] drm/i915: disallow clip rects on gen5+ Daniel Vetter
2012-04-23 14:51 ` [PATCH 17/22] drm/i915: move the ips code to intel_pm.c Daniel Vetter
2012-04-23 14:51 ` [PATCH 18/22] drm/i915: move rps/emon function declarations Daniel Vetter
2012-04-23 14:51 ` [PATCH 19/22] drm/i915: kill pointless clearing of dev_priv->hws_map Daniel Vetter
2012-04-23 22:46 ` Chris Wilson
2012-04-23 14:51 ` [PATCH 20/22] drm/i915: rework legacy GFX HWS handling Daniel Vetter
2012-04-23 14:51 ` [PATCH 21/22] drm/i915: fixup __iomem mixups in ringbuffer.c Daniel Vetter
2012-04-23 14:51 ` [PATCH 22/22] drm/i915: move pnv|ilk_gem_mem_freq to intel_pm.c 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=20120424071917.GA4722@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox