summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* drm/nv50: fix iommu errors caused by device reading from address 0Ben Skeggs2010-06-081-2/+8
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: off by one in init_i2c_device_find()Dan Carpenter2010-06-081-1/+1
| | | | | | | | dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: off by one in nv50_gpio_location()Dan Carpenter2010-06-081-1/+1
| | | | | | | | | If "gpio->line" is 32 then "nv50_gpio_reg[gpio->line >> 3]" reads past the end of the array. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: completely fail init if we fail to map the PRAMIN BARBen Skeggs2010-06-081-12/+7
| | | | | | | | | | | On cards where there's a specific BAR for PRAMIN, we used to try and fall back to the "legacy" aperture within the mmio BAR. This is doomed to cause problems, so lets just fail completely as there's obviously something else very wrong anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: match U/DP script against SOR linkBen Skeggs2010-06-081-3/+20
| | | | | | | | It appears version 0x21 'U' and 'd' tables require us to take the SOR link into account when selecting the appropriate table for a particular output. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Propagate error from drm_fb_helper_init().Chris Wilson2010-06-081-1/+7
| | | | | | | | | | The previous commit fixes the problem, these commits make sure we actually fail properly if it happens again. I've squashed the commits from Chris since they are all fixing one issue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into ↵Dave Airlie2010-06-019-34/+97
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-testing * 'nouveau/for-airlied' of ../drm-nouveau-next: drm/nv50: cast IGP memory location to u64 before shifting drm/nv50: use alternate source of SOR_MODE_CTRL for DP hack drm/nouveau: fix dual-link displays when plugged into single-link outputs drm/nv50: obey dcb->duallink_possible drm/nv50: fix duallink_possible calculation for DCB 4.0 cards drm/nouveau: don't execute INIT_GPIO unless we're really running the table drm/nv40: allow cold-booting of nv4x chipsets drm/nouveau: fix POST detection for certain chipsets drm/nouveau: Add getparam for current PTIMER time. drm/nouveau: allow cursor image and position to survive suspend
| * drm/nv50: cast IGP memory location to u64 before shiftingBen Skeggs2010-06-011-1/+2
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50: use alternate source of SOR_MODE_CTRL for DP hackBen Skeggs2010-05-281-6/+1
| | | | | | | | | | | | | | Fixes module unload+reload on Dell M4500, where the "normal" registers get reset to 0. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: fix dual-link displays when plugged into single-link outputsBen Skeggs2010-05-281-14/+17
| | | | | | | | | | | | | | | | | | | | When selecting the native mode for a display we weren't taking into account whether or not it was actually supported on that particular output. This patch modifies our native mode selection to run all modes through mode_valid() first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50: obey dcb->duallink_possibleBen Skeggs2010-05-281-2/+1
| | | | | | | | | | | | | | | | It was once assumed that all G8x had dual-link TMDS everywhere, this isn't actually the case - especially considering passive DP->DVI converters and some HDMI connectors only support single-link. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50: fix duallink_possible calculation for DCB 4.0 cardsBen Skeggs2010-05-281-6/+10
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: don't execute INIT_GPIO unless we're really running the tableBen Skeggs2010-05-281-1/+4
| | | | | | | | | | | | | | | | | | This resulted in accidently switching off the eDP panel on certain laptops since the default state in the GPIO table was off. Fixes rh#582621 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv40: allow cold-booting of nv4x chipsetsBen Skeggs2010-05-281-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: fix POST detection for certain chipsetsBen Skeggs2010-05-281-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | We totally fail at detecting un-POSTed chipsets prior to G80. This commit changes the pre-G80 POST detection to read the programmed horizontal total from CRTC 0, and assume the card isn't POSTed if it's 0. NVIDIA use some other heuristics more similar to what we do on G80, but I wasted quite a long time trying to figure out the exact specifics of what they do so we can try this for a bit instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: Add getparam for current PTIMER time.Marcin Kościelnicki2010-05-281-0/+3
| | | | | | | | | | | | | | | | This will be useful for computing GPU-CPU latency, including GL_ARB_timer_query extension. Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: allow cursor image and position to survive suspendMaarten Maathuis2010-05-284-0/+33
| | | | | | | | | | | | | | | | | | - This isn't triggered yet on a normal kernel, because it still does a VT switch, but it seemed like a good idea to fix this now. Tested-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/kms: disable/enable poll around switcheroo on/offDave Airlie2010-06-011-0/+3
| | | | | | | | | | | | Because we aren't in a suspend state the poll will still run when we have switcherooed a card off. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nouveau: fixup confusion over which handle the DSM is hanging off.Dave Airlie2010-06-011-8/+6
| | | | | | | | | | | | This fixes the DSM setup correctly since vga switcheroo. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nouveau: attempt to get bios from ACPI v3Dave Airlie2010-06-013-1/+83
| | | | | | | | | | | | | | | | Some of the laptops with the switchable graphics, seem to not post the secondary GPU at all, and we can't find a copy of the BIOS anywhere except in the ACPI rom retrieval. This adds support for ACPI ROM retrieval to nouveau. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: Fixes linux-next & linux-2.6 checkstack warnings:Prarit Bhargava2010-05-241-1/+7
| | | | | | | | | | | | | | | | | | | | drivers/gpu/drm/nouveau/nv40_graph.c: In function `nv40_graph_init': drivers/gpu/drm/nouveau/nv40_graph.c:400: warning: the frame size of 1184 bytes is larger than 1024 bytes drivers/gpu/drm/radeon/radeon_atombios.c: In function `radeon_get_atom_connector_info_from_supported_devices_table': drivers/gpu/drm/radeon/radeon_atombios.c:857: warning: the frame size of 1872 bytes is larger than 1024 bytes Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | nouveau: fix acpi_lid_open undefinedRandy Dunlap2010-05-241-1/+2
|/ | | | | | | | | | | When CONFIG_ACPI_BUTTON=m (and probably when ACPI_BUTTON is not enabled) and NOUVEAU is built-in (not as a loadable module): nouveau_connector.c:(.text+0xe17ce): undefined reference to `acpi_lid_open' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: fix i2c-related init table handlersBen Skeggs2010-05-191-39/+38
| | | | | | | | Mutliple issues. INIT_ZM_I2C_BYTE/INIT_I2C_BYTE didn't even try and use the register value, and all the handlers were using the wrong slave address. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: support init table i2c device identifier 0x81Ben Skeggs2010-05-191-0/+3
| | | | | | It appears to be meant to reference the second "default index". Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: ensure we've parsed i2c table entry for INIT_*I2C* handlersBen Skeggs2010-05-191-77/+88
| | | | | | | | | | We may not have parsed the entry yet if the i2c_index is for an i2c bus that's not referenced by a DCB encoder. This could be done oh so much more nicely, except we have to care about prehistoric DCB tables too, and they make life painful. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: display error message for any failed init table opcodeBen Skeggs2010-05-191-16/+23
| | | | | | | Some handlers don't report specific errors, but we still *really* want to know if we failed to parse a complete init table. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix init table handlers to return proper error codesBen Skeggs2010-05-191-23/+28
| | | | | | | | | We really want to be able to distinguish between INIT_DONE and an actual error sometimes. This commit fixes up several lazy "return 0;" to be actual error codes, and explicitly reserves "0" as "success, but stop parsing this table". Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: support fractional feedback divider on newer chipsBen Skeggs2010-05-194-24/+120
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix monitor detection on certain chipsetsBen Skeggs2010-05-191-5/+16
| | | | | | | | | | There appears to be some kind of switch on certain chips to control whether the DP auxch or traditional i2c bus will be operational on a connector, this commit hopefully fixes nouveau to do the right thing. Likely only relevent on chips with DP outputs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: store full dcb i2c entry from vbiosBen Skeggs2010-05-192-2/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix suspend/resume with DP outputsBen Skeggs2010-05-194-5/+46
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: output calculated crtc pll when debugging onBen Skeggs2010-05-191-0/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: dump pll limits entries when debugging is onBen Skeggs2010-05-191-25/+26
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: bios parser fixes for eDP boardsBen Skeggs2010-05-191-0/+124
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix a nouveau_bo dereference after it's been destroyedBen Skeggs2010-05-191-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40: remove some completed ctxprog TODOsBen Skeggs2010-05-191-5/+0
| | | | | | | I actually thought these were gone already when the initial commit was done.. I guess not! Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04: Implement missing nv04 PGRAPH methods in software.Marcin Kościelnicki2010-05-191-13/+553
| | | | | Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Use 0x5f instead of 0x9f as imageblit on original NV10.Marcin Kościelnicki2010-05-191-1/+1
| | | | | Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/fbdev: rework output polling to be back in the core. (v4)Dave Airlie2010-05-186-13/+23
| | | | | | | | | | | | | | | | | After thinking it over a lot it made more sense for the core to deal with the output polling especially so it can notify X. v2: drop plans for fake connector - per Michel's comments - fix X patch sent to xorg-devel, add intel polled/hpd setting, add initial nouveau polled/hpd settings. v3: add config lock take inside polling, add intel/nouveau poll init/fini calls v4: config lock was a bit agressive, only needed around connector list reading. otherwise it could re-enter. glisse: discard drm_helper_hpd_irq_event v3: Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vga16fb, drm: vga16fb->drm handoffMarcin Slusarz2010-05-181-1/+6
| | | | | | | | | | | | let vga16fb claim 0xA0000+0x10000 region as its aperture; drm drivers don't use it, so we have to detect it and kick vga16fb manually - but only if drm is driving the primary card Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: James Simmons <jsimmons@infradead.org> Cc: Dave Airlie <airlied@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* fbmem, drm/nouveau: kick firmware framebuffers as soon as possibleMarcin Slusarz2010-05-183-18/+45
| | | | | | | | | | | | | | | | | | Currently vesafb/efifb/... is kicked when hardware driver is registering framebuffer. To do it hardware must be fully functional, so there's a short window between start of initialisation and framebuffer registration when two drivers touch the hardware. Unfortunately sometimes it breaks nouveau initialisation. Fix it by kicking firmware driver(s) before we start touching the hardware. Reported-by: Didier Spaier <didier.spaier@epsm.fr> Tested-by: Didier Spaier <didier.spaier@epsm.fr> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Peter Jones <pjones@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* fbdev: allow passing more than one aperture for handoffMarcin Slusarz2010-05-181-59/+25
| | | | | | | | | | | | | | It removes a hack from nouveau code which had to detect which region to pass to kick vesafb/efifb. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Dave Airlie <airlied@redhat.com> Cc: Peter Jones <pjones@redhat.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drivers/gpu/drm: Use kmemdupJulia Lawall2010-05-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | Use kmemdup when some other buffer is immediately copied into the allocated region. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; statement S; @@ - to = \(kmalloc\|kzalloc\)(size,flag); + to = kmemdup(from,size,flag); if (to==NULL || ...) S - memcpy(to, from, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-ttm-unmappable' into drm-core-nextDave Airlie2010-04-202-36/+80
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * drm-ttm-unmappable: drm/radeon/kms: enable use of unmappable VRAM V2 drm/ttm: remove io_ field from TTM V6 drm/vmwgfx: add support for new TTM fault callback V5 drm/nouveau/kms: add support for new TTM fault callback V5 drm/radeon/kms: add support for new fault callback V7 drm/ttm: ttm_fault callback to allow driver to handle bo placement V6 drm/ttm: split no_wait argument in 2 GPU or reserve wait Conflicts: drivers/gpu/drm/nouveau/nouveau_bo.c
| * drm/ttm: remove io_ field from TTM V6Jerome Glisse2010-04-201-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All TTM driver have been converted to new io_mem_reserve/free interface which allow driver to choose and return proper io base, offset to core TTM for ioremapping if necessary. This patch remove what is now deadcode. V2 adapt to match with change in first patch of the patchset V3 update after io_mem_reserve/io_mem_free callback balancing V4 adjust to minor cleanup V5 remove the needs ioremap flag V6 keep the ioremapping facility in TTM [airlied- squashed driver removals in here also] Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/nouveau/kms: add support for new TTM fault callback V5Jerome Glisse2010-04-201-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add the support for the new fault callback, does change anything from driver point of view, thought it should allow nouveau to add support for unmappable VRAM. Improvement: store the aperture base in a variable so that we don't call a function to get it on each fault. Patch hasn't been tested on any hw. V2 don't derefence bo->mem.mm_node as it's not NULL only for VRAM or GTT V3 update after io_mem_reserve/io_mem_free callback balancing V4 callback has to ioremap V5 ioremap is done by ttm Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/ttm: split no_wait argument in 2 GPU or reserve waitJerome Glisse2010-04-082-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is case where we want to be able to wait only for the GPU while not waiting for other buffer to be unreserved. This patch split the no_wait argument all the way down in the whole ttm path so that upper level can decide on what to wait on or not. [airlied: squashed these 4 for bisectability reasons.] drm/radeon/kms: update to TTM no_wait splitted argument drm/nouveau: update to TTM no_wait splitted argument drm/vmwgfx: update to TTM no_wait splitted argument [vmwgfx patch: Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>] Signed-off-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: free core gem object from driver callbacksDaniel Vetter2010-04-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When drivers embed the core gem object into their own structures, they'll have to do this. Temporarily this results in an ugly kfree(gem_obj); in every gem driver. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge branch 'drm-fbdev-cleanup' into drm-core-nextDave Airlie2010-04-2011-136/+200
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * drm-fbdev-cleanup: drm/fb: remove drm_fb_helper_setcolreg drm/kms/fb: use slow work mechanism for normal hotplug also. drm/kms/fb: add polling support for when nothing is connected. drm/kms/fb: provide a 1024x768 fbcon if no outputs found. drm/kms/fb: separate fbdev connector list from core drm connectors drm/kms/fb: move to using fb helper crtc grouping instead of core crtc list drm/fb: fix fbdev object model + cleanup properly. Conflicts: drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/nouveau/nouveau_drv.h
| * | drm/fb: remove drm_fb_helper_setcolregJames Simmons2010-04-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is against the drm-fbdevfix1 branch. It removes the drm_fb_helper_setcolreg function. The reason is that fb_setcolreg is only used in the case where fb_setcmap is called and no fb_ops->fb_setcmap is used. In the drm case we always need a fb_setcmap hook to handle multiple crtcs so we don't need a fb_setcolreg hook. Please apply. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud