aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-12drm/dp: Add a drm_aux-dev module for reading/writing dpcd registers.Rafael Antognolli6-2/+468
This module is heavily based on i2c-dev. Once loaded, it provides one dev node per DP AUX channel, named drm_dp_auxN, where N is an integer. It's possible to know which connector owns this aux channel by looking at the respective sysfs /sys/class/drm_aux_dev/drm_dp_auxN/connector, if the connector device pointer was correctly set in the aux helper struct. Two main operations are provided on the registers read and write. The address of the register to be read or written is given using lseek. The seek position is updated upon read or write. v2: - lseek is used to select the register to read/write - read/write are used instead of ioctl - no blocking_notifier is used, just a direct callback v3: - use drm_dp_aux_dev prefix for public functions - chardev is named drm_dp_auxN - read/write don't allocate a buffer anymore, and transfer up to 16 bytes a time - remove notifier list from the implementation - option on menuconfig is now a boolean - add inline stub functions to avoid breakage when this option is disabled v4: - fix build system changes - actually disable this module when not selected. v5: - Use kref to avoid device closing while still in use - Don't use list, use an idr for storing aux_dev - Remove "connector" attribute - set aux.dev to the connector drm_connector device, instead of drm_device v6: - Use atomic_t for usage count - Use a mutex instead of spinlock for idr lock - Destroy chardev immediately on unregister - other minor suggestions from Ville v7: - style fixes - error handling fixes v8: - more error handling fixes v9: - remove module_init and module_exit, and add drm_dp_aux_dev_init/exit to drm_kms_helper_init/exit. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-12drm/kms_helper: Add a common place to call init and exit functions.Rafael Antognolli5-9/+60
The module_init and module_exit functions will start here, and call the subsequent init's and exit's. v10: - Keep __init on drm_fb_helper init function. - Move MODULE_* macros to the common file. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11drm/msm: remove unused variableArnd Bergmann1-1/+0
After the drm_device_is_unplugged() was removed, the 'dev' variable is now unused, and we get a warning for that: drivers/gpu/drm/msm/msm_fbdev.c: In function 'msm_fbdev_mmap': drivers/gpu/drm/msm/msm_fbdev.c:65:21: error: unused variable 'dev' [-Werror=unused-variable] This removes the variable as well. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: e9f8250f2f92 ("drm/msm: remove the drm_device_is_unplugged check") Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11drm/bridge: removed dummy mode_fixup function from dw-hdmi.Carlos Palminha1-8/+0
Other bridge drivers don't implement this optional function. Removed dummy code from dw-hdmi brigde driver. Signed-off-by: Carlos Palminha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11drm/i2c/tda998x: removed unnecessary code, mode_fixup is now optional.Carlos Palminha1-9/+0
Removed dummy mode_fixup. Signed-off-by: Carlos Palminha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11drm/i2c/sil164: removed unnecessary code, mode_fixup is now optional.Carlos Palminha1-9/+0
Removed dummy mode_fixup. Signed-off-by: Carlos Palminha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11apple-gmux: Fix build breakage if !CONFIG_ACPILukas Wunner1-1/+12
The DRM drivers i915, nouveau and radeon may be compiled with CONFIG_ACPI not set, in which case acpi_dev_present() is undefined. Add a no-op stub for apple_gmux_present() which is used if CONFIG_APPLE_GMUX is not enabled to avoid build breakage. (CONFIG_APPLE_GMUX depends on CONFIG_ACPI.) Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Lukas Wunner <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11drm: fixes crct set_mode when encoder mode_fixup is null.Carlos Palminha2-5/+7
Avoids null crash when encoders don't implement mode_fixup. Signed-off-by: Carlos Palminha <[email protected]> [danvet: Also update kerneldoc.] Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-02-11drm: virtio-gpu: set atomic flagRob Herring1-1/+1
Advertise atomic mode setting capability to user space. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-02-11drm: virtio-gpu: transfer dumb buffers to host on plane updateRob Herring1-0/+7
For dumb buffers, we need to transfer them to the host when updating a plane. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-02-11drm: virtio-gpu: ensure plane is flushed to host on atomic updateRob Herring1-0/+5
This fixes drawing updates when updating planes with atomic API. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-02-11drm: virtio-gpu: get the fb from the plane state for atomic updatesRob Herring1-2/+2
When using the atomic API, plane->fb is not set when calling virtio_gpu_plane_atomic_update. Use plane->state->fb instead. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-02-11Merge git://linux-arm.org/linux-ld into drm-nextDave Airlie9-0/+1044
Pull upstream HDLCD driver. * git://linux-arm.org/linux-ld: MAINTAINERS: Add Liviu Dudau as maintainer for ARM HDLCD driver. drm: Add support for ARM's HDLCD controller.
2016-02-10drm/amd/powerplay: add powerplay valid check to avoid null point.Rex Zhu1-3/+9
In case CONFIG_DRM_AMD_POWERPLAY is defined and amdgpu.powerplay=0. some functions in powrplay can also be called by DAL. and the input parameter is *adev. if just check point not NULL was not enough and will lead to NULL point error. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: Enable low mem pstate when cancel_highEric Yang1-1/+1
Signed-off-by: Eric Yang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: Use correct clock in cz_apply_state_adjust_rulesEric Yang1-2/+2
Signed-off-by: Eric Yang <[email protected]> Reviewed-by: Eagle Yeh <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: get real display device num by cgs interfaceRex Zhu1-9/+16
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Jammy Zhou <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: Use engine clock limit calculated by dalVitaly Prosyak1-3/+3
Use min required system clock calculated by dal Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: Make declarations of functions exposed to DAL type-safe.David Rokhvarg2-14/+16
Signed-off-by: David Rokhvarg <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: implement functions in carrizo for DAL.Rex Zhu1-11/+115
Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: export interface to DAL.Rex Zhu5-21/+251
Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd/powerplay: change struct name.Rex Zhu6-8/+8
amd_pp_dal_clock_info to amd_pp_simple_clock_info. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amd: Adding IVSRC register headersHarry Wentland1-0/+102
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: Move MMIO flip out of spinlocked regionVitaly Prosyak1-3/+3
Prior actual MMIO flip we need to acquire DAL mutex to guard our target state which get modified on reset mode. Assign page flip status before actual flip to handle the possible race condition with interrupt. Signed-off-by: Vitaly Prosyak <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: Don't crash system if we can't get crtcHarry Wentland1-0/+6
Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-11drm/msm: add max-freq gpu param to uapiRob Clark2-0/+4
We need this in userspace for interpreting some of the perf ctrs. Note possibly not quite sufficient if we had some frequency mgmt approach other than race-to-idle. Not really sure what the best thing to do if we did. Although displaying results as a percentage of max frequence seems sensible(ish) if we did. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-02-10drm/amdgpu: move sync into job objectChristian König13-38/+46
No need to keep that for every IB. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: send VCE IB tests directly to the ring againChristian König2-8/+22
We need the IB test for GPU resets as well and the scheduler should be stoped then. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: send UVD IB tests directly to the ring againChristian König5-15/+25
We need the IB test for GPU resets as well and the scheduler should be stoped then. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: rename amdgpu_sched.c to amdgpu_job.cChristian König2-5/+5
That's probably a better matching name. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: cleanup in kernel job submissionChristian König7-204/+111
Add a job_alloc_with_ib helper and proper job submission. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: send SDMA/GFX IB tests directly to the ring againChristian König5-18/+6
There is no point in sending them through the scheduler. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: directly return fence from ib_scheduleChristian König3-8/+12
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: move ring from IBs into jobChristian König14-44/+45
We can't submit to multiple rings at the same time anyway. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: make pad_ib a ring function v3Christian König14-18/+41
The padding depends on the firmware version and we need that for BO moves as well, not only for VM updates. v2: new approach of making pad_ib a ring function v3: fix typo in macro name Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: cleanup user fence handling in the CSChristian König2-17/+13
Don't keep that around twice. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: add proper job alloc/free functionsChristian König6-55/+69
And use them in the CS instead of allocating IBs and jobs separately. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: fix num_ibs checkChristian König1-11/+5
Specifying no IBs on command submission is invalid, stop crashing badly when somebody tries it. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: remove AMDGPU_NUM_SYNCSChristian König2-4/+1
Just a leftover from semaphores. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: remove adev and fence from amdgpu_sync_freeChristian König3-8/+3
Just leftovers from the semaphores. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: check userptrs mm earlierChristian König7-15/+27
Instead of when we try to bind it check the usermm when we try to use it in the IOCTLs. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
2016-02-10drm/radeon: Avoid double gpu reset by adding a timeout on IB ring tests.Matthew Dawson9-23/+89
When the radeon driver resets a gpu, it attempts to test whether all the rings can successfully handle an IB. If these rings fail to respond, the process will wait forever. Another gpu reset can't happen at this point, as the current reset holds a lock required to do so. Instead, make all the IB tests run with a timeout, so the system can attempt to recover in this case. While this doesn't fix the underlying issue with card resets failing, it gives the system a higher chance of recovering. These timeouts have been confirmed to help both a Tathi and Hawaii card recover after a gpu reset. This also adds a new function, radeon_fence_wait_timeout, that behaves like fence_wait_timeout. It is used instead of fence_wait_timeout as it continues to work during a reset. radeon_fence_wait is changed to be implemented using this function. V2: - Changed the timeout to 1s, as the default 10s from radeon_wait_timeout was too long. A timeout of 100ms was tested and found to be too short. - Changed radeon_fence_wait_timeout to behave more like fence_wait_timeout. Reviewed-by: Christian König <[email protected]> Signed-off-by: Matthew Dawson <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu/gfx: minor code cleanupAlex Deucher2-28/+2
Drop needless function wrapper. Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: separate pushing CS to schedulerChristian König1-46/+50
Move that out of the main IOCTL function. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: add amdgpu_set_ib_value helper (v2)Christian König3-8/+15
And use it in UVD/VCE command patching. v2: squash in Christian's fix Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: fix size estimation for clear IBChristian König1-2/+2
We only need a few dw here. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu/smu: skip SMC ucode loading on SR-IOV capable boards (v2)Alex Deucher3-0/+18
VBIOS does this for us in asic_init. v2: update iceland as well Reviewed-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu/gmc8: skip MC ucode loading on SR-IOV capable boardsAlex Deucher1-0/+6
VBIOS does this for us in asic_init. Reviewed-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: always repost cards that support SR-IOVAlex Deucher1-1/+2
Generally a good idea between VM sessions. We need a way to detect VM pass-through in general and always run asic_init in that case. Reviewed-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: track whether the asic supports SR-IOVAlex Deucher2-0/+11
Required to make desicions about certain code pathes. Reviewed-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>