summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-30drm/bridge: analogix-anx78xx: Use bridge->mode_valid() callbackJose Abreu
Now that we have a callback to check if bridge supports a given mode we can use it in Analogix bridge so that we restrict the number of probbed modes to the ones we can actually display. Also, there is no need to use mode_fixup() callback as mode_valid() will handle the mode validation. Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1d0ed1858ae56c827bd09cc1fa6ff4a05d1530eb.1495720737.git.joabreu@synopsys.com
2017-05-30drm: Use mode_valid() in atomic modesetJose Abreu
This patches makes use of the new mode_valid() callbacks introduced previously to validate the full video pipeline when modesetting. This calls the connector->mode_valid(), encoder->mode_valid(), bridge->mode_valid() and crtc->mode_valid() so that we can make sure that the mode will be accepted in every components. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Airlie <airlied@linux.ie> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Changes v1->v2: - Removed call to connector->mode_valid (Ville, Daniel) - Changed function name (Ville) - Use for_each_new_connector_in_state (Ville) - Do not validate if connector and mode didn't change (Ville) - Use new helpers to call mode_valid Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/a457d6a69ad07b3936304653c919068c430c0857.1495720737.git.joabreu@synopsys.com
2017-05-30drm: Use new mode_valid() helpers in connector probe helperJose Abreu
This changes the connector probe helper function to use the new encoder->mode_valid(), bridge->mode_valid() and crtc->mode_valid() helper callbacks to validate the modes. The new callbacks are optional so the behaviour remains the same if they are not implemented. If they are, then the code loops through all the connector's encodersXbridgesXcrtcs and calls the callback. If at least a valid encoderXbridgeXcrtc combination is found which accepts the mode then the function returns MODE_OK. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Dave Airlie <airlied@linux.ie> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Changes v3->v4: - Change function name (Laurent) Changes v2->v3: - Call also bridge->mode_valid (Daniel) Changes v1->v2: - Use new helpers suggested by Ville - Change documentation (Daniel) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/d4e3ba87d822fa92f1b8773e441b9a02af3bde71.1495720737.git.joabreu@synopsys.com
2017-05-30drm: Introduce drm_bridge_mode_valid()Jose Abreu
Introduce a new helper function which calls mode_valid() callback for all bridges in an encoder chain. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Dave Airlie <airlied@linux.ie> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/36bd5e054496ad3c9c71f1ffe204f28533f55f1e.1495720737.git.joabreu@synopsys.com
2017-05-30drm: Add drm_{crtc/encoder/connector}_mode_valid()Jose Abreu
Add a new helper to call crtc->mode_valid, connector->mode_valid and encoder->mode_valid callbacks. Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jose Abreu <joabreu@synopsys.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Dave Airlie <airlied@linux.ie> Changes v2->v3: - Move helpers to drm_probe_helper.c (Daniel) - Squeeze patches that introduce helpers into a single one (Daniel) Signed-off-by: Jose Abreu <joabreu@synopsys.com> [danvet: Make it compile when CONFIG_DRM_DP_AUX_CHARDEV is selected.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/b55c8bd029da219ff04e39086025c115731a49b1.1495720737.git.joabreu@synopsys.com
2017-05-29drm: Remove drm_device->virtdevDaniel Vetter
This is a leftover from the drm_bus days, where we've had a bus-specific device type for every bus type in drm_device. Except for pci (which we can't remove because dri1 drivers) this is all gone. And the virt driver also doesn't really need it, dev_to_virtio works perfectly fine. Cc: David Airlie <airlied@linux.ie> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: virtualization@lists.linux-foundation.org Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-3-daniel.vetter@ffwll.ch
2017-05-26drm: todo: remove task about switch to drm_connector_list_iterGustavo Padovan
This is now completed. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-9-gustavo@padovan.org
2017-05-26drm: remove unsafe drm_for_each_connector()Gustavo Padovan
After converting all users to drm_for_each_connector_iter() we no longer need drm_for_each_connector() so we can go ahead and remove it. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-8-gustavo@padovan.org
2017-05-26drm/vc4: use drm_for_each_connector_iter()Gustavo Padovan
Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). v2: add missing drm_connector_list_iter_end(Daniel Vetter) Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170512164100.7649-1-gustavo@padovan.org
2017-05-26drm/nouveau: use drm_for_each_connector_iter()Gustavo Padovan
Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-6-gustavo@padovan.org
2017-05-26drm/mediatek: use drm_for_each_connector_iter()Gustavo Padovan
Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-5-gustavo@padovan.org
2017-05-26drm/i915: use drm_for_each_connector_iter()Gustavo Padovan
Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter(). Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-4-gustavo@padovan.org
2017-05-26drm/rockchip: use drm_for_each_connector_iter()Gustavo Padovan
Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter() Cc: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170515134330.3275-1-gustavo@padovan.org
2017-05-26drm/exynos: use drm_for_each_connector_iter()Gustavo Padovan
Drop legacy drm_for_each_connector() in favor of the race-free drm_for_each_connector_iter() Cc: Inki Dae <inki.dae@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170511191049.28944-2-gustavo@padovan.org
2017-05-24dma-buf/sync-file: Defer creation of sync_file->nameChris Wilson
Constructing the name takes the majority of the time for allocating a sync_file to wrap a fence, and the name is very rarely used (only via the sync_file status user interface). To reduce the impact on the common path (that of creating sync_file to pass around), defer the construction of the name until it is first used. v2: Update kerneldoc (kbuild test robot) v3: sync_debug.c was peeking at the name v4: Comment upon the potential race between two users of sync_file_get_name() and claim that such a race is below the level of notice. However, to prevent any future nuisance, use a global spinlock to serialize the assignment of the name. v5: Completely avoid the read/write race by only storing the name passed in from the user inside sync_file->user_name and passing in a buffer to dynamically construct the name otherwise. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170516111042.24719-1-chris@chris-wilson.co.uk
2017-05-24sync_file.txt: standardize document formatMauro Carvalho Chehab
Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Use markup for document title and authorship; - Mark literal blocks; - Use a numbered list for references. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/e781f61e582e7c7eb5de456608043aff9fe2b2b5.1495157082.git.mchehab@s-opensource.com
2017-05-23gpu: drm: gma500: remove two more dead variableArnd Bergmann
The dead code removal left two unused variables: drivers/gpu/drm/gma500/mdfld_tpo_vid.c: In function 'tpo_vid_get_config_mode': drivers/gpu/drm/gma500/mdfld_tpo_vid.c:34:31: error: unused variable 'ti' [-Werror=unused-variable] This removes them as well. Fixes: 94d7fb4982d2 ("gpu: drm: gma500: remove dead code") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170522203031.2912874-1-arnd@arndb.de
2017-05-23drm/doc: Clarify mode_fixup vs. atomic_check a bit moreDaniel Vetter
Brought up by both Laurent and Andrzej when reviewing the new ->mode_valid hooks. Since mode_fixup is just a simpler version of the much more generic atomic_check we can't really unify it with mode_valid. Most drivers should probably switch their current mode_fixup code to either the new mode_valid or the atomic_check hooks, but e.g. that doesn't exist yet for bridges, and for CRTCs the situation is a bit more complicated. Hence there's no clear equivalence between mode_fixup and mode_valid, even if it looks like that at first glance. v2: Fix accidental double-dot (Adnrzej). Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Jose Abreu <Jose.Abreu@synopsys.com> Reviewed-by: Jose Abreu <joabreu@synopsys.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170515091136.26307-2-daniel.vetter@ffwll.ch
2017-05-23drm/doc: Document adjusted/request modes a bit betterDaniel Vetter
Laurent started a massive discussion on IRC about this. Let's try to document common usage a bit better. v2: Cross-links+typos. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jose Abreu <Jose.Abreu@synopsys.com> Reviewed-by: Jose Abreu <joabreu@synopsys.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170515091136.26307-1-daniel.vetter@ffwll.ch
2017-05-23drm: Add crtc/encoder/bridge->mode_valid() callbacksJose Abreu
This adds a new callback to crtc, encoder and bridge helper functions called mode_valid(). This callback shall be implemented if the corresponding component has some sort of restriction in the modes that can be displayed. A NULL callback implicates that the component can display all the modes. We also change the documentation so that the new and old callbacks are correctly documented. Only the callbacks were implemented to simplify review process, following patches will make use of them. Changes in v2 from Daniel: - Update the warning about how modes aren't filtered in atomic_check - the heleprs help out a lot more now. - Consistenly roll out that warning, crtc/encoder's atomic_check missed it. - Sprinkle more links all over the place, so it's easier to see where this stuff is used and how the differen hooks are related. - Note that ->mode_valid is optional everywhere. - Explain why the connector's mode_valid is special and does _not_ get called in atomic_check. v3: Document what can and cannot be checked in mode_valid a bit better (Andrjez). Answer: Only allowed to look at the mode, nothing else. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: Jose Abreu <joabreu@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Airlie <airlied@linux.ie> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Archit Taneja <architt@codeaurora.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v2) Reviewed-by: Jose Abreu <joabreu@synopsys.com> (v2) Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170515093347.31098-1-daniel.vetter@ffwll.ch
2017-05-23MAINTAINERS: update drm/stm maintainers listVincent Abriou
Add Benjamin Gaignard and Vincent Abriou as STM maintainers: Benjamin Gaignard <benjamin.gaignard@linaro.org> Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Philippe Cornu <philippe.cornu@st.com> Link: http://patchwork.freedesktop.org/patch/msgid/1495544446-22360-1-git-send-email-vincent.abriou@st.com
2017-05-23drm/stm: ltdc: fix duplicated argumentsPhilippe CORNU
Fix COMPILE_TEST build issue detected with the rule: "duplicated argument to & or |" Signed-off-by: Philippe CORNU <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/1495445421-20846-1-git-send-email-philippe.cornu@st.com
2017-05-22drm/pl111: Fix return value check in pl111_amba_probe()Wei Yongjun
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170521010152.6186-1-weiyj.lk@gmail.com
2017-05-22drm/amd: include <linux/delay.h> instead of "linux/delay.h"Masahiro Yamada
Use <...> notation to include headers located in include/linux. While we are here, tweak the includes order a bit to sort them alphabetically. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1495082612-10385-1-git-send-email-yamada.masahiro@socionext.com
2017-05-22drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPIRobert Foss
Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ defines to the UAPI as a convenience. Ideally the DRM_ROTATE_ and DRM_REFLECT_ property ids are looked up through the atomic API, but realizing that userspace is likely to take shortcuts and assume that the enum values are what is sent over the wire. As a result these defines are provided purely as a convenience to userspace applications. Changes since v3: - Switched away from past tense in comments - Add define name change to previously mis-spelled DRM_REFLECT_X comment - Improved the comment for the DRM_MODE_REFLECT_<axis> comment Changes since v2: - Changed define prefix from DRM_MODE_PROP_ to DRM_MODE_ - Fix compilation errors - Changed comment formatting - Deduplicated comment lines - Clarified DRM_MODE_PROP_REFLECT_ comment Changes since v1: - Moved defines from drm.h to drm_mode.h - Changed define prefix from DRM_ to DRM_MODE_PROP_ - Updated uses of the defines to the new prefix - Removed include from drm_rect.c - Stopped using the BIT() macro Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Sinclair Yeh <syeh@vmware.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/20170519205017.23307-2-robert.foss@collabora.com
2017-05-22drm/vgem: Fix return value check in vgem_init()Wei Yongjun
In case of error, the function platform_device_register_simple() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: af33a9190d02 ("drm/vgem: Enable dmabuf import interfaces") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> [danvet: Fix fixes: tag per Chris' review.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170521011939.8111-1-weiyj.lk@gmail.com
2017-05-22drm/blend: Fix comment typ-oRobert Foss
Fix DRM_REFELCT_Y -> DRM_REFLECT_Y. Signed-off-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170519205017.23307-1-robert.foss@collabora.com
2017-05-22drm/stm: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1495081793-9707-13-git-send-email-yamada.masahiro@socionext.com
2017-05-22drm/vc4: fix include notation and remove -Iinclude/drm flagMasahiro Yamada
Include <drm/*.h> instead of relative path from include/drm, then remove the -Iinclude/drm compiler flag. While we are here, use <...> instead of "..." for include/linux/*.h and include/sound/*.h headers too. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1495081793-9707-2-git-send-email-yamada.masahiro@socionext.com
2017-05-19drm/pl111: Add a debugfs node to dump our registers.Eric Anholt
While debugging an X11 display failure, I wanted to see where we were actually scanning out from. This is probably generally useful to others that might be working on this device. v2: Fix uint32_t sparse warning. Signed-off-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170518005640.10310-1-eric@anholt.net Reviewed-by: Linus Walleij <linus.walleij@linaro.org> (v1)
2017-05-19drm/pl111: make structure mode_config_funcs staticColin Ian King
structure mode_config_funcs can be made static as it does not need to be in global scope. Fixes sparse warning: warning: symbol 'mode_config_funcs' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170519111018.19641-1-colin.king@canonical.com
2017-05-19drm/pl111: make structure pl111_display_funcs staticColin Ian King
structure pl111_display_funcs can be made static as it does not need to be in global scope. Fixes sparse warning: "warning: symbol 'pl111_display_funcs' was not declared. Should it be static?" Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170519110203.19417-1-colin.king@canonical.com
2017-05-19drm/pl111: Register the clock divider and use it.Eric Anholt
This is required for the panel to work on bcm911360, where CLCDCLK is the fixed 200Mhz AXI41 clock. The rate set is still passed up to the CLCDCLK, for platforms that have a settable rate on that one. v2: Set SET_RATE_PARENT (caught by Linus Walleij), depend on COMMON_CLK. v3: Mark the clk_ops static (caught by Stephen). Signed-off-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170508193348.30236-1-eric@anholt.net Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
2017-05-18drm: drop drm_[cm]alloc* helpersMichal Hocko
Now that drm_[cm]alloc* helpers are simple one line wrappers around kvmalloc_array and drm_free_large is just kvfree alias we can drop them and replace by their native forms. This shouldn't introduce any functional change. Changes since v1 - fix typo in drivers/gpu//drm/etnaviv/etnaviv_gem.c - noticed by 0day build robot Suggested-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Michal Hocko <mhocko@suse.com>drm: drop drm_[cm]alloc* helpers [danvet: Fixup vgem which grew another user very recently.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Christian König <christian.koenig@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170517122312.GK18247@dhcp22.suse.cz
2017-05-18drm: replace drm_[cm]alloc* by kvmalloc alternativesMichal Hocko
drm_[cm]alloc* has grown their own kvmalloc with vmalloc fallback implementations. MM has grown kvmalloc* helpers in the meantime. Let's use those because it a) reduces the code and b) MM has a better idea how to implement fallbacks (e.g. do not vmalloc before kmalloc is tried with __GFP_NORETRY). drm_calloc_large needs to get __GFP_ZERO explicitly but it is the same thing as kvmalloc_array in principle. Signed-off-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170517065509.18659-1-mhocko@kernel.org
2017-05-18gpu: host1x: select IOMMU_IOVAArnd Bergmann
When IOMMU_IOVA is not built-in but host1x is, we get a link error: drivers/gpu/host1x/dev.o: In function `host1x_remove': dev.c:(.text.host1x_remove+0x50): undefined reference to `put_iova_domain' drivers/gpu/host1x/dev.o: In function `host1x_probe': dev.c:(.text.host1x_probe+0x31c): undefined reference to `init_iova_domain' dev.c:(.text.host1x_probe+0x38c): undefined reference to `put_iova_domain' drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init': cdma.c:(.text.host1x_cdma_init+0x238): undefined reference to `alloc_iova' cdma.c:(.text.host1x_cdma_init+0x2c0): undefined reference to `__free_iova' drivers/gpu/host1x/cdma.o: In function `host1x_cdma_deinit': cdma.c:(.text.host1x_cdma_deinit+0xb0): undefined reference to `free_iova' This adds the same select statement that we have for drm_tegra. Fixes: 404bfb78daf3 ("gpu: host1x: Add IOMMU support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170419182449.885312-1-arnd@arndb.de
2017-05-18Merge remote-tracking branch 'airlied/drm-next' into drm-misc-nextSean Paul
Picking up drm-next @ 4.12-rc1 in order to apply Michal Hocko's vmalloc patch set Signed-off-by: Sean Paul <seanpaul@chromium.org>
2017-05-18drm/sti:fix spelling mistake: "compoment" -> "component"Colin Ian King
Trivial fix to spelling mistake in DRM_ERROR message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170513224150.19955-1-colin.king@canonical.com
2017-05-18drm: trivial documentation fix to drm_for_each_connector_iterGabriel Krisman Bertazi
While reading drm_for_each_connector_iter, I noticed a mention to drm_connector_begin which doesn't exist. It should be drm_connector_get. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170421003819.17685-1-krisman@collabora.co.uk
2017-05-18drm/via: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-30-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/vgem: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-29-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/udl: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-28-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/tdfx: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-27-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/sis: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-26-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/savage: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-25-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/r128: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-24-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/omap: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-23-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/mga: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-22-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/i2c: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-21-git-send-email-yamada.masahiro@socionext.com
2017-05-18drm/i810: remove unneeded -Iinclude/drm compiler flagMasahiro Yamada
With the include directives under include/drm/ fixed, this flag is no longer needed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493009447-31524-20-git-send-email-yamada.masahiro@socionext.com