Add the ioctl IOCTL_KGSL_CFF_USER_EVENT to write data to cff dump.
Define a new CFF packet cff_op_user_event for this generic user
event.
Write the surface parameter data packet and verify mem file
packet to cff dumps
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
This field of the chip_id was forced to 0 because userspace
got confused when it was a different value. Userspace has
been corrected to deal with the correct patch ids.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
These are changes to the cffdump output format.
MEMORY_BASE reports the address range we're using at the start
of the dump, which helps the postprocessors validate memory
writes.
HANG is emitted at the start of kgsl_postmortem_dump(), and can
be used by the postprocessors to stop when the hang occurs.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
This ioctl is needed to track memory writes done from userspace
so that this data is correctly captured in the dump.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Changed variable "result" type from unsigned int to long
to accurately reflect the result of macro wait_event_interruptible_timeout
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
There may be multiple command submissions per-frame. Start your
busy count only on the first one.
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
kgsl_open does a fine job of setting the private members of
struct file so use that in the other fops functions rather then
looking up the device via the inode minor every time.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
If a major GPU fault occurs, interrupts should be turned off to
avoid a storm. Calling disable_irq from within the IRQ handler,
however has deadlock problems. Call disable_irq_nosync in an
interrupt context instead.
CRs-fixed: 299686
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We are starting to accumulate a lot GPU specific information,
and it is handy to keep it all in one place where new core IDs,
firmware and device functions can be easily added.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
The A3XX code likes to use CP_ as a prefix for ringbuffer
commands rather then the legacy PM4 prefix. Since it is more
correct, switch the A2XX code over now to make it easier to
integrate A3XX into the mix.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We cannot assume that a VMA region created as a result of an mmap
belongs exclusively to us. Allow the user to pass the size of
the vmalloc region through the 'gpuaddr' member of the ioctl
struct and do strict checking on the returned vma to make sure
it is valid.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Move some of the drawctxt functions that are common
to A2XX and A3XX back to the generic drawctxt code
and headers.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
When doing a look-up of the IB1 base address, use the pagetable
belonging to the respective process rather than the pagetable
belonging to the process in whose context the GPU hung.
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
The adreno220 specific registers and setting are all used
on adreno225. Also there is a a225 specific setting setting
for REG_SQ_FLOW_CONTROl at startup to enable the larger
instruction store found on this gpu.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
The MH block should be initialized even if the gpu mmu
is not enabled so that AXI error interrupts will still
be generated.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Add the infrastructure for specific functions based
on the type of 3D GPU core attached to the system.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
-- init rb nodes in ion_handle_create
-- in ion_handle_destroy, check that a node belongs to a tree before removing
it (safety check, does not happen right now)
-- mark as static functions used only inside ion.c
-- update comments to ion_share() with a relevant blurb from the implementation
-- other minor updates/typo fixes to comments
Signed-off-by: Iliyan Malchev <malchev@google.com>
commit 5a96a899bbdee86024ab9ea6d02b9e242faacbed upstream.
DPEncoderService newer than 1.1 can't properly program the DP (display port)
link training. When facing such version use the DIGxEncoderControl method
instead. Fix DP link training on some R7XX.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Align unfenced buffers on older hardware to the power-of-two object
size. The docs suggest that it should be possible to align only to a
power-of-two tile height, but using the already computed fence size is
easier and always correct. We also have to make sure that we unbind
misaligned buffers upon tiling changes.
In order to prevent a repetition of this bug, we change the interface
to the alignment computation routines to force the caller to provide
the requested alignment and size of the GTT binding rather than assume
the current values on the object.
Reported-and-tested-by: Sitosfe Wheeler <sitsofe@yahoo.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36326
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits
agp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M
drm/radeon/kms: fix typo in read_disabled vbios code
drm/radeon/kms: use correct BUS_CNTL reg on rs600
drm/radeon/kms: fix backend map typo on juniper
drm/radeon/kms: fix regression in hotplug