- 24 Nov, 2017 2 commits
-
-
Liviu Dudau authored
The malidp_hw_device structure that the driver uses to handle the differences between versions of the IP contains both non-changeable data and fields that get updated at probe time. Previously we were copying the read-only part into allocated memory, but that can be completely avoided by splitting the structure into a read-only part and keeping the runtime modifiable fields into the old structure. Reviewed-by:
Brian Starkey <brian.starkey@arm.com> Reviewed-by:
Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by:
Liviu Dudau <liviu.dudau@arm.com>
-
Srishti Sharma authored
Replace drm_dev_unref with drm_dev_put as it is more consistent with kernel coding style. Done using the following semantic patch by coccinelle. @r@ expression e; @@ -drm_dev_unref(); +drm_dev_put(); Signed-off-by:
Srishti Sharma <srishtishar@gmail.com> [split patch into hdlcd and mali-dp versions] Signed-off-by:
Liviu Dudau <liviu.dudau@arm.com>
-
- 27 Aug, 2017 1 commit
-
-
Noralf Trønnes authored
drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Noralf Trønnes <noralf@tronnes.org> Acked-by:
Liviu Dudau <liviu.dudau@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-7-git-send-email-noralf@tronnes.org
-
- 29 Jul, 2017 1 commit
-
-
Noralf Trønnes authored
This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Noralf Trønnes <noralf@tronnes.org> Acked-by:
Brian Starkey <brian.starkey@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/1500837417-40580-6-git-send-email-noralf@tronnes.org
-
- 13 Jul, 2017 1 commit
-
-
Maarten Lankhorst authored
for_each_obj_in_state is about to be removed, so use the new iterator macros. Signed-off-by:
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Brian Starkey <brian.starkey@arm.com> Cc: Mali DP Maintainers <malidp@foss.arm.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170712081344.25495-12-maarten.lankhorst@linux.intel.comReviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by:
Liviu Dudau <liviu.dudau@arm.com>
-
- 01 Jun, 2017 1 commit
-
-
Daniel Vetter authored
IRQs are properly shut down, so it almost works as race-free shutdown. Except the irq is stopped after the vblank stuff, so boom anyway. Proper way would be to call drm_atomic_helper_shutdown before any of the kms things gets stopped. So no harm in removing the drm_vblank_cleanup here really. Same story for both hdlcd and mali. v2: Move misplaced malidp hunk to this patch (Liviu). Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Brian Starkey <brian.starkey@arm.com> Acked-by:
Liviu Dudau <liviu.dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-17-daniel.vetter@ffwll.ch
-
- 24 Apr, 2017 7 commits
-
-
Mihail Atanassov authored
Apply image enhacement when we are upscaling by a factor of 2 or more in either direction. Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Mihail Atanassov authored
Enable the scaling engine for upscaling a single plane using the polyphase scaler. No image enhancement support or downscaling yet*, and composition result scaling is not implemented. * Downscaling a plane requires mclk > pxlclk. Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Liviu Dudau authored
Add a core_id file in the driver's sysfs directory, exposing the hardware CORE ID. This is useful to allow userspace to discover the hardware version used. Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Mihail Atanassov authored
All DPs have a COLORADJ matrix which is applied prior to output gamma. Attach that to the CTM property. Also, ensure the input CTM's coefficients can fit in the DP registers' Q3.12 format. Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Mihail Atanassov authored
Add gamma via the DRM GAMMA_LUT/GAMMA_LUT_SIZE CRTC properties. The expected LUT size is 4096 in order to produce as accurate a set of segments as possible. This version uses only the green channel's gamma curve to set the hardware curve on DP550/650. For the sake of simplicity, it uses the same table of coefficients for all 3 curves on DP500. Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by:
Liviu Dudau <liviu.dudau@arm.com>
-
Liviu Dudau authored
Enable runtime and system Power Management. Clocks are now managed from malidp_crtc_{enable,disable} functions. Suspend-to-RAM tested as working on Juno. Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Liviu Dudau authored
Mali DP needs to have all the planes that are becoming inactive in the new state disabled before re-enabling the active CRTC, otherwise we start streaming out data from old pointers in memory. Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
- 06 Apr, 2017 1 commit
-
-
Rob Herring authored
Convert drivers to use the new of_graph_get_remote_node() helper instead of parsing the endpoint node and then getting the remote device node. Now drivers can just specify the device node and which port/endpoint and get back the connected remote device node. The details of the graph binding are nicely abstracted into the core OF graph code. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by:
Rob Herring <robh@kernel.org> Acked-by:
Neil Armstrong <narmstrong@baylibre.com> Tested-by:
Liviu Dudau <liviu.dudau@arm.com> Tested-by:
Eric Anholt <eric@anholt.net> Tested-by:
Jyri Sarha <jsarha@ti.com> Tested by: Archit Taneja <architt@codeaurora.org> Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
- 14 Mar, 2017 1 commit
-
-
Daniel Vetter authored
Less code ftw. This converts all drivers except the tinydrm helper module. That one needs more work, since it gets the THIS_MODULE reference from tinydrm.ko instead of the actual driver module like it should. Probably needs a similar trick like I used here with generating the entire struct with a macro. Cc: Noralf Trønnes <noralf@tronnes.org> Reviewed-by:
Sean Paul <seanpaul@chromium.org> Reviewed-by:
Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170308141257.12119-24-daniel.vetter@ffwll.ch
-
- 12 Feb, 2017 1 commit
-
-
Laurent Pinchart authored
The drm_mode_config helper private field points to a structure of function pointers that don't need to be modified at runtime. Make it const. Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Gabriel Krisman Bertazi <krisman@collabora.co.uk> Acked-by:
Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170102091613.6310-1-laurent.pinchart@ideasonboard.com
-
- 07 Feb, 2017 2 commits
-
-
Shawn Guo authored
The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. Signed-off-by:
Shawn Guo <shawn.guo@linaro.org> Cc: Mali DP Maintainers <malidp@foss.arm.com> Acked-by:
Liviu Dudau <liviu.dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-6-git-send-email-shawnguo@kernel.org
-
Shawn Guo authored
Core code already makes drm_driver.get_vblank_counter hook optional by letting drm_vblank_no_hw_counter be the default implementation for the function hook. So the drm_vblank_no_hw_counter assignment in the driver code becomes redundant and can be removed now. Signed-off-by:
Shawn Guo <shawn.guo@linaro.org> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Mali DP Maintainers <malidp@foss.arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: CK Hu <ck.hu@mediatek.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Marek Vasut <marex@denx.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Jyri Sarha <jsarha@ti.com> Cc: Eric Anholt <eric@anholt.net> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by:
Neil Armstrong <narmstrong@baylibre.com> Acked-by:
Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Alexey Brodkin <abrodkin@synopsys.com> Acked-by:
Liviu Dudau <liviu.dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-3-git-send-email-shawnguo@kernel.org
-
- 02 Feb, 2017 1 commit
-
-
Gabriel Krisman Bertazi authored
Instead of receiving the num_crts as a parameter, we can read it directly from the mode_config structure. I audited the drivers that invoke this helper and I believe all of them initialize the mode_config struct accordingly, prior to calling the fb_helper. I used the following coccinelle hack to make this transformation, except for the function headers and comment updates. The first and second rules are split because I couldn't find a way to remove the unused temporary variables at the same time I removed the parameter. // <smpl> @r@ expression A,B,D,E; identifier C; @@ ( - drm_fb_helper_init(A,B,C,D) + drm_fb_helper_init(A,B,D) | - drm_fbdev_cma_init_with_funcs(A,B,C,D,E) + drm_fbdev_cma_init_with_funcs(A,B,D,E) | - drm_fbdev_cma_init(A,B,C,D) + drm_fbdev_cma_init(A,B,D) ) @@ expression A,B,C,D,E; @@ ( - drm_fb_helper_init(A,B,C,D) + drm_fb_helper_init(A,B,D) | - drm_fbdev_cma_init_with_funcs(A,B,C,D,E) + drm_fbdev_cma_init_with_funcs(A,B,D,E) | - drm_fbdev_cma_init(A,B,C,D) + drm_fbdev_cma_init(A,B,D) ) @@ identifier r.C; type T; expression V; @@ - T C; <... when != C - C = V; ...> // </smpl> Changes since v1: - Rebased on top of the tip of drm-misc-next. - Remove mention to sti since a proper fix got merged. Suggested-by:
Daniel Vetter <daniel.vetter@intel.com> Signed-off-by:
Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by:
Eric Anholt <eric@anholt.net> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170202162640.27261-1-krisman@collabora.co.uk
-
- 26 Jan, 2017 2 commits
-
-
Mihail Atanassov authored
If the device-tree 'reg' node doesn't reserve enough space for the DP, fail to bind. Reviewed-by:
Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> [renamed added function to malidp_has_sufficient_address_space] Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Mihail Atanassov authored
Refuse to bind if the device-tree compatible string lists a different hardware version. Reviewed-by:
Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Mihail Atanassov <mihail.atanassov@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
- 23 Jan, 2017 1 commit
-
-
Liviu Dudau authored
This struct member managed to outlive the submission process without being removed. It is useless. Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
- 04 Nov, 2016 2 commits
-
-
Brian Starkey authored
We need to explicitly disable our planes, so don't set the flag which would otherwise skip the plane disable when the CRTC is disabled. Signed-off-by:
Brian Starkey <brian.starkey@arm.com> Acked-by:
Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
Brian Starkey authored
Split out malidp_fini as the opposite of malidp_init. This helps keep the cleanup paths neat and easier to manage. Signed-off-by:
Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com>
-
- 02 Nov, 2016 3 commits
-
-
Liviu Dudau authored
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 <Liviu.Dudau@arm.com>
-
Liviu Dudau authored
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 <Liviu.Dudau@arm.com>
-
Jani Nikula authored
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 <patrik.r.jakobsson@gmail.com> Signed-off-by:
Jani Nikula <jani.nikula@intel.com> Signed-off-by:
Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1478014844-27454-1-git-send-email-jani.nikula@intel.com
-
- 31 Oct, 2016 1 commit
-
-
Brian Starkey authored
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 <rmk+kernel@arm.linux.org.uk> Signed-off-by:
Brian Starkey <brian.starkey@arm.com> Reviewed-by:
Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk>
-
- 25 Oct, 2016 1 commit
-
-
Russell King authored
Convert DT component matching to use component_match_add_release(). Acked-by:
Jyri Sarha <jsarha@ti.com> Reviewed-by:
Jyri Sarha <jsarha@ti.com> Signed-off-by:
Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by:
Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/E1bwo6l-0005Io-Q1@rmk-PC.armlinux.org.uk
-
- 22 Sep, 2016 1 commit
-
-
Tom Gundersen authored
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 <teg@jklm.no> Signed-off-by:
Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-2-teg@jklm.no
-
- 29 Aug, 2016 1 commit
-
-
Liu Ying authored
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 <daniel.vetter@ffwll.ch> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by:
Liu Ying <gnuiyl@gmail.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1472461923-14364-1-git-send-email-gnuiyl@gmail.com
-
- 28 Jul, 2016 2 commits
-
-
Wei Yongjun authored
Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3c31760e ('drm/arm: mali-dp: Set crtc.port to the port instead of the endpoint') Signed-off-by:
Wei Yongjun <weiyj.lk@gmail.com> Acked-by:
Brian Starkey <brian.starkey@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1469672066-13401-1-git-send-email-weiyj.lk@gmail.com
-
Wei Yongjun authored
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 <weiyj.lk@gmail.com> Acked-by:
Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1469671753-12961-1-git-send-email-weiyj.lk@gmail.com
-
- 26 Jul, 2016 1 commit
-
-
Brian Starkey authored
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 <brian.starkey@arm.com> Acked-by:
Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by:
Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1469549725-19577-1-git-send-email-brian.starkey@arm.com
-
- 15 Jun, 2016 1 commit
-
-
Liviu Dudau authored
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 <David.Brown@arm.com> Cc: Brian Starkey <Brian.Starkey@arm.com> Signed-off-by:
Liviu Dudau <Liviu.Dudau@arm.com> Acked-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-