summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-08drm/gem: remove misleading gfp parameter to get_pages()David Herrmann6-17/+28
drm_gem_get_pages() currently allows passing a 'gfp' parameter that is passed to shmem combined with mapping_gfp_mask(). Given that the default mapping_gfp_mask() is GFP_HIGHUSER, it is _very_ unlikely that anyone will ever make use of that parameter. In fact, all drivers currently pass redundant flags or 0. This patch removes the 'gfp' parameter. The only reason to keep it is to remove flags like __GFP_WAIT. But in its current form, it can only be used to add flags. So to remove __GFP_WAIT, you'd have to drop it from the mapping_gfp_mask, which again is stupid as this mask is used by shmem-core for other allocations, too. If any driver ever requires that parameter, we can introduce a new helper that takes the raw 'gfp' parameter. The caller'd be responsible to combine it with mapping_gfp_mask() in a suitable way. The current drm_gem_get_pages() helper would then simply use mapping_gfp_mask() and call the new helper. This is what shmem_read_mapping_pages{_gfp,} does right now. Moreover, the gfp-zone flag-usage is not obvious: If you pass a modified zone, shmem core will WARN() or even BUG(). In other words, the following must be true for 'gfp' passed to shmem_read_mapping_pages_gfp(): gfp_zone(mapping_gfp_mask(mapping)) == gfp_zone(gfp) Add a comment to drm_gem_read_pages() explaining that constraint. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-07-08drm/omap: use __GFP_DMA32 for shmem-backed gemDavid Herrmann1-9/+8
OMAP requires bo-pages to be in the DMA32 zone. Explicitly request this by setting __GFP_DMA32 as mapping-gfp-mask during shmem initialization. This drops HIGHMEM from the gfp-mask and uses DMA32 instead. shmem-core takes care to relocate pages during swap-in in case they have been loaded into the wrong zone. It is _not_ possible to pass __GFP_DMA32 to shmem_read_mapping_page_gfp() as the page might have already been swapped-in at that time. The zone-mask must be set during initialization and be kept constant for now. Remove the now superfluous TODO in omap_gem.c. Reviewed-by: Rob Clark <robdclark@gmail.com> Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-06-18drm/i915: use shmem helpers if possibleDavid Herrmann1-7/+1
Instead of shuffling gfp-masks all the time, use the shmem_read_mapping_page() helper. Note that __GFP_IO and __GFP_WAIT are set in mapping_gfp_mask() for i915, so the behavior is still the same. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-06-11Merge branch 'drm-nouveau-next' of ↵Dave Airlie90-1486/+3346
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next display rework fixes lots of displayport issues. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (43 commits) drm/nouveau/disp/dp: fix tmds passthrough on dp connector drm/nouveau/dp: probe dpcd to determine connectedness drm/nv50-: trigger update after all connectors disabled drm/nv50-: prepare for attaching a SOR to multiple heads drm/gf119-/disp: fix debug output on update failure drm/nouveau/disp/dp: make use of postcursor when its available drm/g94-/disp/dp: take max pullup value across all lanes drm/nouveau/bios/dp: parse lane postcursor data drm/nouveau/dp: fix support for dpms drm/nouveau: register a drm_dp_aux channel for each dp connector drm/g94-/disp: add method to power-off dp lanes drm/nouveau/disp/dp: maintain link in response to hpd signal drm/g94-/disp: bash and wait for something after changing lane power regs drm/nouveau/disp/dp: split link config/power into two steps drm/nv50/disp: train PIOR-attached DP from second supervisor drm/nouveau/disp/dp: make use of existing output data for link training drm/gf119/disp: start removing direct vbios parsing from supervisor drm/nv50/disp: start removing direct vbios parsing from supervisor drm/nouveau/disp/dp: maintain receiver caps in response to hpd signal drm/nouveau/disp/dp: create subclass for dp outputs ...
2014-06-11drm/nouveau/disp/dp: fix tmds passthrough on dp connectorBen Skeggs2-10/+54
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/dp: probe dpcd to determine connectednessBen Skeggs3-40/+26
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nv50-: trigger update after all connectors disabledBen Skeggs1-0/+1
We were sending the necessary state changes to unset the mode, but never actually hit the big GO button unless another modeset happens afterwards. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nv50-: prepare for attaching a SOR to multiple headsBen Skeggs3-42/+46
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/gf119-/disp: fix debug output on update failureBen Skeggs1-3/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: make use of postcursor when its availableBen Skeggs1-8/+18
And at the same time, obey the spec better wrt out-of-range requests. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/g94-/disp/dp: take max pullup value across all lanesBen Skeggs2-2/+6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/bios/dp: parse lane postcursor dataBen Skeggs4-24/+27
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/dp: fix support for dpmsBen Skeggs2-4/+50
SOR_PWR has no effect to power-off DP links, unlike other SOR protocols. Instead, on the source side, we cut power to the lanes after having put the sink into D3. Link training takes care of everything required to bring it back again. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau: register a drm_dp_aux channel for each dp connectorBen Skeggs2-3/+55
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/g94-/disp: add method to power-off dp lanesBen Skeggs5-0/+35
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: maintain link in response to hpd signalBen Skeggs6-12/+125
This previously worked for the most part due to userspace doing a modeset in response to HPD interrupts. This will allow us to properly handle cases where sync is lost for other reasons, or if userspace isn't caring. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/g94-/disp: bash and wait for something after changing lane power regsBen Skeggs1-0/+3
Some kind of update? Needed to make the power-down take effect at least. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: split link config/power into two stepsBen Skeggs6-12/+29
We want to be able to power down the lanes for DPMS off. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nv50/disp: train PIOR-attached DP from second supervisorBen Skeggs1-21/+11
Same place as for SOR, between detach and attach phases. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: make use of existing output data for link trainingBen Skeggs16-248/+133
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/gf119/disp: start removing direct vbios parsing from supervisorBen Skeggs1-75/+83
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nv50/disp: start removing direct vbios parsing from supervisorBen Skeggs1-107/+116
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: maintain receiver caps in response to hpd signalBen Skeggs2-8/+68
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: create subclass for dp outputsBen Skeggs16-9/+265
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau: use connector events for HPD instead of GPIO watchingBen Skeggs3-44/+34
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp: add internal representaion of output paths and connectorsBen Skeggs10-2/+619
This will, at some point, be used to replace various bits and pieces of code doing direct bios parsing. For now, it'll just be used for some DP improvements. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/bios: extend connector table parsingBen Skeggs4-16/+79
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp: nothing to see hereBen Skeggs3-21/+42
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c/anx9805: add debugging to aux transactionsBen Skeggs2-5/+34
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c: introduce locking at a per-port levelBen Skeggs14-34/+380
There's also provisions to allow a pad to be locked with a specific routing, for an indefinite period of time. This will be used in future patches. The G94+ pad driver will now also power-down pads when not required. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c: balance port acquire/releaseBen Skeggs4-14/+56
This was a half-finished hack before, just enough to handle the shared aux/i2c pad thing on G94 and up. We got lucky with locking etc up until now, as this was (generally) all protected by the DRM mode_config lock. It's about to become a lot more likely to hit the races. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/gk104/i2c: add aux channel interrupt driverBen Skeggs6-6/+79
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/g94/i2c: add aux channel interrupt driverBen Skeggs3-0/+39
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c: add interfaces to support handling aux channel interruptsBen Skeggs4-0/+94
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c: start hiding subdev-internal interfacesBen Skeggs21-236/+194
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c: remove unnecessary i2c_set_adapdata()Ben Skeggs1-2/+0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/i2c: properly hand aux reply back to caller, and only retry on deferBen Skeggs4-14/+20
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nv50-/mc: also pass PMGR interrupts onto I2C subdevBen Skeggs3-3/+6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/gpio: send separate event types for high/low transitionsBen Skeggs4-14/+17
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/gpio: use base constructor for all implementationsBen Skeggs8-119/+47
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/gpio: move on-reset intr disable-and-ack to common codeBen Skeggs7-138/+80
Re-uses the implementation's accessor functions rather than requiring and init/fini implementation for each chipset. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/gpio: split "toggled" interrupt into "went high" / "went low"Ben Skeggs7-114/+156
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/gpio: split g92 class from nv50Ben Skeggs11-58/+110
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/gpio: use indirect pointer to base class definitionBen Skeggs13-75/+75
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: support training to highest rate, rather than a targetBen Skeggs1-23/+34
We really want this for, at least, MST devices. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/disp/dp: support postcursor in link trainingBen Skeggs2-11/+53
Not enabled at the backends yet, but will read status and send back max reached at level 0. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11drm/nouveau/core: allow event source to handle multiple event types per indexBen Skeggs21-77/+112
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11Merge branch 'topic/ipu-destaging' of git://git.pengutronix.de/git/pza/linux ↵Dave Airlie18-29/+216
into drm-next Destage IPUv3 * 'topic/ipu-destaging' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: Register the CSI modules gpu: ipu-v3: Add CSI and SMFC module enable wrappers gpu: ipu-v3: Add ipu_idmac_get_current_buffer function gpu: ipu-v3: Add SMFC code gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging
2014-06-10Merge branch 'drm-nouveau-next' of ↵Dave Airlie48-122/+687
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next There's really not a great deal this time due to me spending most of this window on Maxwell. But, here's the random bits and pieces that's currently queued. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (25 commits) drm/gk208/gr: add missing registers to grctx init drm/nouveau/kms/nv04-nv40: fix pageflip events via special case. drm/nv50-/mc: fix kms pageflip events by reordering irq handling order. drm/nouveau/disp/nv04-nv40: abort scanoutpos query on vga analog. drm/nv50-/kms: wait for enough ring space in crtc_prepare() drm/nouveau/disp/dp: support training pattern 3 drm/nouveau/disp/dp: support aux read interval during link training drm/gk104/gpio: fix incorrect interrupt register usage drm/nouveau/core: punt all object state change messages to trace level drm/nouveau/clk: allow end-user reclocking for nv40, nvaa, and nve0 clock types drm/nouveau/fb: default NvMemExec to on, turning it off is used for debugging only drm/nouveau/bios: fix a potential NULL deref in the PROM shadowing function drm/nouveau/i2c: bump the i2c delay for the adt7473 drm/nouveau/therm/fan/tach: default to 2 pulses per revolution drm/nvf0/device: enable video decoding engines on gk110/gk208 drm/nvf1/device: add support for 0xf1 (gk110b) drm/nouveau/device: support for probing GK20A drm/nouveau/graph: add GK20A support drm/nouveau/graph: pad firmware code at load time drm/nouveau/graph: enable when using external fw ...
2014-06-10drm/gk208/gr: add missing registers to grctx initIlia Mirkin1-0/+2
This fixes hangs on GK208 which happen instantaneously on trying to use a geometry shader. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org # v3.14+