summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2014-11-21drm/prime: reorder drm_prime_add_buf_handle and remove prototypeSeung-Woo Kim1-16/+14
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-11-21drm/prime: fix to put an exported dma_buf for adding handle failureYoungJun Cho1-1/+7
When drm_prime_add_buf_handle() returns failure for an exported dma_buf, the dma_buf was already allocated and its refcount was increased, so it needs to be put. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-11-21drm/prime: support to cache mappingJoonyoung Shim1-3/+49
The drm prime also can support it like GEM CMA supports to cache mapping. It doesn't allow multiple mappings for one attachment. [airlied: rebased on top of other prime changes] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-11-21drm/prime: replace NULL with error value in drm_prime_pages_to_sgYoungJun Cho1-3/+5
Instead of NULL, error value is casted with ERR_PTR() for drm_prime_pages_to_sg() and IS_ERR_OR_NULL() macro is replaced with IS_ERR() macro for drm_gem_map_dma_buf(). Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-11-21drm/prime: fix to check return of dma_map_sg in prime helperYoungJun Cho1-2/+7
The dma_map_sg(), in map_dma_buf callback operation of prime helper, can return 0 when it fails to map, so it needs to release related resources. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-11-21drm: move pinning/unpinning to buffer attachMaarten Lankhorst1-15/+26
This allows importing bo's to own device to work without requiring that the buffer is pinned in GART. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Chanho Park <chanho61.park@samsung.com> Conflicts: drivers/gpu/drm/drm_prime.c Change-Id: I17dbe44549acdf570e155d11370752b0b4ab7919
2014-11-21drm: add unpin function to prime helpersMaarten Lankhorst1-1/+11
Prevents buffers from being pinned forever. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Chanho Park <chanho61.park@samsung.com> Conflicts: drivers/gpu/drm/drm_prime.c Change-Id: I220c7924a9b08a13646fcc43c80cd9c031dd2d79
2014-11-21Revert "dmabuf-sync: update it to patch v8"Chanho Park1-1/+1
This reverts commit cf7e07ce2d9843105d2ed8f9d30ee66c06d83bb0.
2014-11-18drm/exynos: use irq_flags instead of triggeringJoonyoung Shim1-1/+1
The drm_handle_vblank should be called whenever be vsync, te interrupt means vsync on i80 interface. Change-Id: I620346fc78e02589b398a0aaee74a2eb60579720 Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
2014-11-18drm/exynos: add has_vtsel flagJoonyoung Shim1-1/+5
The exynos fimd provides video type selection bits from system register but exynos3 series don't has it, so needs has_vtsel flag and we can distinguish whether set video type selection bits. Change-Id: Iacba73e8813454b04551c2617107786f2d59d6ab Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: move triggering checkingJoonyoung Shim1-7/+7
It's better to be checking whether triggerring in fimd_trigger function. Also it will return if in triggerring on fimd_te_handler, then it can't execute remain codes. Change-Id: If8dbcbd139908af330ad59b5d4a66435fe0d77c6 Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
2014-11-18Revert "drm/exynos: fimd: make a wait_for_vblank event to be handled in same ↵Inki Dae1-9/+0
period" This reverts commit d69e45dccaea2e2da28751e0bdaeae67bba1aa78. Change-Id: I3600f9fc2d29f21c3a0726902f78fcf8d5dcd3d0 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/panel: s6e63j0x03: correct lcd power statusInki Dae1-2/+12
This patch makes sure for panel driver to have correct power status. Change-Id: I33e6e64969ab6f2679f5f1f889ccfde27d81c901 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/panel: s6e63j0x03: Fix uninitialized power stateKrzysztof Kozlowski1-0/+7
Fix following DSI panel enable error (booted init=/bin/sh): echo 0 > /sys/devices/platform/exynos-drm/graphics/fb0/blank [ 55.708859] exynos-dsi 11c80000.dsi: PLL input frequency: 24000000 [ 55.709038] exynos-dsi 11c80000.dsi: PLL freq 250000000, (p 3, m 125, s 2) [ 55.709107] exynos-dsi 11c80000.dsi: band 4 [ 55.709929] exynos-dsi 11c80000.dsi: PLL failed to stabilize [ 55.709987] exynos-dsi 11c80000.dsi: failed to configure DSI PLL [ 56.007706] exynos-dsi 11c80000.dsi: timeout waiting for reset [ 56.030676] exynos-dsi 11c80000.dsi: waiting for bus lanes timed out [ 56.030804] exynos-dsi 11c80000.dsi: < xfer df45fda8: tx len 3, done 0, rx len 0, done 0 [ 56.127024] exynos-dsi 11c80000.dsi: xfer timed out: 03 00 f1 5a 5a [ 56.127125] panel_s6e63j0x03 11c80000.dsi.0: failed to dcs write: -110[f1 5a 5a] The panel power state was initialized by devm_kzalloc() to 0 which means FB_BLANK_UNBLANK. Request to unblank frame buffer from sysfs was triggering a call to panel set_brightness(). This lead to starting DSI transfers on disabled DSI/panel (no calls to exynos_dsi_enable, s6e63j0x03_prepare, s6e63j0x03_enable) Change-Id: I146d46c92c96112a6c616daf83edc57c5b889902 Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/panel: s6e63j0x03: add brightness featureInki Dae1-4/+189
Change-Id: I9b4b9060a9c8ef63f969951da4bd1b9cc26fa553 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: make a wait_for_vblank event to be handled in same periodInki Dae1-0/+9
This patch makes sure for a wait_for_vblank event to be handled in same period. For this, it adds a new member, triggerred which means whether trigger request is completed or not since trigger request. So if there is a trigger request, update-request, then this patch makes a wait_for_vblank event to be handled after the trigger request is completed. Change-Id: If1a2491a323b637d20806373e0502b2b0a9ff810 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: handle finish pageflip at irq handlerInki Dae1-4/+2
In case of all modes, i80 and rgb modes, finish page flip request could be handled at irq handler after framedone. This patch is just for cleanup. Change-Id: Idb56e1932fbe7e085be0384eb35b68f699547d18 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: handle wait vsync event at irq handlerInki Dae1-11/+5
in case of all modes, i80 and rgb modes, wait vsync event should be handled at irq handler after framedone. Change-Id: I7dbd38119c5c27a694e3b1c7c160f8205a4b028c Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: do not call fimd_trigger in atomic contextInki Dae1-0/+3
spin lock, win_updated_lock, isn't related to fimd_trigger. Change-Id: Ia9dd215a2a4809726c357f9de4104c09ce08dc0c Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: move handle vblank position in TE handlerYoungJun Cho1-3/+3
For providing VBLANK information, drm_handle_vblank() should be called properly, but it is blocked by wait_vsync_event condition which is set by manager_ops->wait_for_vblank(). So moves it out from wait_vsync_event routine. Change-Id: Id5fc56f65d582fd90ef261f50b302f12ef890353 Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: correct connector->dpms field before resumingInki Dae1-2/+6
During system suspend after connector switch off its dpms field is set to connector previous dpms state. To properly resume dpms field should be set to its actual state (off) before resuming to previous dpms state. Change-Id: I80acefcd408279c3c1cf3b0e89133dc6899a6914 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: remove pm runtime interfacesInki Dae1-29/+0
These interfaces aren't used anymore. Change-Id: Ia02fbd60b329a3193bb2fe009f55e410031365ac Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: fix screen shaking issueInki Dae1-0/+19
This patch fixes the issue that the screen is shared once resume. The issue could be incurred when overlay registers are updated by win_commit while transmitting video data. So this patch makes win_commit function wait for vsync signal if fimd is still transmitting video data before updating overlay registers. Change-Id: Ia5efff85ccad91cd6e8ff7a5e167a883c8e8d4aa Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: add file checks for ioctlsAndrzej Hajda1-44/+22
Process should not have access to ipp nodes created by another process. The patch adds necessary checks. It also simplifies lookup for command node. Change-Id: If30f01d497a61792d0407821dfd7943075e49e48 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: remove file argument from node related functionsAndrzej Hajda1-8/+6
Since file pointer is preserved in c_node passing it as argument in node functions is redundant. Change-Id: I7a302822ab441a4a572962698c41be31bc360b03 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/fimc: fix source buffer registersAndrzej Hajda1-5/+8
FIMC in default mode of operation uses only one input buffer, but the driver used also second buffer, as a result only the first frame was processed correctly. The patch fixes it. Change-Id: I359cfbc5c80221904659848d09d3778094c6393f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/fimc: simplify buffer queuingAndrzej Hajda1-49/+15
The patch removes redundant checks, redundant HW reads and simplifies code. Change-Id: Ieb4020ea24b3d648c0cab0b22f0b97d3dd956fa6 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/fimc: do not enable fimc twiceAndrzej Hajda1-4/+1
The patch removes redundant H/W activation. Change-Id: Ia8a465f8a31e735b403616f21f7594b29604a02e Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/fimc: avoid clearing overflow bitsAndrzej Hajda1-3/+0
Overflow bits shall be cleared by H/W. Change-Id: Ia8dfd96c9e78d24565a959a2e9c7ee770039ff91 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: remove events during command cleaningAndrzej Hajda1-78/+78
Events were removed only during stop command, as a result there were memory leaks if program prematurely exited. This patch fixes it. Change-Id: I763b05753eb6bebe7ac3dc74da76dd08b5972142 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: stop hardware before freeing memoryAndrzej Hajda1-9/+7
Memory shouldn't be freed when hardware is still running. Change-Id: I2ac15beee14bf3d952a15367bf2f4d1366445eac Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: replace work_struct casting with better constructsAndrzej Hajda4-8/+6
Type casting should be avoided if possible. In case of work_struct it can be simply replaced by reference to member field. Change-Id: I0bc76f41e3cf97ad5bd70ae89f01f092513feacf Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: clean memory nodes on command node cleaningAndrzej Hajda1-3/+9
The nodes should be removed before removing command node. Change-Id: Ib97b737c9578c912737827b666ab0d94395a5334 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: move nodes cleaning to separate functionAndrzej Hajda1-157/+127
The patch introduces ipp_clean_mem_nodes function which replaces redundant code. Additionally memory node function definitions are moved up to increase its visibility. Change-Id: I3143c773be9646f28f8f3c55b711e17e21f67a8a Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: free partially allocated resources on errorAndrzej Hajda1-39/+31
In case of allocation errors some already allocated buffers were not freed. The patch fixes it. Change-Id: I23447928fb497ad33324fc2affa430bd2de98122 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: remove unused field in command nodeAndrzej Hajda2-3/+0
Since command node have file pointer dev field became useless. Change-Id: I3ee97a701b9b032e329a59fcc0ed7c122440c9b7 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: remove only related commands on file closeAndrzej Hajda1-8/+2
On file close driver should remove only command nodes created via this file. Change-Id: I1063955f02af7f1cd456b5e31165fe64ed136788 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: move file reference from memory to command nodeAndrzej Hajda2-3/+4
Command node should contain file reference to distinguish commands created by different processes. Change-Id: I98938d16d323a5f83614ae87c84485f8fa4efc69 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: cancel works before command node cleanAndrzej Hajda1-0/+5
All pending works should be canceled prior to its removal. Change-Id: I6adaf0fcc447f3fdbed4dd8cfb873e1b5d1fdb84 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos/ipp: remove fake pm callbacksAndrzej Hajda1-51/+0
PM callbacks in ipp core do nothing, so the patch removes it. Change-Id: I3fd9eb622b7c29b956dcfeff390004e66ced7e9f Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: scaler: add exynos drm sc driverHyungwon Hwang7-0/+2230
This patch adds exynos drm sc driver for Exynos 3250. Change-Id: Ia71c5354390e67494fd4887c8861a624d21e3839 Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2014-11-18exynos/drm: gsc: fix build error related with write backHyungwon Hwang1-4/+4
Fix the variable type and the macro name to make this driver buildable. Change-Id: I14f95c66db7bcfc8170e330e065f3de80c34ada8 Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2014-11-18exynos/drm: ipp: fix to get null when the list is emptyHyungwon Hwang1-4/+4
list_first_entry does not return null, when the list is empty. Change-Id: I014e2ef5ba035db3b6fc97e6821bc9869143f867 Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2014-11-18drm: fimc: support ipp dynamic color rangeDonghwa Lee1-1/+14
This patch support dynamic range for color space conversion. COLOR_RANGE_LIMITED: selects narrow -> Y(16 to 235), Cb/Cr(16 to 240) COLOR_RANGE_FULL: selects wide -> Y/Cb/Cr(0 to 255), Wide default Change-Id: I7bb62883b497b5b6869108247cc33b09c07f470e Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
2014-11-18drm/exynos: gsc: add device tree supportHyungwon Hwang1-0/+7
This patch makes Exynos DRM GSC driver compatible with device tree. Change-Id: I0e1abed40778c97c15ed5d52fc4568f0ee105c57 Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2014-11-18drm/exynos: gsc: enable DRM_EXYNOS_GSC for Exynos 3 seriesHyungwon Hwang1-1/+1
This patch makes Exynos DRM GSC driver buildable with Exynos 3 series, not only with Exynos 5 series. Change-Id: Ib8cda001f7aee34c1584923c4be43a3ed77c6e6d Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2014-11-18drm: fimd: support display writeback modeDonghwa Lee4-21/+111
This patch supports exynos drm display writeback mode that clone the screen with fimd like below. FIMD----->FIMC H/W---->MEMORY Change-Id: I8172ec6ee157e2e48a23b9776e11543c33716dc5 Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
2014-11-18drm/exynos: hdmi: fix macros for audio registersRobert Baldyga2-5/+5
This patch fix two things: - Remove duplicated HDMI_I2S_SEL_SDATA2(x) macro definition, add missing HDMI_I2S_SEL_SDATA0(x) macro and fix macro usage. - Fix HDMI_I2S_IN_DISABLE and HDMI_I2S_IN_ENABLE values and fix macro usage. Change-Id: I172913a61011292c3c912a3e8ccd84109924b906 Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
2014-11-18drm/panel: s6e63j0x03: decrease TE signal rate to 30HzInki Dae1-1/+1
Change-Id: If5b327b3e33cc518c72003de0b3b0e643b43ff42 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18drm/exynos: fimd: add exynos3250 SoC supportInki Dae1-8/+13
Change-Id: I18cd6a16b9ef66797ceb9b72bb37f626ae1d3856 Signed-off-by: Inki Dae <inki.dae@samsung.com>