aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
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-31drm/msm/disp/dpu: fix two spelling mistakesColin Ian King2-2/+2
Trivial fix to spelling mistake in error messages "diable" -> "disable" "cliend" -> "client" Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Rob Clark <[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-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]>
2018-07-30drm/msm/disp/dpu: Remove unused code from drm_crtc.cJordan Crouse2-442/+2
Remove a chunk of unused code from drm_crtc.c, namely dpu_crtc_res_add, dpu_crtc_res_get, dpu_crtc_res_put and associated static functions. Also zap dpu_crtc_event_queue(), helper functions and members. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/disp/dpu: Remove unused code from drm_encoder.cJordan Crouse3-97/+0
Remove dpu_encoder_check_mode and dpu_encoder_helper_hw_release frmo drm_encoder.c as they appear to be unused. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm: Replace PTR_RET with PTR_ERR_OR_ZEROGustavo A. R. Silva1-1/+1
PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm: mark PM functions as __maybe_unusedArnd Bergmann1-2/+2
The suspend/resume functions are not referenced when power management is disabled: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1288:12: error: 'dpu_runtime_resume' defined but not used [-Werror=unused-function] drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1261:12: error: 'dpu_runtime_suspend' defined but not used [-Werror=unused-function] This marks them as __maybe_unused to let the compiler drop the functions without complaining. Fixes: 591225291ca2 ("drm/msm: Add SDM845 DPU support") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/dpu: fix mismatch in function argument.zhong jiang1-1/+1
Fix the sparse error. the dpu_rm_init declaration is not consistent with the implement. Signed-off-by: zhong jiang <[email protected]> [robclark un-typo'd subject line] Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/gpu: avoid deprecated do_gettimeofdayArnd Bergmann3-4/+4
All users of do_gettimeofday() have been removed, but this one recently crept in, along with an incorrect printing of the microseconds portion. This converts it to using ktime_get_real_timespec64() as a direct replacement, and adds the leading zeroes. I considered using monotonic times (ktime_get()) instead, but as this timestamp appears to only be used for humans rather than compared with other timestamps, the real time domain is probably good enough. Fixes: e43b045e2c82 ("drm/msm/gpu: Capture the state of the GPU") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm: dsi: Handle dual-channel for 6G as wellSean Paul1-37/+35
This fixes up a collision between introducing dual-channel support and the dsi refactors. This patch applies the same dual-channel considerations and pclk calculations to both v2 and 6G, with a bit of abstracting for good measure. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm: dpu: Use clock-names instead of assigned-clock-namesSean Paul1-3/+2
In these cases, we want to enumerate _all_ clocks, not just the ones that are assigned a rate. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm: dpu: Use 'vsync' instead of 'vsync_clk' in cmdmode encoderSean Paul1-1/+1
Should work with the legacy handling in of, but we shouldn't rely on that. Signed-off-by: Sean Paul <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/gpu: Add the buffer objects from the submit to the crash dumpJordan Crouse3-13/+102
For hangs, dump copy out the contents of the buffer objects attached to the guilty submission and print them in the crash dump report. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/adreno: Add a5xx specific registers for the GPU stateJordan Crouse5-31/+248
HLSQ, SP and TP registers are only accessible from a special aperture and to make matters worse the aperture is blocked from the CPU on targets that can support secure rendering. Luckily the GPU hardware has its own purpose built register dumper that can access the registers from the aperture. Add a5xx specific code to program the crashdumper and retrieve the wayward registers and dump them for the crash state. Also, remove a block of registers the regular CPU accessible list that aren't useful for debug which helps reduce the size of the crash state file by a goodly amount. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/adreno: Add ringbuffer data to the GPU stateJordan Crouse2-0/+41
Add the contents of each ringbuffer to the GPU state and dump the data in the crash file encoded with ascii85. To save space only the used portions of the ringbuffer are dumped. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/adreno: Convert the show/crash file formatJordan Crouse1-8/+13
Convert the format of the 'show' debugfs file and the crash dump to a format resembling YAML. This should be easier to parse and be more flexible for future changes and expansions. v2: Use a standard .rst for the msm crashdump documentation Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/gpu: Capture the GPU state on a GPU hangJordan Crouse9-23/+154
Capture the GPU state on a GPU hang and store it for later playback via the devcoredump facility. Only one crash state is stored at a time on the assumption that the first hang is usually the most interesting. The existing crash state can be cleared after capturing it and then a new one will be captured on the next hang. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/gpu: Rearrange the code that collects the task during a hangJordan Crouse1-9/+11
Do a bit of cleanup to prepare for upcoming changes to pass the hanging task comm and cmdline to the crash dump function. v2: Use GFP_ATOMIC while holding the rcu lock per Chris Wilson Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/gpu: Convert the GPU show function to use the GPU stateJordan Crouse7-65/+104
Convert the existing GPU show function to use the GPU state to dump the information rather than reading it directly from the hardware. This will require an additional step to capture the state before dumping it for the existing nodes but it will greatly facilitate reusing the same code for dumping a previously captured state from a GPU hang. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/msm/gpu: Capture the state of the GPUJordan Crouse6-0/+129
Add the infrastructure to capture the current state of the GPU and store it in memory so that it can be dumped later. For now grab the same basic ringbuffer information and registers that are provided by the debugfs 'gpu' node but obviously this should be extended to capture a much larger set of GPU information. Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm: Add puts callback for the coredump printerJordan Crouse1-35/+49
Add a puts function for the coredump printer to bypass printf() for constant strings for a speed boost. Reorganize the coredump printf callback to share as much code as possible. v2: Try to reuse code between print and puts as suggested by Chris Wilson Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm: Add a -puts() function for the seq_file printerJordan Crouse1-0/+6
Add a puts() function to use seq_puts() to help speed up up print time for constant strings. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm: Add drm_puts() to complement drm_printf()Jordan Crouse1-0/+17
Add drm_puts() for a much faster path to print constant strings into a drm_printer object with memcpy and friends. This can have seconds off of really large outputs such as GPU dumps. If the drm_printer object supports a custom puts function then use that otherwise fall back to the slower legacy printf call. v2: Add documentation for drm_puts() per Daniel Vetter Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Jordan Crouse <[email protected]> [robclark fix minor htmldocs warning] Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm: drm_printer: Add printer for devcoredumpJordan Crouse1-0/+74
Add a drm printer suitable for use with the read callback for devcoredump or other suitable buffer based output format that isn't otherwise covered by seq_file. v2: Add improved documentation per Daniel Vetter Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30include: Move ascii85 functions from i915 to linux/ascii85.hJordan Crouse1-30/+4
The i915 DRM driver very cleverly used ascii85 encoding for their GPU state file. Move the encode functions to a general header file to support other drivers that might be interested in the same functionality. v4: Make the return value const char * as suggested by Chris Wilson v3: Fix error_puts -> err_puts pointed out by the 01.org bot v2: Update API to be cleaner for the caller as suggested by Chris Wilson Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2018-07-30drm/armada: remove obsolete fb unreferencing kfifo and workqueueRussell King2-42/+0
Remove the obsolete fb unreferencing system that is no longer used since we've transitioned to atomic modeset. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: remove unnecessary armada_plane structureRussell King4-26/+7
We no longer require a private armada_plane structure, so eliminate it, and use the drm_plane structure directly. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: remove unnecessary armada_ovl_plane structureRussell King1-25/+9
We no longer need a private plane structure, so get rid of it. Use the drm_plane structure directly. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: update primary framebuffer parameters on mode changeRussell King1-2/+4
The framebuffer base address and toggling mode needs to be updated when the interlaced flag for mode changes is updated. Arrange to reprogram these parameters when only the mode has changed. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: update planes after the dumb frame is completeRussell King2-19/+28
Write out the plane updates after the dumb frame has completed, but just before the blank period. This allows all the plane updates to be performed in a flicker-free non-tearing manner. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: switch overlay plane to atomic modesetRussell King3-248/+32
Switch the overlay plane away from the transitional helpers and legacy methods, and use atomic helpers instead to implement the legacy set_plane ioctl methods. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: switch primary plane to atomic modesetRussell King2-117/+3
Switch the primary plane away from the transitional helpers, and use the atomic helpers instead to implement the legacy set_plane ioctl call for this plane. Signed-off-by: Russell King <[email protected]>
2018-07-30drm/armada: switch legacy modeset to atomic modesetRussell King2-103/+1
Switch the legacy set_config() method to use the atomic modeset helper, which allows us to get rid of the legacy dpms, prepare, commit, mode_set, mode_set_base and disable helper methods. Signed-off-by: Russell King <[email protected]>