summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos
AgeCommit message (Collapse)Author
2014-04-30drm/exynos: use %pad for dma_addr_tJingoo Han
Use %pad for dma_addr_t, because a dma_addr_t type can vary based on build options. So, it prevents possible build warnings in printks. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-30drm/exynos: dsi: use IS_ERR() to check devm_ioremap_resource() resultsJingoo Han
devm_ioremap_resource() returns an error pointer, not NULL. Thus, the result should be checked with IS_ERR(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-30drm/exynos: balance framebuffer refcountAndrzej Hajda
exynos_drm_crtc_mode_set assigns primary framebuffer to plane without taking reference. Then during framebuffer removal it is dereferenced twice, causing oops. The patch fixes it. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-04-08Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm updates from Dave Airlie: "Highlights: - drm: Generic display port aux features, primary plane support, drm master management fixes, logging cleanups, enforced locking checks (instead of docs), documentation improvements, minor number handling cleanup, pseudofs for shared inodes. - ttm: add ability to allocate from both ends - i915: broadwell features, power domain and runtime pm, per-process address space infrastructure (not enabled) - msm: power management, hdmi audio support - nouveau: ongoing GPU fault recovery, initial maxwell support, random fixes - exynos: refactored driver to clean up a lot of abstraction, DP support moved into drm, LVDS bridge support added, parallel panel support - gma500: SGX MMU support, SGX irq handling, asle irq work fixes - radeon: video engine bringup, ring handling fixes, use dp aux helpers - vmwgfx: add rendernode support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (849 commits) DRM: armada: fix corruption while loading cursors drm/dp_helper: don't return EPROTO for defers (v2) drm/bridge: export ptn3460_init function drm/exynos: remove MODULE_DEVICE_TABLE definitions ARM: dts: exynos4412-trats2: enable exynos/fimd node ARM: dts: exynos4210-trats: enable exynos/fimd node ARM: dts: exynos4412-trats2: add panel node ARM: dts: exynos4210-trats: add panel node ARM: dts: exynos4: add MIPI DSI Master node drm/panel: add S6E8AA0 driver ARM: dts: exynos4210-universal_c210: add proper panel node drm/panel: add ld9040 driver panel/ld9040: add DT bindings panel/s6e8aa0: add DT bindings drm/exynos: add DSIM driver exynos/dsim: add DT bindings drm/exynos: disallow fbdev initialization if no device is connected drm/mipi_dsi: create dsi devices only for nodes with reg property drm/mipi_dsi: add flags to DSI messages Skip intel_crt_init for Dell XPS 8700 ...
2014-04-04drm/exynos: remove MODULE_DEVICE_TABLE definitionsInki Dae
This patch removes MODULE_DEVICE_TABLE definition to of_device_id of DP and MIPI-DSI drivers. Eyxnos drm should be built as single module so these definitions should be removed. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-04-04drm/exynos: add DSIM driverAndrzej Hajda
The patch adds driver for Exynos DSI master (DSIM). It is a platform driver which is registered as exynos_drm_display sub-driver of exynos_drm framework and implements DRM encoder/connector pair. It is also MIPI-DSI host driver and provides DSI bus for panels. It interacts with its panel(s) using drm_panel framework. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04drm/exynos: disallow fbdev initialization if no device is connectedAndrzej Hajda
This patch adds explicit check if there is a connector with connected status before fbdev initialization. It prevents creation of default fbdev 1024x768 which is unusable on panels with bigger resolutions. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-02Merge branch 'for-3.15' of ↵Linus Torvalds
git://git.linaro.org/people/mszyprowski/linux-dma-mapping Pull DMA-mapping updates from Marek Szyprowski: "This contains extension for more efficient handling of io address space for dma-mapping subsystem for ARM architecture" * 'for-3.15' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping: arm: dma-mapping: remove order parameter from arm_iommu_create_mapping() arm: dma-mapping: Add support to extend DMA IOMMU mappings
2014-04-01drm: Replace crtc fb with primary plane fb (v3)Matt Roper
Now that CRTC's have a primary plane, there's no need to track the framebuffer in the CRTC. Replace all references to the CRTC fb with the primary plane's fb. This patch was generated by the Coccinelle semantic patching tool using the following rules: @@ struct drm_crtc C; @@ - (C).fb + C.primary->fb @@ struct drm_crtc *C; @@ - (C)->fb + C->primary->fb v3: Generate patch via coccinelle. Actual removal of crtc->fb has been moved to a subsequent patch. v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
2014-04-01drm/exynos: Restrict plane loops to only operate on overlay planes (v2)Matt Roper
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. v2: Switch to using drm_for_each_legacy_plane() Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2014-04-01Merge tag 'driver-core-3.15-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core and sysfs updates from Greg KH: "Here's the big driver core / sysfs update for 3.15-rc1. Lots of kernfs updates to make it useful for other subsystems, and a few other tiny driver core patches. All have been in linux-next for a while" * tag 'driver-core-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (42 commits) Revert "sysfs, driver-core: remove unused {sysfs|device}_schedule_callback_owner()" kernfs: cache atomic_write_len in kernfs_open_file numa: fix NULL pointer access and memory leak in unregister_one_node() Revert "driver core: synchronize device shutdown" kernfs: fix off by one error. kernfs: remove duplicate dir.c at the top dir x86: align x86 arch with generic CPU modalias handling cpu: add generic support for CPU feature based module autoloading sysfs: create bin_attributes under the requested group driver core: unexport static function create_syslog_header firmware: use power efficient workqueue for unloading and aborting fw load firmware: give a protection when map page failed firmware: google memconsole driver fixes firmware: fix google/gsmi duplicate efivars_sysfs_init() drivers/base: delete non-required instances of include <linux/init.h> kernfs: fix kernfs_node_from_dentry() ACPI / platform: drop redundant ACPI_HANDLE check kernfs: fix hash calculation in kernfs_rename_ns() kernfs: add CONFIG_KERNFS sysfs, kobject: add sysfs wrapper for kernfs_enable_ns() ...
2014-03-28drm/exynos: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()Lespiau, Damien
There are only a few users of the DRM_LOG_KMS() macro. We can simplify the DRM code a bit by replacing them by DRM_DEBUG_KMS(). Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
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: init kms poll after creation of connectorsAndrzej Hajda
KMS poll init helper should be run when connectors are created, otherwise it will not schedule connection detector. 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: delay fbdev initialization until an output is connectedAndrzej Hajda
In case fbdev is initialized before any output is connected, fb resolution defaults to 1024x768. After that any output with bigger resolution is ignored and fbdev is not displayed. The patch postpones fbdev initialization to avoid such situation. 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: fix unnecessary resource cleanupInki Dae
This patch removes unnecessary drm_mode_config_cleanup call. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-03-24drm/exynos: hdmi: use i2c_adapter instead of i2c_clientInki Dae
This patch changes i2c_client for ddc to i2c_adapter because ddc needs only i2c_adapter. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-03-24drm/exynos: hdmi: consider APB PHYInki Dae
This patch returns error in case of using APB PHY. Exynos5420 SoC and maybe later would use APB PHY instead of I2C PHY so such case should be considered. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-03-24drm/exynos: Remove the exynos_drm_connector shimSean Paul
This path removes the exynos_drm_connector code since it was just passing hooks through display_ops. The individual device drivers are now responsible for implementing drm_connector directly. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Implement lvds bridge discovery to DP driverSean Paul
This patch implements the lvds bridge discovery and connector pre-emption code to the dp driver. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Implement drm_connector directly in vidi driverSean Paul
This patch implements drm_connector directly in the vidi driver, this will allow us to move away from the exynos_drm_connector layer. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Implement drm_connector directly in dp driverSean Paul
This patch implements drm_connector directly in the dp driver, this will allow us to move away from the exynos_drm_connector layer. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Implement drm_connector in hdmi directlySean Paul
This patch implements drm_connector in the hdmi driver directly, instead of using exynos_drm_connector. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Add create_connector callbackSean Paul
This creates a new display hook called create_connector. The purpose is to allow the display driver to create its own drm_connector instead of using the exynos_drm_connector. This moves things closer to completely removing the exynos_drm_connector abstraction. Signed-off-by: Sean Paul <seanpaul@chromium.org> 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: Implement dpms display callback in DPSean Paul
This patch implements the dpms display callback for the DP driver. 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: Move dp driver from video/ to drm/Sean Paul
This patch moves the code from video/ to drm/. This is required the DP driver needs to power on/off in the correct order in relation to fimd. This will also allow the DP driver to participate in drm modeset as well as provide accurate connection detection and edid. 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: Implement mode_fixup manager operationSean Paul
This patch adds a new manager callback for mode_fixup and pipes it through exynos_drm_crtc. This will allow the manager drivers to alter the mode during modeset. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Add mode_set manager operationSean Paul
This patch adds a mode_set callback to the manager operations which sets the crtc's current mode to the manager driver. This will allow the fimd driver to set its mode using values from drm, instead of the dt. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Disable unused crtc planes from crtcSean Paul
This patch moves the code which disables unused crtc planes from the encoder to the crtc. Since there is a 1:1 encoder/crtc mapping in exynos, the only valid crtc change the pre-existing code could catch is disconnecting an active crtc from the encoder. Thus it is functionally equivalent to just disable all planes attached to a crtc when the crtc is disabled. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Use drm_mode_copy to copy modesSean Paul
This patch changes the manual copying of mode to adjusted_mode in mode_fixup to use drm_mode_copy instead of handling things manually. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: Remove exynos_drm_hdmi shimSean Paul
This patch trims exynos_drm_hdmi out of the driver. The reason it existed in the first place was to make up for the mixture of display/overlay/manager ops being spread across hdmi and mixer. With that code now rationalized, mixer and hdmi map directly to exynos_drm_crtc and exynos_drm_encoder, respectively. Since there is a 1:1 mapping, we no longer need this layer. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-03-24drm/exynos: hdmi: remove the i2c drivers and useDaniel Kurtz
The i2c client was previously being passed into the hdmi driver via a dedicated i2c driver, and then a global variable. This patch removes all of that and just uses the device tree to get the i2c_client. This patch also properly references the client so we don't lose it before we're done with it. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> [seanpaul changed to phandle lookup instead of using of node name] 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: Use unsigned long for possible_crtcsSean Paul
Change all instances of possible_crtcs in the exynos drm driver to be unsigned long. This matches the type used in the drm layer. 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: Don't keep dpms state in encoderSean Paul
This patch removes the dpms state tracking in encoder. This state is at best confusing and at worst incorrect since the display drivers can turn on and off without propagating the value. 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: 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 dpms link between encoder/connectorSean Paul
This patch removes the call from encoder dpms into connector dpms (which will then call back into encoder dpms through the helper function). The callback is likely to keep connector->dpms in the right state when initiating dpms from crtc or encoder, but this isn't the right way to do it. This patch is the first step towards rationalizing power management in the exynos drm driver. 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: hdmi: Implement initialize op for hdmiSean Paul
This patch implements the initialize callback in the hdmi and mixer manager. This allows us to get rid of drm_dev in the drm_hdmi level and track it in the mixer and hdmi drivers. This is one of the things holding back the complete removal of the drm_hdmi layer. 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: Add an initialize function to manager and displaySean Paul
This patch adds an initialize function to the manager and display operations. This allows them to keep track of drm_device in their local context, as well as adds an initialization hook right after the encoder is created. 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: 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>