public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Fix module initialisation, v2.
Date: Tue, 1 Sep 2015 12:12:55 +0200	[thread overview]
Message-ID: <20150901101255.GQ1367@phenom.ffwll.local> (raw)
In-Reply-To: <20150831221341.GY13406@intel.com>

On Mon, Aug 31, 2015 at 03:13:41PM -0700, Matt Roper wrote:
> On Thu, Aug 27, 2015 at 03:15:15PM +0200, Maarten Lankhorst wrote:
> > Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic.
> > Remove the legacy suspend/resume, to fix a warning introduced by:
> > 
> > "drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"
> > 
> > and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.
> > 
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> 
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Review should include the commit message and this commit message doesn't
match v2 at all ... Please rectify (or at least tell me what I should put
there).

Thanks, Daniel

> 
> > ---
> > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> > index 097d4ba0421c..f0eaa6f8826b 100644
> > --- a/drivers/gpu/drm/i915/i915_dma.c
> > +++ b/drivers/gpu/drm/i915/i915_dma.c
> > @@ -364,12 +364,12 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_
> >  		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> >  		/* i915 resume handler doesn't set to D0 */
> >  		pci_set_power_state(dev->pdev, PCI_D0);
> > -		i915_resume_legacy(dev);
> > +		i915_resume_switcheroo(dev);
> >  		dev->switch_power_state = DRM_SWITCH_POWER_ON;
> >  	} else {
> >  		pr_err("switched off\n");
> >  		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> > -		i915_suspend_legacy(dev, pmm);
> > +		i915_suspend_switcheroo(dev, pmm);
> >  		dev->switch_power_state = DRM_SWITCH_POWER_OFF;
> >  	}
> >  }
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ce3bd0c713b9..4646fe1a0499 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -679,7 +679,7 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
> >  	return 0;
> >  }
> >  
> > -int i915_suspend_legacy(struct drm_device *dev, pm_message_t state)
> > +int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state)
> >  {
> >  	int error;
> >  
> > @@ -812,7 +812,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
> >  	return ret;
> >  }
> >  
> > -int i915_resume_legacy(struct drm_device *dev)
> > +int i915_resume_switcheroo(struct drm_device *dev)
> >  {
> >  	int ret;
> >  
> > @@ -1649,7 +1649,7 @@ static struct drm_driver driver = {
> >  	 */
> >  	.driver_features =
> >  	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
> > -	    DRIVER_RENDER,
> > +	    DRIVER_RENDER | DRIVER_MODESET,
> >  	.load = i915_driver_load,
> >  	.unload = i915_driver_unload,
> >  	.open = i915_driver_open,
> > @@ -1658,10 +1658,6 @@ static struct drm_driver driver = {
> >  	.postclose = i915_driver_postclose,
> >  	.set_busid = drm_pci_set_busid,
> >  
> > -	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
> > -	.suspend = i915_suspend_legacy,
> > -	.resume = i915_resume_legacy,
> > -
> >  #if defined(CONFIG_DEBUG_FS)
> >  	.debugfs_init = i915_debugfs_init,
> >  	.debugfs_cleanup = i915_debugfs_cleanup,
> > @@ -1704,7 +1700,6 @@ static int __init i915_init(void)
> >  	 * either the i915.modeset prarameter or by the
> >  	 * vga_text_mode_force boot option.
> >  	 */
> > -	driver.driver_features |= DRIVER_MODESET;
> >  
> >  	if (i915.modeset == 0)
> >  		driver.driver_features &= ~DRIVER_MODESET;
> > @@ -1715,17 +1710,11 @@ static int __init i915_init(void)
> >  #endif
> >  
> >  	if (!(driver.driver_features & DRIVER_MODESET)) {
> > -		driver.get_vblank_timestamp = NULL;
> >  		/* Silently fail loading to not upset userspace. */
> >  		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
> >  		return 0;
> >  	}
> >  
> > -	/*
> > -	 * FIXME: Note that we're lying to the DRM core here so that we can get access
> > -	 * to the atomic ioctl and the atomic properties.  Only plane operations on
> > -	 * a single CRTC will actually work.
> > -	 */
> >  	if (i915.nuclear_pageflip)
> >  		driver.driver_features |= DRIVER_ATOMIC;
> >  
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 8c938451a05e..5c2541ddf212 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -2607,8 +2607,8 @@ struct drm_i915_cmd_table {
> >  extern const struct drm_ioctl_desc i915_ioctls[];
> >  extern int i915_max_ioctl;
> >  
> > -extern int i915_suspend_legacy(struct drm_device *dev, pm_message_t state);
> > -extern int i915_resume_legacy(struct drm_device *dev);
> > +extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
> > +extern int i915_resume_switcheroo(struct drm_device *dev);
> >  
> >  /* i915_params.c */
> >  struct i915_params {
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Matt Roper
> Graphics Software Engineer
> IoTG Platform Enabling & Development
> Intel Corporation
> (916) 356-2795

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-09-01 10:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17 10:00 drm/i915: Fix module initialisation Maarten Lankhorst
2015-08-17 10:09 ` Chris Wilson
2015-08-26  7:51 ` Daniel Vetter
2015-08-26  7:57   ` Maarten Lankhorst
2015-08-26  8:12     ` Daniel Vetter
2015-08-27 13:15       ` [PATCH] drm/i915: Fix module initialisation, v2 Maarten Lankhorst
2015-08-29 21:51         ` shuang.he
2015-08-31 22:13         ` Matt Roper
2015-09-01 10:12           ` Daniel Vetter [this message]
2015-09-01 11:51             ` Maarten Lankhorst
2015-09-02  7:53               ` 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=20150901101255.GQ1367@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /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