Commit Graph

5300 Commits

Author SHA1 Message Date
Nicholas Miell b356fe0afe drm/radeon/kms: fix cursor image off-by-one error
The mouse cursor hotspot calculation when the cursor is partially off the
top or left side of the screen was off by one.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41158

Signed-off-by: Nicholas Miell <nmiell@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-03 18:37:33 +01:00
Alex Deucher 5ba7ddf816 drm/radeon/kms: Fix logic error in DP HPD handler
Only disable the pipe if the monitor is physically
disconnected.  The previous logic also disabled the
pipe if the link was trained.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=41248

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-03 18:37:32 +01:00
Alex Deucher 6375bda073 drm/radeon/kms: add retry limits for native DP aux defer
The previous code could potentially loop forever.  Limit
the number of DP aux defer retries to 4 for native aux
transactions, same as i2c over aux transactions.

Noticed by: Brad Campbell <lists2009@fnarfbargle.com>

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Brad Campbell <lists2009@fnarfbargle.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-03 18:37:31 +01:00
Alex Deucher 109bc10d30 drm/radeon/kms: fix regression in DP aux defer handling
An incorrect ordering in the error checking code lead
to DP aux defer being skipped in the aux native write
path.  Move the bytes transferred check (ret == 0)
below the defer check.

Tracked down by: Brad Campbell <brad@fnarfbargle.com>

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=41121

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Brad Campbell <brad@fnarfbargle.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-03 18:37:30 +01:00
Keith Packard bee7eb2da2 drm/i915: Turn force VDD back off when panel running in intel_dp_dpms
The VDD force bit is turned on before touching the panel, but if it
was enabled, there was no call to turn it back off. Add a call.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-30 16:23:46 -07:00
Keith Packard 97af61f57e drm/i915: Check for eDP inside edp panel on/off funcs
Cleans up code dealing with eDP a bit. Remove redundant checks in
callers

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-30 16:23:46 -07:00
Keith Packard 1c0ae80a5e drm/i915: Unlock PCH_PP_CONTROL always
Avoid any question about locked registers by just writing the unlock
pattern with every write to the register.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-30 16:23:45 -07:00
Keith Packard 9b984daec4 drm/i915: Check eDP power when doing aux channel communications
Verify that the eDP VDD is on, either with the panel being on or with
the VDD force-on bit being set.

This demonstrates that in many instances, VDD is not on when needed,
which leads to failed EDID communications.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-30 16:23:45 -07:00
Keith Packard 47f0eb2234 drm/i915: Only use VBT panel mode on eDP if no EDID is found
We're going to assume that EDID is more reliable than the VBT tables
for eDP panels, which is notably true on MacBook machines where the
VBT contains completely bogus data.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-30 16:23:44 -07:00
Keith Packard 192aac1f19 drm/i915: Shut down PCH interrupts during irq_uninstall
This masks out all interrupts and ack's any pending ones at IRQ
uninstall time to make sure we don't receive any unexpected interrupts
later on.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-30 15:30:41 -07:00
Keith Packard 7fe0b973fa drm/i915: Enable digital port hotplug on PCH systems
We were relying on the BIOS to set these bits, which doesn't always
happen.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-30 15:30:01 -07:00
Linus Torvalds 8e8e500fca Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux
* 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux:
  drm/i915: FBC off for ironlake and older, otherwise on by default
  drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
  drm/i915: Enable dither whenever display bpc < frame buffer bpc
2011-09-29 19:23:30 -07:00
Keith Packard 0ac225e569 Merge branch 'drm-intel-fixes' into drm-intel-next 2011-09-28 14:44:38 -07:00
Keith Packard 9fb526db97 drm/i915: Initialize PCH refclks at modeset init time
The reference clock configuration must be done before any mode setting
can occur as all outputs must be disabled to change
anything. Initialize the clocks after turning everything off during
the initialization process.

Also, re-initialize the refclk at resume time.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-28 14:08:38 -07:00
Keith Packard afffb9dfb6 drm/i915: All PCH refclks are 120MHz
I can't find any reference clocks which run at 96MHz as seems to be
indicated from the comments in this code.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-28 14:08:37 -07:00
Keith Packard 99eb6a01e5 drm/i915: Use CK505 as non-SSC source where available
When trying to use SSC on Ibex Peak without CK505, any non-SSC outputs
(like VGA or TV) get broken. So, do not use SSC on Ibex Peak unless
there is a CK505 available (as specified by the VBT).

On Cougar Point, all clocking is internal, so SSC can always be used,
and there will never be a CK505 available.

This eliminates VGA shimmer on some Ironlake machines which have a
CK505 clock source.

References: https://bugzilla.kernel.org/show_bug.cgi?id=21742
References: https://bugs.freedesktop.org/show_bug.cgi?id=38750
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-28 14:08:06 -07:00
Keith Packard 199e5d79f1 drm/i915: Fix PCH SSC reference clock settings
The PCH refclk settings are global, so we need to look at all of the
encoders, not just the current encoder when deciding how to configure
it. Also, handle systems with more than one panel (any combination of
PCH/non-PCH eDP and LVDS).

Disable SSC clocks when no panels are connected.

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-27 11:12:56 -07:00
Keith Packard 72bbe58cd9 drm/i915: Allow SSC parameter to override VBT value
Allow SSC to be enabled even when the BIOS disables it for testing SSC paths.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-27 11:12:40 -07:00
Keith Packard d2830bdb84 drm/i915: Document a few more BDB_GENERAL_FEATURES bits from PCH BIOS
This includes whether an eDP panel is present, and whether that should
use SSC (and at what frequency)

Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-27 11:12:39 -07:00
Keith Packard abd0686018 drv/i915: Pull display_clock_mode out of VBT table
This tells the driver whether a CK505 clock source is available on
pre-PCH hardware. If so, it should be used as the non-SSC source,
leaving the internal clock for use as the SSC source.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wison <chris@chris-wilson.co.uk>
2011-09-27 11:12:26 -07:00
Keith Packard 562396b9e4 drm/i915: Use DRM_DEBUG_KMS for all messages in intel_bios.c
These are all KMS related anyways, so don't hide them under other
debug levels.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-27 11:12:10 -07:00
Keith Packard 395072592e drm/i915: broken copyright encoding in intel_bios.c
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-26 22:29:38 -07:00
Alex Deucher fdfc61594e drm/radeon/kms: fix DDIA enable on some rs690 systems
DVOOutputControl checks the value of of bios scratch reg 3
on some tables and assumes the encoder is already enabled
if the DFP2_ACTIVE bit is set.  Clear that bit so the table
sets the DDIA enable bit properly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-23 14:02:18 +01:00
Dave Airlie d9ad77ebfd Revert "drm/radeon/kms: fix typo in r100_blit_copy"
This reverts commit 18b4fada27.

