Commit Graph

335767 Commits

Author SHA1 Message Date
Ben Skeggs 82d23aea10 drm/nvc0/dmaobj: stub bind function for now so we can call unconditionally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:38 +10:00
Ben Skeggs 6c1689a08c drm/nouveau/dmaobj: move parent class check to bind() method
Otherwise when nvc0- gains a bind() method (disp needs it), the fifo
engine will attempt to create a dma object for the push buffer, which
is unnecessary on fermi.

The only sane place to put these checks is in the bind method itself,
and have it unconditionally called from wherever it might be needed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:38 +10:00
Ben Skeggs f86770aaaa drm/nouveau/dmaobj: merge everything except ctor and bind together
Simplifies things a little, and currently no reason to need
chipset-specific dmaobj constructors.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:37 +10:00
Ben Skeggs 0a32241d8b drm/nouveau: pass address to object accessor functions as u64
Will be required by future work.  Make the API change now to catch any
(but hopefully none) unexpected fallout.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:37 +10:00
Ben Skeggs 66bb7e1d67 drm/nouveau/gpio: place upper limit on using old-school tvdac bios data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:36 +10:00
Ben Skeggs 9da49599a7 drm/nouveau: remove newline-only NV_DEBUG calls
This used to output the function name, now doesn't, so just looks
stupid.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:36 +10:00
Marcin Slusarz d432a2db7d drm/nv50: decode PGRAPH status registers on TLB flush fail
SIgned-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:35 +10:00
Viktor Novotný 1f2285d462 drm/nouveau/clk: fix crystal frequency retrieval on nv25
Signed-off-by: Viktor Novotný <noviktor@seznam.cz>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:35 +10:00
Marcin Slusarz fced4b2211 drm/nouveau: remove unused variable from nouveau_bios_shadow_of
drivers/gpu/drm/nouveau/core/subdev/bios/base.c: warning: unused variable 'i'

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:34 +10:00
Ben Skeggs 7ef19e454e drm/nv40/fb: use an actual compressed zeta format
SPLIT is apparently just that, and only splits Z and S components.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:34 +10:00
Ben Skeggs d7da62845b drm/nv30/fb: enable z compression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:33 +10:00
Ben Skeggs 2f1cb96d65 drm/nv40/fb: enable z compression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:33 +10:00
Ben Skeggs fd3a522586 drm/nv20/fb: fixup compression tag allocation size
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:32 +10:00
Ben Skeggs fafa0cb37e drm/nv30-nv40/graph: poke zcomp regs from tile_prog hook
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:32 +10:00
Ben Skeggs e1344412ae drm/nv30-nv40/fb: call zcomp setup hook from tiling setup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:31 +10:00
Ben Skeggs dac1558d49 drm/nouveau/fb: create tag heap from common code for all relevant chipsets
A nv2x bug wrt hardcoded tag counts is now also fixed as a side-effect.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:31 +10:00
Ben Skeggs 268d5a3017 drm/nv30/fb: start bashing zcomp registers with 'disabled' (for now)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:30 +10:00
Ben Skeggs 7e0f992b79 drm/nouveau: replace some open-coded mm_initialised checks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:30 +10:00
Ben Skeggs 6d338081a6 drm/nouveau/fb: read TILE_BASE after writing it to avoid a hardware race
Apparently needed for turbocache nv4x chips at least, we'll just do it
everywhere...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:29 +10:00
Ben Skeggs 5f8e256704 drm/nv40/fb: start bashing zcomp registers on relevant chipsets
Always bashing "disabled" for now, actual compressing coming up...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:29 +10:00
Ben Skeggs 150ccf161f drm/nv30-nv40/fb: make use of bankoff for zeta buffers, where supported
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:28 +10:00
Ben Skeggs d33db63b37 drm/nv20/fb: fix zcomp register calculation on big-endian systems
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:28 +10:00
Ben Skeggs 4ae207453e drm/nv40/fb: split implementation into nv40/nv41/nv44/nv46/nv47/nv49/nv4e pieces
Wow, this is a nice complicated mess of build-your-own-mc blocks...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:27 +10:00
Ben Skeggs 11bac40708 drm/nv30/fb: split implementation into nv34(nv10)/nv30/nv35 pieces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:27 +10:00
Ben Skeggs a8749af1a0 drm/nv20/fb: split implementation into nv20/nv25 pieces
There's more stuff that can be shared in the constructor, will be merged
together again later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:27 +10:00
Ben Skeggs 67e9e9f6ca drm/nouveau/fb: split tile and compression region handling
This is in preparation for extending the support to the remaining
chipsets, to allow for sharing more functions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:26 +10:00
Ben Skeggs de2b8b8bbb drm/nouveau/bios: attempt to fetch entire acpi rom image in one shot
v2: fdo#55948 - the _ROM method silently truncates size to 4KiB, perform
    a checksum test and fall back to slow _ROM access on failure.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:26 +10:00
Daniel Vetter 28164fdad8 drm/doc: add new dp helpers into drm DocBook
I didn't bother with documenting the really trivial new "extract
something from dpcd" helpers, but the i2c over aux ch is now
documented a bit.

v2: Clarify the comment for i2c_dp_aux_add_bus a bit.

v3: Fix more spelling fail spotted by Laurent Pinchart.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:26:53 +10:00
Daniel Vetter d0ddc0338a drm/doc: integrate fb helper reference into docs
Again only minimal changes to make kerneldoc no longer shout. Plus a
little introduction in the form of a inline DOC: section to quickly
explain what this is all about.

