public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: keithp@keithp.com, Daniel Vetter <daniel.vetter@ffwll.ch>,
	linux-kernel@vger.kernel.org, Dave Airlie <airlied@redhat.com>,
	dri-devel@lists.sourceforge.net
Subject: Re: [BISECTED] drm: random hang since 620f378 "drm: prune modes when ..."
Date: Mon, 21 Dec 2009 17:57:08 +0000	[thread overview]
Message-ID: <200912211757.08305.arnd@arndb.de> (raw)
In-Reply-To: <200912211606.43789.arnd@arndb.de>

On Monday 21 December 2009 16:06:43 Arnd Bergmann wrote:
> 
> -       if (IS_G4X(dev)) {
> -               u16 gcfgc;
> -
> -               /* Adjust render clock... */
> -               pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
> -
> -               /* Down to minimum... */
> -               gcfgc &= ~GM45_GC_RENDER_CLOCK_MASK;
> -               gcfgc |= GM45_GC_RENDER_CLOCK_266_MHZ;
> -
> -               pci_write_config_word(dev->pdev, GCFGC, gcfgc);
> -       } else if (IS_I965G(dev)) {
> +       if (IS_I965G(dev)) {
>                 u16 gcfgc;

This crashed again immediately, apparently because IS_I965G is a superset
of IS_G4X (that seems counterintuitive), but not it seems to run using
this modified version of the patch (half an hour so far).

	Arnd

--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3783,7 +3783,7 @@ void intel_increase_renderclock(struct drm_device *dev, bool schedule)
 {
 	drm_i915_private_t *dev_priv = dev->dev_private;
 
-	if (IS_IRONLAKE(dev))
+	if (IS_IRONLAKE(dev) || IS_G4X(dev))
 		return;
 
 	if (!dev_priv->render_reclock_avail) {
@@ -3792,7 +3792,7 @@ void intel_increase_renderclock(struct drm_device *dev, bool schedule)
 	}
 
 	/* Restore render clock frequency to original value */
-	if (IS_G4X(dev) || IS_I9XX(dev))
+	if (IS_I9XX(dev))
 		pci_write_config_word(dev->pdev, GCFGC, dev_priv->orig_clock);
 	else if (IS_I85X(dev))
 		pci_write_config_word(dev->pdev, HPLLCC, dev_priv->orig_clock);
@@ -3808,7 +3808,7 @@ void intel_decrease_renderclock(struct drm_device *dev)
 {
 	drm_i915_private_t *dev_priv = dev->dev_private;
 
-	if (IS_IRONLAKE(dev))
+	if (IS_IRONLAKE(dev) || IS_G4X(dev))
 		return;
 
 	if (!dev_priv->render_reclock_avail) {
@@ -3816,16 +3816,7 @@ void intel_decrease_renderclock(struct drm_device *dev)
 		return;
 	}
 
-	if (IS_G4X(dev)) {
-		u16 gcfgc;
-
-		/* Adjust render clock... */
-		pci_read_config_word(dev->pdev, GCFGC, &gcfgc);
-
-		/* Down to minimum... */
-		gcfgc &= ~GM45_GC_RENDER_CLOCK_MASK;
-		gcfgc |= GM45_GC_RENDER_CLOCK_266_MHZ;
-	} else if (IS_I965G(dev)) {
+	if (IS_I965G(dev)) {
 		u16 gcfgc;
 
 		/* Adjust render clock... */

  reply	other threads:[~2009-12-21 17:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 17:30 [BISECTED] drm: random hang since 620f378 "drm: prune modes when ..." Arnd Bergmann
2009-12-08 21:59 ` Arnd Bergmann
2009-12-08 22:13   ` Dave Airlie
2009-12-08 23:07     ` Arnd Bergmann
2009-12-09  5:38       ` Dave Airlie
2009-12-13 12:18         ` Arnd Bergmann
2009-12-13 12:30           ` Arnd Bergmann
2009-12-13 20:00             ` Daniel Vetter
2009-12-13 21:31               ` Arnd Bergmann
2009-12-13 21:54                 ` Dave Airlie
2009-12-14 18:20                   ` Jesse Barnes
2009-12-14 20:38                     ` Arnd Bergmann
2009-12-14 20:50                       ` Jesse Barnes
2009-12-15  9:51                         ` Arnd Bergmann
2009-12-16 13:53                           ` Arnd Bergmann
2009-12-16 20:18                             ` Jesse Barnes
2009-12-16 21:20                               ` Arnd Bergmann
2009-12-16 21:30                                 ` Jesse Barnes
2009-12-16 21:36                                   ` Arnd Bergmann
2009-12-16 22:41                                     ` Arnd Bergmann
2009-12-17 17:25                                       ` Jesse Barnes
2009-12-17 17:52                                         ` Arnd Bergmann
2009-12-17 19:13                                           ` Jesse Barnes
2009-12-19 13:16                                             ` Arnd Bergmann
2009-12-21 16:06                                             ` Arnd Bergmann
2009-12-21 17:57                                               ` Arnd Bergmann [this message]
2009-12-28 18:47                                                 ` Jesse Barnes
2009-12-30 22:00                                                   ` Arnd Bergmann
2009-12-16 12:19                     ` Mathieu Taillefumier

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=200912211757.08305.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=keithp@keithp.com \
    --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