aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915
AgeCommit message (Collapse)AuthorFilesLines
2011-02-16drm/i915: Move the lvds OpRegion lid detection code to panel and reuse for eDPChris Wilson4-9/+25
Share the lid detection code for the all panels for consistent behaviour and a single place to add the eventual quirks for crap hardware. Signed-off-by: Chris Wilson <[email protected]>
2011-02-16drm/i915: don't enable FDI & transcoder interrupts after allJesse Barnes1-3/+3
We can enable some safely, but FDI and transcoder interrupts can occur and block other interrupts from being detected (like port hotplug events). So keep them disabled by default (they can be re-enabled for debugging display bringup, but should generally be off). Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-16drm/i915: Ignore a hung GPU when flushing the framebuffer prior to a switchChris Wilson1-5/+5
If the gpu is hung, then whatever was inside the render cache is lost and there is little point waiting for it. Or complaining if we see an EIO or EAGAIN instead. So, if the GPU is indeed in its death throes when we need to rewrite the registers for a new framebuffer, just ignore the error and proceed with the update. Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915: disable PCH ports if needed when disabling a CRTCJesse Barnes2-25/+74
Disable any PCH ports associated with a pipe when disabling it. This should prevent transcoder disable failures due to ports still being on. Signed-off-by: Jesse Barnes <[email protected]> [ickle: introduce *_PIPE_ENABLED() macro] Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915: i915_mutex_interruptible() returns -EINTRChris Wilson1-0/+1
... so we handle that for i915_gem_fault() in the same manner as ERESTARTSYS, or we send a SIGBUS to the faulting application. Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915: Fix resume regression from 5d1d0ccChris Wilson1-2/+1
The irony of the patch to fix the resume regression on PineView causing a further regression on Ironlake is not lost on me. Reported-by: Jeff Chua <[email protected]> Reported-by: Björn Schließmann <[email protected]> Tested-by: Björn Schließmann <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28802 Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915/tv: Use polling rather than interrupt-based hotplugChris Wilson1-13/+30
The documentation recommends that we should use a polling method for TV detection as this is more power efficient than the interrupt based mechanism (as the encoder can be completely switched off). A secondary effect is that leaving the hotplug enabled seems to be causing pipe underruns as reported by Hugh Dickins on his Crestline. Tested-by: Hugh Dickins <[email protected]> Signed-off-by: Chris Wilson <[email protected]> [This is a candidate for stable, but needs minor porting to 2.6.37]
2011-02-11drm/i915: Trigger modesetting if force-audio changesChris Wilson3-18/+91
If the user changes the force-audio property and it no longer reflects the current configuration, then we need to trigger a mode set in order to update the registers. Signed-off-by: Chris Wilson <[email protected]>
2011-02-09drm/i915/sdvo: If we have an EDID confirm it matches the mode of the connectionChris Wilson1-5/+27
If we have an EDID for a digital panel, but we are probing a non-TMDS connector then we know that this is a false detection, and vice versa. This should reduce the number of bogus outputs on multi-function adapters that report the same output on multiple connectors. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34101 Reported-by: Sebastien Caty <[email protected]> Tested-by: Sebastien Caty <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2011-02-09drm/i915: Disable RC6 on IronlakeChris Wilson4-44/+55
The automatic powersaving feature is once again causing havoc, with 100% reliable hangs on boot and resume on affected machines. Reported-by: Francesco Allertsen <[email protected]> Reported-by: Gui Rui <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28582 Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: cleanup per-pipe reg usageJesse Barnes13-647/+640
We had some conversions over to the _PIPE macros, but didn't get everything. So hide the per-pipe regs with an _ (still used in a few places for legacy) and add a few _PIPE based macros, then make sure everyone uses them. [update: remove usage of non-existent no-op macro] [update 2: keep modesetting suspend/resume code, update to new reg names] Signed-off-by: Jesse Barnes <[email protected]> [ickle: stylistic cleanups for checkpatch and taste] Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Skip the no-op domain changes when already in CPU|GTT domainsChris Wilson1-0/+6
Removes some superfluous fluff from tracing... Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Refine tracepointsChris Wilson11-359/+330
A lot of minor tweaks to fix the tracepoints, improve the outputting for ftrace, and to generally make the tracepoints useful again. It is a start and enough to begin identifying performance issues and gaps in our coverage. Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Fix infinite loop regression from 21dd3734Chris Wilson1-5/+25
By returning EAGAIN upon a wedged GPU before attempting to wait, we would hit an infinite loop of repeating operation without ever progressing. Instead this needs to be EIO so that userspace knows that the GPU is truly wedged and not in the process of error recovery. Similarly, we need to handle the error recovery during i915_gem_fault. Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: the PCH reference clocks are global, so don't clobber unconditionallyJesse Barnes1-46/+77
The PCH can drive several reference clocks simultaneously, and needs to with multiple display configurations. So we can't just clobber the existing state everytime we set a mode, we need to take into account what the other CRTCs are doing at the time. Doing so fixes an issue where you'd lose the LVDS display at boot if you had an LVDS+DP config. [updated: init bools and check CRTC status correctly] Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: add port assertion check when disabling transcodersJesse Barnes1-0/+59
When a transcoder is disabled, any ports pointing at it should also be disabled. If they're not, we may fail to disable the transcoder, leading to blank displays. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: don't check plane vs pipe enable on ILK+Jesse Barnes1-0/+4
These bits have a different meaning on ILK+, where planes are hardwired to pipes. Fixing this avoid some spurious assertion failures. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Set the transcoder port to none when disabling DP.Eric Anholt2-0/+2
The specs say to do so. Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Use DEBUG_KMS for the self-refresh watermarksChris Wilson1-5/+6
For consistency and segregation from the noisy DRM_DEBUG(). Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Include 'i915_error_state' hint for when the GPU catches fireChris Wilson1-1/+2
Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm: rework PCI/platform driver interface.Dave Airlie1-10/+10
This abstracts the pci/platform interface out a step further, we can go further but this is far enough for now to allow USB to be plugged in. The drivers now just call the init code directly for their device type. Signed-off-by: Dave Airlie <[email protected]>
2011-02-07drm: dumb scanout create/mmap for intel/radeon (v3)Dave Airlie3-30/+83
This is just an idea that might or might not be a good idea, it basically adds two ioctls to create a dumb and map a dumb buffer suitable for scanout. The handle can be passed to the KMS ioctls to create a framebuffer. It looks to me like it would be useful in the following cases: a) in development drivers - we can always provide a shadowfb fallback. b) libkms users - we can clean up libkms a lot and avoid linking to libdrm_*. c) plymouth via libkms is a lot easier. Userspace bits would be just calls + mmaps. We could probably mark these handles somehow as not being suitable for acceleartion so as top stop people who are dumber than dumb. Signed-off-by: Dave Airlie <[email protected]>
2011-02-06drm/i915/lvds: Restore dithering on native modes for gen2/3Chris Wilson1-6/+6
A regression introduced in bee17e5 cleared the dithering bit for native modes on gen2/3. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/711568 Signed-off-by: Chris Wilson <[email protected]>
2011-02-02drm/i915: Invalidate TLB caches on SNB BLT/BSD ringsChris Wilson2-11/+19
Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2011-02-01drm/i915: Only bind to function 0 of the PCI deviceChris Wilson1-0/+8
Early chipsets (gen2/3) used function 1 as a placeholder for multi-head. We used to ignore these since they were not assigned to PCI_CLASS_DISPLAY_VGA. However with 934f992c7 we attempt to bind to all Intel PCI_CLASS_DISPLAY devices (and functions) to work in multi-gpu systems. This fails hard on gen2/3. Reported-by: Ferenc Wágner <[email protected]> Tested-by: Ferenc Wágner <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28012 Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2011-02-01drm/i915: Enable GMBUS for post-gen2 chipsetsChris Wilson1-1/+2
With the recent SDVO fix, this is working on all the machines I have to hand - except for an 845G. Signed-off-by: Chris Wilson <[email protected]>
2011-02-01Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson5-30/+53
Merge resume fixes from -fixes and an important fix for SDVO GMBUS.
2011-02-01drm/i915: Remove unreachable conditionChris Wilson1-2/+1
Fortunately unreachable. For Crestline, the watermarks must always be programmed to 8... Signed-off-by: Chris Wilson <[email protected]>
2011-02-01drm/i915: Override SDVO panel type in VBTChris Wilson3-8/+18
Judging by comments in the BIOS, if the SDVO LVDS option h40 is enabled, then we are supposed to query the real panel type via Int15. We don't do this and so for the Sony Vaio VGC-JS210J which has otherwise default values, we choose the wrong mode. This patch adds a driver option, i915.vbt_sdvo_panel_type, which can be used to override the value in the VBT. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33691 Signed-off-by: Chris Wilson <[email protected]>
2011-02-01drm/i915: Trivial spelling mistake 'assertiing'Chris Wilson1-2/+2
Signed-off-by: Chris Wilson <[email protected]>
2011-01-31drm/i915: Suppress spurious vblank interruptsChris Wilson1-4/+4
Hugh Dickins found that characters in xterm were going missing and oft delayed. Being the curious type, he managed to associate this with the new high-precision vblank patches; disabling these he found, restored the orderliness of his characters. The oddness begins when one realised that Hugh was not using vblanks at all on his system (fvwm and some xterms). Instead, all he had to go on were warning of a pipe underrun, curiously enough at around 60Hz. He poked and found that in addition to the underrun warning, the hardware was flagging the start of a new frame, a vblank, which in turn was kicking off the pending vblank processing code. There is little we can do for the underruns on Hugh's machine, a Crestline [965GM], which must have its FIFO watermarks set to 8. However, we do not need to process the vblank if we know that they are disabled... Reported-by: Hugh Dickins <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-28drm/i915: Record all error ringbuffersChris Wilson3-18/+29
Signed-off-by: Chris Wilson <[email protected]>
2011-01-27drm/i915: Defer reporting EIO until we try to use the GPUChris Wilson4-28/+18
Instead of reporting EIO upfront in the entrance of an ioctl that may or may not attempt to use the GPU, defer the actual detection of an invalid ioctl to when we issue a GPU instruction. This allows us to continue to use bo in video memory (via pread/pwrite and mmap) after the GPU has hung. Signed-off-by: Chris Wilson <[email protected]>
2011-01-27drm/i915: Check wedged status before throttlingChris Wilson1-0/+3
Signed-off-by: Chris Wilson <[email protected]>
2011-01-26drm/i915/sdvo: Add BUILD_BUG_ON to warn if the structs are ever miscompiledChris Wilson1-0/+9
Signed-off-by: Chris Wilson <[email protected]>
2011-01-26drm/i915/sdvo: Use a compact test for determining a multi-function deviceChris Wilson1-27/+3
Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: Reset crtc after resumeChris Wilson1-3/+14
Based on a patch by Takashi Iwai. Reported-by: Matthias Hopf <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27272 Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915/crt: Force the initial probe after resetChris Wilson1-0/+10
Upon resume, like after a cold boot, we need to forcibly probe the analog connector and cannot rely on the hotplug status. Based on a patch by Takashi Iwai. Reported-by: Stefan Dirsch <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=26952 Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: Reset state after a GPU reset or resumeChris Wilson1-0/+2
Call drm_mode_config_reset() after an invalidation event to restore any cached state to unknown. Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915/sdvo: If at first we don't succeed in reading the response, waitChris Wilson1-23/+23
We were not pausing after detecting the response was pending and so did not allow the hardware sufficient time to complete before aborting. This lead to transient failures whilst probing SDVO devices. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30235 Reported-by: Knut Petersen <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: use VDD AUX override to make panel power sequencing look betterJesse Barnes2-7/+59
Rather than power cycling the panel when there are no bits to display, use the VDD AUX bit to power the panel up just enough for DP AUX transactions to work. This prevents a bit of unnecessary ugliness as mode sets occur on the panel. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: remove now unnecessary delays in eDP panel power sequencingJesse Barnes1-10/+0
Now that we're doing the right thing elsewhere, these are no longer necessary. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31114 Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: Refactor self-refresh watermark calculationsChris Wilson2-191/+200
Move the plane->mode config to the point of use rather than repeatedly querying the same information. Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: Silence a few -Wunused-but-set-variableChris Wilson3-5/+5
Signed-off-by: Chris Wilson <[email protected]>
2011-01-24Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson10-55/+134
Merge important suspend and resume regression fixes and resolve the small conflict. Conflicts: drivers/gpu/drm/i915/i915_dma.c
2011-01-24drm/i915: Prevent uninitialised reads during error state captureChris Wilson1-0/+2
error_bo and pinned_bo could be used uninitialised if there were no active buffers. Caught by kmemcheck. Signed-off-by: Chris Wilson <[email protected]>
2011-01-24drm/i915: Use consistent mappings for OpRegion between ACPI and i915Michael Karcher1-1/+2
The opregion is a shared memory region between ACPI and the graphics driver. As the ACPI mapping has been changed to cachable in commit 6d5bbf00d251cc73223a71422d69e069dc2e0b8d, mapping the intel opregion non-cachable now fails. As no bus-master hardware is involved in the opregion, cachable map should do no harm. Tested on a Fujitsu Lifebook P8010. Signed-off-by: Michael Karcher <[email protected]> [ickle: convert to acpi_os_ioremap for consistency] Signed-off-by: Chris Wilson <[email protected]>
2011-01-24drm/i915: Handle the no-interrupts case for UMS by pollingChris Wilson1-2/+2
If the driver calls into the kernel to wait for a breadcrumb to pass, but hasn't enabled interrupts, fallback to polling the breadcrumb value. Reported-by: Chris Clayton <[email protected]> Tested-by: Chris Clayton <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-24drm/i915: Disable high-precision vblank timestamping for UMSChris Wilson1-0/+3
We only have sufficient information for accurate (sub-frame) timestamping when the modesetting is under our control. Reported-by: Chris Clayton <[email protected]> Tested-by: Chris Clayton <[email protected]> Reviewed-by: Mario Kleiner <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-24drm/i915: Increase the amount of defense before computing vblank timestampsChris Wilson1-7/+18
Reported-by: Chris Clayton <[email protected]> Tested-by: Chris Clayton <[email protected]> Signed-off-by: Chris Wilson <[email protected]>