This code was correct, apologies to anyone who noticed things broke.

revert contents are different due to another commit in between.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-23 14:01:44 +01:00
Keith Packard cd0de039bf drm/i915: FBC off for ironlake and older, otherwise on by default
Make the default FBC behaviour chipset specific, allowing us to turn
it on by default for Ironlake and older where it has been seen to
cause trouble with screen updates.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Francis Moreau <francis.moro@gmail.com>
2011-09-21 15:03:11 -07:00
Simon Farnsworth cc68c81aed drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
I was seeing a nasty 5 frame glitch every 10 seconds, caused by the
poll for connection on DVI attached by SDVO.

As my SDVO DVI supports hotplug detect interrupts, the fix is to
enable them, and hook them in to the various bits of driver
infrastructure so that they work reliably.

Note that this is only tested on single-function DVI-D SDVOs, on two
platforms (965GME and 945GSE), and has not been checked against a
specification document.

With lots of help from Adam Jackson <ajax@redhat.com> on IRC.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:55:51 -07:00
Ben Widawsky c8c99b0f0d drm/i915: Dumb down the semaphore logic
While I think the previous code is correct, it was hard to follow and
hard to debug. Since we already have a ring abstraction, might as well
use it to handle the semaphore updates and compares.

I don't expect this code to make semaphores better or worse, but you
never know...

v2:
Remove magic per Keith's suggestions.
Ran Daniel's gem_ring_sync_loop test on this.

v3:
Ignored one of Keith's suggestions.

v4:
Removed some bloat per Daniel's recommendation.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:52:41 -07:00
Wu Fengguang e0dac65ed4 drm/i915: pass ELD to HDMI/DP audio driver
Add ELD support for Intel Eaglelake, IbexPeak/Ironlake,
SandyBridge/CougarPoint and IvyBridge/PantherPoint chips.

ELD (EDID-Like Data) describes to the HDMI/DP audio driver the audio
capabilities of the plugged monitor. It's built and passed to audio
driver in 2 steps:

(1) at get_modes time, parse EDID and save ELD to drm_connector.eld[]

(2) at mode_set time, write drm_connector.eld[] to the Transcoder's hw
    ELD buffer and set the ELD_valid bit to inform HDMI/DP audio driver

This patch is tested OK on G45/HDMI, IbexPeak/HDMI and IvyBridge/HDMI+DP.
Test scheme: plug in the HDMI/DP monitor, and run

        cat /proc/asound/card0/eld*

to check if the monitor name, HDMI/DP type, etc. show up correctly.

Minor imperfection: the GEN5_AUD_CNTL_ST/DIP_Port_Select field always
reads 0 (reserved). Without knowing the port number, I worked it around
by setting the ELD_valid bit for ALL the three ports. It's tested to not
be a problem, because the audio driver will find invalid ELD data and
hence rightfully abort, even when it sees the ELD_valid indicator.

Thanks to Zhenyu and Pierre-Louis for a lot of valuable help and testing.

CC: Zhao Yakui <yakui.zhao@intel.com>
CC: Wang Zhenyu <zhenyu.z.wang@intel.com>
CC: Jeremy Bush <contractfrombelow@gmail.com>
CC: Christopher White <c.white@pulseforce.com>
CC: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
CC: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:52:41 -07:00
Wu Fengguang 76adaa34db drm: support routines for HDMI/DP ELD
ELD (EDID-Like Data) describes to the HDMI/DP audio driver the audio
capabilities of the plugged monitor.

This adds drm_edid_to_eld() for converting EDID to ELD. The converted
ELD will be saved in a new drm_connector.eld[128] data field. This is
necessary because the graphics driver will need to fixup some of the
data fields (eg. HDMI/DP connection type, AV sync delay) before writing
to the hardware ELD buffer. drm_av_sync_delay() will help the graphics
drivers dynamically compute the AV sync delay for fixing-up the ELD.

ELD selection policy: it's possible for one encoder to be associated
with multiple connectors (ie. monitors), in which case the first found
ELD will be returned by drm_select_eld(). This policy may not be
suitable for all users, but let's start it simple first.

The impact of ELD selection policy: assume there are two monitors, one
supports stereo playback and the other has 8-channel output; cloned
display mode is used, so that the two monitors are associated with the
same internal encoder. If only the stereo playback capability is reported,
the user won't be able to start 8-channel playback; if the 8-channel ELD
is reported, then user space applications may send 8-channel samples
down, however the user may actually be listening to the 2-channel
monitor and not connecting speakers to the 8-channel monitor.

According to James, many TVs will either refuse the display anything or
pop-up an OSD warning whenever they receive hdmi audio which they cannot
handle. Eventually we will require configurability and/or per-monitor
audio control even when the video is cloned.

CC: Zhao Yakui <yakui.zhao@intel.com>
CC: Wang Zhenyu <zhenyu.z.wang@intel.com>
CC: Jeremy Bush <contractfrombelow@gmail.com>
CC: Christopher White <c.white@pulseforce.com>
CC: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
CC: Paul Menzel <paulepanter@users.sourceforge.net>
CC: James Cloos <cloos@jhcloos.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-21 14:52:41 -07:00
Keith Packard 578393cd1e drm/i915: Enable dither whenever display bpc < frame buffer bpc
We want to enable dithering on any pipe where the frame buffer has
more color resolution than the output device.

