aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm
AgeCommit message (Collapse)AuthorFilesLines
2016-11-04drm: mali-dp: Add pitch alignment check for planesBrian Starkey1-1/+14
Check that the framebuffer pitches are appropriately aligned when checking planes. Signed-off-by: Brian Starkey <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
2016-11-04drm: mali-dp: Add pitch alignment check functionBrian Starkey2-0/+12
Different hardware versions have different requirements when it comes to pitch alignment. Add a function which can be used to check pitch alignment for a device. Signed-off-by: Brian Starkey <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
2016-11-02drm: mali-dp: Set the drm->irq_enabled flag to match driver's state.Liviu Dudau1-0/+3
Mali DP driver does not use drm_irq_{un,}install() function so the drm->irq_enabled flag does not get set automatically. drm_wait_vblank() checks the value of the flag among other functions. Signed-off-by: Liviu Dudau <[email protected]>
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 <[email protected]>
2016-11-02drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefsJani Nikula2-4/+0
If we define drm_compat_ioctl NULL on CONFIG_COMPAT=n, we don't have to check for the config everywhere. Reviewed-by: Patrik Jakobsson <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-10-31drm/i2c: tda998x: mali-dp: hdlcd: refactor connector registrationBrian Starkey2-15/+22
Connectors shouldn't be registered until the rest of the whole device is set up, so that consistent state is presented to userspace. As such, remove the calls to drm_connector_register() and drm_connector_unregister() from tda998x, as these are now handled by drm_dev_(un)register() itself. To work with this change, the mali-dp and hdlcd bind and unbind sequences have to be reordered, to ensure that the componentised encoder/connector is bound before drm_dev_register() registers all connectors. Similarly, the device must be unregistered before the component is unbound. Altogether, this allows other drivers using tda998x to be de-midlayered, and to have less racy initialisation of their components. Splitting this commit into three (one per driver) isn't possible without intermediate breakage, so it is all squashed together here. Suggested-by: Russell King <[email protected]> Signed-off-by: Brian Starkey <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Signed-off-by: Russell King <[email protected]>
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 <[email protected]> Reviewed-by: Jyri Sarha <[email protected]> Signed-off-by: Russell King <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Mali DP Maintainers <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Acked-by: Brian Starkey <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-13-git-send-email-laurent.pinchart@ideasonboard.com
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 <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-6-git-send-email-laurent.pinchart@ideasonboard.com
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 <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: David Airlie <[email protected]> Cc: Russell King <[email protected]> Cc: Peter Senna Tschudin <[email protected]> Cc: Lucas Stach <[email protected]> Signed-off-by: Liu Ying <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Ville Syrjälä <[email protected]> Cc: Liviu Dudau <[email protected]> Cc: Sean Paul <[email protected]> Acked-by: Liviu Dudau <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> (v1) Signed-off-by: Joonas Lahtinen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1469771405-17653-1-git-send-email-joonas.lahtinen@linux.intel.com
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 <[email protected]> Acked-by: Brian Starkey <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Cc: Brian Starkey <[email protected]> Signed-off-by: Liviu Dudau <[email protected]> Acked-by: Daniel Vetter <[email protected]>
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 <[email protected]> Tested-by: Liviu Dudau <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-06-09Merge tag 'topic/drm-misc-2016-06-07' of ↵Dave Airlie1-19/+0
git://anongit.freedesktop.org/drm-intel 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://anongit.freedesktop.org/drm-intel: (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 <[email protected]>
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 <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
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 <[email protected]> Acked-by: Liviu Dudau <[email protected]>
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 <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
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 <[email protected]> Tested-by: Liviu Dudau <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-31drm/hlcd: Use lockless gem BO free callbackDaniel Vetter1-1/+1
No dev->struct_mutex anywhere to be seen. Cc: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-21drm: Nuke ->vblank_disable_allowedDaniel Vetter1-1/+0
This was added in commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241 Author: Jesse Barnes <[email protected]> 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 <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Liviu Dudau <[email protected]> Cc: Russell King <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Inki Dae <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Mark Yao <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Philipp Zabel <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Tested-by: Laurent Pinchart <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
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 <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1461679905-30177-4-git-send-email-maarten.lankhorst@linux.intel.com
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 <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
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 <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: Robin Murphy <[email protected]> Signed-off-by: Alexey Brodkin <[email protected]> Signed-off-by: Liviu Dudau <[email protected]>
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 <[email protected]> Cc: Robin Murphy <[email protected]> Signed-off-by: Liviu Dudau <[email protected]> [Kconfig cleanup and !CONFIG_PM fixes] Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Daniel Vetter <[email protected]>