summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_crtc.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: make cursor_set implementation consistent with other driversMarcin Slusarz2011-05-161-3/+3
| | | | | | | | | | | When xorg state tracker wants to hide the cursor it calls set_cursor with NULL buffer_handle and size=0x0, but nouveau refuses to hide it because size is not 64x64... which is a bit odd. Both radeon and intel check buffer_handle before validating size of cursor, so make nouveau implementation consistent with them. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/clk: better pll calculation when no fractional fb div availableBen Skeggs2011-05-161-2/+2
| | | | | | | | | | | | The core/mem/shader clocks don't support the fractional feedback divider, causing our calculated clocks to be off by quite a lot in some cases. To solve this we will switch to a search-based algorithm when fN is NULL. For my NVA8 at PL3, this actually generates identical cooefficients to the binary driver. Hopefully that's a good sign, and that does not break VPLL calculation for someone.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix brace placement checkpatch.pl errors.Emil Velikov2011-05-161-2/+1
| | | | | | | | Fix 'ERROR: that open brace { should be on the previous line' Fix 'ERROR: else should follow close brace }' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nv50-nvc0: remove some code that doesn't belong hereBen Skeggs2011-04-051-3/+0
| | | | | | Not sure how this snuck in... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove no_vm/mappable flags from nouveau_boBen Skeggs2011-02-251-2/+2
| | | | | | | | | | 'mappable' isn't really used at all, nor is it necessary anymore as the bo code is capable of moving buffers to mappable vram as required. 'no_vm' isn't necessary anymore either, any places that don't want to be mapped into a GPU address space should allocate the VRAM directly instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-nvc0: activate/update ds channel's framebuffer on modesetsBen Skeggs2011-02-251-1/+9
| | | | | | | | The hw doesn't really appear to be designed to be used the way we have to use it due to DRI2's design. This leads us to having to keep the flipped fb support active at all times. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-nvc0: precalculate some fb state when creating themBen Skeggs2011-02-251-50/+11
| | | | | | | Just a cleanup, to avoid duplicating parts of nv50_crtc.c's code in the page flipping routines. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-nvc0: request and wait on notification of modeset completionBen Skeggs2011-02-251-24/+53
| | | | | | | | | This should prevent a number of races from occuring, the most obvious of which will be exposed when we start making use of the "display sync" evo channel for page flipping. The DS channel will reject any command stream that doesn't completely agree with the current "master" state. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-nvc0: rename disp->evo to disp->masterBen Skeggs2011-02-251-6/+6
| | | | | | | More appropriate, and we're about to be using more than just the master EVO channel. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-nvc0: move non-sharable display state into private structureBen Skeggs2011-02-251-10/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: initial support for tiled buffer objectsBen Skeggs2010-12-211-7/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: implement global channel address space on new VM codeBen Skeggs2010-12-081-4/+2
| | | | | | | As of this commit, it's guaranteed that if an object is in VRAM that its GPU virtual address will be constant. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Call drm_vblank_pre/post_modeset() around mode setting.Francisco Jerez2010-12-031-0/+2
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Implement the pageflip ioctl.Francisco Jerez2010-12-031-0/+1
| | | | | | | nv0x-nv4x should be mostly fine, nv50 doesn't work yet. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Expose some BO usage flags to userspace.Francisco Jerez2010-11-181-2/+2
| | | | | | | | | This will be needed for Z compression and to take smarter placement decisions. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm, kdb, kms: Change mode_set_base_atomic() enter argument to be an enumJason Wessel2010-10-191-1/+1
| | | | | | | | | | | | | | The enter argument as implemented by commit 413d45d3627 (drm, kdb, kms: Add an enter argument to mode_set_base_atomic() API) should be more descriptive as to what it does vs just passing 1 and 0 around. There is no runtime behavior change as a result of this patch. Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> CC: David Airlie <airlied@linux.ie> CC: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-kdb-next' into drm-core-nextDave Airlie2010-10-061-13/+36
|\ | | | | | | | | | | | | | | | | * drm-kdb-next: drm/nouveau/kms: Avoid a hang entering KDB with VT accel on. radeon, kdb, kms: Save and restore the LUT on atomic KMS enter/exit drm, kdb, kms: Add an enter argument to mode_set_base_atomic() API drm/nouveau/kms: Implement KDB debug hooks for nouveau KMS. drm/radeon/kms: Implement KDB debug hooks for radeon KMS.
| * drm, kdb, kms: Add an enter argument to mode_set_base_atomic() APIJason Wessel2010-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices such as the radeon chips receive information from user space which needs to be saved when executing an atomic mode set operation, else the user space would have to be queried again for the information. This patch extends the mode_set_base_atomic() call to pass an argument to indicate if this is an entry or an exit from an atomic kernel mode set change. Individual drm drivers can properly save and restore state accordingly. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> CC: Jesse Barnes <jbarnes@virtuousgeek.org> CC: David Airlie <airlied@linux.ie> CC: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/nouveau/kms: Implement KDB debug hooks for nouveau KMS.Chris Ball2010-10-061-13/+36
| | | | | | | | | | | | | | | | | | | | Tested on nv50 and nv04 HW. Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> CC: Jesse Barnes <jbarnes@virtuousgeek.org> CC: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/ttm: restructure to allow driver to plug in alternate memory managerBen Skeggs2010-10-051-2/+1
| | | | | | | | | | | | | | | | | | Nouveau will need this on GeForce 8 and up to account for the GPU reordering physical VRAM for some memory types. Reviewed-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Thomas Hellström <thellstrom@vmware.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50: use pll type rather than register for CRTC PLLBen Skeggs2010-09-241-19/+14
| | | | | | | | | | | | | | Just in case someone, somewhere, does something difficult. This also removes one path that was different between fermi and non-fermi. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: require explicit unmap of kmapped bosBen Skeggs2010-09-241-0/+2
|/ | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: expand gamma_setJames Simmons2010-08-101-6/+3
| | | | | | | | | | Expand the crtc_gamma_set function to accept a starting offset. The reason for this is to eventually use this function for setcolreg from drm_fb_helper.c. The fbdev colormap function can start at any offset in the color map. Signed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Use ENOENT consistently for the error return for an unmatched handle.Chris Wilson2010-08-101-1/+1
| | | | | | | | | | | This is consistent with trying to access a filename that not exist within a directory which is a good analogy here. The main reason for the change is that it is easy to confuse the error code of EBADF as an performing an ioctl on an invalid file descriptor (rather than an unknown object). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nvc0: implement crtc pll settingBen Skeggs2010-08-061-3/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: send evo "update" command after each disconnectBen Skeggs2010-07-131-9/+2
| | | | | | | | | It turns out that the display engine signals an interrupt for disconnects too. In order to make it easier to process the display interrupts correctly, we want to ensure we only get one operation per interrupt sequence - this is what this commit achieves. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: supply encoder disable() hook for SOR outputsBen Skeggs2010-07-131-31/+0
| | | | | | | | | | Allows us to remove a driver hack that used to be necessary to disable encoders in certain situations before setting up a mode. The DRM has better knowledge of when this is needed than the driver does. This fixes a number of display switching issues. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: support fractional feedback divider on newer chipsBen Skeggs2010-05-191-23/+25
| | | | 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>
* Use drm_gem_object_[handle_]unreference_unlocked where possibleLuca Barbieri2010-02-111-3/+1
| | | | | | | | | | | Mostly obvious simplifications. The i915 pread/pwrite ioctls, intel_overlay_put_image and nouveau_gem_new were incorrectly using the locked versions without locking: this is also fixed in this patch. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: move dereferences after null checksMarcin Slusarz2010-02-111-4/+7
| | | | | | | Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: prevent accidently turning off encoders we're actually usingBen Skeggs2010-01-181-1/+21
| | | | | | | | | | | | | On most cards the DisplayPort connector is created with 2 encoders sharing a single SOR (for native DP, and for DVI-over-DP). The previous logic for turning off unused encoders didn't take into account that we could have multiple drm_encoders on a single hw encoder and ended up turning off encoders that were actually being used still. This patch fixes that issue. We probably want to look at something a bit better later on, and only expose one drm_encoder per hw encoder block. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use drm debug levelsMaarten Maathuis2009-12-161-11/+11
| | | | | | | | | | - Use driver level (0x2) for NV_DEBUG instead of all levels - Create a NV_DEBUG_KMS for KMS level (0x4) and use them in modesetting code - Remove a few odd NV_TRACE calls and replace some of them with NV_DEBUG_KMS or NV_INFO Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add DRM driver for NVIDIA GPUsBen Skeggs2009-12-111-0/+769
This adds a drm/kms staging non-API stable driver for GPUs from NVIDIA. This driver is a KMS-based driver and requires a compatible nouveau userspace libdrm and nouveau X.org driver. This driver requires firmware files not available in this kernel tree, interested parties can find them via the nouveau project git archive. This driver is reverse engineered, and is in no way supported by nVidia. Support for nearly the complete range of nvidia hw from nv04->g80 (nv50) is available, and the kms driver should support driving nearly all output types (displayport is under development still) along with supporting suspend/resume. This work is all from the upstream nouveau project found at nouveau.freedesktop.org. The original authors list from nouveau git tree is: Anssi Hannula <anssi.hannula@iki.fi> Ben Skeggs <bskeggs@redhat.com> Francisco Jerez <currojerez@riseup.net> Maarten Maathuis <madman2003@gmail.com> Marcin Kościelnicki <koriakin@0x04.net> Matthew Garrett <mjg@redhat.com> Matt Parnell <mparnell@gmail.com> Patrice Mandin <patmandin@gmail.com> Pekka Paalanen <pq@iki.fi> Xavier Chantry <shiningxc@gmail.com> along with project founder Stephane Marchesin <marchesin@icps.u-strasbg.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud