summaryrefslogtreecommitdiffstats
path: root/drivers/gpu (follow)
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/kms: get HPD info for connectorsAlex Deucher2009-12-087-84/+330
| | | | | | | | | This populates the connectors with HPD (Hot Plug Detect) information. This will be used in subsequent patches for automatic digital monitor connect/disconnect handling. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: clean up DP debuggingAlex Deucher2009-12-081-28/+28
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix DP detectAlex Deucher2009-12-084-11/+10
| | | | | | | | only return connected if there is actually a monitor connected. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: drop unused array to fix warning.Dave Airlie2009-12-081-3/+0
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: do dp link training at dpms on time not mode set.Dave Airlie2009-12-081-4/+6
| | | | | | | This moves the radeon DP link training call to happen when we dpms on the encoder not when we set the mode. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: make displayport work by reorganising vsemph setup.Dave Airlie2009-12-081-1/+2
| | | | | | | This fix reorganises the initial DP link training slightly, and actually makes DP work under kms here. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/dp: fix return in dpcd retrival.Dave Airlie2009-12-081-0/+1
| | | | | | | Not returning here caused us to get a display port version of 0 for everything this caused power up to not get sent which ends up in a black screen. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: free aux channel i2c adapter on destroyAlex Deucher2009-12-081-1/+18
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add support for DP modesettingAlex Deucher2009-12-085-67/+558
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: handle dp sinks in atom encoder/transmitter tablesAlex Deucher2009-12-083-12/+100
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: store sink type in atom dig connectorAlex Deucher2009-12-083-10/+17
| | | | | | | | This will be used laster when the encoder and transmitters are set up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: i2c reorgAlex Deucher2009-12-087-120/+166
| | | | | | | | | | - keep the atom i2c id in the i2c rec - fix gpio regs for GPIO and MDGPIO on pre-avivo chips - track whether the i2c line is hw capable - track whether the i2c line uses the multimedia i2c block Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: DP fixes and cleanup from the ddxAlex Deucher2009-12-084-149/+102
| | | | | | | | | - dpcp -> dpcd - fix up dig encoder routing - aux transaction table takes delay in 10 usec units Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: initial radeon displayport portingDave Airlie2009-12-088-24/+498
| | | | | | This is enough to retrieve EDID and DPCP. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add support to atom parser for FB read/writeDave Airlie2009-12-073-4/+8
| | | | | | | | FB read/write really doesn't need to access the actual VRAM, we can just use a scratch area. This is required for using atom displayport calls later. Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge remote branch 'origin/drm-core-next' into testDave Airlie2009-12-0725-371/+1648
|\ | | | | | | | | Conflicts: drivers/gpu/drm/drm_fb_helper.c
| * drm/ttm: fix unreachable code.Dave Airlie2009-12-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | None of the in-tree drivers use user objects yet so this wasn't hitting us. Stanse found unreachable code in ttm_bo_add_ttm: http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=32&id=714#l238 Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/intel: refactor DP i2c support and DP common header to drm helperDave Airlie2009-12-086-222/+73
| | | | | | | | | | | | | | | | | | | | Both radeon and nouveau can re-use this code so move it up a level so they can. However the hw interfaces for aux ch are different enough that the code to translate from mode, address, bytes to actual hw interfaces isn't generic, so move that code into the Intel driver. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Export symbols needed for the vmwgfx driver.Thomas Hellstrom2009-12-071-0/+2
| | | | | | | | | | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/ttm: Export symbols needed for the vmwgfx driver.Thomas Hellstrom2009-12-073-0/+5
| | | | | | | | | | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/ttm: Add TTM execbuf utilities.Thomas Hellstrom2009-12-072-1/+118
| | | | | | | | | | | | | | | | | | | | Utilities to reserve, unreserve and fence a list of TTM buffer objects in a deadlock-safe manner. Used by the vmwgfx driver. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/ttm: Add ttm lock functionality.Thomas Hellstrom2009-12-072-1/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | This is intended to be used by ttm-aware drivers to 1) Block clients to inactive masters when they try to validate buffers for GPU use. 2) Optionally block clients to the current master when there is thrashing due to GPU memory shortage. Used by the vmwgfx driver. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/ttm: Add user-space objects.Thomas Hellstrom2009-12-072-1/+454
| | | | | | | | | | | | | | | | | | | | Add objects needed for user-space to maintain reference counts on ttm objects. This is used by the vmwgfx driver which allows user-space to maintain map-counts on dma buffers, lock-counts on the ttm lock and ref-counts on gpu surfaces, gpu contexts and dma buffer. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/mm: fixup typo in debug functions.Dave Airlie2009-12-041-1/+1
| | | | | | | | | | | | Free and used were reversed. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Add dirty ioctl and propertyJakob Bornecrantz2009-12-042-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a ioctl and property to allow userspace to notify the kernel that a framebuffer has changed. Instead of snooping the command stream this allows finer grained tracking of which areas have changed. The primary user for this functionality is virtual hardware like the vmware svga device, but also Xen hardware likes to be notify. There is also real hardware like DisplayLink and DisplayPort that might take advantage of this ioctl. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/ttm: fix small memory leak in ttm_memory.cDan Carpenter2009-12-041-4/+5
| | | | | | | | | | | | | | | | I moved the allocation until after the check for (si->totalhigh == 0). Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-By: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Add support for drm master_[set|drop] callbacks.Thomas Hellstrom2009-12-032-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vmwgfx driver has a per master rw lock around TTM, to guarantee mutual exclusion when needed. This is typically when all evictable buffers are evicted due to 1) vt switch 2) master switch 3) suspend / resume. In the multi-master case, on master switch the new master takes the previously active master lock in write mode, and then evicts all buffers. Any clients to previous masters will then block on that lock when trying to validate a buffer. fbdev also acts as a virtual master wrt this. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/edid: Decode 3-byte CVT codes from EDID 1.4Adam Jackson2009-12-031-0/+48
| | | | | | | | | | Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/edid: Add DMT modes to the pool if the monitor is GTF-capableAdam Jackson2009-12-031-4/+65
| | | | | | | | | | | | | | See also: http://bugzilla.redhat.com/539785 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/modes: Add drm_mode_hsync()Adam Jackson2009-12-031-1/+27
| | | | | | | | | | Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/edid: Unify detailed block parsing between base and extension blocksAdam Jackson2009-12-031-102/+61
| | | | | | | | | | | | | | | | Also fix an embarassing bug in standard timing subblock parsing that would result in an infinite loop. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/modes: Fall back to 1024x768 instead of 800x600Adam Jackson2009-11-241-1/+1
| | | | | | | | | | | | | | | | | | This matches the X server's fallback modes when using RANDR 1.2. See also: http://bugzilla.redhat.com/538761 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/edid: Fix up partially corrupted headersAdam Jackson2009-11-241-6/+16
| | | | | | | | | | | | | | | | | | We'll still fail the block if it fails the EDID checksum though. See also: http://bugzilla.redhat.com/534120 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/edid: Retry EDID fetch up to four timesAdam Jackson2009-11-241-14/+14
| | | | | | | | | | | | | | | | | | | | | | This matches the X server's retry logic. Note that we'll only retry if we get a DDC response but fail validation; legitimately disconnected outputs will bomb out early. See also: http://bugzilla.redhat.com/532957 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/modes: Limit fallback modes to 60HzAdam Jackson2009-11-241-0/+2
| | | | | | | | | | | | | | See also: http://bugzilla.redhat.com/514600 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: allocate framebuffer cmapClemens Ladisch2009-11-191-1/+7
| | | | | | | | | | | | | | | | | | Without an allocated colormap, FBIOGETCMAP fails. This would make programs restore an all-black colormap ("links -g") or fail to work altogether ("mplayer -vo fbdev2"). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handlingClemens Ladisch2009-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the framebuffer driver does not publish detailed timing information for the current video mode, the correct value for the pixclock field is zero, not -1. Since pixclock is actually unsigned, the value -1 would be interpreted as 4294967295 picoseconds (i.e., about 4 milliseconds) by register_framebuffer() and userspace programs. This patch allows X.org's fbdev driver to work. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: properly handle fbdev blankingJames Simmons2009-11-191-6/+9
| | | | | | | | | | | | | | | | I examined several fbdev drivers and foudn the blanking code in drm_fb_helper to be wrong. This patch fixes the fbdev blanking to behave like other fbdev drivers. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: add page flipping ioctlKristian Høgsberg2009-11-182-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a page flipping ioctl to the KMS API. The ioctl takes an fb ID and a ctrc ID and flips the crtc to the given fb at the next vblank. The ioctl returns immediately but the flip doesn't happen until after any rendering that's currently queued up against the new framebuffer is done. After submitting a page flip, any execbuffer involving the old front buffer will block until the flip is completed. Optionally, a vblank event can be generated when the swap eventually happens. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: check return values in drm_versionAndres Salomon2009-11-181-5/+11
| | | | | | | | | | | | | | | | | | In drm_version, actually check the results from function calls so that we're not potentially passing garbage back to userspace. Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: replace DRM_COPY macro w/ a functionAndres Salomon2009-11-181-12/+22
| | | | | | | | | | | | | | | | | | Don't inline it; the compiler can figure it out. Comments added that are based upon my interpretation of the code. Hopefully they're correct. :) Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: kill more unused DRM macrosAndres Salomon2009-11-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few more macros in drmP.h that are unused; DRM_GET_PRIV_SAREA, DRM_ARRAY_SIZE, and DRM_WAITCOUNT can go away completely. Unfortunately, DRM_COPY is still used in one place, but we can at least move it to where it's used. It's an awful looking macro.. [akpm: fix overeagerness] Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: when queuing an event with NEXTONMISS, return queued sequence to userspaceJesse Barnes2009-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | If we queue a vblank event but miss it, we should return the actual sequence number we queued to userspace, so its event handling function will know which event to look for. Acked-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Add async event synchronization for drmWaitVblankKristian Høgsberg2009-11-184-2/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new flag to the drmWaitVblank ioctl, which asks the drm to return immediately and notify userspace when the specified vblank sequence happens by sending an event back on the drm fd. The event mechanism works with the other flags supported by the ioctls, specifically, the vblank sequence can be specified relatively or absolutely, and works for primary and seconday crtc. The signal field of the vblank request is used to provide user data, which will be sent back to user space in the vblank event. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: fix vram setup on rs600/rs690/rs740Alex Deucher2009-12-073-5/+21
| | | | | | | | | | | | | | Don't remap vram to 0 on IGP chips. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: more r4xx lvds fixesAlex Deucher2009-12-073-6/+16
| | | | | | | | | | | | | | | | Grab pll ref div from regs at driver init. r4xx seems very picky about the dividers for the pll driving lvds. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms/legacy: set common regs to sane valueAlex Deucher2009-12-074-0/+21
| | | | | | | | | | | | | | The DDX and radeonfb always set these regs to a sane value. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms/legacy: set overscan regs on modesetAlex Deucher2009-12-072-0/+16
| | | | | | | | | | | | | | | | | | These can end up with garbage otherwise. fixes rh bug 537140 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: fix RS600 MC setup.Dave Airlie2009-12-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | Again we try to put VRAM at 0, and it didn't work on this chipset, reports of corrupt RAM appeared on irc and bugzilla. Fix the vram location according to what the BIOS setup, I'm not 100% sure we don't need the same thing on rs690/rs780/rs880, we probably should do it there just in case as its what the DDX does. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: fix up gart setup on rs600Alex Deucher2009-12-061-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | Set up rs600 gart like r600: - set gart system aperture to vram - inside gart system aperture is unmapped* - outside gart system aperture is mapped* *mapped refers to memory handled by page tables Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>