The previous code was incorrectly clamping the frame buffer bpc to the
display bpc, effectively disabling dithering all of the time as the
computed frame buffer bpc would never be larger than the display bpc.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
2011-09-21 14:52:40 -07:00
Dave Airlie 88ef4e3f4f Merge branch 'drm-intel-next' of git://people.freedesktop.org/~keithp/linux into drm-next
* 'drm-intel-next' of git://people.freedesktop.org/~keithp/linux:
  Drivers: i915: Fix all space related issues.
2011-09-20 09:36:22 +01:00
Dave Airlie b2d108ba33 Merge branch 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-next
* 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6: (353 commits)
  drm/nouveau: remove allocations from gart populate() hook
  drm/nvc0/fb: slightly improve PMFB intr handling, move out of nvc0_graph.c
  drm/nvc0/fifo: avoid touching missing subfifos
  drm/nvd9/disp: bail out of mode_set_base if no fb bound to crtc
  drm/nvd9/disp: stub some more api hooks so we don't oops on resume
  drm/nouveau: fix printk typo in ioremap failure path
  drm/nvc0/pm: minor clock readback fixes
  drm/nv40/pm: execute memory reset script from vbios
  drm/nv50/gr: refactor initialisation
  drm/nouveau: if requested, try harder at disabling sysmem pushbufs
  drm/nv50/gr: enable ctxprog xfer only when we need it to save power
  drm/nouveau/dp: add support for displayport table 0x30
  drm/nouveau/dp: return master dp table pointer too when looking up encoder
  drm/nouveau/bios: simplify U/d table hash matching func to just match
  drm/nouveau/dp: preserve non-pattern bits in DP_TRAINING_PATTERN_SET
  drm/nvc0/gr: remove MODULE_FIRMWARE() lines
  drm/nouveau/dp: use alternate lane mask for nvaf
  drm/nouveau/dp: link rate scripts are selected with a comparison table
  drm/nv40/pm: write nv40-specific reclocking routines
  drm/nv40/pm: parse geometric delta clock from vbios
  ...
2011-09-20 09:35:22 +01:00
Ben Skeggs a0d9a8feb9 drm/nouveau: remove allocations from gart populate() hook
Since some somewhat questionable changes a while back, TTM provides a
completely empty array of struct dma_address that stays around for the
entire lifetime of the TTM object.

Lets use this array, *always*, rather than wasting yet more memory on
another array who's purpose is identical, as well as yet another bool array
of the same size saying *which* of the previous two arrays to use...

This change will also solve the high order allocation failures seen by
some people while using nouveau.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:12:27 +10:00
Ben Skeggs a14845121c drm/nvc0/fb: slightly improve PMFB intr handling, move out of nvc0_graph.c
I'm still not certain how to determine the number of SUBPs are present on
a given board.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:12:21 +10:00
Ben Skeggs 3dcbb02b3a drm/nvc0/fifo: avoid touching missing subfifos
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:12:18 +10:00
Ben Skeggs 84e2ad8b7b drm/nvd9/disp: bail out of mode_set_base if no fb bound to crtc
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:12:11 +10:00
Ben Skeggs c20ab3e1cb drm/nvd9/disp: stub some more api hooks so we don't oops on resume
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:12:08 +10:00
Marcin Slusarz ff920bfbe6 drm/nouveau: fix printk typo in ioremap failure path
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:12:05 +10:00
Ben Skeggs 8ce51fcfee drm/nvc0/pm: minor clock readback fixes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:55 +10:00
Ben Skeggs 59ef9742f6 drm/nv40/pm: execute memory reset script from vbios
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:51 +10:00
Ben Skeggs 6d6538a0c3 drm/nv50/gr: refactor initialisation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:45 +10:00
Ben Skeggs 8c06e60ed4 drm/nouveau: if requested, try harder at disabling sysmem pushbufs
On >=nv50, userspace would still end up allocating pushbufs in GART.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:41 +10:00
Martin Peres fbba036a56 drm/nv50/gr: enable ctxprog xfer only when we need it to save power
This patch adds instructions to ctxprog and by doing, impacts context
switching performance.  My testcase showed a 1% performance cost using
glxgears that is a context-switch bound application.

Please test and report bugs/performance/power/other.

Many thanks to Maxim Levitsky for his dedicated work on lowering power
consumption with nouveau.

More patches are coming thanks to his work:

https://bugs.freedesktop.org/show_bug.cgi?id=37922

Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:28 +10:00
Ben Skeggs c16a3a358b drm/nouveau/dp: add support for displayport table 0x30
Written from observations of my NVD9's vbios, completely untested due to
my NVD9 lacking actual DisplayPort connectors..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:21 +10:00
Ben Skeggs 5f1800bd8a drm/nouveau/dp: return master dp table pointer too when looking up encoder
Will need to be able to distinguish 2.0/2.1 from 3.0 soon.  Also, move
the vbios parsing to nouveau_dp where it belongs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:18 +10:00
Ben Skeggs 721b0821ad drm/nouveau/bios: simplify U/d table hash matching func to just match
The caller is now responsible for parsing its own lists (or whatever) of
possible encoders.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:14 +10:00
Ben Skeggs 5b3eb95fd8 drm/nouveau/dp: preserve non-pattern bits in DP_TRAINING_PATTERN_SET
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:09 +10:00
Ben Skeggs 2834f86864 drm/nvc0/gr: remove MODULE_FIRMWARE() lines
We don't use these by default anymore, and there's been complaints from a
number of places thinking that the firmware blobs are required still.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:05 +10:00
Ben Skeggs 1b45dbe0bc drm/nouveau/dp: use alternate lane mask for nvaf
Naturally...  Because Macs can't just be the same as everything else
now can they?

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:11:00 +10:00
Ben Skeggs 856ed88875 drm/nouveau/dp: link rate scripts are selected with a comparison table
Not hardcoded as originally thought.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:56 +10:00
Ben Skeggs 1262a206da drm/nv40/pm: write nv40-specific reclocking routines
Not 100% perfect yet, but a good start towards what it'll look like in the
end.

Actually seems stable on a NV44 I have here, as much as running around OA
for a fair amount of time constantly switching between performance levels
can prove..

My NV49 isn't quite so happy, and semaphores mess up somehow (sometimes) as
a result of the memory reclocking.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:45 +10:00
Ben Skeggs 9f403603f2 drm/nv40/pm: parse geometric delta clock from vbios
This changes the meaning of what we reported as "core" clock previously.

