All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
@ 2012-03-05 14:22 Alan Cox
  2012-03-05 16:50 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2012-03-05 14:22 UTC (permalink / raw)
  To: airlied, dri-devel, torvalds

From: Alan Cox <alan@linux.intel.com>

[Resending with correct address for Linus]

Production GMA3600/3650 hardware turns out to be subtly different to the
development platforms. This combined with a minor driver bug is causing
the kernel to hang on these platforms.

This patch does the following

- turn down a couple of messages that were meant to be debug and are
  causing much confusion

- ensure the hotplug interrupt is disabled on Cedartrail systems.

- fix a bug where gtt roll mode called psbfb_sync, which tries to sync
  the 2D engine. On other devices it is harmless as the 2D engine is
  present but not in use when in gtt roll mode, on Cedartrail it causes
  a hang

Without these changes 3.3-rc hangs on boot on Cedartrail based systems.

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/gpu/drm/gma500/cdv_device.c  |    2 ++
 drivers/gpu/drm/gma500/framebuffer.c |    1 -
 drivers/gpu/drm/gma500/gtt.c         |    9 ++++-----
 3 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
index 4a5b099..53404af 100644
--- a/drivers/gpu/drm/gma500/cdv_device.c
+++ b/drivers/gpu/drm/gma500/cdv_device.c
@@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev)
 	cdv_get_core_freq(dev);
 	gma_intel_opregion_init(dev);
 	psb_intel_init_bios(dev);
+	REG_WRITE(PORT_HOTPLUG_EN, 0);
+	REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 830dfdd6b..be61673 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -247,7 +247,6 @@ static struct fb_ops psbfb_roll_ops = {
 	.fb_imageblit = cfb_imageblit,
 	.fb_pan_display = psbfb_pan,
 	.fb_mmap = psbfb_mmap,
-	.fb_sync = psbfb_sync,
 	.fb_ioctl = psbfb_ioctl,
 };
 
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index 5d5330f..aff194f 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -446,10 +446,9 @@ int psb_gtt_init(struct drm_device *dev, int resume)
 	pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);
 	gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)
 								>> PAGE_SHIFT;
-	/* Some CDV firmware doesn't report this currently. In which case the
-	   system has 64 gtt pages */
+	/* CDV doesn't report this. In which case the system has 64 gtt pages */
 	if (pg->gtt_start == 0 || gtt_pages == 0) {
-		dev_err(dev->dev, "GTT PCI BAR not initialized.\n");
+		dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n");
 		gtt_pages = 64;
 		pg->gtt_start = dev_priv->pge_ctl;
 	}
