1
0
Fork 0
Commit Graph

3595 Commits (0ac74c6b3386f0413baf48f6d61850650e0dc4ab)

Author SHA1 Message Date
Chris Wilson 0ac74c6b33 drm/i915: Only emit a flush if there is an outstanding gpu write
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-06 14:36:02 +00:00
Chris Wilson 6bda10d152 drm/i915: Completely disable fence pipelining.
I'm still seeing tiling corruption of PutImage and CopyArea (I think)
under mutter on pnv, so obviously the pipelining logic is deeply flawed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 23:19:37 +00:00
Chris Wilson 0cdab21f9a drm/i915: Uncouple render/power ctx before suspending
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 23:19:37 +00:00
Chris Wilson 9b3826bf84 drm/i915: Ignore fenced commands for gpu access on gen4
Userspace should not have been declaring that it needed fenced GPU
access with gen4+ as those GPUs have no fenced commands, but to be on
the safe side it is easier to ignore userspace in case they did.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 23:18:32 +00:00
Chris Wilson e3c4e5dd5a drm/i915: caps.has_rc6 is no longer used, remove it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 23:18:31 +00:00
Chris Wilson 3c8cdf9b60 drm/i915: Power Context register is only available for gen4 mobiles
The ability to save the hardware context upon powering down the render
clock through PWRCTXA is only available on a couple of gen4 chipsets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 23:18:31 +00:00
Chris Wilson 88f23b8fa3 drm/i915: Avoid using PIPE_CONTROL on Ironlake
The workaround is hideous and we are using the STORE_DWORD on all other
generations on all other rings, so use for the gen5 render ring as
well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 23:18:14 +00:00
Chris Wilson 160b1543cd drm/i915/dp: Trivial code tidy
Locally scope the crtc to where it is used.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 14:54:05 +00:00
Chris Wilson 5aa7d52aeb Merge branch 'drm-intel-fixes' into drm-intel-next
Immediate merge for the conflicting introduction of HAS_COHERENT_RINGS.

Conflicts:
	drivers/gpu/drm/i915/i915_dma.c
	include/drm/i915_drm.h
2010-12-05 10:43:39 +00:00
Daniel Vetter bbf0c6b362 drm/i915: announce to userspace that the bsd ring is coherent
Otherwise we can't really fix the abi-braindeadness of forcing
libva to manually wait for rendering when switching rings. Which
in turn makes implementing hw semaphores a pointless exercise
(at least for ironlake).

[Also added the relaxed fencing param to explain the jump in
numbering - relaxed fencing is in -next.]

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 10:40:39 +00:00
Chris Wilson 382ab78c0e Merge branch 'drm-intel-fixes' into drm-intel-next 2010-12-05 00:37:43 +00:00
Chris Wilson f7746f0e1f drm/i915: Enable self-refresh for Ironlake
We disabled this a while ago as it was inexplicably broken. However, it
now appears to work...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:39 +00:00
Chris Wilson 1ec14ad313 drm/i915: Implement GPU semaphores for inter-ring synchronisation on SNB
The bulk of the change is to convert the growing list of rings into an
array so that the relationship between the rings and the semaphore sync
registers can be easily computed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:38 +00:00
Chris Wilson 340479aac6 drm/i915: Be paranoid and bail on resetting if we can't take the lock.
This will declare the machine wedged, but is better than truly wedging
the machine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:38 +00:00
Chris Wilson 4add75c43f drm/i915: Allow LVDS to be on pipe A for Ironlake+
Previously we enabled this for gen4, only to have to revert it due to it
causing a large number of spurious wakeups. Try again hoping that the
hardware has become more sane in the mean time...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:37 +00:00
Chris Wilson f684f5b48c drm/i915: Re-enable RC6 for power-savings.
Let's see if we've successfully cleared up all the bugs from last
time...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:37 +00:00
Chris Wilson c1858123db drm/i915: Enable CB tuning of the Display PLL
Magic numbers from the specs. This is supposed to allow the PLL some
variance to improve jitter performance and VCO headroom across
manufacturing and environmental variations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:36 +00:00
Chris Wilson a589b9f429 drm/i915: Explain why we need to write DPLL twice
... it's because setting the Pixel Multiply bits only takes effect once
the PLL is enabled and stable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:35 +00:00
Chris Wilson 17fe698110 drm/i915/lvds: Connect the PWM to the LVDS pipe
... and do not just assume to always use pipe B.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-05 00:37:35 +00:00
Chris Wilson 49078f7d10 drm/i915: Factor in pixel-repeat in FDI M/N calculation
Fixes the modesetting on the secondary panel of the Libretto W100 and
presumably many more Ironlake laptops with SDVO LVDS displays.