v2: Fixup spelling fail.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:26:52 +10:00
Daniel Vetter 0d4ed4c8f9 drm/doc: integrate crtc helper api into docbook
- Add the missing doc for drm_helper_move_panel_connectors_to_head.
- Fixup any outdated stuff in existing sections. I've only looked at
  those kerneldoc headers that actually resulted in a complaint from
  the kerneldoc parser tool.

v2:
- Actually include the docbook snippet in the right patch.
- Fix spelling fail.

v3: It's now called drm_crtc_helper_set_mode, spotted by Laurent
Pinchart.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:19:58 +10:00
Daniel Vetter e4949f2974 drm/doc: Helpers are not a Midlayer!
I'm devoting all my wrath to that fight, so don't misname it ;-)

v2: Make it clear that this section talks about kms helpers.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:17:07 +10:00
Daniel Vetter 670c1ef650 drm/edid: tune down debug message in parse_hdmi_vsdb
Those tend to be totally not interesting for end-users, and for
debugging we tend to dump the entire noise anyway by enabling all
debug messages.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57388
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:15:12 +10:00
James Hogan dff98e529e drm: only build ati_pcigart if PCI enabled
Prevent ati_pcigart.c being built unless PCI is enabled. The exported
functions in this file are only used by drivers which depend on PCI
(namely r128 and radeon), and it tries to use PCI specific functions
(pci_unmap_page, pci_map_page, and pci_dma_mapping_error) that cause
compiler errors when PCI is disabled.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:12:29 +10:00
Thomas Hellstrom d08a9b9cd8 drm/vmwgfx: Tighten the security around buffer maps
Make sure that other DRM clients can't map the contents of
non-shareable buffer objects.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:09:08 +10:00
Thierry Reding 219e81536c drm: tegra: Add Tegra30 support
Add support for host1x, the display controllers and HDMI on the Tegra30
SoC.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:07:02 +10:00
Thierry Reding ac8f7c4894 drm: tegra: Use framebuffer pitch as line stride
Instead of using the stride derived from the display mode, use the pitch
associated with the currently active framebuffer. This fixes a bug where
the LCD display content would be skewed when enabling HDMI with a video
mode different from that of the LCD.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Mark Zhang <markz@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 20:05:46 +10:00
Thomas Hellstrom 82fe50bcc8 drm/ttm: Optimize vm locking using kref_get_unless_zero v3
Removes the need for a write lock each time we call ttm_bo_unref().

v2: Remove an unused variable.
v3: Really remove the unused variable.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 18:37:59 +10:00
Thomas Hellstrom 5293908afa drm/ttm: Use the hashtab _rcu interface for ttm_objects
Also move a kref_init() out of spinlocked region

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 18:36:15 +10:00
Thomas Hellstrom ae8df2ae8a drm/ttm: Fix locking in an error path
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 18:36:14 +10:00
Thomas Hellstrom 35f62a5829 drm/vmwgfx: Free user-space fence objects correctly
They need to be freed after an rcu grace period.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 18:36:12 +10:00
Thomas Hellstrom a82b8db02f kref: Add kref_get_unless_zero documentation
Document how kref_get_unless_zero should be used and how it helps
solve a typical kref / locking problem.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 18:36:06 +10:00
Thomas Hellstrom 384cc2f968 drm: Add a hash-tab rcu-safe API
While hashtab should now be RCU-safe, Add a drm_ht_xxx_api for consumers
to use to make it obvious what locking mechanism is used.

Document the way the rcu-safe interface should be used.

Don't use rcu-safe list traversal in modify operations where we should use
a spinlock / mutex anyway.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-28 18:36:05 +10:00
Thomas Hellstrom 7e8d9da32e drm/vmwgfx: Add and make use of a header for surface size calculation.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-21 07:47:09 +10:00
Thomas Hellstrom 543831cfc9 drm/vmwgfx: Break out surface and context management to separate files
Add a resource-private header for common resource definitions

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-21 07:47:08 +10:00
Thomas Hellstrom c0951b797e drm/vmwgfx: Refactor resource management
Refactor resource management to make it easy to hook up resources
that are backed up by buffers. In particular, resources and their
backing buffers can be evicted and rebound, if supported by the device.
To avoid query deadlocks, the query code is also modified somewhat.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-21 07:47:06 +10:00
Thomas Hellstrom bf6f036848 drm/vmwgfx: Make vmw_dmabuf_unreference handle NULL objects
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-20 16:19:59 +10:00
Thomas Hellstrom 506ff75c92 drm/vmwgfx: Refactor module load to not require fifo unless fbdev is loaded
This also fixes a bug where the fence manager was left without irq
enabled when waiting for fences, causing various errors at module
load time

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-20 16:19:56 +10:00
Thomas Hellstrom 29a16e9543 drm/vmwgfx: Make screen object code not require fifo at init time
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-20 16:19:53 +10:00
Thomas Hellstrom dcb5227155 drm/vmwgfx: Make overlay code not require fifo at init time
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-20 16:19:50 +10:00
Thomas Hellstrom ba723fe8b7 drm/vmwgfx: Enable traces *after* we've hidden SVGA
Hiding SVGA seems to trigger a VGA screen clear, and with no
traces dirty it doesn't seem to repaint

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-20 16:19:48 +10:00