mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Ingo Molnar <mingo@elte.hu>, Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Bernhard Schmidt <berni@birkenwald.de>,
	"Romano Giannetti (lists)" <romanol@upcomillas.es>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	Andreas Mohr <andi@lisas.de>,
	devsk <kernel-bugs.dev1world@spamgourmet.com>,
	Johan Bilien <jobi@via.ecp.fr>
Subject: Re: [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken
Date: Wed, 26 Nov 2008 15:44:31 +0100	[thread overview]
Message-ID: <200811261544.32461.rjw@sisk.pl> (raw)
In-Reply-To: <20081126083528.GM26036@elte.hu>

On Wednesday, 26 of November 2008, Ingo Molnar wrote:
> 
> * Bernhard Schmidt <berni@birkenwald.de> wrote:
> 
> > Hello,
> >
> >> On Monday, November 24, 2008 12:47 am Romano Giannetti (lists) wrote:
> >>> Rafael J. Wysocki wrote:
> >>>> Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=11947
> >>>> Subject		: 2.6.28-rc VC switching with Intel graphics broken
> >>>> Submitter	: Romano Giannetti <romano.giannetti@gmail.com>
> >>>> Date		: 2008-11-03 12:10 (20 days old)
> >>>> Handled-By	: Jesse Barnes <jbarnes@virtuousgeek.org>
> >>> Still with us on -rc6, nasty, reproducible, no clues on what can be.
> >>>
> >>> VC switch locks or delay the systems minutes, resuming from suspend locks
> >>> hard the machine.
> >>>
> >>> 2.6.28-rc is unusable here.
> >>>
> >>> Jesse, any hints? My suspicion that it can be the same thing happened with
> >>> bug 10620 is wrong? (It was a very similar error about vblank...)
> >>
> >> Just added to the bug, it looks like a DUP of an issue Keith just fixed 
> >> last week (now to make sure the patch makes it upstream quickly).
> >
> > I can confirm that, with the patch from  
> > http://lists.freedesktop.org/archives/intel-gfx/2008-November/000614.html 
> > applied on top of current git head (rejected hunk in  
> > drivers/gpu/drm/i915/915_irq.c due to the additional  
> > dev_priv->irq_mask_reg = ~0; in git between the removed lines, I kept  
> > it) I can suspend/resume and do a VC switch again.
> >
> > Big thanks!
> 
> here it is below plaintext as well, merged up to latest -git.

Well, I still have a resume issue with this patch applied on Toshiba Portege
R500 (please see http://bugzilla.kernel.org/show_bug.cgi?id=12031#c9 for
details).

Thanks,
Rafael

 
> ------------------->
> From 60174462808051477793776c67282364bc94ded3 Mon Sep 17 00:00:00 2001
> From: Keith Packard <keithp@keithp.com>
> Date: Tue, 18 Nov 2008 09:30:25 -0800
> Subject: [PATCH] drm: move drm vblank initialization/cleanup to driver load/unload
> 
> drm vblank initialization keeps track of the changes in driver-supplied
> frame counts across vt switch and mode setting, but only if you let it by
> not tearing down the drm vblank structure.
> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  drivers/gpu/drm/drm_drv.c       |    2 ++
>  drivers/gpu/drm/drm_irq.c       |    4 +---
>  drivers/gpu/drm/i915/i915_dma.c |    5 +++++
>  drivers/gpu/drm/i915/i915_drv.h |    2 ++
>  drivers/gpu/drm/i915/i915_irq.c |    5 -----
>  include/drm/drmP.h              |    1 +
>  6 files changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 3ab1e9c..996097a 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -305,6 +305,8 @@ static void drm_cleanup(struct drm_device * dev)
>  		return;
>  	}
>  
> +	drm_vblank_cleanup(dev);
> +
>  	drm_lastclose(dev);
>  
>  	if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 15c8dab..1e787f8 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -94,7 +94,7 @@ static void vblank_disable_fn(unsigned long arg)
>  	}
>  }
>  
> -static void drm_vblank_cleanup(struct drm_device *dev)
> +void drm_vblank_cleanup(struct drm_device *dev)
>  {
>  	/* Bail if the driver didn't call drm_vblank_init() */
>  	if (dev->num_crtcs == 0)
> @@ -278,8 +278,6 @@ int drm_irq_uninstall(struct drm_device * dev)
>  
>  	free_irq(dev->pdev->irq, dev);
>  
> -	drm_vblank_cleanup(dev);
> -
>  	return 0;
>  }
>  EXPORT_SYMBOL(drm_irq_uninstall);
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 0d215e3..9a1450e 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -856,6 +856,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>  
>  	spin_lock_init(&dev_priv->user_irq_lock);
>  
> +	ret = drm_vblank_init(dev, I915_NUM_PIPE);
> +
> +	if (ret)
> +		return ret;
> +
>  	return ret;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index ef1c0b8..ec78190 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -47,6 +47,8 @@ enum pipe {
>  	PIPE_B,
>  };
>  
> +#define I915_NUM_PIPE	2
> +
>  /* Interface history:
>   *
>   * 1.1: Original.
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 82752d6..a60af31 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -483,14 +483,9 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
>  int i915_driver_irq_postinstall(struct drm_device *dev)
>  {
>  	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
> -	int ret, num_pipes = 2;
> -
>  	/* Set initial unmasked IRQs to just the selected vblank pipes. */
>  	dev_priv->irq_mask_reg = ~0;
>  
> -	ret = drm_vblank_init(dev, num_pipes);
> -	if (ret)
> -		return ret;
>  
>  	dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B;
>  	dev_priv->irq_mask_reg &= ~I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT;
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 28c7f16..d5e8e5c 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -1151,6 +1151,7 @@ extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
>  extern void drm_handle_vblank(struct drm_device *dev, int crtc);
>  extern int drm_vblank_get(struct drm_device *dev, int crtc);
>  extern void drm_vblank_put(struct drm_device *dev, int crtc);
> +extern void drm_vblank_cleanup(struct drm_device *dev);
>  /* Modesetting support */
>  extern int drm_modeset_ctl(struct drm_device *dev, void *data,
>  			   struct drm_file *file_priv);
> 
> 