Reported-and-tested-by: Matthew Willoughby <mattfredwill@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
2010-12-04 13:41:04 +00:00
Chris Wilson 22ed1113a9 drm/i915: Death to the unnecessary 64bit divide
Use the hardware DDA to calculate the ratio with as much accuracy as is
possible.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
2010-12-03 23:51:02 +00:00
Chris Wilson 47f1c6c9ff drm/i915: Clean conflicting modesetting registers upon init
If we leave the registers in a conflicting state then when we attempt
to teardown the active mode, we will not disable the pipes and planes
in the correct order -- leaving a plane reading from a disabled pipe and
possibly leading to undefined behaviour.

Reported-and-tested-by: Andy Whitcroft <apw@canonical.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32078
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
2010-12-03 17:50:55 +00:00
Chris Wilson b9e68670cc Merge branch 'drm-intel-fixes' into drm-intel-next
Conflicts:
	drivers/gpu/drm/i915/intel_drv.h
2010-12-02 23:50:36 +00:00
Eric Anholt 5bddd17fec drm/i915: Apply a workaround for transitioning from DP on pipe B to HDMI.
This workaround only applies to Ironlake.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
2010-12-02 22:31:30 +00:00
Eric Anholt 220cad3cbf drm/i915: Always set the DP transcoder config to 8BPC.
The pipe is always set to 8BPC, but here we were leaving whatever
previous bits were set by the BIOS in place.

Signed-off-by: Eric Anholt <eric@anholt.net>
Tested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
2010-12-02 22:31:20 +00:00
Chris Wilson 60de2ba51e drm/i915: Kill the get_fence tracepoint
As the tracepoint is now decoupled from when the actual register is
assigned and was never complemented by detailing when the object lost
its fence, it has outlived its limited usefulness. Profiling the actual
stalls is a far more profitable venture anyway.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-02 10:20:47 +00:00
Chris Wilson c6748e09ee drm/i915: Remove inactive LRU tracking from set_domain_ioctl
As the userspace mappings are torn down on every GPU write, we prefer to
track when the buffer is activated (via a fresh i915_gem_fault). This
makes the LRU conceptually simpler. With coherent mappings, the
remaining use-case for set_domain_ioctl is GPU synchronisation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-02 10:16:30 +00:00
Chris Wilson d9e86c0ee6 drm/i915: Pipelined fencing [infrastructure]
With this change, every batchbuffer can use all available fences (save
pinned and scanout, of course) without ever stalling the gpu!

In theory. Currently the actual pipelined update of the register is
disabled due to some stability issues. However, just the deferred update
is a significant win.

Based on a series of patches by Daniel Vetter.

The premise is that before every access to a buffer through the GTT we
have to declare whether we need a register or not. If the access is by
the GPU, a pipelined update to the register is made via the ringbuffer,
and we track the last seqno of the batches that access it. If by the
CPU we wait for the last GPU access and update the register (either
to clear or to set it for the current buffer).

One advantage of being able to pipeline changes is that we can defer the
actual updating of the fence register until we first need to access the
object through the GTT, i.e. we can eliminate the stall on set_tiling.
This is important as the userspace bo cache does not track the tiling
status of active buffers which generate frequent stalls on gen3 when
enabling tiling for an already bound buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-12-02 10:07:05 +00:00
Chris Wilson 87ca9c8a7e drm/i915: Prevent stalling for a GTT read back from a read-only GPU target
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-02 10:00:15 +00:00
Chris Wilson 257e48f147 drm/i915/lvds: Disable panel-fitter on gen4 for 1:1 scale factors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-01 10:26:35 +00:00
Alex Deucher 3074adc8b6 drm/radeon/kms: add workaround for dce3 ddc line vbios bug
fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=23752

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc:stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-01 12:13:37 +10:00
Alex Deucher c49948f4bd drm/radeon/kms: fix interlaced and doublescan handling
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-01 12:13:23 +10:00
Alex Deucher 0ec80d6456 drm/radeon/kms: fix typos in disabled vbios code
6xx/7xx was hitting the wrong BUS_CNTL reg and bits.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-01 12:13:10 +10:00
Dave Airlie 150f8815bb Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixes
* 'intel/drm-intel-fixes' of /ssd/git/drm-next:
  Revert "drm/i915/dp: use VBT provided eDP params if available"
  drm/i915: Clear pfit registers when not used by any outputs
  drm/i915: fix regression due to ba3d8d749b
2010-12-01 12:10:34 +10:00
Chris Wilson c4e7a41467 drm/i915/ringbuffer: Handle cliprects in the caller
This makes the various rings more consistent by removing the anomalous
handing of the rendering ring execbuffer dispatch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-30 14:17:51 +00:00
Chris Wilson 70eac33e7a drm/i915: Move instruction state invalidation from execbuffer to flush
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-30 14:08:43 +00:00
Chris Wilson 3cf2efb1a7 Revert "drm/i915/dp: use VBT provided eDP params if available"
This reverts commit 869184a675.

