1
0
Fork 0
Commit Graph

520807 Commits (8ccd0d0ca04147e91890c373677f1e741dda2631)

Author SHA1 Message Date
Dave Airlie dc9be8e217 Merge branch 'drm-next-4.2-amdgpu' of git://people.freedesktop.org/~agd5f/linux into drm-next
More fixes for amdgpu for 4.2.  We've integrated Jerome's comments
about the interface among other things.  I'll be on vacation next week
so Christian will be handling any updates next week.

* 'drm-next-4.2-amdgpu' of git://people.freedesktop.org/~agd5f/linux: (23 commits)
  drm/amdgpu: fix a amdgpu_dpm=0 bug
  drm/amdgpu: don't enable/disable display twice on suspend/resume
  drm/amdgpu: fix UVD/VCE VM emulation
  drm/amdgpu: enable vce powergating
  drm/amdgpu/iceland: don't call smu_init on resume
  drm/amdgpu/tonga: don't call smu_init on resume
  drm/amdgpu/cz: don't call smu_init on resume
  drm/amdgpu: update to latest gfx8 golden register settings
  drm/amdgpu: whitespace cleanup in gmc8 golden regs
  drm/admgpu: move XDMA golden registers to dce code
  drm/amdgpu: fix the build on big endian
  drm/amdgpu: cleanup UAPI comments
  drm/amdgpu: remove AMDGPU_CTX_OP_STATE_RUNNING
  drm/amdgpu: remove the VI hardware semaphore in ring sync
  drm/amdgpu: set the gfx config properly for all CZ variants (v2)
  drm/amdgpu: also print the pci revision when printing the pci ids
  drm/amdgpu: cleanup VA IOCTL
  drm/amdgpu: fix saddr handling in amdgpu_vm_bo_unmap
  drm/amdgpu: fix amdgpu_vm_bo_map
  drm/amdgpu: remove unused AMDGPU_IB_FLAG_GDS
  ...
2015-06-11 13:04:07 +10:00
Sonny Jiang 6d8db6ce23 drm/amdgpu: fix a amdgpu_dpm=0 bug
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 15:05:33 -04:00
Alex Deucher 633ed3df9a drm/amdgpu: don't enable/disable display twice on suspend/resume
We were doing it in the common code and in the IP specific code.
Remove the IP specific code.  The common code handles the
ordering properly.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 14:16:48 -04:00
Christian König 4802ce1177 drm/amdgpu: fix UVD/VCE VM emulation
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 14:16:48 -04:00
Sonny Jiang b7a0776949 drm/amdgpu: enable vce powergating
Enable VCE dpm and powergating. VCE dpm dynamically scales the VCE clocks on
demand.

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-10 11:54:16 -04:00
Alex Deucher b97aab014c drm/amdgpu/iceland: don't call smu_init on resume
smu_init allocates buffers and initializes them.  It does not
touch the hw.  There is no need to do it again on resume.  It
should really be part of sw_init (and smu_fini should be part
of sw_fini), but we need the firmware sizes from the other IPs
for firmware loading so we have to wait until sw init is done
for all other IPs.

Reviewed-by: Sonny Jiang <Sonny.Jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:32:25 -04:00
Alex Deucher aaf4ee3c02 drm/amdgpu/tonga: don't call smu_init on resume
smu_init allocates buffers and initializes them.  It does not
touch the hw.  There is no need to do it again on resume.  It
should really be part of sw_init (and smu_fini should be part
of sw_fini), but we need the firmware sizes from the other IPs
for firmware loading so we have to wait until sw init is done
for all other IPs.

Reviewed-by: Sonny Jiang <Sonny.Jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:32:19 -04:00
Alex Deucher 05188312e2 drm/amdgpu/cz: don't call smu_init on resume
smu_init allocates buffers and initializes them.  It does not
touch the hw.  There is no need to do it again on resume.  It
should really be part of sw_init (and smu_fini should be part
of sw_fini), but we need the firmware sizes from the other IPs
for firmware loading so we have to wait until sw init is done
for all other IPs.