The shader/rop units are allegedly supposed to be run at the base clock
listed in the perf table, while the geometric clock can be bumped from
this value on some boards.

So that we can report both, we'll report the base clock as "shader" (since
the shaders *do* run at it), and the geometric clock as "core".

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:40 +10:00
Ben Skeggs 52e0d0ecc8 drm/nouveau/dp: enable down-spread if vbios and sink support it
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:35 +10:00
Ben Skeggs 28e2d12405 drm/nouveau/dp: execute some more vbios tables relating to link rate
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:27 +10:00
Ben Skeggs 75a1fccf92 drm/nouveau/dp: store unencoded link_bw everywhere
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:24 +10:00
Ben Skeggs 27a4598737 drm/nouveau/dp: restructure link training code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:21 +10:00
Ben Skeggs a002feceb7 drm/nouveau/dp: pass in required datarate to link training
Not used currently, but it will be used in preference to pre-determined
lane/bandwidth numbers at a later point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:19 +10:00
Ben Skeggs a8e415d3eb drm/nouveau/bios: check for null script pointers in parser
Allows us to be lazy elsewhere...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:12 +10:00
Ben Skeggs 5024c54b5c drm/nva3/backlight: add suppport for newer style backlight regs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:06 +10:00
Ben Skeggs 09461459e1 drm/nv50/backlight: express brightness level in percent
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:10:02 +10:00
Ben Skeggs 10b461e40a drm/nv50/backlight: take the sor into account when bashing regs
I'm sure that out there somewhere, someone will need this.  We currently
haven't seen an example of LVDS being on a non-0 SOR so far though.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:09:56 +10:00
Ben Skeggs 730764812d drm/nouveau/backlight: make more consistent with rest of driver style
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:09:53 +10:00
Ben Skeggs 68c9918479 drm/nouveau: tidy connector hotplug handler, punt messages to debug
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:09:49 +10:00
Ben Skeggs 46959b7790 drm/nouveau/dp: remove reliance on vbios for native displayport
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:09:42 +10:00
Ben Skeggs 4372013388 drm/nouveau/dp: rewrite auxch transaction routines
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:09:03 +10:00
Ben Skeggs 91a8f1ea4b drm/nouveau: workaround semaphore hw bug causing unnecessary interrupts
The HW will only accept the DMA_FROM_MEMORY class for DMA_SEMAPHORE without
asking the driver to intervene.

It appears that semaphores will work correctly even without DMA_IN_MEMORY,
so lets avoid the large amount of interrupts generated by x-chan sync.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:59 +10:00
Ben Skeggs afb0c796d8 drm/nouveau/tmr: fix miscalculation of ratio on pre-nv4x chipsets
The clock_get() hook returns KHz, not Hz.

Also fixed to use crystal freq from dev_priv.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:54 +10:00
Ben Skeggs 378f85ed54 drm/nva3/pm: fixup for NVAF special
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:50 +10:00
Ben Skeggs 64e740bb3d drm/nva3/pm: use crystal freq where appropriate
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:44 +10:00
Ben Skeggs f2cbe46f14 drm/nouveau: determine timing crystal freq from straps
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:41 +10:00
Ben Skeggs 93e692dc5f drm/nva3/pm: pll disabled if bit 0 of ctrl not set
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:37 +10:00
Ben Skeggs 6b70e48167 drm/nouveau: magic to make auxch on new macbooks booted in EFI mode work
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:32 +10:00
Roy Spliet 2228c6fe04 drm/nouveau/pm: Document and expose CL and WR for 0x1002Cx
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
2011-09-20 16:08:28 +10:00
Roy Spliet 9a78248876 drm/nouveau/pm: add initial NV3x/NVCx memtiming support, improve other cards
NV30: Create framework for memtm
NV50: Improve reg creation,
NV50: Use P.version instead of card codename/stepping,
NVC0: Initial memtiming code for Fermi,
Renamed regs for consistency,
Overall redesign to improve readability,
Avoid kfree on null-pointer

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
2011-09-20 16:08:25 +10:00
Ben Skeggs 1cb70b30e4 drm/nouveau: remove special-casing of hotplug detection type
If we support PGPIO interrupts, and know a hotplug GPIO tag for a
connector we use HPD, otherwise POLL_CONNECT.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:14 +10:00
Ben Skeggs bd57e7fc2e drm/nvd0: no page flipping at the moment
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:11 +10:00
Ben Skeggs 64c2502b77 drm/nvc0/gr: remove max tpc count info
Just assume a max of 16 everywhere, and hope it's okay.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:08 +10:00
Ben Skeggs e432d48f87 drm/nvd0: lets not attempt to dereference a nv50_display pointer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:08:02 +10:00
Ken Milmore 658e86ee2d drm/nouveau: enable hwmon support when both nouveau/hwmon are built as modules.
The nouveau hwmon temperature support currently only functions when hwmon is
compiled into the kernel. There's no reason why this shouldn't also work when
both hwmon and nouveau are modularised (as is the case with Slackware's stock
kernels).

