Bug 28249 - Hercules Stingray 64 (ark2000pv) does not work: AddScreen/ScreenInit failed for driver 0
Summary: Hercules Stingray 64 (ark2000pv) does not work: AddScreen/ScreenInit failed f...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/ark (show other bugs)
Version: 7.5 (2009.10)
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-05-25 13:17 UTC by Ondrej Zary
Modified: 2011-02-28 12:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
PATCH: Don't assume that FB address registers are initialized properly (2.78 KB, patch)
2010-05-25 13:17 UTC, Ondrej Zary
no flags Details | Splinter Review

Description Ondrej Zary 2010-05-25 13:17:13 UTC
Created attachment 35852 [details] [review]
PATCH: Don't assume that FB address registers are initialized properly

ark driver does not work with Hercules Stingray 64 card (ark2000pv). X fails to start with:

[...]
(II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(II) ark(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
(==) ark(0): Depth 24, (--) framebuffer bpp 32
(==) ark(0): RGB weight 888
(==) ark(0): Default visual is TrueColor
(**) ark(0): Chipset: "ark2000pv"
(--) ark(0): Framebuffer @ 0xe5e50000
(==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
(--) ark(0): Detected 2048 bytes video ram
[...]
Fatal server error:
AddScreen/ScreenInit failed for driver 0

Comparing with lspci, the framebuffer address is wrong:
00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] (prog-if 00 [VGA controller])
        Flags: medium devsel
        Memory at e5000000 (32-bit, prefetchable) [size=4M]
        [virtual] Expansion ROM at 1c000000 [disabled] [size=64K]

Attached patch fixes this problem.
Comment 1 Daniel Stone 2010-05-26 06:45:08 UTC
Review of attachment 35852 [details] [review]:

I can't test this as I have never owned and almost certainly will never own any ark hardware, but:

::: xf86-video-ark-0.7.2-orig/src//ark_driver.c
@@ +1038,3 @@
 		void** result = (void**)&pARK->FBBase;
 		int err = pci_device_map_range(pARK->PciInfo,
+					       pARK->PciInfo->regions[0].base_addr,

This needs an #ifdef XSERVER_LIBPCIACCESS, no?
Comment 2 Daniel Stone 2010-05-26 06:46:09 UTC
(In reply to comment #1)
> Review of attachment 35852 [details] [review]:
> 
> I can't test this as I have never owned and almost certainly will never own any
> ark hardware, but:
> 
> ::: xf86-video-ark-0.7.2-orig/src//ark_driver.c
> @@ +1038,3 @@
>          void** result = (void**)&pARK->FBBase;
>          int err = pci_device_map_range(pARK->PciInfo,
> +                           pARK->PciInfo->regions[0].base_addr,
> 
> This needs an #ifdef XSERVER_LIBPCIACCESS, no?

Wait, I'm an idiot.  Nevermind.
Comment 3 Ondrej Zary 2010-05-26 06:51:50 UTC
I haven't tested it without libpciaccess, though.
Comment 4 Ondrej Zary 2010-06-14 10:29:05 UTC
Can PLEASE someone commit this? Or at least reply if there's something wrong with the patch.
Comment 5 Alan Coopersmith 2010-06-14 10:34:01 UTC
(In reply to comment #4)
> Can PLEASE someone commit this? Or at least reply if there's something wrong
> with the patch.

While unmaintained drivers like ark don't get patches applied quickly,
patches do tend to get reviewed a little faster if submitted to the 
mailing list, as described on 
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
Comment 6 Matt Turner 2011-02-28 12:05:40 UTC
(In reply to comment #4)
> Can PLEASE someone commit this? Or at least reply if there's something wrong
> with the patch.

I sent this to the xorg-devel@ list back in december and got a review, so I've committed this.

It'll be available in version 0.74 of -ark. Marking as FIXED. :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.