Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753853AbZDNUQQ (ORCPT ); Tue, 14 Apr 2009 16:16:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751805AbZDNUQA (ORCPT ); Tue, 14 Apr 2009 16:16:00 -0400 Received: from mail-gx0-f208.google.com ([209.85.217.208]:33173 "EHLO mail-gx0-f208.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627AbZDNUP7 (ORCPT ); Tue, 14 Apr 2009 16:15:59 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=GiH0lt9SMn3Nt7MF6MZ2hipWlnqAVse+QpEoqjW8rqwe1eeGxPxfTNcGndXa9erzSN jnId5m2IN7PSmbbGbc03XAV9G/CKLH2cPPZRkdVg6P7ugMiGtGWWDBJvO7DPWic502WF oxAWIZp6q6UJOr5yxJLZpHTFCtdPecxlyO/oQ= MIME-Version: 1.0 Date: Tue, 14 Apr 2009 16:15:57 -0400 Message-ID: Subject: Radeon kernel-modesetting on Alpha. Problem reading PCI ROM From: Matt Turner To: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, dri-devel@lists.sourceforge.net Cc: Richard Henderson , Ivan Kokshaysky , Jay Estabrook , Oliver Falk , glisse@freedesktop.org Content-Type: multipart/mixed; boundary=00151750e184b1e2c10467897f61 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8806 Lines: 144 --00151750e184b1e2c10467897f61 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I'm testing Jerome Glisse's drm-next-radeon branch which provides Radeon Kernel-modesetting support on a Samsung UP1500 with a PCI Radeon X1550. See http://cgit.freedesktop.org/~glisse/drm-next/log/?h=drm-next-radeon While doing so, I've hit a few snags, and placed DRM_INFOs and printks throughout code in question. On Alpha, it hangs after calling fb_notifier_call_chain in register_framebuffer. Jerome and I think that the hang may be caused by being unable to read the PCI ROM. The radeon_read_bios function makes use of pci_map_rom, which calls pci_get_rom_size. In pci_get_rom_size, readb(image) doesn't return 0x55. It falls back to read_disabled functions which appear to succeed. Why would the ROM not be able to be read by readb? Is this a general problem, or Alpha-specific? Attached are relevant dmesg logs and printk patches (against commit 7582b4332602dcf03bb0c79f17e0cf89eeec6623) to give context. Thanks, Matt Turner --00151750e184b1e2c10467897f61 Content-Type: application/octet-stream; name="radeon-kms.log" Content-Disposition: attachment; filename="radeon-kms.log" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ftj0wyfk0 W2RybV0gSW5pdGlhbGl6ZWQgZHJtIDEuMS4wIDIwMDYwODEwCltkcm1dIHJhZGVvbiBrZXJuZWwg bW9kZXNldHRpbmcgZW5hYmxlZC4KUENJOiBTZXR0aW5nIGxhdGVuY3kgdGltZXIgb2YgZGV2aWNl IDAwMDA6MDI6MDAuMCB0byA2NApbZHJtXSByYWRlb246IEluaXRpYWxpemluZyBrZXJuZWwgbW9k ZXNldHRpbmcuCltkcm1dIHJlZ2lzdGVyIG1taW8gYmFzZTogMHhFNDAwMDAwMApbZHJtXSByZWdp c3RlciBtbWlvIHNpemU6IDY1NTM2Cltkcm1dIHJhZGVvbjogMSBwaXBlKHMpCltkcm1dIHJhZGVv bl9yZWFkX2Jpb3M6IGNhbGxpbmcgcGNpX21hcF9yb20KcGNpX21hcF9yb206IGlvcmVtYXAgcmV0 dXJuZWQgIT0gTlVMTApwY2lfZ2V0X3JvbV9zaXplOiBzaXplIGFzIHBhc3NlZCB0aHJvdWdoIGFy Z3VtZW50IGxpc3QgPSAxMzEwNzIKcGNpX2dldF9yb21fc2l6ZTogcm9tIGFzIHBhc3NlZCB0aHJv dWdoIGFyZ3VtZW50IGxpc3QgPSAwWEU4MDAwMDAwCnBjaV9nZXRfcm9tX3NpemU6IGltYWdlID0g MFhFODAwMDAwMApwY2lfZ2V0X3JvbV9zaXplOiByZW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WRpbmcgUjUwMCBNaWNyb2NvZGUKW2RybV0g cmFkZW9uOiByaW5nIGF0IDB4MDAwMDAwMDAxMDAwMDAwMApbZHJtXSByaW5nIHRlc3Qgc3VjY2Vl ZGVkIGluIDEgdXNlY3MKW2RybV0gcmFkZW9uOiBpYiBwb29sIHJlYWR5LgpbZHJtXSBpYiB0ZXN0 IHN1Y2NlZWRlZCBpbiAwIHVzZWNzCmkyYy1hZGFwdGVyIGkyYy0xOiB1bmFibGUgdG8gcmVhZCBF RElEIGJsb2NrLgpyYWRlb24gMDAwMDowMjowMC4wOiBWR0EtMTogbm8gRURJRCBkYXRhCltkcm1d IGZiIG1hcHBhYmxlIGF0IDB4RjAwNDgwMDAKW2RybV0gdnJhbSBhcHBlciBhdCAweEYwMDAwMDAw Cltkcm1dIHNpemUgNTI0Mjg4MApbZHJtXSBmYiBkZXB0aCBpcyAyNApbZHJtXSAgICBwaXRjaCBp cyA1MTIwCnJlZ2lzdGVyX2ZyYW1lYnVmZmVyOiBhYm91dCB0byBjYWxsIGZiX25vdGlmaWVyX2Nh bGxfY2hhaW4K --00151750e184b1e2c10467897f61 Content-Type: application/octet-stream; name="radeon-kms-debugging.patch" Content-Disposition: attachment; filename="radeon-kms-debugging.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ftj0x4vz1 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvZ3B1L2RybS9yYWRlb24vcmFkZW9uX2Jpb3MuYyBiL2RyaXZl cnMvZ3B1L2RybS9yYWRlb24vcmFkZW9uX2Jpb3MuYwppbmRleCAxZjE5MmViLi5mMzVmMGM3IDEw MDY0NAotLS0gYS9kcml2ZXJzL2dwdS9kcm0vcmFkZW9uL3JhZGVvbl9iaW9zLmMKKysrIGIvZHJp dmVycy9ncHUvZHJtL3JhZGVvbi9yYWRlb25fYmlvcy5jCkBAIC0zOSwxNiArMzksMjAgQEAgc3Rh dGljIGJvb2wgcmFkZW9uX3JlYWRfYmlvcyhzdHJ1Y3QgcmFk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kaXNhYmxl ZF9iaW9zIHJldHVybmVkICVzXG4iLCByID8gInRydWUiIDogImZhbHNlIik7CiAJfQorCURSTV9J TkZPKCJyZGV2LT5iaW9zICVjPSBOVUxMXG4iLCByZGV2LT5iaW9zID09IE5VTEwgPyAnPScgOiAn IScpOwogCWlmIChyID09IGZhbHNlIHx8IHJkZXYtPmJpb3MgPT0gTlVMTCkgewotCQlEUk1fRVJS T1IoIlVuYWJsZSB0byBsb2NhdGUgYSBCSU9TIFJPTVxuIik7CisJCURSTV9FUlJPUigicmFkZW9u X2dldF9iaW9zOiBVbmFibGUgdG8gbG9jYXRlIGEgQklPUyBST01cbiIpOwogCQlyZXR1cm4gZmFs c2U7CiAJfQorCURSTV9JTkZPKCJyYWRlb25fZ2V0X2Jpb3M6IHJkZXYtPmJpb3NbMF0gPT0gJSNY XG4iLCByZGV2LT5iaW9zWzBdKTsKIAlpZiAocmRldi0+Ymlvc1swXSAhPSAweDU1IHx8IHJkZXYt PmJpb3NbMV0gIT0gMHhhYSkgewogCQlnb3RvIGZyZWVfYmlvczsKIAl9CkBAIC0zMDksNyArMzIw LDcgQEAgYm9vbCByYWRlb25fZ2V0X2Jpb3Moc3RydWN0IHJhZGVvbl9kZXZpY2UgKnJkZXYpCiAJ CXJkZXYtPmlzX2F0b21fYmlvcyA9IGZhbHNlOwogCX0KIAotCURSTV9ERUJVRygiJXNCSU9TIGRl dGVjdGVkXG4iLCByZGV2LT5pc19hdG9tX2Jpb3MgPyAiQVRPTSIgOiAiQ09NIik7CisJRFJNX0lO Rk8oIiVzQklPUyBkZXRlY3RlZFxuIiwgcmRldi0+aXNfYXRvbV9iaW9zID8gIkFUT00iIDogIkNP TSIpOwogCXJldHVybiB0cnVlOwogZnJlZV9iaW9zOgogCWtmcmVlKHJkZXYtPmJpb3MpOwo= --00151750e184b1e2c10467897f61-- -- 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/