Reviewed-by: Sonny Jiang <Sonny.Jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:31:26 -04:00
Alex Deucher 6a00a09e49 drm/amdgpu: update to latest gfx8 golden register settings
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:13:35 -04:00
Alex Deucher c61bf64927 drm/amdgpu: whitespace cleanup in gmc8 golden regs
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:13:28 -04:00
Alex Deucher 5732a94f18 drm/admgpu: move XDMA golden registers to dce code
Already moved other display registers.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:13:21 -04:00
Alex Deucher 454fc95e84 drm/amdgpu: fix the build on big endian
Some leftover copy and pastes from radeon that never
got updated.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:13:01 -04:00
Christian König 675da0ddd6 drm/amdgpu: cleanup UAPI comments
No functional change.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:06:46 -04:00
Christian König 692a59e696 drm/amdgpu: remove AMDGPU_CTX_OP_STATE_RUNNING
Not used.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-10 09:06:46 -04:00
David Zhang 147dbfbc54 drm/amdgpu: remove the VI hardware semaphore in ring sync
Signed-off-by: David Zhang <david1.zhang@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-10 09:06:45 -04:00
Alex Deucher bd5c97bc1a drm/amdgpu: set the gfx config properly for all CZ variants (v2)
Need to adjust the number of CUs and RBs.

v2: get proper values

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-08 21:42:54 -04:00
Alex Deucher 3e39ab9083 drm/amdgpu: also print the pci revision when printing the pci ids
The driver makes use of this information so print if to aid in
debugging.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-08 21:42:53 -04:00
Christian König 34b5f6a6d6 drm/amdgpu: cleanup VA IOCTL
Remove the unnecessary returned status and make the IOCTL write only.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-08 21:42:53 -04:00
Christian König 6c7fc503a4 drm/amdgpu: fix saddr handling in amdgpu_vm_bo_unmap
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-08 21:42:52 -04:00
Christian König 7e9fca0baa drm/amdgpu: fix amdgpu_vm_bo_map
We need to reset the bo_va address, otherwise new mappings
wouldn't be updated in the page table.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-08 21:42:51 -04:00
Vincent Abriou c58d6d1b66 drm/sti: vtg fix CEA-861E video format timing error
HDMI analyzer tests showed that Vsync and Hsync signal were not
compliant with the HDMI protocol.

HDMI_DELAY should be taken into account in the VTG Vsync
programming to reflect the 6 pixels shift introduced in the VTG
Hsync programming.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2015-06-08 15:28:28 +02:00
Vincent Abriou 8661532a6c drm/sti: hdmi fix CEA-861E video format timing error
HDMI analyzer tests showed that Vsync and Hsync signal were not
compliant with the HDMI protocol.

The first active pixel of a line is defined by HDMI_ACTIVE_VID_XMIN.
The last active pixel of a line is defined by HDMI_ACTIVE_VID_XMAX.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2015-06-08 15:28:26 +02:00
Vincent Abriou 8b0a99ce9a drm/sti: VTG interrupt names are badly displayed
VTG interrupt names are badly displayed using "cat /proc/interrupts".
Simply use the VTG device name while registering the VTG interrupts
to fix it.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2015-06-08 15:28:23 +02:00
Vincent Abriou 8eba270311 drm/sti: missing first pixel column on HDMI display
VTG programing updated to fix the shift of one column observed
on HDMI display.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2015-06-08 15:28:20 +02:00
Wei Yongjun d3c8a0b2be drm/sti: correctly test devm_ioremap() return
In case of error, the function devm_ioremap_nocache() returns NULL
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
2015-06-08 15:28:10 +02:00
Oded Gabbay da73b9fb56 drm/amdkfd: remove not used defines from cik_regs.h
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06 22:26:47 +03:00
Oded Gabbay eaccd6e743 drm/amdkfd: Add missing properties to CZ device info
This patch adds two missing properties initializations to the device
info structure of CZ.

As we don't have CZ support yet, it isn't critical, but its important to
fix this now instead of forgetting about it later.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06 22:26:47 +03:00
Ben Goz a82918f18a drm/amdkfd: make reset wavefronts per process per device
This commit moves the reset wavefront flag to per process per device
data structure, so we can support multiple devices.

Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06 22:26:39 +03:00
Oded Gabbay 6235e15ea6 drm/amdkfd: add debug print to kfd_events.c
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06 21:09:51 +03:00
Valentin Rothberg f4e04022ed drm/amdkfd: avoid CONFIG_ prefix for non-Kconfig symbols
The CONFIG_ prefix is reserved for Kconfig options in Make and CPP
syntax.  Various static analysis tools rely on this naming convention
and check if CONFIG_ prefixed symbols are defined Kconfig.  Hence add
yet another prefix AMD_ to CONFIG_REG_{BASE,END,SISE} to apply to this
convention and make static analysis tools happy.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-06-06 20:48:34 +03:00
Jammy Zhou cab6d57c09 drm/amdgpu: remove unused AMDGPU_IB_FLAG_GDS
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-05 11:02:07 -04:00
Chunming Zhou 890ee23fc6 drm/amdgpu: disable user fence interrupt (v2)
amdgpu submits both kernel and user fences, but just need one interrupt,
disable user fence interrupt and don't effect user fence.

