summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_fimd.c
AgeCommit message (Collapse)Author
2014-03-24drm/exynos: fimd: remove unused variableAndrzej Hajda
The patch removes unused vidcon0 field from fimd_context structure. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: restore parallel output interface supportAndrzej Hajda
The patch adds parallel output interface to FIMD device driver. It also restores support for panels initialized by boot loader, but without proper kernel driver. Driver uses video interface bindings to find connected panel. It uses drm_panel interface to interact with the panel. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: correct timing porch conversionAndrzej Hajda
The patch corrects porch calculation. It should be calculated as a difference between adjacent respective fields of drm_display_mode. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Consolidate suspend/resume in drm_drvSean Paul
This patch removes all of the suspend/resume logic from the individual drivers and consolidates it in drm_drv. This consolidation reduces the number of functions which enable/disable the hardware to just one -- the dpms callback. This ensures that we always power up/down in a consistent manner. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Clean up FIMD power on/off routinesSean Paul
This patch separates the fimd_activate function into poweron/poweroff functions to be more consistent with the other drivers in exynos drm. It also properly cleans up after failures in poweron. The functions have also been shuffled around such that they are all in the same spot in the file and poweron/poweroff can be called from the dpms function. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Move display implementation into dpSean Paul
This patch moves the exynos_drm_display implementation from fimd into the dp driver. This will allow for tighter integration of the dp driver into the exynos drm driver. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Remove unused/useless fimd_context membersSean Paul
This patch removes a few fimd_context members which are either entirely unused or unneeded. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Use mode_set to configure fimdSean Paul
This patch uses the mode passed into mode_set to configure fimd instead of directly using the panel from context. This will allow us to move the exynos_drm_display implementation out of fimd, where it doesn't belong. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Split manager/display/subdrvSean Paul
This patch splits display and manager from subdrv. The result is that crtc functions can directly call into manager callbacks and encoder functions can directly call into display callbacks. This will allow us to remove the exynos_drm_hdmi shim and support mixer/hdmi & fimd/dp with common code. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Rename display_op power_on to dpmsSean Paul
This patch renames the display_op power_on to dpms to accurately reflect what the function does. The side-effect of this patch is that the new hdmi dpms callback is now invoked twice in the dpms path. This is safe and will be dealt with when the exynos_drm shim goes away. Signed-off-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Remove apply manager callbackSean Paul
This patch removes the apply() manager callback in favor of putting the relevant commits in the individual drivers. This will mitigate some of the difference between the suspend/resume path and the dpms path Signed-off-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Pass exynos_drm_manager in manager ops instead of devSean Paul
This patch changes the manager ops callbacks from accepting the subdrv device pointer to taking a pointer to the manager. This will allow us to move closer to decoupling manager/display from subdrv, and subsequently decoupling the crtc/plane from the encoder. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Use manager_op initialize in fimdSean Paul
This patch implements the intitialize manager op in fimd. This will allow us to keep track of drm_dev in context instead of using subdev, which in turn makes it easier to remove subdev from fimd. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Merge overlay_ops into manager_opsSean Paul
This patch merges overlay_ops into manager_ops. In all cases, overlay_ops is implemented in the same place as manager ops, it doesn't serve a functional purpose, and doesn't make things more clear. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-01-07drm/exynos: fix build error caused by removed drm core macrosSeung-Woo Kim
DRM_HZ and DRM_WAKEUP macros are removed, but they still remained. So this patch fixes build errors by replacing the macros. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-12-18drm: Kill DRM_WAKUP and DRM_INIT_WAITQUEUEDaniel Vetter
Less yelling ftw! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-12-02drm/exynos: Fix trivial typo in exynos_drm_fimd.cSachin Kamat
Fixed a trivial typo. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-10-09drm: Make irq_enabled boolVille Syrjälä
irq_enabled is only ever 0 or 1, so make it a bool. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-10-09drm: Make vblank_disable_allowed boolVille Syrjälä
vblank_disable_allowed is only ever 0 or 1, so make it a bool. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-09-05drm/exynos: Remove non-DT support in exynos_drm_fimdSachin Kamat
Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: fimd: move platform data parsing to separate functionAndrzej Hajda
The patch moves platfrom_data and device tree parsing to separate function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: fimd: get signal polarities from device treeAndrzej Hajda
The patch adds code to get signal polarization setting from device tree display-timings node. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: fimd: replace struct fb_videomode with videomodeAndrzej Hajda
The patch replaces all occurrences of struct fb_videomode by more accurate struct videomode. The change allows to remove mode conversion function and simplifies clock divider calculation. Clock configuration is moved to separate function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: check a pixel format to a particular window layerInki Dae
This patch checks if a requested window supports alpha channel or not. In case of s3c64xx, window 0 doesn't support alpha channel so if the request pixel format is ARGB8888 then change it to XRGB8888. Signed-off-by: Inki Dae <inki.dae@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-09-05drm/exynos: fix fimd pixel format settingInki Dae
This patch fixes wrong pixel format setting. A pixel format is decided according to bpp and depth, or user-requested format but fimd driver considered only bpp value to decide a proper pixel format. So this patch makes a proper pixel format to be set according to drm_framebuffer's pixel_format which is set by addfb with bpp and depth, or addfb2 with user-requested format. Signed-off-by: Inki Dae <inki.dae@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-09-05drm/exynos: Remove redundant error messagesSachin Kamat
kzalloc already has built-in error messages. Hence remove additional ones. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-09-05drm/exynos: Add missing of.h header includeSachin Kamat
Add of.h explicitly for of_* APIs. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-07-30drm/exynos: Remove module.h header inclusionSachin Kamat
Remove module.h header file inclusion from files since they do not use/refer to any code from that file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-07-30drm/exynos: fix module build errorInki Dae
This patch removes all MODULE_DEVICE_TABLE declarations. Exynos drm drivers don't need to create MODULE_DEVICE_TABLE yet because all devices of Exynos drm include in one SoC so they cannot be plugged in as of now. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-06-28drm/exynos: Remove tracking log functionsYoungJun Cho
This patch removes tracking log functions which were used to debug in the early development stage and are not so important as were. So remove them for code clean up. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: hdmi: use drm_display_mode to check the supported modesRahul Sharma
This patch renames check_timing to check_mode and removes the unnecessary conversion of drm_display_mode to/from fb_videomode in the hdmi driver. v4: 1) Changed the commit message to add information related to renaming the callbacks to check_mode. 2) Changed debug message to print 1/0 for interlace mode. v3: 1) Replaced check_timing callbacks with check_mode. 2) Change the type of second parameter of check_mode callback from void pointer paramenter to struct drm_display_mode pointer. v2: 1) Removed convert_to_video_timing(). 2) Corrected DRM_DEBUG_KMS to print the resolution properly. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: fimd: Add support for S3C64xx SoCsTomasz Figa
The FIMD block present on S3C6400/S3C6410 SoCs is compatible with this driver, so it can be supported by it as well. This patch adds appropriate device IDs and driver data to enable this driver for S3C64xx SoCs. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: fimd: Add support for FIMD variants with clock selectionTomasz Figa
Some platforms that can be supported this driver has additional clock source selection bits in VIDCON0 register that allows to select which clock should be used to drive the pixel clock: bus clock or special clock. Since this driver assumes that special clock always drives the pixel clock, this patch sets the selection bitfield to use the special clock. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: fimd: Add support for FIMD versions without SHADOWCON registerTomasz Figa
Some platforms that can be supported with this driver have PRTCON register instead of SHADOWCON, which requires slightly different handling. This patch factors out all register shadow control code from the driver and adds a function to control register shadowing appropriately, depending on driver data. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: fimd: Hold pointer to driver data in context structTomasz Figa
This patch adds pointer to driver data to fimd_context structure, to remove the need to call drm_fimd_get_driver_data() each time access to driver data is necessary. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-06-28drm/exynos: fix tests for valid FIMD window numberKrzysztof Kozlowski
Valid values for FIMD windows are from 0 to WINDOWS_NR-1 inclusive (5 windows in total). The WINDOWS_NR is also a size of fimd_context.win_data array. However, early-return tests for wrong values of windows accepted a value of WINDOWS_NR which is out of bound for fimd_context.win_data. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-05-23drm/exynos: cleanup device pointer usagesSeung-Woo Kim
Struct device pointer got from platform device pointer is already alsigned as variable, but some functions do not use device pointer. So this patch replaces thoes usages. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-04-29drm/exynos: enable FIMD clocksVikas Sajjan
Common Clock Framework introduced the need to prepare clocks before enabling them, otherwise clk_enable() fails. This patch adds clk_prepare_enable and clk_disable_unprepare() calls to the driver. This patch also removes clk_disable() from fimd_remove() as it will be done by pm_runtime_put_sync. Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-04-29Revert "drm/exynos: prepare FIMD clocks"Inki Dae
This reverts commit b4e3a3e844a0e33cf106a1c9f27ff93340c37640.
2013-04-21drm/exynos: prepare FIMD clocksVikas Sajjan
While migrating to common clock framework (CCF), I found that the FIMD clocks were pulled down by the CCF. If CCF finds any clock(s) which has NOT been claimed by any of the drivers, then such clock(s) are PULLed low by CCF. Calling clk_prepare() for FIMD clocks fixes the issue. This patch also replaces clk_disable() with clk_unprepare() during exit, since clk_prepare() is called in fimd_probe(). Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-04-17drm/exynos: change the method for getting the interruptVikas Sajjan
Replaces the "platform_get_resource() for IORESOURCE_IRQ" with platform_get_resource_byname(). Both in exynos4 and exynos5, FIMD IP has 3 interrupts in the order: "fifo", "vsync", and "lcd_sys". But The FIMD driver expects the "vsync" interrupt to be mentioned as the 1st parameter in the FIMD DT node. So to meet this expectation of the driver, the FIMD DT node was forced to be made by keeping "vsync" as the 1st paramter. For example in exynos4, the FIMD DT node has interrupt numbers mentioned as <11, 1> <11, 0> <11, 2> keeping "vsync" as the 1st paramter. This patch fixes the above mentioned "hack" of re-ordering of the FIMD interrupt numbers by getting interrupt resource of FIMD by using platform_get_resource_byname(). Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-04-17drm/exynos: Add display-timing node parsing using video helper functionVikas Sajjan
Add support for parsing the display-timing node using video helper function. The DT node parsing is done only if 'dev.of_node' exists and the NON-DT logic is still maintained under the 'else' part. Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-03-20drm/exynos: fimd: calculate the correct address offsetLeela Krishna Amudala
Calculate the correct address offset values for alpha and color key control registers based on exynos4 and exynos5 user manuals. Also remove VIDOSD_C_SIZE_W0 macro and fix comments about registers for size and alpha. Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-03-20drm/exynos: modify the compatible string for exynos fimdVikas Sajjan
modified compatible string for exynos4 fimd as "exynos4210-fimd" and exynos5 fimd as "exynos5250-fimd" to stick to the rule that compatible value should be named after first specific SoC model in which this particular IP version was included as discussed at https://patchwork.kernel.org/patch/2144861/ Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-25drm: Convert to devm_ioremap_resource()Thierry Reding
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-08Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm update from Dave Airlie: "Exynos and Radeon mostly, with a dma-buf and ttm fix thrown in. It's a bit big but its mostly exynos license fix ups and I'd rather not hold those up since its legally stuff. Radeon has a couple of fixes from dma engine work, TTM is just a locking fix, and dma-buf fix has been hanging around and I finally got a chance to review it." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (30 commits) drm/ttm: fix fence locking in ttm_buffer_object_transfer drm/prime: drop reference on imported dma-buf come from gem drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks drm/exynos: move finish page flip to a common place drm/exynos: fimd: modify condition in fimd resume drm/radeon: fix DMA CS parser for r6xx linear copy packet drm/radeon: split r6xx and r7xx copy_dma functions drm/exynos: Use devm_clk_get in exynos_drm_gsc.c drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c drm/exynos: Use devm_clk_get in exynos_drm_rotator.c drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c drm/exynos: Use devm_clk_get in exynos_drm_fimc.c drm/exynos: Remove redundant NULL check drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c drm/exynos: fix gem buffer allocation type checking drm/exynos: remove needless parenthesis. drm/exynos: fix incorrect interrupt induced by m2m operation. ...
2013-01-07drm/exynos: move finish page flip to a common placeRahul Sharma
This patch implements the exynos_drm_crtc_finish_pageflip in exynos_drm_crtc.c. This avoids the duplication of same code in mixer, fimd and vidi. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Stephane Marchesin <marcheu@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-07drm/exynos: fimd: modify condition in fimd resumePrathyush K
If fimd is runtime suspended (by DPMS OFF), fimd_suspend does not call fimd_activate(false) and just returns. Similarily the check in fimd_resume should not resume if previously runtime_suspended. Instead the existing check does the opposite. So if fimd was not runtime suspended, suspend will turn off fimd but resume will not turn it on. This patch fixes this issue by reversing the condition. Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-01-03Drivers: gpu: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-15drm/exynos: support device tree for fimdJoonyoung Shim
This adds the of_match_table to exynos-drm fimd driver to be probed from the device tree. Changelog v2: - fix build error without CONFIG_OF. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>