Signed-off-by: Ken Milmore <ken.milmore@googlemail.com>
Reviewed-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:59 +10:00
Ben Skeggs 37b034a64b drm/nvd0/disp: tidy up what we have so far
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:49 +10:00
Ben Skeggs ee41779e76 drm/nvd0/disp: rewrite irq handler, should be somewhat sturdier now
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:46 +10:00
Ben Skeggs f20ce9629f drm/nvd0/disp: do modeset irq handling from tasklet
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:42 +10:00
Ben Skeggs 3b6d83d1b9 drm/nvd0/disp: untested LVDS support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:36 +10:00
Ben Skeggs c6f2f71dae drm/nvd0/disp: track down fb positioning method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:32 +10:00
Ben Skeggs ff8ff50342 drm/nvd0/disp: determine U table config in or_mode_set()
Takes a gamble and presumes that we can safely store something random in
OR_MODE_CTRL+4, the hw doesn't seem to mind...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:29 +10:00
Ben Skeggs b681993f7a drm/nvd0/disp: dac load detect
VBIOS does more than this, as does nv50/nvc0 driver in nouveau.  Traces
of the NVIDIA binary driver however, show pretty much just this being
done...  Seems to work for me, it'll be fine for the moment.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:22 +10:00
Ben Skeggs 629c1b9207 drm/nvd0/disp: handle sync polarity, kill off some unknown
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:18 +10:00
Ben Skeggs f3fdc52dd7 drm/nvd0/disp: scaling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:15 +10:00
Ben Skeggs a46232ee09 drm/nvd0/disp: push the update button in mode_set_base()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:09 +10:00
Ben Skeggs 8ea0d4aa60 drm/nvd0/disp: fixup clut so it actually works
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:05 +10:00
Ben Skeggs 3a89cd0292 drm/nvd0/disp: initial attempt at modeset irq handling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:07:01 +10:00
Ben Skeggs b6d8e7ec38 drm/nvd0/disp: stub dac load detect, prevents oops
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:57 +10:00
Ben Skeggs 8eaa9669f8 drm/nvd0/disp: dac encoder module
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:50 +10:00
Ben Skeggs a36f04c044 drm/nvd0/disp: extend the init voodoo to cover crtcs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:47 +10:00
Ben Skeggs c0cc92a115 drm/nvd0/disp: remove lp reordering from vram dmaobj, create fb dmaobjs
Fixes CLUT being messed up.  Mostly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:44 +10:00
Ben Skeggs 1d6e7a59f7 drm/nvd0/disp: some magic to make evo happeir
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:37 +10:00
Ben Skeggs 2fad3d5e2b drm/nvd0/disp: they moved the linear flag..
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:33 +10:00
Ben Skeggs 438d99e3b1 drm/nvd0/disp: initial crtc object implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:30 +10:00
Ben Skeggs 270a574780 drm/nvd0/disp: skeletal handling of modeset interrupts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:24 +10:00
Ben Skeggs 83fc083cbb drm/nvd0/disp: start on SOR encoder functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:21 +10:00
Ben Skeggs efd272a7a0 drm/nvd0/disp: setup a couple of dma objects we'll need
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:07 +10:00
Ben Skeggs 4600522a8f drm/nvd0/disp: start on interrupt handling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:06:01 +10:00
Ben Skeggs 51beb428e4 drm/nvd0/disp: whip up some basic dma handling for the evo channels
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:57 +10:00
Ben Skeggs 26f6d88b32 drm/nvd0/disp: very initial evo setup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:54 +10:00
Ben Skeggs 02e4f5877d drm/nouveau/bios: allow passing in crtc to the init table parser
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:48 +10:00
Ben Skeggs 4784e4aa47 drm/nvd0/pm: enable clock/voltage hooks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:44 +10:00
Ben Skeggs 75139063b7 drm/nouveau/bios: fix INIT_GPIO for new chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:40 +10:00
Ben Skeggs d7f8172ca9 drm/nvd0/gpio: initial implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:36 +10:00
Ben Skeggs eeb3ca12b4 drm/nvd0/i2c: initial implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:24 +10:00
Ben Skeggs d9f61c2d28 drm/nouveau: initial chipset description for nvdX chipsets
All the non-stubbed functions should be okay for this chipset, the rest
will be added back as they're figured out.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:20 +10:00
Ben Skeggs 03bc9675d3 drm/nouveau: allow modeset module option to select 'headless mode'
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:16 +10:00
Ben Skeggs 1575b3646c drm/nouveau: fixup init/fini sequence to deal with no CRTCs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:09 +10:00
Ben Skeggs 048a88595a drm/nouveau: make general drm modesetting init common
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:05:04 +10:00
Ben Skeggs 2e9733ff7d drm/nvd0: add a card_type for 0xdX chipsets
These are different enough from 0xcX to justify it, half fermi, half
kepler(??)..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:45 +10:00
Martin Peres f3f2f54e11 drm/nv04/pm: recalibrate timer on nvclk changes
Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:42 +10:00
Ben Skeggs 591b06d73b drm/nouveau/tmr: calibrate for ns timestamps on init
We previously assumed (incorrectly a lot of the time) that PTIMER would
be programmed at a frequency which'd give its 64-bit timestamps in
nanoseconds.

By programming PTIMER ourselves, we avoid this problem.