v2: fix merge error

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-05 11:02:06 -04:00
Christian König 9298e52f8b drm/amdgpu: fix user ptr race condition
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: monk liu <monk.liu@amd.com>
2015-06-05 10:59:32 -04:00
Jack Xiao 25f45e6338 drm/amdgpu: add zero timeout check in amdgpu_fence_wait_seq_timeout
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-06-05 10:59:25 -04:00
Thierry Reding 6343f22f82 drm/panel: ld9040: Remove useless padding
There's some useless padding in the struct spi_driver definition. Remove
it since it serves no useful purpose.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-06-05 13:50:20 +02:00
Thierry Reding 1a8f9056f5 drm/panel: Constify OF match tables
Both the Samsung LD9040 and Samsung S6E8AA0 panel drivers are missing
a const qualifier for their OF match tables. This data is static and
never changes, so can be read-only.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-06-05 13:49:38 +02:00
Thierry Reding f3f375cd4e drm/bridge: Remove stale ptn3460.h include
This header file declares prototypes of functions that are no longer
used. Remove this file and all references to it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-06-05 13:49:37 +02:00
Geert Uytterhoeven dcd43d6483 drm/bridge: ps8622: Include linux/gpio/consumer.h
If GPIOLIB=n and asm-generic/gpio.h is not used:

    drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_pre_enable’:
    drivers/gpu/drm/bridge/ps8622.c:368: error: implicit declaration of function ‘gpiod_set_value’
    drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_probe’:
    drivers/gpu/drm/bridge/ps8622.c:584: error: implicit declaration of function ‘devm_gpiod_get’
    drivers/gpu/drm/bridge/ps8622.c:584: warning: assignment makes pointer from integer without a cast
    drivers/gpu/drm/bridge/ps8622.c:590: error: implicit declaration of function ‘gpiod_direction_output’
    drivers/gpu/drm/bridge/ps8622.c:596: warning: assignment makes pointer from integer without a cast

Add the missing #include <linux/gpio/consumer.h> to fix this.

Fixes: f1336e6afb ("drm/bridge: Add I2C based driver for ps8622/ps8625 bridge")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-06-05 13:46:20 +02:00
Geert Uytterhoeven dad3c35034 drm/bridge: ptn3460: Include linux/gpio/consumer.h
If GPIOLIB=n and asm-generic/gpio.h is not used:

    drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’:
    drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’
    drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’:
    drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’
    drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast
    drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’
    drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast

Add the missing #include <linux/gpio/consumer.h> to fix this.

Fixes: af478d8823 ("drm/bridge: ptn3460: use gpiod interface")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-06-05 13:46:18 +02:00
Doug Anderson 6c7e66e617 drm/bridge: dw-hdmi: Return number of EDID modes
The dw_hdmi_connector_get_modes() function accidentally forgets to
return the number of modes it added, although it has this information
stored in a local variable.  Let's fix that.

Without this fix, drm_helper_probe_single_connector_modes_merge_bits()
could get confused and always call drm_add_modes_noedid().  That's not
right.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-06-05 13:46:12 +02:00
Rodrigo Vivi bf546f8158 drm/i915/skl: Fix DMC API version in firmware file name
04 is the minor version. API version is ver1.
So let's follow same scheme used on published version at 01.org.

If really needed the minor version a follow-up updated will be
done. But for now we need to move fwd and unblock end users.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-06-05 12:08:01 +03:00
Dave Airlie ae45577324 virtgpu: include linux/types.h to avoid warning.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 12:31:12 +10:00
Dave Airlie a93fe8f8b4 Merge branch 'drm-next-4.2-amdgpu' of git://people.freedesktop.org/~agd5f/linux into drm-next
This is the big pull request for amdgpu, the new driver for VI+ AMD
asics.  I currently supports Tonga, Iceland, and Carrizo and also
contains a Kconfig option to build support for CI parts for testing.

