summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm: add drm_fb_helper_restore_fbdev_mode_unlocked()Rob Clark2014-06-0510-49/+48
| | | | | | | | | All drm_fb_helper_restore_fbdev_mode() call sites, save one, do the same locking. Simplify this into drm_fb_helper_restore_fbdev_mode_unlocked(). Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: convert crtc and connection_mutex to ww_mutex (v5)Rob Clark2014-06-0521-87/+531
| | | | | | | | | | | | | | | | | | | | | | | For atomic, it will be quite necessary to not need to care so much about locking order. And 'state' gives us a convenient place to stash a ww_ctx for any sort of update that needs to grab multiple crtc locks. Because we will want to eventually make locking even more fine grained (giving locks to planes, connectors, etc), split out drm_modeset_lock and drm_modeset_acquire_ctx to track acquired locks. Atomic will use this to keep track of which locks have been acquired in a transaction. v1: original v2: remove a few things not needed until atomic, for now v3: update for v3 of connection_mutex patch.. v4: squash in docbook v5: doc tweaks/fixes Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/dp: add a hw mutex around the transfer functions. (v2)Dave Airlie2014-06-056-20/+29
| | | | | | | | | This should avoid races between connector probing and HPD irqs in the future, currently mode_config.mutex blocks this possibility. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge tag 'topic/core-stuff-2014-06-02' of ↵Dave Airlie2014-06-046-8/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-next Just flushing out my pile of random drm patches for the merge window, nothing big. And it all hung around in drm-intel trees for a while (only just rebased now). * tag 'topic/core-stuff-2014-06-02' of git://anongit.freedesktop.org/drm-intel: imx-drm: imx-tve: remove unused variable drm: Missed clflushopt in drm_clflush_virt_range drm/plane: Fix a couple of checkpatch warnings drm/plane: Fix sparse warnings drm/exynos: Fix double locks at PM resume drm/ast: Fix double lock at PM resume drm/dp-helper: Deprecate old i2c-over-dp_aux heleprs
| * imx-drm: imx-tve: remove unused variableVincent Stehlé2014-06-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f9b0e251dfbf 'drm: make mode_valid callback optional' left variable ret unused; remove it. This fixes the following compilation warning: drivers/staging/imx-drm/imx-tve.c: In function ‘imx_tve_connector_mode_valid’: drivers/staging/imx-drm/imx-tve.c:252:6: warning: unused variable ‘ret’ [-Wunused-variable] Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm: Missed clflushopt in drm_clflush_virt_rangeRoss Zwisler2014-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit: 2a0788dc9bc4 x86: Use clflushopt in drm_clflush_virt_range If clflushopt is available on the system, we use it instead of clflush in drm_clflush_virt_range. There were two calls to clflush in this function, but only one was changed to clflushopt. This patch changes the other clflush call to clflushopt. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reported-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Cc: H Peter Anvin <h.peter.anvin@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/plane: Fix a couple of checkpatch warningsThierry Reding2014-06-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code should be indented using tabs rather than spaces (see CodingStyle) and the canonical form to declare a constant static variable is using "static const" rather than "const static". Fixes the following warnings from checkpatch: $ scripts/checkpatch.pl -f drivers/gpu/drm/drm_plane_helper.c WARNING: storage class should be at the beginning of the declaration #40: FILE: drivers/gpu/drm/drm_plane_helper.c:40: +const static uint32_t safe_modeset_formats[] = { WARNING: please, no spaces at the start of a line #41: FILE: drivers/gpu/drm/drm_plane_helper.c:41: + DRM_FORMAT_XRGB8888,$ WARNING: please, no spaces at the start of a line #42: FILE: drivers/gpu/drm/drm_plane_helper.c:42: + DRM_FORMAT_ARGB8888,$ Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/plane: Fix sparse warningsThierry Reding2014-06-022-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include the drm_plane_helper.h header file to fix the following sparse warnings: CHECK drivers/gpu/drm/drm_plane_helper.c drivers/gpu/drm/drm_plane_helper.c:102:5: warning: symbol 'drm_primary_helper_update' was not declared. Should it be static? drivers/gpu/drm/drm_plane_helper.c:219:5: warning: symbol 'drm_primary_helper_disable' was not declared. Should it be static? drivers/gpu/drm/drm_plane_helper.c:233:6: warning: symbol 'drm_primary_helper_destroy' was not declared. Should it be static? drivers/gpu/drm/drm_plane_helper.c:241:30: warning: symbol 'drm_primary_helper_funcs' was not declared. Should it be static? drivers/gpu/drm/drm_plane_helper.c:259:18: warning: symbol 'drm_primary_helper_create_plane' was not declared. Should it be static? Doing that makes gcc complain as follows: CC drivers/gpu/drm/drm_plane_helper.o drivers/gpu/drm/drm_plane_helper.c:260:19: error: conflicting types for 'drm_primary_helper_create_plane' struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev, ^ In file included from drivers/gpu/drm/drm_plane_helper.c:29:0: include/drm/drm_plane_helper.h:42:19: note: previous declaration of 'drm_primary_helper_create_plane' was here struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev, ^ drivers/gpu/drm/drm_plane_helper.c: In function 'drm_primary_helper_create_plane': drivers/gpu/drm/drm_plane_helper.c:274:11: warning: assignment discards 'const' qualifier from pointer target type formats = safe_modeset_formats; ^ In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from include/drm/drmP.h:45, from drivers/gpu/drm/drm_plane_helper.c:27: drivers/gpu/drm/drm_plane_helper.c: At top level: drivers/gpu/drm/drm_plane_helper.c:289:15: error: conflicting types for 'drm_primary_helper_create_plane' EXPORT_SYMBOL(drm_primary_helper_create_plane); ^ include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL' extern typeof(sym) sym; \ ^ drivers/gpu/drm/drm_plane_helper.c:289:1: note: in expansion of macro 'EXPORT_SYMBOL' EXPORT_SYMBOL(drm_primary_helper_create_plane); ^ In file included from drivers/gpu/drm/drm_plane_helper.c:29:0: include/drm/drm_plane_helper.h:42:19: note: previous declaration of 'drm_primary_helper_create_plane' was here struct drm_plane *drm_primary_helper_create_plane(struct drm_device *dev, ^ Which can easily be fixed by making the signatures of the implementation and the prototype match. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/exynos: Fix double locks at PM resumeTakashi Iwai2014-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | The recent commit [3ea87855: drm/helper: lock all around force mode restore] introduced drm_modeset_lock_all() in drm_helper_resume_force_mode() itself, while exynos driver takes this lock before calling it. Move the function call outside the lock for avoiding a deadlock. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/ast: Fix double lock at PM resumeTakashi Iwai2014-06-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | The recent commit [3ea87855: drm/helper: lock all around force mode restore] introduced drm_modeset_lock_all() in drm_helper_resume_force_mode() itself, while ast driver still takes this lock before calling it. Remove the caller side lock for avoid a fatal deadlock. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/dp-helper: Deprecate old i2c-over-dp_aux heleprsDaniel Vetter2014-06-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Only gma500 is still using this, once that's converted we can kill all this code. If that conversion doesn't happen soonish I think we should just move this helper code into the gma500 driver itself to avoid abuse from new drivers. Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | Merge branch 'exynos-drm-next' of ↵Dave Airlie2014-06-0430-1419/+1807
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: - Resolve probe order and deferred probe issue with component framework support. - Resolve hdmi dt broken issue. . HDMI DT support, which was broken since CCF (common clock framework) support, and considring legacy dt binding. - Consolidate HDMI part. . APB based phy support for Exynos5420 and later, and fixups related to power on/off sequence. - Consolidate IPP part. . Mostly bug fixups and code cleanups. - Trivial fixups and code cleanups. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (64 commits) drm/exynos: consider deferred probe case drm/exynos: remove unnecessary exynos_hdmi.h file drm/exynos/fimd: allow multiplatform configuration drm/exynos: add hdmiphy power on/off sequence drm/exynos: ipp: remove description of non-existing field drm/exynos: ipp: update comment for struct drm_ipp_buf_info drm/exynos: ipp: rearrange c_node->event_lock using routine drm/exynos: ipp: rearrange c_node->mem_lock using routines drm/exynos: ipp: add ipp_remove_id() drm/exynos: ipp: add cmd_lock for cmd_list drm/exynos: ipp: rename cmd_lock to lock drm/exynos: ipp: remove duplicated setting drm/exynos: ipp: remove usless list_empty() functions drm/exynos: Use PTR_ERR_OR_ZERO in exynos_dp_core.c drm/exynos: remove hardware overlays disable from fimd probe drm/exynos: Fix checkpatch warning in exynos_dp_reg.c drm/exynos: add fimd dependency to fimd related encoders drm/exynos: remove redundant mutex_unlock drm/exynos/fimc: simplify and rename fimc_dst_get_buf_seq drm/exynos/fimc: replace mutex by spinlock ...
| * | drm/exynos: consider deferred probe caseInki Dae2014-06-028-75/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes sure that exynos drm framework handles deferred probe case correctly. Sub drivers could be probed before resources, clock, regulator, phy or panel, are ready for them so we should make sure that exynos drm core waits until all resources are ready and sub drivers are probed correctly. Chagelog v2: - Make sure that exynos drm core tries to bind sub drivers only in case that they have a pair: crtc and encoder/connector components should be a pair. - Remove unnecessary patch: drm/exynos: mipi-dsi: consider panel driver-deferred probe - Return error type correctly. Signed-off-by: Inki Dae <inki.dae@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | drm/exynos: remove unnecessary exynos_hdmi.h fileJingoo Han2014-06-021-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exynos_hdmi.h has been used for the dedicated i2c drivers that were already removed. Thus, the unnecessary exynos_hdmi.h should be removed. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/fimd: allow multiplatform configurationAndrzej Hajda2014-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The patch removes dependency on !ARCH_MULTIPLATFORM. This dependency seems to be not longer valid. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: add hdmiphy power on/off sequenceShirish S2014-06-012-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the power on/off sequence of HDMI PHY in exynos5420 and exynos5250 as provided by the hardware team. This has been verified for mulitple iterations of S2R. Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: remove description of non-existing fieldAndrzej Hajda2014-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | ipp_id field is removed from exynos_drm_ippdrv struct. The patch removes its description as well. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: update comment for struct drm_ipp_buf_infoYoungJun Cho2014-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attribute gem_objs in struct drm_exynos_ipp_buf_info was changed to handles. So the comment needs to be updated also. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: rearrange c_node->event_lock using routineYoungJun Cho2014-06-011-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The c_node->event_list should be protected with c_node->event_lock. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: rearrange c_node->mem_lock using routinesYoungJun Cho2014-06-011-38/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The c_node->mem_list[] should be protected with c_node->mem_lock. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: add ipp_remove_id()YoungJun Cho2014-06-011-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ipp_remove_id() for idr resource free. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: add cmd_lock for cmd_listYoungJun Cho2014-06-012-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds cmd_lock for cmd_list synchronization. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: rename cmd_lock to lockYoungJun Cho2014-06-012-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ippdrv->cmd_list requires cmd_lock. So renames cmd_lock to lock for context. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: remove duplicated settingYoungJun Cho2014-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes duplicated setting. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.cho@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: ipp: remove usless list_empty() functionsYoungJun Cho2014-06-011-52/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list_for_each_entry() handles empty lists, so there is no need to check whether the list is empty first. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Acked-by: Seong-Woo Kim <sw0312.kim@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: Use PTR_ERR_OR_ZERO in exynos_dp_core.cSachin Kamat2014-06-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: remove hardware overlays disable from fimd probeRahul Sharma2014-06-011-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | System hangs when FIMD registers are accessed to disable hardware overlays. This is because of the clocks which are not enabled before register access. 'Hardware overlay disable' is cleaned from the FIMD probe. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: Fix checkpatch warning in exynos_dp_reg.cSachin Kamat2014-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Silences the following warning: WARNING: space prohibited before semicolon Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: add fimd dependency to fimd related encodersAndrzej Hajda2014-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | DPI, DSI and DP drivers will not work without FIMD. The patch adds appropriate dependencies in Kconfig. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: remove redundant mutex_unlockAndrzej Hajda2014-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | The patch fixes unlocking in exynos_drm_component_del. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/fimc: simplify and rename fimc_dst_get_buf_seqAndrzej Hajda2014-06-011-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | fimc_dst_get_buf_seq returns number of buffers so the name should be fimc_dst_get_buf_count. Function body has been simplified. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/fimc: replace mutex by spinlockAndrzej Hajda2014-06-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | Function fimc_dst_set_buf_seq is called by irq handler so it should not use mutexes. This patch fixes it. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/fimc: replace hw access macros with functionsAndrzej Hajda2014-06-011-161/+150
| | | | | | | | | | | | | | | | | | | | | | | | HW access macros implicitly depended on presence of ctx local variable. This patch replaces them with C functions. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/fimc: simplify irq masking functionAndrzej Hajda2014-06-011-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The name fimc_handle_irq suggests it is irq handler, but the function is for irq mask configuration. The patch renames the function to fimc_mask_irq and removes unused arguments. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/fimc: simplify pre-scaler ratio calculationAndrzej Hajda2014-06-011-43/+13
| | | | | | | | | | | | | | | | | | | | | | | | The patch replaces dedicated function for scaling ratio calculation by fls calls. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/ipp: simplify property list allocationAndrzej Hajda2014-06-015-26/+8
| | | | | | | | | | | | | | | | | | | | | | | | prop_list is always allocated, so instead of allocating it dynamically the pointer can be replaced by the structure itself. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/ipp: correct ipp_id field initializationAndrzej Hajda2014-06-012-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | prop_list.ipp_id field is not initialized properly. The patch fixes it, additionally it removes redundant field from ippdrv. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos/ipp: fix get_property IOCTLAndrzej Hajda2014-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Due to incorrect assignment in EXYNOS_IPP_GET_PROPERTY IOCTL handler this IOCTL did not work at all. The patch fixes it. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: Staticize local symbols in exynos_hdmi.cSachin Kamat2014-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | These symbols are local to this file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: Remove duplicate inclusion of i2c.hSachin Kamat2014-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | i2c.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: Staticize exynos_dpi_of_find_panel_nodeSachin Kamat2014-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | exynos_dpi_of_find_panel_node is local to this file. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae>
| * | drm/exynos: Fix PTN3460 dependencyJean Delvare2014-06-012-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following configuration options combination: CONFIG_DRM_EXYNOS_DP=y CONFIG_DRM_PTN3460=m currently leads to the following linker failure: drivers/built-in.o: In function `exynos_drm_attach_lcd_bridge': .../drivers/gpu/drm/exynos/exynos_dp_core.c:1004: undefined reference to `ptn3460_init' This is because ptn3460_init can't be implemented in a module while its caller is built into the kernel. So add the proper dependency in Kconfig so that the above can't happen. I moved DRM_PTN3460 earlier in Kconfig, next to the I2C helper module section, so that the user has a chance to select it before moving to the Exynos-specific section. IMHO the proper way to solve the problem would be to turn ptn3460 into a clean I2C driver, similar to the other I2C helper chip drivers. It's the only way to not sink into impossible-to-guess dependencies. Then ptn3460 could even be moved together with the other I2C helper chip drivers. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: use 4WORD dma burst length for small fbsRahul Sharma2014-06-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of exynos, setting dma-burst to 16Word causes permanent tearing for very small buffers, e.g. cursor buffer. Burst Mode switching, which is based on overlay size is not recommended as overlay size varies a lot towards the end of the screen. This causes unstable DMA which results into tearing again. Rendering small buffers with lower burst size doesn't cause any noticable performance overhead. 128 pixel width is selected based on mulitple experiments with exynos5 SoCs. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: use regmap interface to set hdmiphy control bit in pmuRahul Sharma2014-06-013-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exynos drm hdmi driver used to get dummy hdmiphy clock to control the PMU bit for hdmiphy. This bit needs to be set before setting any resolution to hdmi hardware. This was handled using dummy hdmiphy clock which is removed here. PMU is already defined as system controller for exynos SoCs. Hdmi driver is modified to control the phy enable bit inside PMU using regmap interfaces. Devicetree binding document for hdmi is also updated. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: allocate non-contigous buffers when iommu is enabledRahul Sharma2014-06-011-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to allocate non-contigous buffers when iommu is enabled. Currently, it tries to allocates contigous buffer which consistently fail for large buffers and then fall back to non contigous. Apart from being slow, this implementation is also very noisy and fills the screen with alloc fail logs. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: hdmi: consider legacy dt bindingInki Dae2014-06-011-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch considers legacy dt binding, and resolves the issue that the use of existing dtb is broken. To resove the dt broken issue, this path tries to get legacy dt nodes from existing dtb directly prior to getting new dt nodes. Signed-off-by: Inki Dae <inki.dae@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | drm/exynos: restore core HDMI settingsShirish S2014-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In DVI mode the video preamble and Guard band should be disabled whereas it should be applied in HDMI mode, the re-applying of preamble and guard band was missing, which resulted in display failures when switched to HDMI mode from DVI mode. This patch ensures the setting is applied in HDMI mode. Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: hdmi: remove unnecessary dedicated i2c driversSeung-Woo Kim2014-06-012-128/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c drivers for ddc and hdmiphy are already removed from build and instead, i2c clients registered via devicetree are used. So this patch removes the unnecessary i2c drivers. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: enable support for exynos5420 hdmi deviceRahul Sharma2014-06-012-0/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable support for hdmi for exynos5420 hdmiphy. Add compatible string in the of_match table. Also added hdmiphy configuration values for exynos5420. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Shirish S <s.shirish@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | drm/exynos: add support for apb mapped phys in hdmi driverRahul Sharma2014-06-012-53/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previous SoCs have hdmi phys which are accessible through dedicated i2c lines. Newer SoCs have Apb mapped hdmi phys. Hdmi driver is modified to support apb mapped phys. Signed-off-by: Rahul Sharma <Rahul.Sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>