summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-02-19[media] v4l: vsp1: Make pipeline inputs array index by RPF indexLaurent Pinchart
The pipeline inputs array stores pointers to all RPFs contained in the pipeline. It's currently indexed contiguously by adding RPFs in the order they are found during graph walk. This can't easily support dynamic addition and removal of RPFs while streaming, which will be required for combined VSP+DU support. Make the array indexed by RPF index instead and skip NULL elements when iterating over RPFs. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Make the userspace API optionalLaurent Pinchart
The R-Car Gen3 SoCs include VSP instances dedicated to the DU that will be controlled entirely by the rcar-du-drm driver through the KMS API. To support that use case make the userspace V4L2 API optional. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move format info to vsp1_pipe.cLaurent Pinchart
Format information and the related helper function are not specific to the V4L2 API, move them from vsp1_video.c to vsp1_pipe.c. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Make the BRU optionalLaurent Pinchart
Not all VSP instances have a BRU on R-Car Gen3, make it optional. Set the feature unconditionally for now, this will be fixed when adding Gen3 support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Make number of BRU inputs configurableLaurent Pinchart
The R-Car Gen3 family has 5-inputs BRUs, support them by making the number of BRU inputs configurable. As the driver assumes that the number of BRU inputs is equal to the number of RPFs, replace the BRU_MAX_INPUTS macro with VSP1_MAX_RPF to make the assumption apparent. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move entity route setup function to vsp1_entity.cLaurent Pinchart
The function will be used by the DU code, move it out of vsp1_video.c. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Remove unused module read functionsLaurent Pinchart
Several module read functions are not used, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Set the SRU CTRL0 register when starting the streamLaurent Pinchart
Commit 58f896d859ce ("[media] v4l: vsp1: sru: Make the intensity controllable during streaming") refactored the stream start code and removed the SRU CTRL0 register write by mistake. Add it back. Fixes: 58f896d859ce ("[media] v4l: vsp1: sru: Make the intensity controllable during streaming") Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Fix typo in VI6_DISP_IRQ_STA_DST register bit nameLaurent Pinchart
Rename the VI6_DISP_IRQ_STA_DSE register bit to VI6_DISP_IRQ_STA_DST to fix a typo and match the datasheet. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Document the vsp1_pipeline structureLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Extract link creation to separate functionLaurent Pinchart
Link creation will be handled differently for the DU pipeline. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Reuse local variable instead of recomputing itLaurent Pinchart
No need to waste CPU cycles when the value we need is already available. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Extract pipeline initialization code into a functionLaurent Pinchart
The code will be reused outside of vsp1_video.c. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Rename video pipeline functions to use vsp1_video prefixLaurent Pinchart
Those functions are specific to video nodes, rename them for consistency. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Split pipeline management code from vsp1_video.cLaurent Pinchart
The code will be used to control the vsp1 driver from the DU driver without using video nodes. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Decouple pipeline end of frame processing from vsp1_videoLaurent Pinchart
To make the pipeline structure and operations usable without video devices the frame end processing must be decoupled from struct vsp1_video. Implement this by calling the video frame end function indirectly through a function pointer in struct vsp1_pipeline. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Remove struct vsp1_pipeline num_video fieldLaurent Pinchart
The field is always equal to the num_inputs field plus one, remove the duplicate. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move vsp1_video pointer from vsp1_entity to vsp1_rwpfLaurent Pinchart
Only RPFs and WPFs can be associated with video nodes, don't waste memory by storing the video pointer in all entities. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Support VSP1 instances without any UDSLaurent Pinchart
Not all VSP1 instances include a UDS. Make the renesas,#uds DT property optional and accept a number of UDS equal to 0 as valid. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Make rwpf operations independent of video deviceLaurent Pinchart
The rwpf queue operation doesn't queue a buffer but sets the memory address for the next run. Rename it to set_memory and pass it a new structure independent of the video buffer than only contains memory information. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move video device out of struct vsp1_rwpfLaurent Pinchart
To make the video device nodes optional we need to decouple the [rw]pf instances from the video devices. Move video devices out of struct vsp1_rwpf and instantiate them dynamically in the core driver code. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Rename vsp1_video_buffer to vsp1_vb2_bufferLaurent Pinchart
The structure represent a vsp1 videobuf2 buffer, name it accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Move video operations to vsp1_rwpfLaurent Pinchart
This removes the dependency of vsp1_rpf and vsp1_wpf on vsp1_video, making it possible to reuse the operations without a V4L2 video device node. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Store the memory format in struct vsp1_rwpfLaurent Pinchart
Move the format from struct vsp1_video to struct vsp1_rwpf to prepare for VSPD KMS support that will not instantiate V4L2 video device nodes. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Change the type of the rwpf field in struct vsp1_videoLaurent Pinchart
The rwpf field contains a pointer to the rpf or wpf associated with the video node. Instead of storing it as a vsp1_entity, store the corresponding vsp1_rwpf pointer to allow accessing the vsp1_rwpf fields directly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Group all link creation code in a single fileLaurent Pinchart
There's no need to spread the code across multiple source files. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: vsp1: Add tri-planar memory formats supportLaurent Pinchart
Tri-planar memory formats store the Y, U and V components in separate planes. The VSP hardware supports them, the driver now does too. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: Add YUV 4:2:2 and YUV 4:4:4 tri-planar non-contiguous formatsLaurent Pinchart
The formats use three planes through the multiplanar API, allowing for non-contiguous planes in memory. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] media: ti-vpe: cal: Fix syntax check warningsBenoit Parrot
Fix the following sparse warnings: ti-vpe/cal.c:387:26: warning: incorrect type in return expression (different address spaces) ti-vpe/cal.c:459:26: warning: incorrect type in return expression (different address spaces) ti-vpe/cal.c:503:27: warning: incorrect type in argument 6 (different address spaces) ti-vpe/cal.c:509:47: warning: incorrect type in argument 6 (different address spaces) ti-vpe/cal.c:518:47: warning: incorrect type in argument 6 (different address spaces) ti-vpe/cal.c:526:31: warning: incorrect type in argument 6 (different address spaces) ti-vpe/cal.c:1807:24: warning: Using plain integer as NULL pointer ti-vpe/cal.c:1844:16: warning: Using plain integer as NULL pointer Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAMEWu-Cheng Li
There is a new control V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME to force an encoder key frame. It is the same as requesting V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME. Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l: add V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAMEWu-Cheng Li
Some drivers also need a control like V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE to force an encoder key frame. Add a general V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME so the new drivers and applications can use it. Signed-off-by: Wu-Cheng Li <wuchengli@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] saa7134: Fix bytesperline not being set correctly for planar formatsHans de Goede
bytesperline should be the bytesperline for the first plane for planar formats, not that of all planes combined. This fixes a crash in xawtv caused by the wrong bpl. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1305389 Reported-and-tested-by: Stas Sergeev <stsp@list.ru> Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] media: ti-vpe: add dependency of HAS_DMASudip Mukherjee
The build of m32r allmodconfig fails with the error: drivers/media/v4l2-core/videobuf2-dma-contig.c:492:28: error: implicit declaration of function 'dma_get_cache_alignment' The build of videobuf2-dma-contig.c depends on HAS_DMA and it is correctly mentioned in the Kconfig but the symbol VIDEO_TI_CAL also selects VIDEOBUF2_DMA_CONTIG, so it is trying to compile videobuf2-dma-contig.c even though HAS_DMA is not defined. Fixes: 343e89a792a5 ("[media] media: ti-vpe: Add CAL v4l2 camera capture driver") Cc: Benoit Parrot <bparrot@ti.com> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] timblogiw: move to staging in preparation for removalHans Verkuil
The Timberdale FPGA video driver has not seen any real development since 2011 (and very little before that). One of the problems with the timblogiw driver is that it uses videobuf instead of the newer vb2 framework. The long term goal is to either convert or remove any driver still using videobuf. Since none of the core v4l developers has the hardware, we cannot convert it ourselves. As far as I can tell it was only used in an Intel demo board in 2009 using Meego: http://www.chinait.com/intelcontent/intelprc/admin/PDFFile/20106411545.pdf which has since been superseded. Moving this driver to staging is the first step towards removal. After 2 or 3 kernel cycles it will be removed altogether unless someone steps up to clean up this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Richard Röjfors <richard@puffinpack.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] adv7511: TX_EDID_PRESENT is still 1 after a disconnectHans Verkuil
The V4L2_CID_TX_EDID_PRESENT control reports if an EDID is present. The adv7511 however still reported the EDID present after disconnecting the HDMI cable. Fix the logic regarding this control. And when the EDID is disconnected also call ADV7511_EDID_DETECT to notify the bridge driver. This was also missing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.12 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] usb/cpia2_core: clean up a min_t() castDan Carpenter
It makes sense to make the min_t() cast unsigned here since we don't really want negative sizes. Making it signed causes a static checker warning in Smatch. Smatch knows "fw->size - i" is positive but it doesn't know that fw->size is less than INT_MAX so in theory casting it to int might lead to a negative. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] pvrusb2: correctly handling failed thread runInsu Yun
Since kthread_run returns -ENOMEM if failed, it needs to be checked whether it is error, not whether it is null. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19[media] v4l2-async: Don't fail if registered_async isn't implementedJavier Martinez Canillas
After sub-dev registration in v4l2_async_test_notify(), the v4l2-async core calls the registered_async callback but if a sub-dev driver does not implement it, v4l2_subdev_call() will return a -ENOIOCTLCMD which should not be considered an error. Reported-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Benoit Parrot <bparrot@ti.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-19Merge branch 'drm-rockchip-next-2016-02-18' of ↵Dave Airlie
https://github.com/markyzq/kernel-drm-rockchip into drm-next add Innosilicon HDMI support. * 'drm-rockchip-next-2016-02-18' of https://github.com/markyzq/kernel-drm-rockchip: dt-bindings: add document for Innosilicon HDMI on Rockchip platform drm/rockchip: hdmi: add Innosilicon HDMI support
2016-02-19Merge tag 'drm-vc4-next-2016-02-17' of github.com:anholt/linux into drm-nextDave Airlie
This pull request brings in overlay plane support for vc4. * tag 'drm-vc4-next-2016-02-17' of github.com:anholt/linux: drm/vc4: Add support for YUV planes. drm/vc4: Add support a few more RGB display plane formats. drm/vc4: Add support for scaling of display planes. drm/vc4: Fix which value is being used for source image size. drm/vc4: Add more display planes to each CRTC. drm/vc4: Make the CRTCs cooperate on allocating display lists. drm/vc4: Add a proper short-circut path for legacy cursor updates. drm/vc4: Move the plane clipping/scaling setup to a separate function. drm/vc4: Add missing __iomem annotation to hw_dlist. drm/vc4: Improve comments on vc4_plane_state members.
2016-02-19Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie
into drm-next First radeon and amdgpu pull request for 4.6. Highlights: - ACP support for APUs with i2s audio - CS ioctl optimizations - GPU scheduler optimizations - GPUVM optimizations - Initial GPU reset support (not enabled yet) - New powerplay sysfs interface for manually selecting clocks - Powerplay fixes - Virtualization fixes - Removal of hw semaphore support - Lots of other misc fixes and cleanups * 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux: (118 commits) drm/amdgpu: Don't call interval_tree_remove in amdgpu_mn_destroy drm/amdgpu: Fix race condition in amdgpu_mn_unregister drm/amdgpu: cleanup gem init/finit drm/amdgpu: rework GEM info printing drm/amdgpu: print the GPU offset as well in gem_info drm/amdgpu: optionally print the pin count in gem_info as well drm/amdgpu: print the BO size only once in amdgpu_gem_info drm/amdgpu: print pid as integer drm/amdgpu: remove page flip work queue v3 drm/amdgpu: stop blocking for page filp fences drm/amdgpu: stop calling amdgpu_gpu_reset from the flip code drm/amdgpu: remove fence reset detection leftovers drm/amdgpu: Fix race condition in MMU notifier release drm/radeon: Fix WARN_ON if DRM_DP_AUX_CHARDEV is enabled drm/amdgpu/vi: move uvd tiling config setup into uvd code drm/amdgpu/vi: move sdma tiling config setup into sdma code drm/amdgpu/cik: move uvd tiling config setup into uvd code drm/amdgpu/cik: move sdma tiling config setup into sdma code drm/amdgpu/gfx7: rework gpu_init() drm/amdgpu/gfx: clean up harvest configuration (v2) ...
2016-02-19Merge tag 'topic/drm-misc-2016-02-18' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next Misc stuff all over: - more mode_fixup removal from Carlos, there's another final pile still left. - final bits of vgaswitcheroo from Lukas for apple gmux, we're still discussing an api cleanup patch to make it a bit more abuse-safe as a follow-up - dp aux interface for userspace for tools&tests from Rafael Antognolli - actual interface parts for dma-buf flushing for userspace mmap - few small bits all over - vgaswitcheroo support for apple gmux from Lukas Wunner - checks for ->mode_fixup in non-atomic helpers from Carlos Palminha, plus removing dummy funcs from drivers. Carlos promised to follow up with more, since there's lots more silly dummy functions around. - dma-buf patches from Tiago, except the ioctl itself (that needed a respin to address review from David Herrmann) - encoder mask for atomic from Maarten - bunch of random things all over. * tag 'topic/drm-misc-2016-02-18' of git://anongit.freedesktop.org/drm-intel: (57 commits) drm/udl: Use module_usb_driver drm: fixes crct set_mode when crtc mode_fixup is null. drm/tilcdc: removed optional dummy encoder mode_fixup function. drm/sti: removed optional dummy encoder mode_fixup function. drm/rockchip: removed optional dummy encoder mode_fixup function. drm/qxl: removed optional dummy encoder mode_fixup function. drm/mgag200: removed optional dummy encoder mode_fixup function. drm/msm/mdp: removed optional dummy encoder mode_fixup function. drm/imx: removed optional dummy encoder mode_fixup function. drm/gma500: removed optional dummy encoder mode_fixup function. drm/radeon: removed optional dummy encoder mode_fixup function. drm/cirrus: removed optional dummy encoder mode_fixup function. drm/bochs: removed optional dummy encoder mode_fixup function. drm/ast: removed optional dummy encoder mode_fixup function. drm/amdgpu: removed optional dummy encoder mode_fixup function. drm/exynos: removed optional dummy encoder mode_fixup function. drm/udl: removed optional dummy encoder mode_fixup function. drm/virtio: removed optional dummy encoder mode_fixup function. drm/fb_helper: Use add_one_connector in add_all_connectors. drm/fb_helper: Use correct allocation count for arrays. ...
2016-02-18drm/rockchip: hdmi: add Innosilicon HDMI supportYakir Yang
The Innosilicon HDMI is a low power HDMI 1.4 transmitter IP, and it have been integrated on some rockchip CPUs (like RK3036, RK312x). Signed-off-by: Yakir Yang <ykk@rock-chips.com> Tested-by: Heiko Stuebner <heiko@sntech.de>
2016-02-17drm/amdgpu: Don't call interval_tree_remove in amdgpu_mn_destroyFelix Kuehling
rbtree_postorder_for_each_entry_safe can skip over some entries if the tree is rebalanced in interval_tree_remove. interval_tree_remove is also redundant when the tree is just about to be freed. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2016-02-17drm/amdgpu: Fix race condition in amdgpu_mn_unregisterFelix Kuehling
Exchange locking order of adev->mn_lock and mm_sem, so that rmn->mm->mmap_sem can be taken safely, protected by adev->mn_lock, when amdgpu_mn_destroy runs concurrently. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2016-02-17drm/udl: Use module_usb_driverAmitoj Kaur Chawla
Macro module_usb_driver is used for drivers whose init and exit paths only register and unregister to usb API. So remove boilerplate code to make code simpler by using module_usb_driver. This change was made with the help of the following Coccinelle semantic patch: //<smpl> @a@ identifier f, x; @@ -static f(...) { return usb_register(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { usb_deregister(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_usb_driver; @@ -module_exit(e); +module_usb_driver(x); //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20160217121327.GA29682@amitoj-Inspiron-3542
2016-02-17Merge branch 'topic/mode_fixup-optional' into topic/drm-miscDaniel Vetter
Pull in pile of patches from Carlos to remove now redundant mode_fixup hooks for encoders. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-02-16drm/amdgpu: cleanup gem init/finitChristian König
Remove the double housekeeping and use something sane to forcefuly delete BOs on unload. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-16drm/amdgpu: rework GEM info printingChristian König
Print BOs grouped per client. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-16drm/amdgpu: print the GPU offset as well in gem_infoChristian König
To easily find which memory is used. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>