Reviewed-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:36 +10:00
Ben Skeggs 16cd399c65 drm/nvc0/gr: unblacklist nvcf acceleration
Reported to be working.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:32 +10:00
Ben Skeggs 0b3b5579e1 drm/nouveau: don't complain for disabled timingset entries
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:29 +10:00
Ben Skeggs e425e0b339 drm/nvc0/gr: copy GPC mpart config from PFFB
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:15 +10:00
Ben Skeggs aa6500964c drm/nvc0/vram: support non-uniform memory size per controller
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:11 +10:00
Ben Skeggs 3c23a7b8bc drm/nvc0/gr: add support for nvcf chipset
untested, written from a trace, accel disabled by default until it is

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:06 +10:00
Ben Skeggs a12036ba2c drm/nouveau: allow a nouveau_mm to be created with holes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:04:00 +10:00
Ben Skeggs 987eec10dd drm/nouveau: embed nouveau_mm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:03:56 +10:00
Ben Skeggs 52d073318a drm/nv31/mpeg: support for a single class3174 user
Uncertain if/how the hw does multiple PMPEG channels, supporting one is
better than none however.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:03:44 +10:00
Ben Skeggs 323dcac552 drm/nouveau: rename nv40_mpeg to nv31_mpeg
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:03:38 +10:00
Ben Skeggs 9698b9a680 drm/nvc0/pm: more complete parsing of clock domains
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:03:34 +10:00
Ben Skeggs 354d0781e5 drm/nvc0/pm: initial implementation of clocks_get()
Not too certain on memory clock yet, but it gets the right numbers for
each perflvl on my NVC0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:03:16 +10:00
Ben Skeggs d0f67a48f4 drm/nva3/pm: idle graphics engine before changing clocks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:02:53 +10:00
Ben Skeggs 78e2933d07 drm/nouveau: add function to wait until a callback returns true
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:02:50 +10:00
Ben Skeggs 95f0de3a0a drm/nv50/gr: insert set/clr of a ctxprog flag at start/end of ctxprog
The set will be replaced with a wait on the same flag by a subsequent
commit in order to halt a ctxprog's execution temporarily.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:02:46 +10:00
Ben Skeggs cec2a270db drm/nva3/pm: tidy and add some comments here and there
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:02:40 +10:00
Ben Skeggs 4fd2847e9b drm/nva3/pm: parse/reclock vdec/41a0 clocks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:02:36 +10:00
Ben Skeggs ca94a71fc4 drm/nva3/pm: rewrite clock_set, and switch to new interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:51 +10:00
Ben Skeggs 77e7da6814 drm/nouveau/pm: add hooks to get/set *all* clocks at once
This is probably better than having to tell the common code about all the
clocks that exist on every chipset.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:45 +10:00
Ben Skeggs 3b0582d31d drm/nva3/pm: rewrite clock readback functions, far more correct now
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:41 +10:00
Ben Skeggs 03ce8d9e63 drm/nouveau/pm: some fermi chipsets still use volt 0x30
Fun, fun.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:37 +10:00
Ben Skeggs da1dc4cfec drm/nouveau/pm: allow voltage-only perflvl set, enable nvc0
Okay, my card didn't blow up.  Lets turn it on!

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:30 +10:00
Ben Skeggs 3c71c2330b drm/nvc0/pm: enable voltage_get
I don't have a terribly good reason for not enabling voltage_set too, but,
lets wait and see.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:25 +10:00
Ben Skeggs 93dccbedeb drm/nouveau/pm: show any info we can manage to glean on current perflvl
Previously wouldn't show detected voltage if we couldn't figure out the
clock frequencies..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:21 +10:00
Ben Skeggs 3b5565ddfd drm/nouveau/pm: add support for parsing perflvl voltage on fermi chips
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:14 +10:00
Ben Skeggs a31214ef3e drm/nouveau/pm: add yet another vid gpio tag
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:11 +10:00
Ben Skeggs f60dfb996c drm/nouveau/pm: initial attempt at parsing volt 0x40
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:06 +10:00
Ben Skeggs c3450239c7 drm/nouveau/pm: store voltage in microvolts
Instead of 10s of millivolts, to match fermi vbios.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-20 16:01:02 +10:00
Keith Packard 7cd015a0a3 drm/i915: Enable dither whenever display bpc < frame buffer bpc
We want to enable dithering on any pipe where the frame buffer has
more color resolution than the output device.

The previous code was incorrectly clamping the frame buffer bpc to the
display bpc, effectively disabling dithering all of the time as the
computed frame buffer bpc would never be larger than the display bpc.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
2011-09-19 18:02:51 -07:00
Akshay Joshi 0206e353a0 Drivers: i915: Fix all space related issues.
Various issues involved with the space character were generating
warnings in the checkpatch.pl file. This patch removes most of those
warnings.

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-09-19 18:01:47 -07:00
Alex Deucher 003cefe0c2 drm/radeon/kms: Make GPU/CPU page size handling consistent in blit code (v2)
The BO blit code inconsistenly handled the page size.  This wasn't
an issue on system with 4k pages since the GPU's page size is 4k as
well.  Switch the driver blit callbacks to take num pages in GPU
page units.

Fixes lemote mipsel systems using AMD rs780/rs880 chipsets.

v2: incorporate suggestions from Michel.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-18 19:44:36 +01:00
Alex Deucher 18b4fada27 drm/radeon/kms: fix typo in r100_blit_copy
cur_pages is the number of pages per loop iteration.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-18 19:43:42 +01:00
Jiri Kosina e060c38434 Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
2011-09-15 15:08:18 +02:00
Justin P. Mattock 699324871f treewide: remove extra semicolons from various parts of the kernel
This is a resend from the original, changing the title from PATCH to
RFC(since this is a review for commit, and I should have put that the first go around).
and also removing some of the commit's with ia64 and bash since it is significant.
let me know if I might have missed anything etc..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:50:49 +02:00
Michel Dänzer db318d7a8a drm/radeon: Unreference GEM object outside of spinlock in page flip error path.
Should fix https://bugzilla.redhat.com/show_bug.cgi?id=726277 .

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-14 13:36:39 +01:00
Michel Dänzer 87463ff83b drm/radeon: Don't read from CP ring write pointer registers.
Apparently this doesn't always work reliably, e.g. at resume time.

Just initialize to 0, so the ring is considered empty.

Tested with hibernation on Sumo and Cayman cards.

Should fix https://bugs.launchpad.net/ubuntu/+source/linux/+bug/820746/ .

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-14 13:35:35 +01:00
Ben Skeggs ff02b13f68 drm/ttm: request zeroed system memory pages for new TT buffer objects
Fixes an information leak to userspace, we were handing out un-zeroed pages
for any newly created TTM_PL_TT buffer.

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-14 13:34:51 +01:00
Lin Ming 55a01f6f68 drm: Remove duplicate "return" statement
Remove the duplicate "return" statement in drm_fb_helper_panic().

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-09 09:11:44 +01:00
Dave Airlie 909d6e0cb6 Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-test
* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nv04/crtc: Bail out if FB is not bound to crtc
  drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
  drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
  drm/nouveau: fix oops on pre-semaphore hardware
  drm/nv50/crtc: Bail out if FB is not bound to crtc
2011-09-09 09:10:04 +01:00
Emil Velikov 0e83bb4eee drm/nv04/crtc: Bail out if FB is not bound to crtc
This commit resolves a possible 'NULL pointer dereference'
It uses the same approach as radeon, intel and nouveau/nv50

Fixes bug 'Nouveau: Kernel oops when unplugging external monitor'
https://bugs.freedesktop.org/show_bug.cgi?id=40336

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09 17:24:21 +10:00
Marcin Slusarz 1bf2706601 drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
nv04_sgdma_bind binds the same page multiple times on
architectures where PAGE_SIZE != 4096.
Let's fix it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09 17:24:10 +10:00
Marcin Slusarz 17c8b96093 drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
Not cleaning after alloc failure would result in crash on destroy,
because nouveau_sgdma_clear assumes "ttm_alloced" to be not null when
"pages" is not null.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09 17:24:06 +10:00
Ben Skeggs cfd8be088e drm/nouveau: fix oops on pre-semaphore hardware
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09 17:24:00 +10:00
Emil Velikov ffbc559b06 drm/nv50/crtc: Bail out if FB is not bound to crtc
Fixes possbile NULL pointer dereference
Resolves 'kernel crash in nv50_crtc_do_mode_set_base during shutdown'
https://bugs.freedesktop.org/show_bug.cgi?id=40005

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09 17:23:56 +10:00
Tormod Volden fcf4de5acf drm/radeon: Print gart initialization details on all chipsets
This was previously done for r300 only. Use %016llX instead of %08X for
printing the table address.

