summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/atomic-helper: always track connector commits, tooDaniel Vetter2017-11-151-9/+3
| | | | | | | | | | | | | | It's useful for syncing async connector work like link retraining. v2: Make it work (Manasi&Ville) Cc: Manasi Navare <manasi.d.navare@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171110105313.16718-1-daniel.vetter@ffwll.ch
* drm: Fix kerneldocs for drm_plane modifiersVille Syrjälä2017-11-141-0/+2
| | | | | | | | | | | Add the missing kerneldoc for modifiers and modifier_count. Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171114191021.15591-3-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm/gem-cma-helper: Fix kerneldocsVille Syrjälä2017-11-141-1/+1
| | | | | | | | | | | Use the correct name for the function argument in the docs. Cc: Noralf Trønnes <noralf@tronnes.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171114191021.15591-1-ville.syrjala@linux.intel.com Acked-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* drm: Fix modifiers_property kernel docVille Syrjälä2017-11-141-1/+1
| | | | | | | | | | | | | The member is called 'modifiers_property' instead of 'modifiers'. Adjust the kernel docs to match. Cc: dri-devel@lists.freedesktop.org Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-11-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* dma-buf: try to replace a signaled fence in ↵Christian König2017-11-141-3/+15
| | | | | | | | | | | | | | | reservation_object_add_shared_inplace The amdgpu issue to also need signaled fences in the reservation objects should be fixed by now. Optimize the handling by replacing a signaled fence when adding a new shared one. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171114142436.1360-2-christian.koenig@amd.com
* dma-buf: keep only not signaled fence in ↵Christian König2017-11-141-17/+21
| | | | | | | | | | | | | | | | | | reservation_object_add_shared_replace v3 The amdgpu issue to also need signaled fences in the reservation objects should be fixed by now. Optimize the list by keeping only the not signaled yet fences around. v2: temporary put the signaled fences at the end of the new container v3: put the old fence at the end of the new container as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171114142436.1360-1-christian.koenig@amd.com
* drm/debugfs: Fix framebuffer debugfs file initNoralf Trønnes2017-11-141-4/+6
| | | | | | | | | | | | | | | | | The introduction of: drm/framebuffer: Add framebuffer debugfs file broke vgem. That patch assumed that all drivers had initialized the dev->mode_config.fb_lock mutex which happens in drm_mode_config_init(). vgem doesn't need to call drm_mode_config_init(). Fix this by only creating the framebuffer debugfs file for modesetting drivers. Fixes: 45d58b40292b ("drm/framebuffer: Add framebuffer debugfs file") Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171113231201.26177-1-noralf@tronnes.org
* dma-buf: add reservation_object_lock_interruptible()Christian König2017-11-131-0/+23
| | | | | | | | | That's the only wrapper function missing and necessary to cleanup TTM. Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171109085909.1653-3-christian.koenig@amd.com
* drm/cma-helper: Remove drm_fb_cma_debugfs_show()Noralf Trønnes2017-11-114-73/+0
| | | | | | | | | | | drm_fb_cma_debugfs_show() and drm_gem_cma_describe() are superseded by drm_framebuffer_debugfs_init() and drm_gem_cma_print_info(). Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-13-noralf@tronnes.org
* drm/tinydrm: Use drm_gem_cma_print_info()Noralf Trønnes2017-11-112-7/+2
| | | | | | | | | | | | | There is a new core debugfs file that prints fb/gem info: <debugfs>/dri/<n>/framebuffer Use drm_gem_cma_print_info() to provide info to that output instead of using drm_fb_cma_debugfs_show(). Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-12-noralf@tronnes.org
* drm/tilcdc: Use drm_gem_cma_print_info()Noralf Trønnes2017-11-111-1/+1
| | | | | | | | | | | | | | | There is a new core debugfs file that prints fb/gem info: <debugfs>/dri/<n>/framebuffer Use drm_gem_cma_print_info() to provide info to that output instead of using drm_fb_cma_debugfs_show(). Cc: Jyri Sarha <jsarha@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-11-noralf@tronnes.org
* drm/arm/hdlcd: Use drm_gem_cma_print_info()Noralf Trønnes2017-11-111-1/+1
| | | | | | | | | | | | | | | There is a new core debugfs file that prints fb/gem info: <debugfs>/dri/<n>/framebuffer Use drm_gem_cma_print_info() to provide info to that output instead of using drm_fb_cma_debugfs_show(). 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> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-10-noralf@tronnes.org
* drm/arc: Use drm_gem_cma_print_info()Noralf Trønnes2017-11-111-1/+1
| | | | | | | | | | | | | | There is a new core debugfs file that prints fb/gem info: <debugfs>/dri/<n>/framebuffer Use drm_gem_cma_print_info() to provide info to that output instead of using drm_fb_cma_debugfs_show(). Cc: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-9-noralf@tronnes.org
* drm/cma-helper: Add drm_gem_cma_print_info()Noralf Trønnes2017-11-112-0/+22
| | | | | | | | | Add drm_gem_cma_print_info() for debugfs printing struct drm_gem_cma_object specific info. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-8-noralf@tronnes.org
* drm/cma-helper: Turn to_drm_gem_cma_obj() into a macroNoralf Trønnes2017-11-111-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the argument to be a const. The other option was to keep it an inline function and make the argument a const: static inline struct drm_gem_cma_object * to_drm_gem_cma_obj(const struct drm_gem_object *gem_obj) { return container_of(gem_obj, struct drm_gem_cma_object, base); } This will happily return a non-const pointer to the drm_gem_cma_object based on a const pointer to the contained drm_gem_object, thus creating const-safety problems. There was an attempt to fix the problem in the container_of() macro itself (see https://lkml.org/lkml/2017/5/19/381) but the patch seems to have fallen through the cracks. It would require turning this inline function into a macro. By making this a macro now, we will benefit from a possible future enhancement of container_of(). We don't loose type checking by doing this, container_of() takes care of that. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-7-noralf@tronnes.org
* drm/atomic: Use drm_framebuffer_print_info()Noralf Trønnes2017-11-111-15/+3
| | | | | | | | | | Use drm_framebuffer_print_info() to print framebuffer info in drm_atomic_plane_print_state(). This will give optional GEM info as well. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-6-noralf@tronnes.org
* drm/framebuffer: Add framebuffer debugfs fileNoralf Trønnes2017-11-115-0/+104
| | | | | | | | | | Add debugfs file that dumps info about the framebuffers and its planes. Also dump info about any connected gem object(s). Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-5-noralf@tronnes.org
* drm/print: Add drm_printf_indent()Noralf Trønnes2017-11-111-0/+8
| | | | | | | | | | Add drm_printf_indent() that adds tab indentation according to argument. Indentation overflow is marked with an X. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-4-noralf@tronnes.org
* drm/framebuffer: drm_framebuffer_read_refcount() constify argumentNoralf Trønnes2017-11-111-1/+1
| | | | | | | | | Constify argument so functions calling into this take a const argument. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-3-noralf@tronnes.org
* drm/vma-manager: drm_vma_node_start() constify argumentNoralf Trønnes2017-11-111-1/+1
| | | | | | | | | Constify argument so functions calling into this take a const argument. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-2-noralf@tronnes.org
* virtgpu: remove redundant task_comm copyingMichał Mirosław2017-11-101-4/+2
| | | | | | | | | | | Remove redundant task name copying because: 1. task->comm is already NUL-terminated 2. virtio_gpu_context_create() trims passed dbgname anyway Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: http://patchwork.freedesktop.org/patch/msgid/588612bbc672e8b598e10f79fcbc041122e844ba.1504202471.git.mirq-linux@rere.qmqm.pl Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm: qxl: remove pr_info message, stops log spammingColin Ian King2017-11-101-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Simply mmap'ing /dev/dri/card0 repeatedly will spam the kernel log with qxl_mmap information messages. The following example code illustrates this: int main(void) { int fd = open("/dev/dri/card0", O_RDONLY); if (fd == -1) err(1, "open failed"); for (;;) { void *m = mmap(NULL, 4096, PROT_READ, MAP_SHARED, fd, 0); if (m != MAP_FAILED) munmap(m, 4096); } } Stop the spamming by removing the pr_info message. Since the mmap'ing returns -EINVAL there is no need for the pr_info message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170912173422.14062-1-colin.king@canonical.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/cirrus: add create_handle support.Lepton Wu2017-11-101-0/+9
| | | | | | | | | Add create_handle support to cirrus fb. Without this, screenshot tool in chromium OS can't work. Signed-off-by: Lepton Wu <ytht.net@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20171108185537.56167-1-ytht.net@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* drm/virtio: add create_handle support.Lepton Wu2017-11-101-0/+12
| | | | | | | | | Add create_handle support to virtio fb. Without this, screenshot tool in chromium OS can't work. Signed-off-by: Lepton Wu <ytht.net@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20171108184209.46211-1-ytht.net@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* dma-buf: Use rcu_assign_pointer() to set rcu protected pointersVille Syrjälä2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | Use rcu_assign_pointer() when setting an rcu protected pointer. This gets rid of another sparse warning. Cc: Dave Airlie <airlied@redhat.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: linaro-mm-sig@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Christian König <christian.koenig@amd.com>. Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
* drm/syncobj: Use proper methods for accessing rcu protected pointersVille Syrjälä2017-11-091-4/+7
| | | | | | | | | | | | | | | | | | | Use rcu_dereference_protected() and rcu_assign_pointer() for accessing the rcu protected syncobj->fence pointer. This eliminates several sparse warnings. Cc: Dave Airlie <airlied@redhat.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: linaro-mm-sig@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-4-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Christian König <christian.koenig@amd.com>
* dma-buf/fence: Sparse wants __rcu on the object itselfChris Wilson2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | In order to silence sparse in dma_fence_get_rcu_safe(), we need to mark the incoming fence object as being RCU protected and not the pointer to the object. Cc: Dave Airlie <airlied@redhat.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: linaro-mm-sig@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Sumit Semwal <sumit.semwal@linaro.org> [vsyrjala: s/silent/silence/ in commit message] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
* drm/syncobj: Mark up the fence as an RCU protected pointerChris Wilson2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | We take advantage of that syncobj->fence is an RCU-protected pointer, and so sparse complains that it is lacking annotation. Cc: Dave Airlie <airlied@redhat.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: linaro-mm-sig@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
* drm/vc4: Reject HDMI modes with too high of clocks.Eric Anholt2017-11-091-0/+15
| | | | | | | | | | | | Peter Robinson reported issues on Fedora with 4k monitors not having their modes filtered down to 1920x1080 on Raspberry Pi. v2: Fix vc5 typo in place of vc4. Cc: Peter Robinson <pbrobinson@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20170920225935.14566-1-eric@anholt.net Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
* drm: Update docs for legacy kms stateDaniel Vetter2017-11-094-5/+28
| | | | | | | | | | | | | Point at the equivalent atomic state and explain that atomic drivers shouldn't really depend upon legacy state. Motivated by questions from Manasi about how this all is supposed to work. Cc: Manasi Navare <manasi.d.navare@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171108203007.12274-1-daniel.vetter@ffwll.ch
* drm: sti: remove vtg_removeBenjamin Gaignard2017-11-081-6/+0
| | | | | | | | vtg_remove does nothing just remove it Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1510146367-25329-1-git-send-email-benjamin.gaignard@linaro.org
* drm: sti: remove useless fields from vtg structureBenjamin Gaignard2017-11-082-24/+9
| | | | | | | | | | | Drivers are registered on platform bus so the private list could be replace by a call to of_find_device_by_node(). Changing this also makes dev, np and link fields useless in vtg structure. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1510146255-24982-1-git-send-email-benjamin.gaignard@linaro.org
* drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2.Maarten Lankhorst2017-11-081-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | This introduces a slight behavioral change to rmfb. Instead of disabling a crtc when the primary plane is disabled, we try to preserve it. Apart from old versions of the vmwgfx xorg driver, there is nothing depending on rmfb disabling a crtc. Vmwgfx' and simple kms helper atomic implementation rejects CRTC enabled without plane, so we can do this safely. If the atomic commit is rejected by the driver then we will still fall back to the old behavior and turn off the crtc. Changes since v1: - Restart completely when rmfb with crtc on fails (Sean Paul). Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Sean Paul <seanpaul@chromium.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101150433.10777-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/edid: make drm_edid_to_eld() staticJani Nikula2017-11-073-7/+2
| | | | | | | | | | This is no longer needed outside of drm_edid.c. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/9c0be7b97d0144ed0419c87ac42b30f5835ca7e6.1509545641.git.jani.nikula@intel.com
* drm/drivers: drop redundant drm_edid_to_eld() callsJani Nikula2017-11-0714-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_add_edid_modes() now fills in the ELD automatically, so the calls to drm_edid_to_eld() are redundant. Remove them. All the other places are obvious, but nv50 has detached drm_edid_to_eld() from the drm_add_edid_modes() call. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Russell King <linux@armlinux.org.uk> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Archit Taneja <architt@codeaurora.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/0959ca02b983afc9e74dd9acd190ba6e25f21678.1509545641.git.jani.nikula@intel.com
* drm/edid: build ELD in drm_add_edid_modes()Jani Nikula2017-11-071-2/+6
| | | | | | | | | | | | Call drm_edid_to_eld() from drm_add_edid_modes() to fill in the ELD automatically. There's no harm in doing this for connectors that do not support audio. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/551b2e1cf19be04c510e7865d7539cfc2f54ea89.1509545641.git.jani.nikula@intel.com
* drm/edid: abstract connector ELD clearingJani Nikula2017-11-071-8/+13
| | | | | | | | | | Preparation for future work. No functional changes. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/95e83e7a62566b65a56c8cb5038ddf0c6b8e5e95.1509545641.git.jani.nikula@intel.com
* drm/edid: set ELD connector type in drm_edid_to_eld()Jani Nikula2017-11-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since drm_edid_to_eld() knows the connector type, we can set the type in ELD while at it. Most connectors this gets called on are not DP encoders, and with the HDMI type being 0, this does not change behaviour for non-DP. For i915 having this in place earlier would have saved a considerable amount of debugging that lead to the fix 2d8f63297b9f ("drm/i915: always update ELD connector type after get modes"). I don't see other drivers, even the ones calling drm_edid_to_eld() on DP connectors, setting the connector type in ELD. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Russell King <linux@armlinux.org.uk> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d527b31619528c477c2c136f25cdf118bc0cfc1d.1509545641.git.jani.nikula@intel.com
* drm/edid: use macros for ELD offsets and valuesJani Nikula2017-11-071-13/+14
| | | | | | | | | | We have the macros, use them. No functional changes. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/36f00f018280a04d2db806574d337f7512986c86.1509545641.git.jani.nikula@intel.com
* drm/selftests/mm: Insert cond_resched() between insert modesChris Wilson2017-11-071-0/+5
| | | | | | | | | | | | | kbuilder has begun running the selftests and reported a soft-lockup inside __igt_insert(), so break up the test loop over different modes with another call to cond_resched(). Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171107104131.5923-1-chris@chris-wilson.co.uk
* drm/stm: ltdc: add a 2nd endpointPhilippe CORNU2017-11-071-19/+45
| | | | | | | | | | | | | ltdc can have up to 2 endpoints: - dpi external gpios: for rgb panels or external bridge ICs. - dpi internal ios: connected internally to dsi. Note: Refer to the reference manual to know if the dsi is present on your device. Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1509018489-19641-3-git-send-email-philippe.cornu@st.com
* dt-bindings: display: stm32: add a 2nd endpointPhilippe CORNU2017-11-071-1/+5
| | | | | | | | | | | | | | ltdc can have up to 2 endpoints: - dpi external gpios: for rgb panels or external bridge ICs. - dpi internal ios: connected internally to dsi. Note: Refer to the reference manual to know if the dsi is present on your device. Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1509018489-19641-2-git-send-email-philippe.cornu@st.com
* drm/stm: checkpatch strict minor updatesPhilippe CORNU2017-11-072-3/+3
| | | | | | | | | Minor fixes detected with "scripts/checkpatch.pl --strict" Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1509013473-18365-1-git-send-email-philippe.cornu@st.com
* drm/stm: dsi: Rename driver namePhilippe CORNU2017-11-071-1/+1
| | | | | | | | | | | Rename the driver name from "dw_mipi_dsi-stm" to "stm32-display-dsi" for a better readability in /sys/bus/platform/drivers entries. Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1509012290-16906-1-git-send-email-philippe.cornu@st.com
* drm: via: use ktime_get() instead of do_gettimeofdayArnd Bergmann2017-11-062-16/+9
| | | | | | | | | | | | | | | | | | | We want to remove uses of do_gettimeofday() from the kernel since the resulting timeval structure overflows in 2038. This is not a problem for this particular use, but do_gettimeofday() is also not an appropriate method for measuring time intervals, since it requires a conversion into microseconds and is complicated to work with. ktime_get() is a better replacement, as it works with the monontonic kernel timebase and requires a minimum of computation. I'm slightly changing the output from microseconds to nanoseconds here, to avoid introducing a new division operation. This should be fine since the value is only used for debugging. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20171104212131.2939989-1-arnd@arndb.de
* drm: Print the fb dimensions when the src coord check failsVille Syrjälä2017-11-022-4/+6
| | | | | | | | | | When debugging bad plane source coordinates it helps to have an idea of what the framebuffer dimensions are. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101183533.28466-1-ville.syrjala@linux.intel.com
* drm/drm_mm.h: Fix the name of the referenced function in commentLiviu Dudau2017-11-021-1/+1
| | | | | | | | | | | | drm_mm_insert_node_generic() is a simplified version of drm_mm_insert_node_in_range(), update comment to reflect correct function name. Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101140445.2798-1-Liviu.Dudau@arm.com
* dma-buf: Cleanup comments on dma_buf_map_attachment()Liviu Dudau2017-11-021-3/+3
| | | | | | | | | | | | Mappings need to be unmapped by calling dma_buf_unmap_attachment() and not by calling again dma_buf_map_attachment(). Also fix some spelling mistakes. Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101140630.2884-1-Liviu.Dudau@arm.com
* drm: Spelling fixesLiviu Dudau2017-11-022-2/+2
| | | | | | | | | | Minor spelling fix for 'monster' and replace 'on' with 'own' in comments. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101140436.2743-1-Liviu.Dudau@arm.com
* drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()Boris BREZILLON2017-11-021-2/+2
| | | | | | | | | | | vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields and should be printed with a %zd specifier. Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20171101095731.14878-1-boris.brezillon@free-electrons.com