-- 
Everyone knows that debugging is twice as hard as writing a program
in the first place.  So if you're as clever as you can be when you write it,
how will you ever debug it? --- Brian Kernighan

  reply	other threads:[~2008-11-26 14:45 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 20:24 2.6.28-rc6-git1: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-11-22 20:24 ` [Bug #11822] ACPI Warning (nspredef-0858): _SB_.PCI0.LPC_.EC__.BAT0._BIF: Return Package type mismatch at index 9 - found Buffer, expected String [20080926] Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11849] default IRQ affinity change in v2.6.27 (breaking several SMP PPC based systems) Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11828] Linux 2.6.27-git3: no SD card reader Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11875] radeonfb lockup in .28-rc (bisected) Rafael J. Wysocki
2008-11-22 23:15   ` Benjamin Herrenschmidt
2008-11-22 20:28 ` [Bug #11858] Timeout regression introduced by 242f9dcb8ba6f68fcd217a119a7648a4f69290e9 Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11898] mke2fs hang on AIC79 device Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11906] 2.6.28-rc2 seems to fail at powering down the monitor when it should Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11925] cdrom: missing compat ioctls Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11913] USB/INPUT: slab error in cache_alloc_debugcheck_after(): double free? Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken Rafael J. Wysocki
2008-11-24  8:47   ` Romano Giannetti (lists)
2008-11-24 19:01     ` Jesse Barnes
2008-11-24 19:13       ` Bernhard Schmidt
2008-11-24 19:35         ` Jesse Barnes
2008-11-26  8:35         ` Ingo Molnar
2008-11-26 14:44           ` Rafael J. Wysocki [this message]
2008-11-25 11:01       ` Romano Giannetti (lists)
2008-11-22 20:28 ` [Bug #11958] [2.6.27.x =&gt; 2.6.28-rc3] Xorg crash with xf86MapVidMem error Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11965] regression introduced by - timers: fix itimer/many thread hang Rafael J. Wysocki
2008-11-23  7:39   ` Ingo Molnar
2008-11-23 12:43     ` Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11996] Tracing framework regression in 2.6.28-rc3 Rafael J. Wysocki
2008-11-23 13:12   ` Pekka Paalanen
2008-11-23 13:14     ` Ingo Molnar
2008-11-22 20:28 ` [Bug #11982] Fan level 7 after resume wit 2.6.28-rc3 Rafael J. Wysocki
2008-11-24  7:26   ` Tino Keitel
2008-11-22 20:28 ` [Bug #12020] scsi_times_out NULL pointer dereference Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11970] gettimeofday return a old time in mmbench Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12028] i915 DRM is broken in 2.6.28-rc4 Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12034] snd-hda-intel on Realtek ALC268 chip shows only Master volume (for playback) Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12031] DRM enabled kernel hangs hard on resume on x60 Rafael J. Wysocki
2008-11-24 13:36   ` Rafael J. Wysocki
2008-11-24 17:50     ` Jesse Barnes
2008-11-22 20:28 ` [Bug #12047] ACPI toshiba: only register rfkill if bt is enabled Rafael J. Wysocki
2008-11-22 23:44   ` Frederik Deweerdt
2008-11-22 20:28 ` [Bug #12061] snd_hda_intel: power_save: sound cracks on powerdown Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12064] [regression] Measured 688 cycles TSC warp; marking TSC unstable Rafael J. Wysocki
2008-11-23 16:29   ` Frans Pop
2008-11-23 16:32     ` Ingo Molnar
2008-11-22 20:28 ` [Bug #12038] Suspend regression in stable kernel 2.6.27.4 on Mac mini Core Duo Rafael J. Wysocki
2008-11-24  8:03   ` Tino Keitel
2008-11-24  8:32     ` Justin P. Mattock
2008-11-22 20:28 ` [Bug #12082] IRQ and MSI allocations broken without sparse irq Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12081] xen: pin correct PGD on suspend Rafael J. Wysocki
2008-11-23 17:15 ` [linux-pm] 2.6.28-rc6-git1: Reported regressions from 2.6.27 Alan Stern
  -- strict thread matches above, loose matches on Subject: below --
2008-12-07 20:27 2.6.28-rc8-git5: " Rafael J. Wysocki
2008-12-07 20:32 ` [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken Rafael J. Wysocki
2008-12-03 21:49 2.6.28-rc7-git2: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-12-03 21:57 ` [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken Rafael J. Wysocki
2008-12-04 10:55   ` Romano Giannetti (lists)
2008-11-16 16:24 2.6.28-rc5: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-11-16 16:35 ` [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken Rafael J. Wysocki
2008-11-17 16:40   ` Romano Giannetti (lists)
2008-11-09 17:53 2.6.28-rc3-git6: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-11-09 17:59 ` [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken Rafael J. Wysocki
2008-11-11  9:28   ` Romano Giannetti

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=200811261544.32461.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=andi@lisas.de \
    --cc=berni@birkenwald.de \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jobi@via.ecp.fr \
    --cc=kernel-bugs.dev1world@spamgourmet.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=romanol@upcomillas.es \
    /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

all inboxes | Powered by JetHome®