Also fix typos in gart warning messages.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:55:08 +01:00
Thomas Hellstrom 2ae7b03c26 vmwgfx: Bump major
This bumps driver major version as a result of previous incompatible
interface changes.

In addition, a leftover command definition is removed from the
vmwgfx_drm.h header.

Also a strict version check is enforced on the exebuf ioctl.

This is intended to be the last major bump before exiting staging.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:51:12 +01:00
Thomas Hellstrom ae2a104058 vmwgfx: Implement fence objects
Will be needed for queries and drm event-driven throttling.

As a benefit, they help avoid stale user-space fence handles.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:51:11 +01:00
Thomas Hellstrom 4f73a96bd7 vmwgfx: Make vmw_wait_seqno a bit more readable
Break out on-demand enabling and disabling of fence irqs to make
the function more readable. Also make dev_priv->fence_queue_waiters an int
instead of an atomic_t since we only manipulate it with dev_priv->hw_mutex
held.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:48:43 +01:00
Thomas Hellstrom 6bcd8d3c78 vmwgfx: Fix confusion caused by using "fence" in various places
This is needed before we introduce the fence objects.
Otherwise this will be even more confusing. The plan is to use the following:

seqno: A 32-bit sequence number that may be passed in the fifo.
marker: Objects, carrying a seqno, that track fifo submission time. They
are used for fifo lag based throttling.
fence objects: Kernel space objects, possibly accessible from user-space and
carrying a 32-bit seqno together with signaled status.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:48:40 +01:00
Thomas Hellstrom f63f6a59d3 vmwgfx: Add functionality to get 3D caps
Since we don't allow user-space to map the fifo anymore,
add a parameter to get fifo hw version and
an ioctl to copy the 3D capabilities.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecranz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:48:35 +01:00
Thomas Hellstrom 07999a7e0e vmwgfx: Remove the possibility to map the fifo from user-space
This was previously used by user-space to check whether a fence
sequence had passed or not.
With fence objects that's not needed anymore.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:48:34 +01:00
Thomas Hellstrom fe0f5c6576 vmwgfx: Remove the update layout IOCTL.
It doesn't seem like its needed. If this turns out to be an incorrect
assumption, we can reinstate it.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:48:33 +01:00
Thomas Hellstrom 781b8bdb2d vmwgfx: Remove the fifo debug ioctl
It was only used for bringup debugging, and probably doesn't work
anymore. Remove it.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:48:32 +01:00
Alex Deucher b06947b500 drm/radeon/kms: fix DP detect and EDID fetch for DP bridges
Sink type is always DP for DP bridges and EDID fetch on
DP bridges is always i2c over aux rather than plain i2c.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 11:46:36 +01:00
Alex Deucher d054ac16ee drm/radeon/kms: make sure pci max read request size is valid on evergreen+ (v2)
If the bios or OS sets the pci max read request size to 0 or an
invalid value (6,7), it can result in a hang or slowdown.  Check
and set it to something sane if it's invalid.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=42162

v2: use pci reg defines from include/linux/pci_regs.h

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-02 09:40:20 +01:00
Thomas Hellstrom 2de59d0161 vmwgfx: Implement GMR2
Guest Memory Regions 2 is a way to bind pages to the GPU, but using
the FIFO instead of an io-submitted descriptor chain.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:39:25 +01:00
Thomas Hellstrom dcca28627d vmwgfx: Update register definitions for HWV8 and print out new capabilities
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:38:11 +01:00
Thomas Hellstrom fb17f18993 vmwgfx: Restrict number of GMR pages to device limit
When GMR2 is available, make sure we restrict the number of used GMR pages
to the limit indicated by the device.
This is done by failing a GMRID allocation if the total number of GMR pages
exceeds the limit.
As a result TTM will then start evicting buffers in GMR memory on a
LRU basis until the allocation succeeds.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:38:07 +01:00
Thomas Hellstrom 05730b32a7 vmwgfx: Switch to VGA when we drop master and vmwgfx fbdev is not active
Previously this was not done when any 3D resource was active,
since that meant disabling the fifo with all 3D state lost.
Now, if there are still 3D resources active, we use the svga hide feature.

This fixes X server VT switching with 3D enabled.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:38:00 +01:00
Thomas Hellstrom be38ab6ea7 vmwgfx: Fix potential execbuf deadlocks
Perform all command stream validation in a bounce buffer separate from the
fifo. This makes the fifo available to all validation-generated commands,
which would otherwise attempt to grab the fifo recursively, causing a
deadlock. This is in preparation for GMR2 and swappable surfaces.

Also maintain references to all surfaces in the command stream until the
command stream has been fired in order to avoid racing with surface
destruction taking place after validation but before submission.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:37:55 +01:00
Michel Dänzer 0bef23f918 vmwgfx: Print error diagnostics if depth doesn't match the host expectation
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:37:49 +01:00
Michel Dänzer 6558429bc4 vmwgfx: Fix 'bbp' typo
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:37:40 +01:00
Michel Dänzer e666d66b42 vmwgfx: Don't write to read-only registers
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:37:37 +01:00
Michel Dänzer f01b7ba0eb vmwgfx: Add support for depth 8
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:37:27 +01:00
Thomas Hellstrom 654a4ef07a vmwgfx: Let SVGA_REG_NUM_DISPLAYS determine output connectivity
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-01 09:37:21 +01:00
Marek Olšák d3ed74027f drm/radeon/kms: add a new gem_wait ioctl with read/write flags
The new DRM_RADEON_GEM_WAIT ioctl combines GEM_WAIT_IDLE and GEM_BUSY (there
is a NO_WAIT flag to get the latter) with USAGE_READ and USAGE_WRITE flags
to take advantage of the new ttm_bo_wait changes.

