From: Tempura San <tempura.san@gmail.com>
To: Julien Cristau <jcristau@debian.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: i915 module does not find 82865G if configured as secondary
Date: Mon, 10 Oct 2011 22:32:38 +0200 [thread overview]
Message-ID: <4E935666.40505@gmail.com> (raw)
In-Reply-To: <20111010190627.GF12618@radis.liafa.jussieu.fr>
[-- Attachment #1: Type: text/plain, Size: 5026 bytes --]
This would be great, but...
I have just tested the patches and it really messes up the system.
On the first boot I got a shell and was able to to a dmesg:
...
[ 46.775935] [drm] Initialized drm 1.1.0 20060810
[ 46.926398] i915 0000:00:02.0: enabling device (0000 -> 0003)
[ 46.926412] i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 46.926422] i915 0000:00:02.0: setting latency timer to 64
[ 46.932858] [drm] set up 31M of stolen space
[ 46.933087] i915 0000:00:02.0: BAR 6: can't allocate resource (bogus
alignment) [0x0-0x0] flags 0x0
[ 46.933093] [drm] failed to find VBIOS tables
[ 46.978294] [drm] initialized overlay support
[ 47.308831] Console: switching to colour frame buffer device 160x64
[ 47.308849] fb0: inteldrmfb frame buffer device
[ 47.308853] registered panic notifier
[ 47.308868] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on
minor 0
[ 47.323940] vgaarb: this pci device is not a vga device
[ 47.355806] render error detected, EIR: 0x00000010
[ 47.355815] [drm:i915_handle_error] *ERROR* EIR stuck: 0x00000010,
masking
[ 47.355835] render error detected, EIR: 0x00000010
[ 48.112726] vgaarb: this pci device is not a vga device
[ 48.568008] tap0: no IPv6 routers present
[ 50.673130] lp0: using parport0 (interrupt-driven).
[ 50.842153] [drm:i915_hangcheck_elapsed] *ERROR* Hangcheck timer
elapsed... GPU hung
[ 50.842166] render error detected, EIR: 0x00000000
[ 50.842200] [drm:i915_do_wait_request] *ERROR* i915_do_wait_request
returns -5 (awaiting 1 at 0)
[ 51.100509] ppdev: user-space parallel port driver
[ 51.436065] EXT3-fs error (device sda2): ext3_lookup: deleted inode
referenced: 157299
[ 51.436076] Aborting journal on device sda2.
[ 51.436296] Remounting filesystem read-only
...
On the second boot the computer hung altogether.
Xorg seemed to initialise but ended up with this (last) line in the log
file:
(EE) intel(0): Detected a hung GPU, disabling acceleration.
I have attached the log for completeness.
So I believe for the older kernel there would be more to patch than
this... I have attached the diff of the changes I have done so far -
should be the two patches Chris had listed.
Compared against the sources from:
ii linux-source-2.6.32
2.6.32-38 Linux kernel source for version
2.6.32 with Debian patches
Were the changes I did correct? Just in case I messed things up myself...
Yours,
Tempura.
On Mon, 10 Oct 2011 21:06:27 +0200, Julien Cristau wrote:
> On Sun, Oct 9, 2011 at 19:36:27 +0100, Chris Wilson wrote:
>
>> On Sun, 9 Oct 2011 14:44:30 +0200, Daniel Vetter <daniel@ffwll.ch> wrote:
>>> On Sun, Oct 09, 2011 at 01:07:25PM +0200, Tempura San wrote:
>>>> Here is the output of lspci -nn:
>>>>
>>>> 00:00.0 Host bridge [0600]: Intel Corporation 82865G/PE/P DRAM
>>>> Controller/Host-Hub Interface [8086:2570] (rev 02)
>>>> 00:02.0 Display controller [0380]: Intel Corporation 82865G Integrated
>>>> Graphics Controller [8086:2572] (rev 02)
>>> The issue seems to be that the igd isn't a VGA pci class device anymore
>>> when used as secondary. The below (untested) patch should allow to still
>>> bind the i915 driver. Please test how far that gets us.
>> Note the old kernel, and probable lack of:
>>
>> commit 934f992c763ae1e5eefcce8af769c16444085df7
>> Author: Chris Wilson <chris@chris-wilson.co.uk>
>> Date: Thu Jan 20 13:09:12 2011 +0000
>>
>> drm/i915: Recognise non-VGA display devices
>>
>> Starting with SandyBridge (though possible with earlier hacked BIOSes),
>> the BIOS may initialise the IGFX as secondary to a discrete GPU. Prior,
>> it would simply disable the integrated GPU. So we adjust our PCI class
>> mask to match any DISPLAY_CLASS device.
>>
>> In such a configuration, the IGFX is not a primary VGA controller and
>> so should not take part in VGA arbitration, and the error return from
>> vga_client_register() is expected.
>>
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: stable@kernel.org
>>
>> and
>>
>> commit 5fe49d86f9d01044abf687a8cd21edef636d58aa
>> Author: Chris Wilson <chris@chris-wilson.co.uk>
>> Date: Tue Feb 1 19:43:02 2011 +0000
>>
>> drm/i915: Only bind to function 0 of the PCI device
>>
>> Early chipsets (gen2/3) used function 1 as a placeholder for multi-head.
>> We used to ignore these since they were not assigned to
>> PCI_CLASS_DISPLAY_VGA. However with 934f992c7 we attempt to bind to all
>> Intel PCI_CLASS_DISPLAY devices (and functions) to work in multi-gpu
>> systems. This fails hard on gen2/3.
>>
>> Reported-by: Ferenc W??gner <wferi@niif.hu>
>> Tested-by: Ferenc W??gner <wferi@niif.hu>
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28012
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: stable@kernel.org
> I'll try to get these included into a future squeeze kernel update.
> Thanks.
>
> Cheers,
> Julien
[-- Attachment #2: i915-for-squeeze.diff --]
[-- Type: text/x-patch, Size: 2525 bytes --]
diff -uNr linux-source-2.6.32/drivers/gpu/drm/i915/i915_dma.c linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_dma.c
--- linux-source-2.6.32/drivers/gpu/drm/i915/i915_dma.c 2011-10-02 01:46:54.000000000 +0200
+++ linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_dma.c 2011-10-09 21:55:14.000000000 +0200
@@ -1267,9 +1267,15 @@
if (ret)
DRM_INFO("failed to find VBIOS tables\n");
- /* if we have > 1 VGA cards, then disable the radeon VGA resources */
- ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode);
- if (ret)
+ /* If we have > 1 VGA cards, then we need to arbitrate access
+ * to the common VGA resources.
+ *
+ * If we are a secondary display controller (!PCI_DISPLAY_CLASS_VGA),
+ * then we do not take part in VGA arbitration and the
+ * vga_client_register() fails with -ENODEV.
+ */
+ ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode);
+ if (ret && ret != -ENODEV)
goto destroy_ringbuffer;
/* IIR "flip pending" bit means done if this bit is set */
diff -uNr linux-source-2.6.32/drivers/gpu/drm/i915/i915_drv.c linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_drv.c
--- linux-source-2.6.32/drivers/gpu/drm/i915/i915_drv.c 2011-10-02 01:46:49.000000000 +0200
+++ linux-source-2.6.32-i915/drivers/gpu/drm/i915/i915_drv.c 2011-10-09 21:59:58.000000000 +0200
@@ -52,7 +52,7 @@
#define INTEL_VGA_DEVICE(id, info) { \
.class = PCI_CLASS_DISPLAY_VGA << 8, \
- .class_mask = 0xffff00, \
+ .class_mask = 0xff0000, \
.vendor = 0x8086, \
.device = id, \
.subvendor = PCI_ANY_ID, \
@@ -393,6 +393,14 @@
static int __devinit
i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
+ /* Only bind to function 0 of the device. Early generations
+ * used function 1 as a placeholder for multi-head. This causes
+ * us confusion instead, especially on the systems where both
+ * functions have the same PCI-ID!
+ */
+ if (PCI_FUNC(pdev->devfn))
+ return -ENODEV;
+
return drm_get_dev(pdev, ent, &driver);
}
diff -uNr linux-source-2.6.32/drivers/gpu/vga/vgaarb.c linux-source-2.6.32-i915/drivers/gpu/vga/vgaarb.c
--- linux-source-2.6.32/drivers/gpu/vga/vgaarb.c 2011-10-02 01:46:46.000000000 +0200
+++ linux-source-2.6.32-i915/drivers/gpu/vga/vgaarb.c 2011-10-09 21:56:59.000000000 +0200
@@ -614,7 +614,7 @@
void (*irq_set_state)(void *cookie, bool state),
unsigned int (*set_vga_decode)(void *cookie, bool decode))
{
- int ret = -1;
+ int ret = -ENODEV;
struct vga_device *vgadev;
unsigned long flags;
[-- Attachment #3: Xorg.0.log.old --]
[-- Type: application/x-trash, Size: 18778 bytes --]
[-- Attachment #4: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-10-10 20:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-08 15:25 i915 module does not find 82865G if configured as secondary Tempura San
2011-10-08 16:33 ` Felix Miata
2011-10-09 9:52 ` Tempura San
2011-10-08 19:37 ` Dave Airlie
2011-10-09 9:34 ` Tempura San
2011-10-09 10:38 ` Daniel Vetter
2011-10-09 11:07 ` Tempura San
2011-10-09 12:44 ` Daniel Vetter
2011-10-09 18:36 ` Chris Wilson
2011-10-09 20:20 ` Tempura San
2011-10-10 19:06 ` Julien Cristau
2011-10-10 20:32 ` Tempura San [this message]
2011-10-10 20:53 ` Chris Wilson
2011-10-11 8:25 ` Dave Airlie
2011-10-15 11:44 ` Tempura San
2011-10-09 20:19 ` Tempura San
2011-10-10 6:55 ` 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=4E935666.40505@gmail.com \
--to=tempura.san@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jcristau@debian.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