@@ -461,10 +460,10 @@ int psb_gtt_init(struct drm_device *dev, int resume)
 
 	if (pg->gatt_pages == 0 || pg->gatt_start == 0) {
 		static struct resource fudge;	/* Preferably peppermint */
-		/* This can occur on CDV SDV systems. Fudge it in this case.
+		/* This can occur on CDV systems. Fudge it in this case.
 		   We really don't care what imaginary space is being allocated
 		   at this point */
-		dev_err(dev->dev, "GATT PCI BAR not initialized.\n");
+		dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n");
 		pg->gatt_start = 0x40000000;
 		pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT;
 		/* This is a little confusing but in fact the GTT is providing

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
  2012-03-05 14:22 [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc Alan Cox
@ 2012-03-05 16:50 ` Linus Torvalds
  2012-03-05 18:54   ` David Airlie
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2012-03-05 16:50 UTC (permalink / raw)
  To: Alan Cox; +Cc: dri-devel

On Mon, Mar 5, 2012 at 6:22 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> From: Alan Cox <alan@linux.intel.com>
>
> [Resending with correct address for Linus]

Should I take this directly, or is there a pending DRM pull that will
contain this?

                     Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
  2012-03-05 16:50 ` Linus Torvalds
@ 2012-03-05 18:54   ` David Airlie
  0 siblings, 0 replies; 6+ messages in thread
From: David Airlie @ 2012-03-05 18:54 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: dri-devel




----- Original Message -----
> From: "Linus Torvalds" <torvalds@linux-foundation.org>
> To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
> Cc: dri-devel@lists.freedesktop.org
> Sent: Monday, 5 March, 2012 4:50:14 PM
> Subject: Re: [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
> 
> On Mon, Mar 5, 2012 at 6:22 AM, Alan Cox <alan@lxorguk.ukuu.org.uk>
> wrote:
> > From: Alan Cox <alan@linux.intel.com>
> >
> > [Resending with correct address for Linus]
> 
> Should I take this directly, or is there a pending DRM pull that will
> contain this?

I've just queued it up in drm-fixes, will send it out now since nothing else
came in today.

Dave.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
  2012-03-07 15:16 ` Joseph Salisbury
@ 2012-03-07 16:01   ` Alan Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2012-03-07 16:01 UTC (permalink / raw)
  To: Joseph Salisbury; +Cc: torvalds, airlied, linux-kernel

> I don't see stable@vger.kernel.org in the Cc list.  Will this patch be 
> submitted to stable?

No. Cedartrail support is not enabled in earlier kernels anyway.

Alan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
  2012-03-02 23:30 Alan Cox
@ 2012-03-07 15:16 ` Joseph Salisbury
  2012-03-07 16:01   ` Alan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Joseph Salisbury @ 2012-03-07 15:16 UTC (permalink / raw)
  To: Alan Cox; +Cc: torvalds, airlied, linux-kernel

On 03/02/2012 06:30 PM, Alan Cox wrote:
>
> Production GMA3600/3650 hardware turns out to be subtly different to the
> development platforms. This combined with a minor driver bug is causing
> the kernel to hang on these platforms.
>
> This patch does the following
>
> - turn down a couple of messages that were meant to be debug and are
>    causing much confusion
>
> - ensure the hotplug interrupt is disabled on Cedartrail systems.
>
> - fix a bug where gtt roll mode called psbfb_sync, which tries to sync
>    the 2D engine. On other devices it is harmless as the 2D engine is
>    present but not in use when in gtt roll mode, on Cedartrail it causes
>    a hang
>
> Signed-off-by: Alan Cox<alan@linux.intel.com>
>
> diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
> index 4a5b099..53404af 100644
> --- a/drivers/gpu/drm/gma500/cdv_device.c
> +++ b/drivers/gpu/drm/gma500/cdv_device.c
> @@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev)
>   	cdv_get_core_freq(dev);
>   	gma_intel_opregion_init(dev);
>   	psb_intel_init_bios(dev);
> +	REG_WRITE(PORT_HOTPLUG_EN, 0);
> +	REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
>   	return 0;
>   }
>
> diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
> index 830dfdd6b..be61673 100644
> --- a/drivers/gpu/drm/gma500/framebuffer.c
> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> @@ -247,7 +247,6 @@ static struct fb_ops psbfb_roll_ops = {
>   	.fb_imageblit = cfb_imageblit,
>   	.fb_pan_display = psbfb_pan,
>   	.fb_mmap = psbfb_mmap,
> -	.fb_sync = psbfb_sync,
>   	.fb_ioctl = psbfb_ioctl,
>   };
>
> diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
> index 5d5330f..aff194f 100644
> --- a/drivers/gpu/drm/gma500/gtt.c
> +++ b/drivers/gpu/drm/gma500/gtt.c
> @@ -446,10 +446,9 @@ int psb_gtt_init(struct drm_device *dev, int resume)
>   	pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);
>   	gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)
>   								>>  PAGE_SHIFT;
> -	/* Some CDV firmware doesn't report this currently. In which case the
> -	   system has 64 gtt pages */
> +	/* CDV doesn't report this. In which case the system has 64 gtt pages */
>   	if (pg->gtt_start == 0 || gtt_pages == 0) {
> -		dev_err(dev->dev, "GTT PCI BAR not initialized.\n");
> +		dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n");
>   		gtt_pages = 64;
>   		pg->gtt_start = dev_priv->pge_ctl;
>   	}
> @@ -461,10 +460,10 @@ int psb_gtt_init(struct drm_device *dev, int resume)
>
>   	if (pg->gatt_pages == 0 || pg->gatt_start == 0) {
>   		static struct resource fudge;	/* Preferably peppermint */
> -		/* This can occur on CDV SDV systems. Fudge it in this case.
> +		/* This can occur on CDV systems. Fudge it in this case.
>   		   We really don't care what imaginary space is being allocated
>   		   at this point */
> -		dev_err(dev->dev, "GATT PCI BAR not initialized.\n");
> +		dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n");
>   		pg->gatt_start = 0x40000000;
>   		pg->gatt_pages = (128 * 1024 * 1024)>>  PAGE_SHIFT;
>   		/* This is a little confusing but in fact the GTT is providing
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

I don't see stable@vger.kernel.org in the Cc list.  Will this patch be 
submitted to stable?

Thanks,

Joe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc
@ 2012-03-02 23:30 Alan Cox
  2012-03-07 15:16 ` Joseph Salisbury
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2012-03-02 23:30 UTC (permalink / raw)
  To: torvalds, airlied, linux-kernel


Production GMA3600/3650 hardware turns out to be subtly different to the
development platforms. This combined with a minor driver bug is causing
the kernel to hang on these platforms.

This patch does the following

- turn down a couple of messages that were meant to be debug and are
  causing much confusion

- ensure the hotplug interrupt is disabled on Cedartrail systems.

- fix a bug where gtt roll mode called psbfb_sync, which tries to sync
  the 2D engine. On other devices it is harmless as the 2D engine is
  present but not in use when in gtt roll mode, on Cedartrail it causes
  a hang

Signed-off-by: Alan Cox <alan@linux.intel.com>

diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
index 4a5b099..53404af 100644
--- a/drivers/gpu/drm/gma500/cdv_device.c
+++ b/drivers/gpu/drm/gma500/cdv_device.c
@@ -321,6 +321,8 @@ static int cdv_chip_setup(struct drm_device *dev)
 	cdv_get_core_freq(dev);
 	gma_intel_opregion_init(dev);
 	psb_intel_init_bios(dev);
+	REG_WRITE(PORT_HOTPLUG_EN, 0);
+	REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 830dfdd6b..be61673 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -247,7 +247,6 @@ static struct fb_ops psbfb_roll_ops = {
 	.fb_imageblit = cfb_imageblit,
 	.fb_pan_display = psbfb_pan,
 	.fb_mmap = psbfb_mmap,
-	.fb_sync = psbfb_sync,
 	.fb_ioctl = psbfb_ioctl,
 };
 
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c
index 5d5330f..aff194f 100644
--- a/drivers/gpu/drm/gma500/gtt.c
+++ b/drivers/gpu/drm/gma500/gtt.c
@@ -446,10 +446,9 @@ int psb_gtt_init(struct drm_device *dev, int resume)
 	pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);
 	gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)
 								>> PAGE_SHIFT;
-	/* Some CDV firmware doesn't report this currently. In which case the
-	   system has 64 gtt pages */
+	/* CDV doesn't report this. In which case the system has 64 gtt pages */
 	if (pg->gtt_start == 0 || gtt_pages == 0) {
-		dev_err(dev->dev, "GTT PCI BAR not initialized.\n");
+		dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n");
 		gtt_pages = 64;
 		pg->gtt_start = dev_priv->pge_ctl;
 	}
@@ -461,10 +460,10 @@ int psb_gtt_init(struct drm_device *dev, int resume)
 
 	if (pg->gatt_pages == 0 || pg->gatt_start == 0) {
 		static struct resource fudge;	/* Preferably peppermint */
-		/* This can occur on CDV SDV systems. Fudge it in this case.
+		/* This can occur on CDV systems. Fudge it in this case.
 		   We really don't care what imaginary space is being allocated
 		   at this point */
-		dev_err(dev->dev, "GATT PCI BAR not initialized.\n");
+		dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n");
 		pg->gatt_start = 0x40000000;
 		pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT;
 		/* This is a little confusing but in fact the GTT is providing



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-07 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-05 14:22 [PATCH] drm, gma500: Fix Cedarview boot failures in 3.3-rc Alan Cox
2012-03-05 16:50 ` Linus Torvalds
2012-03-05 18:54   ` David Airlie
  -- strict thread matches above, loose matches on Subject: below --
2012-03-02 23:30 Alan Cox
2012-03-07 15:16 ` Joseph Salisbury
2012-03-07 16:01   ` Alan Cox

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.