aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-08-02drm/i2c: tda998x: move tda998x_set_config() into tda998x_create()Russell King1-38/+35
Move the non-DT configuration of the TDA998x into tda998x_create() so that we do all setup in one place. Tested-by: Peter Rosin <[email protected]> Signed-off-by: Russell King <[email protected]>
2018-08-02drm/i2c: tda998x: split tda998x_encoder_dpms into enable/disablePeter Rosin1-12/+25
This fits better with the drm_bridge callbacks for when this driver becomes a drm_bridge. Suggested-by: Laurent Pinchart <[email protected]> Signed-off-by: Peter Rosin <[email protected]> [edited by rmk to just split the tda998x_encoder_dpms() function and restore the double-disable protection we originally had, preserving original behaviour.] Tested-by: Peter Rosin <[email protected]> Signed-off-by: Russell King <[email protected]>
2018-08-02drm/i2c: tda998x: find the drm_device via the drm_connectorPeter Rosin1-1/+1
This prepares for being a drm_bridge which will not register the encoder. That makes the connector the better choice. Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Peter Rosin <[email protected]> Signed-off-by: Russell King <[email protected]>
2018-08-01drm/ttm: clean up non-x86 definitions on ttm_ttHuang Rui1-18/+7
All non-x86 definitions are moved to ttm_set_memory header, so remove it from ttm_tt.c. Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-08-01drm/ttm: Add ttm_set_pages_wc and ttm_set_pages_uc helperHuang Rui1-0/+22
These two helpers will be used on set page caching. Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-08-01drm/ttm: fix missed conversion of set_pages_array_ucHuang Rui1-1/+1
This patch fixed the error when do not configure CONFIG_X86, otherwise, below error will be encountered. All errors (new ones prefixed by >>): drivers/gpu/drm/ttm/ttm_page_alloc_dma.c: In function 'ttm_set_pages_caching': >> drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:272:7: error: implicit declaration of function 'set_pages_array_uc'; did you mean +'ttm_set_pages_array_uc'? [-Werror=implicit-function-declaration] r = set_pages_array_uc(pages, cpages); ^~~~~~~~~~~~~~~~~~ ttm_set_pages_array_uc cc1: some warnings being treated as errors Reported-by: kbuild test robot <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-08-01drm/imx: Convert drm_atomic_helper_suspend/resume()Souptick Joarder1-40/+2
convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). with this conversion, the remaining member of struct imx_drm_device, state, will be no more useful and it could be removed forever. Signed-off-by: Souptick Joarder <[email protected]> Signed-off-by: Ajit Negi <[email protected]> [[email protected]: rebased onto drm-next, updated commit message] Signed-off-by: Philipp Zabel <[email protected]>
2018-08-01Merge branch 'drm-armada-devel' of git://git.armlinux.org.uk/~rmk/linux-arm ↵Dave Airlie14-1250/+921
into drm-next This set of changes migrates Armada DRM from legacy modeset to atomic modeset. This is everything from the "Transition Armada DRM planes to atomic state" and "Finish Armada DRM transition to atomic modeset" patch sets as posted on drm-devel, excluding the "Finish Armada DRM DT support" series. These series did not evoke any comments - if there are any, these can be addressed via follow up patches. Developed and tested on Dove Cubox with xf86-video-armada including the overlay plane, and also tested with the tools in libdrm. Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-08-01Merge tag 'drm-msm-next-2018-07-30' of ↵Dave Airlie96-524/+32751
git://people.freedesktop.org/~robclark/linux into drm-next A bit larger this time around, due to introduction of "dpu1" support for the display controller in sdm845 and beyond. This has been on list and undergoing refactoring since Feb (going from ~110kloc to ~30kloc), and all my review complaints have been addressed, so I'd be happy to see this upstream so further feature work can procede on top of upstream. Also includes the gpu coredump support, which should be useful for debugging gpu crashes. And various other misc fixes and such. Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGv-8y3zguY0Mj1vh=o+vrv_bJ8AwZ96wBXYPvMeQT2XcA@mail.gmail.com
2018-07-31drm/amdgpu/pm: Fix potential Spectre v1Gustavo A. R. Silva1-1/+2
idx can be indirectly controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:408 amdgpu_set_pp_force_state() warn: potential spectre issue 'data.states' Fix this by sanitizing idx before using it to index data.states Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: [email protected] Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amd/display: add missing void parameter to dc_create_transfer_funcColin Ian King1-1/+1
Add a missing void parameter to function dc_create_transfer_func, fixes sparse warning: warning: non-ANSI function declaration of function 'dc_create_transfer_func' Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/radeon: Replace ttm_bo_unref with ttm_bo_putThomas Zimmermann1-3/+2
The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/radeon: Replace ttm_bo_reference with ttm_bo_getThomas Zimmermann1-1/+1
The function ttm_bo_get acquires a reference on a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: Replace ttm_bo_unref with ttm_bo_putThomas Zimmermann1-3/+2
The function ttm_bo_put releases a reference to a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. A call to ttm_bo_unref takes the address of the TTM BO object's pointer and clears the pointer's value to NULL. This is not necessary in most cases and sometimes even worked around by the calling code. A call to ttm_bo_put only releases the reference without clearing the pointer. The current behaviour of cleaning the pointer is kept in the calling code, but should be removed if not required in a later patch. v2: * set prefix to drm/amdgpu Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: Replace ttm_bo_reference with ttm_bo_getThomas Zimmermann1-1/+1
The function ttm_bo_get acquires a reference on a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. v2: * changed prefix to drm/amdgpu Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/scheduler: stop setting rq to NULLChristian König1-27/+8
We removed the redundancy of having an extra scheduler field, so we can't set the rq to NULL any more or otherwise won't know which scheduler to use for the cleanup. Just remove the entity from the scheduling list instead. Signed-off-by: Christian König <[email protected]> Acked-by: Nayan Deshmukh <[email protected]> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107367 Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/scheduler: only kill entity if last user is killed v2Christian König2-1/+7
Note which task is using the entity and only kill it if the last user of the entity is killed. This should prevent problems when entities are leaked to child processes. v2: add missing kernel doc Signed-off-by: Christian König <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Acked-by: Nayan Deshmukh <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: create an empty bo_list if no handle is providedChristian König1-65/+46
Instead of having extra handling just create an empty bo_list when no handle is provided. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: allocate the bo_list array after the listChristian König2-74/+57
This avoids multiple allocations for the head and the array. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: add bo_list iteratorsChristian König3-39/+43
Add helpers to iterate over all entries in a bo_list. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: nuke amdgpu_bo_list_freeChristian König3-14/+2
The RCU grace period is harmless and avoiding it is not worth the effort of doubling the implementation. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: always recreate bo_listChristian König3-15/+12
The bo_list handle is allocated by OP_CREATE, so in OP_UPDATE here we just re-create the bo_list object and replace the handle. This way we don't need locking to protect the bo_list because it's always re-created when changed. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: move bo_list defines to amdgpu_bo_list.hChristian König2-39/+71
Further demangle amdgpu.h Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: add new amdgpu_vm_bo_trace_cs() function v2Christian König4-0/+37
This allows us to trace all VM ranges which should be valid inside a CS. v2: dump mappings without BO as well Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-and-tested-by: Andrey Grodzovsky <[email protected]> (v1) Reviewed-by: Huang Rui <[email protected]> (v1) Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: return error if both BOs and bo_list handle is givenChristian König1-3/+6
Return -EINVAL when both the BOs as well as a list handle is provided in the IOCTL. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: fix total size calculationChristian König1-1/+1
long might only be 32bit in size and we can easily use more than 4GB here. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/sched: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada1-1/+0
I refactored the include directives under include/drm/ some time ago. This flag is unneeded. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Christian König <[email protected]> Acked-by: Nayan Deshmukh <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: add proper error handling to amdgpu_bo_list_getChristian König3-23/+20
Otherwise we silently don't use a BO list when the handle is invalid. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amdgpu: fix a reversed conditionRex Zhu1-1/+1
This test was reversed so it would end up leading to vddnb value can't be read via hwmon on APU. Reviewed-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2018-07-31drm/amd/pp: Convert voltage unit in mV*4 to mV on CZ/STRex Zhu1-2/+3
the voltage showed in debugfs and hwmon should be in mV Reviewed-by: Evan Quan <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2018-07-31drm/amd/pp: Delete unused temp variablesRex Zhu1-16/+6
Only delete the dead temp variables in Polaris. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2018-07-31drm/amd/pp/Polaris12: Fix a chunk of registers missed to programRex Zhu1-0/+43
DIDTConfig_Polaris12[] table missed a big chunk of data. Pointed by aidan.fabius <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2018-07-31drm/arm/hdlcd: Reject atomic commits that disable only the planeLiviu Dudau2-17/+19
The HDLCD engine needs an active plane while the CRTC is active, as it will start scanning out data from HDLCD_REG_FB_BASE once it gets enabled. Make sure that the only available plane doesn't get disabled while the CRTC remains active, as this will scanout invalid data. Signed-off-by: Liviu Dudau <[email protected]>
2018-07-31drm: arm: hdlcd: Use drm_atomic_helper_shutdown() to disable planes on removalLaurent Pinchart2-7/+2
The plane cleanup handler currently calls drm_plane_helper_disable(), which is a legacy helper function. Replace it with a call to drm_atomic_helper_shutdown() at removal time. The plane .destroy() handler now consisting only of a call to drm_plane_cleanup(), replace it with direct calls to that function. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
2018-07-31drm: arm: hdlcd: Don't destroy plane manually in hdlcd_setup_crtc()Laurent Pinchart1-3/+1
The top-level error handler calls drm_mode_config_cleanup() which will destroy all planes. There's no need to destroy them manually in lower error handlers. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
2018-07-31drm/arm/hdlcd: Use drm_fb_cma_fbdev_init/fini()Noralf Trønnes2-32/+6
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on the fact that drm_device holds a pointer to the drm_fb_helper structure. This means that the driver doesn't have to keep track of that. Also use the drm_fb_helper functions directly. Cc: Liviu Dudau <[email protected]> Cc: Brian Starkey <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
2018-07-31drm/arm/hdlcd: Use drm_mode_config_helper_suspend/resume()Noralf Trønnes2-23/+3
Replace driver's code with the generic helpers that do the same thing including the NULL check. Cc: Liviu Dudau <[email protected]> Cc: Brian Starkey <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
2018-07-31Merge branch 'drm-udl-next' of git://people.freedesktop.org/~airlied/linux ↵Dave Airlie5-63/+60
into drm-next A set of cleanups and fixes for Mikulas for using udl on arm boards. Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAPM=9twQNgrmfe0=Okq1NTgWHRQXy+AzeDy8A0p_-y856p4vtA@mail.gmail.com
2018-07-31udl-kms: dont spam the syslog with debug messagesMikulas Patocka2-4/+4
The udl kms driver writes messages to the syslog whenever some application opens or closes /dev/fb0 and whenever the user switches between the Xserver and the console. This patch changes the priority of these messages to debug. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2018-07-31udl-kms: use spin_lock_irq instead of spin_lock_irqsaveMikulas Patocka2-9/+6
spin_lock_irqsave and spin_unlock_irqrestore is inteded to be called from a context where it is unknown if interrupts are enabled or disabled (such as interrupt handlers). From a process context, we should call spin_lock_irq and spin_unlock_irq, that avoids the costly pushf and popf instructions. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2018-07-31udl-kms: avoid prefetchMikulas Patocka1-7/+0
Modern processors can detect linear memory accesses and prefetch data automatically, so there's no need to use prefetch. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2018-07-31udl-kms: avoid divisionMikulas Patocka3-26/+30
Division is slow, so it shouldn't be done by the pixel generating code. The driver supports only 2 or 4 bytes per pixel, so we can replace division with a shift. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2018-07-31udl-kms: fix crash due to uninitialized memoryMikulas Patocka1-1/+1
We must use kzalloc when allocating the fb_deferred_io structure. Otherwise, the field first_io is undefined and it causes a crash. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2018-07-31udl-kms: handle allocation failureMikulas Patocka1-10/+18
Allocations larger than PAGE_ALLOC_COSTLY_ORDER are unreliable and they may fail anytime. This patch fixes the udl kms driver so that when a large alloactions fails, it tries to do multiple smaller allocations. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2018-07-31udl-kms: change down_interruptible to downMikulas Patocka1-6/+1
If we leave urbs around, it causes not only leak, but also memory corruption. This patch fixes the function udl_free_urb_list, so that it always waits for all urbs that are in progress. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2018-07-30dt-bindings: msm/disp: Add bindings for Snapdragon 845 DPUJeykumar Sankaran1-0/+131
Adds bindings for Snapdragon 845 display processing unit Changes in v2: - Use SoC specific compatibles for mdss and dpu (Rob Herring) - Use assigned-clocks to set initial clock frequency (Rob Herring) Changes in v3 (all suggested by Rob Herring): - Rename mdss_phys to mdss - Correct description for clocks/assigned-clocks - Rename mdp_phys to mdp - Rename vbif_phys to vbif - Remove redundant interrupt-parent from mdss_mdp - Fully specify 'ranges' and use relative reg address in mdss_mdp Cc: Rob Herring <[email protected]> Signed-off-by: Jeykumar Sankaran <[email protected]> Signed-off-by: Rajesh Yadav <[email protected]> Signed-off-by: Sean Paul <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30dt-bindings: msm/dsi: Add mdp transfer time to msm dsi bindingJeykumar Sankaran1-0/+16
Adds mdp transfer time to msm dsi binding Changes in v3: - Added Rob's R-b Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Jeykumar Sankaran <[email protected]> Signed-off-by: Rajesh Yadav <[email protected]> Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/disp/dpu: Mark a handful of functions as staticJordan Crouse11-47/+13
Mark a number of static functions that are only unsed in the file that defines them and remove the prototypes from the headers where needed. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/disp/dpu: Remove unused functions from dpu_formats.cJordan Crouse4-166/+0
Remove dpu_format_get_block_size, dpu_format_get_framebuffer_size, dpu_set_scaler_v2 and dpu_copy_formats they are unused and unneeded. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/disp/dpu: Remove dpu_kms_utilsJordan Crouse3-266/+0
None of the functions in dpu_kms_utils.c seem to be used so remove them all. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>