Also bump the DRM version.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-31 19:25:48 +01:00
Marek Olšák dfadbbdb57 drm/ttm: add a way to bo_wait for either the last read or last write
Sometimes we want to know whether a buffer is busy and wait for it (bo_wait).
However, sometimes it would be more useful to be able to query whether
a buffer is busy and being either read or written, and wait until it's stopped
being either read or written. The point of this is to be able to avoid
unnecessary waiting, e.g. if a GPU has written something to a buffer and is now
reading that buffer, and a CPU wants to map that buffer for read, it needs to
only wait for the last write. If there were no write, there wouldn't be any
waiting needed.

This, or course, requires user space drivers to send read/write flags
with each relocation (like we have read/write domains in radeon, so we can
actually use those for something useful now).

Now how this patch works:

The read/write flags should passed to ttm_validate_buffer. TTM maintains
separate sync objects of the last read and write for each buffer, in addition
to the sync object of the last use of a buffer. ttm_bo_wait then operates
with one the sync objects.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-31 19:25:35 +01:00
Dave Airlie 9adceaa5b3 drm/radeon/kms: set a default max_pixel_clock
On some Power rv100 cards, we have no ATY OF table, but we have
no combios table either, and hence we refuse all modes on VGA-0
since we end up with a 0 max pixel clock.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: stable@kernel.org
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2011-08-31 14:06:19 +01:00
Rob Clark b464e9a25c drm/i915: use common functions for mmap offset creation
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30 11:07:00 +01:00
Rob Clark 75ef8b3b9c drm/gem: add functions for mmap offset creation
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30 11:06:06 +01:00
Alex Deucher 302a8e8b06 drm/radeon/kms: add s/r quirk for Compaq Presario V5245EU
Fixes resume on Compaq Presario V5245EU.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=41642

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30 10:55:20 +01:00
Jerome Glisse a49a50dad4 drm/radeon/kms: evergreen & ni reset SPI block on CP resume
For some reason SPI block is in broken state after module
unloading. This lead to broken rendering after reloading
module. Fix this by reseting SPI block in CP resume function

Signed-off-by: Jerome Glisse <jglisse@redhat.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-30 10:55:10 +01:00
Joonyoung Shim 6380c50921 drm: Fix the number of connector and encoder to cleanup functions
It is left out the code to decrease the number of connector and encoder
to the cleanup functions.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-29 11:47:35 +01:00
Linus Torvalds b727d20269 Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
  drm/i915: Fix wrong initializer for "locked" variable in assert_panel_unlocked
  i915: do not setup intel_backlight twice
2011-08-26 15:00:49 -07:00
Thomas Jarosch 0de3b48569 drm/i915: Fix wrong initializer for "locked" variable in assert_panel_unlocked
Otherwise it just contains random memory.

Issue detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-08-25 11:21:20 -07:00
Thomas Reim f2b60717e6 drm/radeon: Extended DDC Probing for Toshiba L300D Radeon Mobility X1100 HDMI-A Connector
Toshiba Satellite L300D with ATI Mobility Radeon X1100 sends data
   to i2c bus for a HDMI connector that is not implemented/existent
   on the notebook's board.

   Fix by applying extented DDC probing for this connector.

   Requires [PATCH] drm/radeon: Extended DDC Probing for Connectors
   with Improperly Wired DDC Lines

   Tested for kernel 2.6.38 on Toshiba Satellite L300D notebook

   BugLink: http://bugs.launchpad.net/bugs/826677

Signed-off-by: Thomas Reim <reimth@gmail.com>
Acked-by: Chris Routh <routhy@gmail.com>
Cc: <stable@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-23 13:24:55 +01:00
Ben Skeggs 8d3bb23609 drm/ttm: ensure ttm for new node is bound before calling move_notify()
This was true for new TTM_PL_SYSTEM and new TTM_PL_TT cases, but wasn't
the case on TTM_PL_SYSTEM<->TTM_PL_TT moves, which causes trouble on some
paths as nouveau's move_notify() hook requires that the dma addresses be
valid at this point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-23 09:38:30 +01:00
Ben Skeggs eac2095398 drm/ttm: unbind ttm before destroying node in accel move cleanup
Nouveau makes the assumption that if a TTM is bound there will be a mm_node
around for it and the backwards ordering here resulted in a use-after-free
on some eviction paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-23 09:35:16 +01:00
Marcin Slusarz 7c4c3960df drm/ttm: fix ttm_bo_add_ttm(user) failure path
ttm_tt_destroy kfrees passed object, so we need to nullify
a reference to it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-23 09:34:18 +01:00
Kamal Mostafa a2cc797d2d i915: do not setup intel_backlight twice
The commit "Not all systems expose a firmware or platform mechanism for
changing the backlight intensity on i915, so add native driver support"
adds calls to  intel_panel_setup_backlight() from intel_{lvds,dp}_init
so do not call it again from intel_setup_outputs().

BugLink: http://bugs.launchpad.net/bugs/831542

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
ACKed-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-08-22 14:59:35 -07:00
Michel Dänzer ba95c45a78 drm/radeon: Make vramlimit parameter actually work.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-22 09:55:19 +01:00
Michel Dänzer 4fb1a35c01 drm/radeon: Explicitly print GTT/VRAM offsets on test failure.
Otherwise these would need to be painstakingly calculated looking at the source
code.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-22 09:54:52 +01:00
Michel Dänzer 24cae9e7c9 drm/radeon: Take IH ring into account for test size calculation.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-22 09:54:12 +01:00
Jay Estabrook ffb57c4b86 drm/radeon/alpha: Add Alpha support to Radeon DRM code
Alpha needs to have available the system bus address for the Radeon's
local memory, so that it can be used in ttm_bo_vm_fault(), when building
the PTEs for accessing that VRAM.  So, we make bus.addr hold the ioremap()
return, and then we can modify bus.base appropriately for use during page
fault processing.

Signed-off-by: Jay Estabrook <jay.estabrook@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-22 09:31:08 +01:00
Linus Torvalds bed8cad959 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel:
  drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge
2011-08-19 23:07:08 -07:00