This is required for the Sony Vaio Jesse was working on at the time, but
breaks most other eDP machines - machines that were working in earlier
kernels.

Reported-and-tested-by: Dave Airlie <airlied@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31188
Tested-by: Zhao Jian <jian.j.zhao@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-30 08:52:20 +00:00
Chris Wilson c5d1b51d35 drm/i915: Clear pfit registers when not used by any outputs
... otherwise the panel-fitter may be left enabled with random settings
and cause unintended filtering (i.e. blurring of native modes on external
panels).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31942
Reported-and-tested-by: Ben Kohler <bkohler@gmail.com>
Tested-by: Ciprian Docan <docan@eden.rutgers.edu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-29 18:45:01 +00:00
Keith Packard c5027dec02 drm: record monitor status in output_poll_execute
In order to correctly report monitor connected status changes, the
previous monitor status must be recorded in the connector->status
value instead of being discarded.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-29 16:27:57 +10:00
Keith Packard bf9dc102e2 drm: Set connector DPMS status to ON in drm_crtc_helper_set_config
When setting a new crtc configuration, force the DPMS state of all
connectors to ON. Otherwise, they'll be left at OFF and a future mode set
that disables the specified connector will not turn the connector off.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-29 16:27:56 +10:00
Chris Wilson 7d2cb39c33 drm/i915: Release fenced GTT mapping on suspend
... so that upon first use after resume we will reacquire the fence reg.

Reported-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-28 16:12:15 +00:00
Chris Wilson 3619df035e Merge branch 'drm-intel-fixes' into drm-intel-next
Conflicts:
	drivers/gpu/drm/i915/i915_gem.c
2010-11-28 15:37:17 +00:00
Chris Wilson 602606a472 drm/i915/execbuffer: On error, starting unwinding from the previous object
As the error occurred on the current object, it means that its state was
not changed and so it should be excluded from the unwind.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-28 15:31:02 +00:00
Daniel Vetter de18a29e0f drm/i915: fix regression due to ba3d8d749b
We don't track gpu flush request in any special way. So even with
obj->write_domain == 0, a gpu flush might be outstanding but no
yet executed. Even worse, the latest request might use the object
only for reading. So and unconditional call to object_wait_rendering
is needed for !pipelined.

Hence revert that patch fully and untangle the flushing from the
synchronization again.

Reported-by: Keith Packard <keithp@keithp.com>
Tested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-28 09:05:12 +00:00
Dave Airlie e536fb6f9d Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixes
* 'intel/drm-intel-fixes' of /ssd/git/drm-next:
  drm/i915/sdvo: Always add a 30ms delay to make SDVO TV detection reliable
  MAINTAINERS: INTEL DRM DRIVERS list (intel-gfx) is subscribers-only
  drm/i915/sdvo: Always fallback to querying the shared DDC line
  drm/i915: Handle pagefaults in execbuffer user relocations
  drm/i915/sdvo: Only enable HDMI encodings only if the commandset is supported
  drm/i915: Only save/restore cursor regs if !KMS
  drm/i915: Prevent integer overflow when validating the execbuffer
2010-11-26 10:45:03 +10:00
Alex Deucher a235e4c930 Revert "drm/radeon/kms: fix typo in r600 cs checker"
This reverts commit d33ef52d9d.

This change seems to expose a bug in the 3D driver tiggered by
certain apps, so revert it to keep userspace working.

Reported-by: Rafael J. Wysocki <rjw@sisk.pl>

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-26 10:41:42 +10:00
Chris Wilson 432e58edc9 drm/i915: Avoid allocation for execbuffer object list
Besides the minimal improvement in reducing the execbuffer overhead, the
real benefit is clarifying a few routines.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-25 21:19:26 +00:00
Chris Wilson 54cf91dc4e drm/i915: Split i915_gem_execbuffer into its own file.
A number of dragons have been seen lurking within the execbuffer code.
The first step is then to isolate them from the rest and begin to
scrutinise them in depth. Suggested by Daniel Vetter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-25 21:19:25 +00:00
Chris Wilson 6299f992c0 drm/i915: Defer accounting until read from debugfs
Simply remove our accounting of objects inside the aperture, keeping
only track of what is in the aperture and its current usage. This
removes the over-complication of BUGs that were attempting to keep the
accounting correct and also removes the overhead of the accounting on
the hot-paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-25 15:04:53 +00:00
Chris Wilson 2021746e1d drm/i915: Mark a few functions as __must_check
... to benefit from the compiler checking that we remember to handle
and propagate errors.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-25 15:04:04 +00:00