All major functionality is supported (displays, gfx, compute, dma,
video decode/encode, etc.).  Power management is working on Carrizo,
but is still being worked on for Tonga and Iceland.

* 'drm-next-4.2-amdgpu' of git://people.freedesktop.org/~agd5f/linux: (106 commits)
  drm/amdgpu: only support IBs in the buffer list (v2)
  drm/amdgpu: add vram_type and vram_bit_width for interface query (v2)
  drm/amdgpu: add ib_size/start_alignment interface query
  drm/amdgpu: add me/ce/pfp_feature_version interface query
  drm/amdgpu add ce_ram_size for interface query
  drm/amdgpu add max_memory_clock for interface query (v2)
  drm/amdgpu: add hdp flush for gfx8 compute ring
  drm/amdgpu: fix no hdp flush for compute ring
  drm/amdgpu: add HEVC/H.265 UVD support
  drm/amdgpu: stop loading firmware with pm.mutex locked
  drm/amdgpu: remove mclk_lock
  drm/amdgpu: fix description of vm_size module parameter (v2)
  drm/amdgpu: remove all sh mem register modification in vm flush
  drm/amdgpu: rename GEM_OP_SET_INITIAL_DOMAIN -> GEM_OP_SET_PLACEMENT
  drm/amdgpu: fence should be added to shared slot
  drm/amdgpu: sync fence of clear_invalids (v2)
  drm/amdgpu: max_pde_used usage should be under protect
  drm/amdgpu: fix bug of vm_bo_map (v2)
  drm/amdgpu: implement the allocation range (v3)
  drm/amdgpu: rename amdgpu_ip_funcs to amd_ip_funcs (v2)
  ...
2015-06-05 11:14:18 +10:00
Frediano Ziglio ef13169610 drm/qxl: Propagate correctly errors from qxlhw_handle_to_bo
This function could return a NULL pointer in case of handle not
present and in case of out of memory conditions however caller
function always returned EINVAL error hiding a possible ENOMEM.
This patch change the function to return the error instead to
be able to propagate the error instead of assuming EINVAL.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:52 +10:00
Frediano Ziglio 74d9a6335d drm/qxl: Simplify cleaning qxl processing command
In qxlhw_handle_to_bo we incremented counters twice, one time for release object
and one for reloc_info.
In the main function however reloc_info references was drop much earlier than
release so keeping the pointer only on release is safe and make cleaning
process easier.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:52 +10:00
Frediano Ziglio e07154e28c drm/qxl: Move main reference counter to GEM object instead of TTM ones
qxl_bo structure has two reference counters, one in the GEM object and
another in the TTM object. The GEM object keep a counter to the TTM object
so when GEM counter reached zero the TTM counter (using qxl_bo_unref) was
decremented. The qxl object is fully freed (both GEM and TTM part are cleaned)
when the TTM counter reach zero.
One issue was that surface idr structure has no owning on qxl_bo objects however
it contains a pointer to qxl_bo object. This caused some nasty race condition
for instance qxl_bo object was reaped even after counter was already zero.
This patch fix these races moving main counter (the one used by qxl_bo_(un)ref)
to GEM object which cleanup routine (qxl_gem_object_free) remove the idr pointer
(using qxl_surface_evict) when the counters are still valid.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:51 +10:00
Frediano Ziglio 72ec5650a8 drm/qxl: Remove format string errors
Enable format string checks for qxl_io_log and remove resulting warnings
which could lead to memory errors on different platform or just printing
wrong information.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:51 +10:00
Frediano Ziglio de0b523a5a drm/qxl: Handle correctly failures in qxl_alloc_relase_reserved
Free resources correctly if function fails

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:50 +10:00
Frediano Ziglio 6ecf5c2b57 drm/qxl: Fix return for qxl_release_alloc
This function return handle to allocated release object which is an int.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:50 +10:00
Frediano Ziglio c610c7137c drm/qxl: Handle all errors in qxl_surface_evict
Only EBUSY error was handled. This could cause code to believe
reserve was successful while it failed.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-05 11:00:49 +10:00