path: root/drivers/gpu/drm/arm
AgeCommit message (Collapse)AuthorFilesLines
2016-11-02drm: mali-dp: Clear the config_valid flag before using it in wait_event.Liviu Dudau1-0/+1
config_valid variable is used to signal the activation of the CVAL request when the vsync interrupt has fired. malidp_set_and_wait_config_valid() uses the variable in wait_event_interruptible_timeout without clearing it first, so the wait is skipped. Signed-off-by: Liviu Dudau <>
2016-10-25drm: convert DT component matching to component_match_add_release()Russell King2-2/+5
Convert DT component matching to use component_match_add_release(). Acked-by: Jyri Sarha <> Reviewed-by: Jyri Sarha <> Signed-off-by: Russell King <> Signed-off-by: Sean Paul <> Link:
2016-10-21drm/arm: Use per-plane rotation propertyVille Syrjälä1-8/+5
The global mode_config.rotation_property is going away, switch over to per-plane rotation_property. v2: Drop the BIT() Cc: Liviu Dudau <> Cc: Brian Starkey <> Cc: Mali DP Maintainers <> Signed-off-by: Ville Syrjälä <> Acked-by: Brian Starkey <> Signed-off-by: Daniel Vetter <> Link:
2016-10-18drm/arm: mali-dp: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()Laurent Pinchart1-6/+1
The driver doesn't need the color depth, only the number of bits per pixel. Use the right API. Signed-off-by: Laurent Pinchart <> Reviewed-by: Daniel Vetter <> Signed-off-by: Archit Taneja <> Link:
2016-10-18drm: hdlcd: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()Laurent Pinchart1-3/+2
The driver needs the number of bytes per pixel, not the bpp and depth info meant for fbdev compatibility. Use the right API. Signed-off-by: Laurent Pinchart <> Acked-by: Liviu Dudau <> Signed-off-by: Archit Taneja <> Link:
2016-09-22drm: Don't swallow error codes in drm_dev_alloc()Tom Gundersen2-4/+4
There are many reasons other than ENOMEM that drm_dev_init() can fail. Return ERR_PTR rather than NULL to be able to distinguish these in the caller. Signed-off-by: Tom Gundersen <> Signed-off-by: Sean Paul <> Link:
2016-08-29drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commitLiu Ying1-1/+2
Drivers may set the NO_DISABLE_AFTER_MODESET flag in the 'flags' parameter of the helper drm_atomic_helper_commit_planes() if the relevant display controllers(e.g., IPUv3 for imx-drm) require to disable a CRTC's planes when the CRTC is disabled. The helper would skip the ->atomic_disable call for a plane if the CRTC of the old plane state needs a modesetting operation. Of course, the drivers need to disable the planes in their CRTC disable callbacks since no one else would do that. Suggested-by: Daniel Vetter <> Cc: Philipp Zabel <> Cc: David Airlie <> Cc: Russell King <> Cc: Peter Senna Tschudin <> Cc: Lucas Stach <> Signed-off-by: Liu Ying <> Signed-off-by: Daniel Vetter <> Link:
2016-08-08drm: BIT(DRM_ROTATE_?) -> DRM_ROTATE_?Joonas Lahtinen2-11/+11
Only property creation uses the rotation as an index, so convert the to figure the index when needed. v2: Use the new defines to build the _MASK defines (Sean) Cc: Cc: Cc: Cc: Cc: David Airlie <> Cc: Daniel Vetter <> Cc: Ville Syrjälä <> Cc: Liviu Dudau <> Cc: Sean Paul <> Acked-by: Liviu Dudau <> Reviewed-by: Ville Syrjälä <> (v1) Signed-off-by: Joonas Lahtinen <> Signed-off-by: Sean Paul <> Link:
2016-07-28drm/arm: mali-dp: Fix error return code in malidp_bind()Wei Yongjun1-1/+3
Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3c31760e760c ('drm/arm: mali-dp: Set crtc.port to the port instead of the endpoint') Signed-off-by: Wei Yongjun <> Acked-by: Brian Starkey <> Signed-off-by: Daniel Vetter <> Link:
2016-07-28drm/arm: mali-dp: Remove redundant dev_err call in malidp_bind()Wei Yongjun1-3/+1
There is a error message within devm_ioremap_resource already, so remove the DRM_ERROR call to avoid redundant error message. Signed-off-by: Wei Yongjun <> Acked-by: Liviu Dudau <> Signed-off-by: Daniel Vetter <> Link:
2016-07-26drm/arm: mali-dp: Set crtc.port to the port instead of the endpointBrian Starkey1-3/+10
The CRTC's port pointer was being set to the endpoint node instead of the port. Fix that, and hold a reference on the port node. Signed-off-by: Brian Starkey <> Acked-by: Liviu Dudau <> Signed-off-by: Sean Paul <> Link:
2016-07-18drm/arm: make fbdev support really optionalTobias Jakobi1-1/+0
Currently enabling ARM HDLCD DRM support automatically pulls in fbdev dependency. However this dep is unnecessary since DRM core already handles this for us (DRM_FBDEV_EMULATION). Signed-off-by: Tobias Jakobi <> Signed-off-by: Daniel Vetter <> Link:
2016-07-18drm/hdlcd: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()Markus Elfring1-2/+1
The drm_fbdev_cma_hotplug_event() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <> Signed-off-by: Daniel Vetter <> Link:
2016-06-15drm/arm: Add support for Mali Display ProcessorsLiviu Dudau9-0/+2202
Add support for the new family of Display Processors from ARM Ltd. This commit adds basic support for Mali DP500, DP550 and DP650 parts, with only the display engine being supported at the moment. Cc: David Brown <> Cc: Brian Starkey <> Signed-off-by: Liviu Dudau <> Acked-by: Daniel Vetter <>
2016-06-10drm/hdlcd: Use helper support for nonblocking commitsDaniel Vetter1-7/+1
With the fixed up drm event handling for crtc_state->event we can just use the helper support for nonblocking commits. Cc: Liviu Dudau <> Tested-by: Liviu Dudau <> Acked-by: Liviu Dudau <> Signed-off-by: Daniel Vetter <> Link:
2016-06-09Merge tag 'topic/drm-misc-2016-06-07' of ↵Dave Airlie1-19/+0
git:// into drm-next As promised, piles of prep work all around: - drm_atomic_state rework, prep for nonblocking commit helpers - fence patches from Gustavo and Christian to prep for atomic fences and some cool work in ttm/amdgpu from Christian - drm event prep for both nonblocking commit and atomic fences - Gustavo seems on a crusade against the non-kms-native version of the vblank functions. - prep work from Boris to nuke all the silly ->best_encoder implementations we have (we really only need that for truly dynamic cases like dvi-i vs dvi-d or dp mst selecting the right transcoder on intel) - prep work from Laurent to rework the format handling functions - and few small things all over * tag 'topic/drm-misc-2016-06-07' of git:// (47 commits) drm/dsi: Implement set tear scanline drm/fb_cma_helper: Implement fb_mmap callback drm/qxl: Remove useless drm_fb_get_bpp_depth() call drm/ast: Remove useless drm_fb_get_bpp_depth() call drm/atomic: Fix remaining places where !funcs->best_encoder is valid drm/core: Change declaration for gamma_set. Documentation: add fence-array to kernel DocBook drm/shmobile: use drm_crtc_vblank_{get,put}() drm/radeon: use drm_crtc_vblank_{get,put}() drm/qxl: use drm_crtc_vblank_{get,put}() drm/atmel: use drm_crtc_vblank_{get,put}() drm/armada: use drm_crtc_vblank_{get,put}() drm/amdgpu: use drm_crtc_vblank_{get,put}() drm/virtio: use drm_crtc_send_vblank_event() drm/udl: use drm_crtc_send_vblank_event() drm/qxl: use drm_crtc_send_vblank_event() drm/atmel: use drm_crtc_send_vblank_event() drm/armada: use drm_crtc_send_vblank_event() drm/doc: Switch to sphinx/rst fixed-width quoting drm/doc: Drop kerneldoc for static functions in drm_irq.c ...
2016-06-09Backmerge tag 'v4.7-rc2' into drm-nextDave Airlie3-81/+78
Daniel has a pull request that relies on stuff in fixes that are in rc2.
2016-06-02drm: hdlcd: Add information about the underlying framebuffers in debugfsLiviu Dudau1-0/+1
drm_fb_cma code has a nice helper function to display in the debugfs information about the underlying framebuffers used by HDLCD: $ cat /sys/kernel/debug/dri/0/fb fb: 1920x1200@XR24 0: offset=0 pitch=7680, obj: 0 ( 2) 001011ba 0x00000000fc300000 ffffff800a27c000 9338880 fb: 1920x1200@XR24 0: offset=0 pitch=7680, obj: 0 ( 2) 001008ca 0x00000000fba00000 ffffff8009987000 9338880 fb: 1920x1200@XR24 0: offset=0 pitch=7680, obj: 0 ( 1) 00100000 0x00000000fb100000 ffffff8008fdc000 9216000 Add the entry in HDLCD's debugfs node. Signed-off-by: Liviu Dudau <>
2016-06-02drm: hdlcd: Cleanup the atomic plane operationsLiviu Dudau2-17/+29
Harden the plane_check() code to drop attempts at scaling because that is not supported. Make hdlcd_plane_atomic_update() set the pitch and line length registers that correctly reflect the plane's values. And make hdlcd_crtc_mode_set_nofb() a helper function for hdlcd_crtc_enable() rather than an exposed hook. Cc: Daniel Vetter <> Signed-off-by: Liviu Dudau <>
2016-06-02drm/hdlcd: Fix up crtc_state->event handlingDaniel Vetter3-29/+9
event_list just reimplemented what drm_crtc_arm_vblank_event does. And we also need to send out drm events when shutting down a pipe. With this it's possible to use the new nonblocking commit support in the helpers. Signed-off-by: Daniel Vetter <> Acked-by: Liviu Dudau <>
2016-06-02drm: hdlcd: Revamp runtime power managementLiviu Dudau3-35/+39
Because the HDLCD driver acts as a component master it can end up enabling the runtime PM functionality before the encoders are initialised. This can cause crashes if the component slave never probes (missing module) or if the PM operations kick in before the probe finishes. Move the enabling of the runtime PM after the component master has finished collecting the slave components and use the DRM atomic helpers to suspend and resume the device. Tested-by: Robin Murphy <> Signed-off-by: Liviu Dudau <>
2016-06-02drm/hdlcd: Clean up crtc hooksDaniel Vetter1-19/+0
Those are all no longer needed for a pure atomic driver. Cc: Liviu Dudau <> Tested-by: Liviu Dudau <> Acked-by: Liviu Dudau <> Signed-off-by: Daniel Vetter <> Link:
2016-05-31drm/hlcd: Use lockless gem BO free callbackDaniel Vetter1-1/+1
No dev->struct_mutex anywhere to be seen. Cc: Liviu Dudau <> Signed-off-by: Daniel Vetter <> Acked-by: Liviu Dudau <> Signed-off-by: Daniel Vetter <> Link:
2016-05-21drm: Nuke ->vblank_disable_allowedDaniel Vetter1-1/+0
This was added in commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241 Author: Jesse Barnes <> Date: Tue Sep 30 12:14:26 2008 -0700 drm: Rework vblank-wait handling to allow interrupt reduction. to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs. So let's just nuke it. Plan B would be to set it unconditionally in drm_vblank_init for kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks in drmP.h and drm_irq.c, plus add a check for DRIVER_MODESET in drm_vblank_init. Stumbled over this in a discussion on irc with Chris. Cc: Chris Wilson <> Cc: Alex Deucher <> Cc: Liviu Dudau <> Cc: Russell King <> Cc: Thierry Reding <> Cc: Eric Anholt <> Cc: Laurent Pinchart <> Cc: Inki Dae <> Cc: Tomi Valkeinen <> Cc: Mark Yao <> Cc: Sascha Hauer <> Cc: Philipp Zabel <> Signed-off-by: Daniel Vetter <> Reviewed-by: Alex Deucher <> Acked-by: Liviu Dudau <> Acked-by: Laurent Pinchart <> Tested-by: Laurent Pinchart <> Signed-off-by: Dave Airlie <>
2016-05-02drm/arm/hdlcd: Rename async to nonblock.Maarten Lankhorst1-1/+1
The async name is deprecated and should be changed to nonblocking. Cc: Liviu Dudau <> Signed-off-by: Maarten Lankhorst <> Acked-by: Liviu Dudau <> Signed-off-by: Daniel Vetter <> Link:
2016-04-04drm: ARM HDLCD - fix an error codeDan Carpenter1-1/+2
We accidentally return PTR_ERR(NULL) which is success instead of a negative error code. Fixes: 879e40bea6f2 ('drm: ARM HDLCD - get rid of devm_clk_put()') Signed-off-by: Dan Carpenter <> Signed-off-by: Liviu Dudau <>
2016-04-04drm: ARM HDLCD - get rid of devm_clk_put()Alexey Brodkin1-12/+3
Clock is acquired with devm_clk_get() which already manages corresponding resource. I.e. in case of driver removal or failure on installaiton clock resources will be automatically released and explicit call of devm_clk_put() is not required. Cc: Arnd Bergmann <> Cc: Daniel Vetter <> Cc: David Airlie <> Cc: Robin Murphy <> Signed-off-by: Alexey Brodkin <> Signed-off-by: Liviu Dudau <>
2016-02-10drm: Add support for ARM's HDLCD controller.Liviu Dudau6-0/+1035
The HDLCD controller is a display controller that supports resolutions up to 4096x4096 pixels. It is present on various development boards produced by ARM Ltd and emulated by the latest Fast Models from the company. Cc: David Airlie <> Cc: Robin Murphy <> Signed-off-by: Liviu Dudau <> [Kconfig cleanup and !CONFIG_PM fixes] Signed-off-by: Arnd Bergmann <> Acked-by: Daniel Vetter <>