aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2010-04-09drm/nv50: fix instmem init on IGPs if stolen mem crosses 4GiB markBen Skeggs1-3/+4
Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nv40: add LVDS table quirk for Dell Latitude D620Ben Skeggs1-0/+15
Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=505132 https://bugzilla.redhat.com/show_bug.cgi?id=543091 https://bugzilla.redhat.com/show_bug.cgi?id=530425 https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/ +bug/539730 Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nv40: rework lvds table parsingBen Skeggs2-28/+17
All indications seem to be that the version 0x30 table should be handled the same way as 0x40 (as used on G80), at least for the parts that we currently try use. This commit cleans up the parsing to make it clearer about what we're actually trying to achieve, and unifies the 0x30/0x40 parsing. Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nouveau: detect vram amount once, and save the valueBen Skeggs8-76/+74
As opposed to repeatedly reading the amount back from the GPU every time we need to know the VRAM size. We should now fail to load gracefully on detecting no VRAM, rather than something potentially messy happening. Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nouveau: remove some unused members from drm_nouveau_privateBen Skeggs2-11/+0
Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nouveau: Make use of TTM busy_placements.Francisco Jerez3-59/+61
Previously we were filling it the same as "placements", but in some cases there're valid alternatives that we were ignoring completely. Keeping a back-up memory type helps on several low-mem situations. Signed-off-by: Francisco Jerez <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nv50: add more 0x100c80 flushy magicBen Skeggs2-0/+46
Fixes the !vbo_fifo path in the 3D driver on certain chipsets. Still not really any good idea of what exactly the magic achieves, but it makes things work. While we're at it, in the PCIEGART path, flush on unbinding also. Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nv50: fix fbcon when framebuffer above 4GiB markBen Skeggs1-6/+7
This can't actually happen right now, but lets fix it anyway. Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/nv50: Fix NEWCTX_DONE flag numberMarcin Koƛcielnicki1-3/+3
Signed-off-by: Marcin Koƛcielnicki <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2010-04-09drm/edid: Fix sync polarity for secondary GTF curveAdam Jackson1-1/+4
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-08drm/ttm: using kmalloc/kfree requires including slab.hStephen Rothwell1-0/+1
Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-08drm/ttm: split no_wait argument in 2 GPU or reserve waitJerome Glisse9-75/+93
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 <[email protected]>] Signed-off-by: Jerome Glisse <[email protected]> Acked-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-08drm/fb: remove drm_fb_helper_setcolregJames Simmons4-35/+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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-08drm/ttm: include linux/seq_file.h for seq_printfMatt Turner1-0/+1
Fixes drivers/gpu/drm/ttm/ttm_page_alloc.c: In function 'ttm_page_alloc_debugfs': drivers/gpu/drm/ttm/ttm_page_alloc.c:829: error: implicit declaration of function 'seq_printf' Signed-off-by: Matt Turner <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/kms/fb: use slow work mechanism for normal hotplug also.Dave Airlie8-161/+215
a) slow work is always used now for any fbcon hotplug, as its not a fast task and is more suited to being ran under slow work. b) attempt to not do any fbdev changes when X is running as we'll just mess it up. This hooks set_par to hopefully do the changes once X hands control to fbdev. This also adds the nouveau/intel hotplug support. Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/kms/fb: add polling support for when nothing is connected.Dave Airlie5-10/+91
When we are running in a headless environment we have no idea what output the user might plug in later, we only have hotplug detect from the digital outputs. So if we detect no connected outputs at initialisation, start a slow work operation to poll every 5 seconds for an output. this is only hooked up for radeon so far, on hw where we have full hotplug detection there is no need for this. Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/kms/fb: provide a 1024x768 fbcon if no outputs found.Dave Airlie1-1/+3
If we get no outputs setup provide a 1024x768 fbcon, with this + radeon hotplug stuff I can plug a monitor in after startup and get to see stuff. Last thing is to add some sort of timer for non-hpd outputs like VGA etc. Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/kms/fb: separate fbdev connector list from core drm connectorsDave Airlie6-134/+121
This breaks the connection between the core drm connector list and the fbdev connector usage, and allows them to become disjoint in the future. It also removes the untype void* that was in the connector struct to support this. All connectors are added to the fbdev now but this could be changed in the future. Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/kms/fb: move to using fb helper crtc grouping instead of core crtc listDave Airlie11-434/+398
This move to using the list of crtcs in the fb helper and cleans up the whole picking code, now we store the crtc/connectors we want directly into the modeset and we use the modeset directly to set the mode. Fixes from James Simmons and Ben Skeggs. Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/fb: fix fbdev object model + cleanup properly.Dave Airlie24-815/+834
The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work. This patch a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs. b) migrated all the fb helper functions out of the crtc helper file into the fb helper file. c) pushed the fb probing/hotplug control into the driver d) makes the surface sizes into a structure for ease of passing This changes the intel/radeon/nouveau drivers to use the new helper. Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms/combios: verify dac_adj values are validAlex Deucher1-5/+15
Some vbios dac_adj tables are all zeros. Check for that case and use the default table if so. Should fix fdo bug 27478. Signed-off-by: Alex Deucher <[email protected]> Cc: stable <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms: clean up atom dac handlingAlex Deucher1-14/+7
- make sure legacy dac1 has an enc priv - remove unused num var - no need for extra tv_dac var in atom dac functions Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms: legacy tv dac cleanupAlex Deucher1-25/+33
- fix formatting - clean up tv_dac_cntl handling for tv Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms: small memory leak in atom exit codeDan Carpenter1-2/+5
This is an unlikely memory leak, but we may as well fix it. It's easy to fix and every static checker will complain if we don't. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/edid/quirks: Envision EN2028Adam Jackson1-0/+2
Claims 1280x1024 preferred, physically 1600x1200 cf. http://bugzilla.redhat.com/530399 Signed-off-by: Adam Jackson <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon/kms: fix washed out image on legacy tv dacAlex Deucher1-1/+1
bad cast was overwriting the tvdac adj values Fixes fdo bug 27478 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/ttm: Add sysfs interface to control pool allocator.Pauli Nieminen2-2/+113
Sysfs interface allows user to configure pool allocator functionality and change limits for the size of pool. Signed-off-by: Pauli Nieminen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/ttm: Use set_pages_array_wc instead of set_memory_wc.Pauli Nieminen1-11/+1
Using single call to set multiple pages to wc reduces number of expensive cache flushes. Signed-off-by: Pauli Nieminen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/nouveau: Add ttm page pool debugfs file.Pauli Nieminen1-0/+3
ttm_page_pool file is hooked ttm_page_alloc_debugfs for pool allocator state. Signed-off-by: Pauli Nieminen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon/kms: Add ttm page pool debugfs file.Pauli Nieminen1-3/+10
ttm_page_pool file is hooked ttm_page_alloc_debugfs for pool allocator state. Signed-off-by: Pauli Nieminen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/ttm: Add debugfs output entry to pool allocator.Pauli Nieminen1-7/+38
ttm_page_alloc_debugfs can be registered to output the state of pools. Debugfs file will output number of pages freed from the pool, number of pages in pool now and the lowes number of pages in pool since previous shrink. Signed-off-by: Pauli Nieminen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/ttm: add pool wc/uc page allocator V3Pauli Nieminen4-25/+739
On AGP system we might allocate/free routinely uncached or wc memory, changing page from cached (wb) to uc or wc is very expensive and involves a lot of flushing. To improve performance this allocator use a pool of uc,wc pages. Pools are protected with spinlocks to allow multiple threads to allocate pages simultanously. Expensive operations are done outside of spinlock to maximize concurrency. Pools are linked lists of pages that were recently freed. mm shrink callback allows kernel to claim back pages when they are required for something else. Fixes: * set_pages_array_wb handles highmem pages so we don't have to remove them from pool. * Add count parameter to ttm_put_pages to avoid looping in free code. * Change looping from _safe to normal in pool fill error path. * Initialize sum variable and make the loop prettier in get_num_unused_pages. * Moved pages_freed reseting inside the loop in ttm_page_pool_free. * Add warning comment about spinlock context in ttm_page_pool_free. Based on Jerome Glisse's and Dave Airlie's pool allocator. Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon/kms: simplify & improve GPU reset V2Jerome Glisse20-354/+508
This simplify and improve GPU reset for R1XX-R6XX hw, it's not 100% reliable here are result: - R1XX/R2XX works bunch of time in a row, sometimes it seems it can work indifinitly - R3XX/R3XX the most unreliable one, sometimes you will be able to reset few times, sometimes not even once - R5XX more reliable than previous hw, seems to work most of the times but once in a while it fails for no obvious reasons (same status than previous reset just no same happy ending) - R6XX/R7XX are lot more reliable with this patch, still it seems that it can fail after a bunch (reset every 2sec for 3hour bring down the GPU & computer) This have been tested on various hw, for some odd reasons i wasn't able to lockup RS480/RS690 (while they use to love locking up). Note that on R1XX-R5XX the cursor will disapear after lockup haven't checked why, switch to console and back to X will restore cursor. Next step is to record the bogus command that leaded to the lockup. V2 Fix r6xx resume path to avoid reinitializing blit module, use the gpu_lockup boolean to avoid entering inifinite waiting loop on fence while reiniting the GPU Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon/kms: rename gpu_reset to asic_resetJerome Glisse15-46/+46
Patch rename gpu_reset to asic_reset in prevision of having gpu_reset doing more stuff than just basic asic reset. Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon/kms: fence cleanup + more reliable GPU lockup detection V4Jerome Glisse9-107/+281
This patch cleanup the fence code, it drops the timeout field of fence as the time to complete each IB is unpredictable and shouldn't be bound. The fence cleanup lead to GPU lockup detection improvement, this patch introduce a callback, allowing to do asic specific test for lockup detection. In this patch the CP is use as a first indicator of GPU lockup. If CP doesn't make progress during 1second we assume we are facing a GPU lockup. To avoid overhead of testing GPU lockup frequently due to fence taking time to be signaled we query the lockup callback every 500msec. There is plenty code comment explaining the design & choise inside the code. This have been tested mostly on R3XX/R5XX hw, in normal running destkop (compiz firefox, quake3 running) the lockup callback wasn't call once (1 hour session). Also tested with forcing GPU lockup and lockup was reported after the 1s CP activity timeout. V2 switch to 500ms timeout so GPU lockup get call at least 2 times in less than 2sec. V3 store last jiffies in fence struct so on ERESTART, EBUSY we keep track of how long we already wait for a given fence V4 make sure we got up to date cp read pointer so we don't have false positive Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/modes: Fix interlaced mode namesAdam Jackson2-11/+14
Height in frame size, not field size, and trailed with an 'i'. Matches the X server behaviour. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Add secondary GTF curve supportAdam Jackson2-54/+146
Before CVT-R, some monitors would advertise support for an alternative GTF formula with lower blanking intervals. Correctly identify such monitors, and use the alternative formula when generating modes for them. Note that we only do this for "standard" timing descriptors (tuples of hsize in characters / aspect ratio / vertical refresh). Range-based mode lists still only refer to the primary GTF curve. It would be possible to do better for the latter case, but monitors are required to support the primary curve over the entire advertised range, so all it would win you is a lower pixel clock and therefore possibly better image quality on analog links. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Strengthen the algorithm for standard mode codesAdam Jackson1-10/+18
If you have 1920x1200 in both detailed (probably RB) and standard variants, you probably only want the RB version. But we have no way of guessing that from standard mode parse. So, if a mode already exists for a given w/h/r, skip adding it. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Fix the HDTV hack.Adam Jackson1-3/+13
Standard timings don't let you say 1366. Both 1360 and 1368 have been seen in the wild. So invent a CVT timing for it. CVT will round 1366 up to 1368; we'll then manually underscan it. Split this into two parts, since we need to do something sneaky between them in the future. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Extend range-based mode addition for EDID 1.4Adam Jackson1-23/+78
1.4 adds better pixel clock precision, explicit reduced blanking awareness, and extended sync ranges. It's almost like a real spec. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Add test for monitor reduced blanking support.Adam Jackson1-4/+43
The generic block walk callback looks like overkill, but we'll need it for other detailed block walks in the future. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Fix preferred mode parse for EDID 1.4Adam Jackson1-1/+4
In 1.4, the first detailed mode is always the preferred mode. The bit that used to mean that, now means "this mode is the physical size in pixels". Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Remove some silly commentsAdam Jackson1-14/+3
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Remove arbitrary EDID extension limitAdam Jackson4-21/+15
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Add modes for Established Timings III sectionAdam Jackson1-0/+91
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Reshuffle mode list construction to closer match the specAdam Jackson1-2/+16
Also, document what the spec says to do. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Remove a redundant checkAdam Jackson1-4/+0
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Remove some misleading commentsAdam Jackson1-8/+0
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/edid: Fix secondary block fetch.Adam Jackson1-143/+187
This makes fetching the second EDID block on HDMI monitors actually work. DDC can't transfer more than 128 bytes at a time. Also, rearrange the code so the pure DDC bits are separate from block parse. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon/kms/atom: fix gpio i2c table overrun (v2)Alex Deucher1-4/+7
The GPIO_I2C_INFO table does not always have ATOM_MAX_SUPPORTED_DEVICE entries. Limit the number of indices to the size of the table. Should fix Novell bug 589022. v2: fix typo Signed-off-by: Alex Deucher <[email protected]> Cc: Stable <[email protected]> Signed-off-by: Dave Airlie <[email protected]>