aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/edp
Commit message (Collapse)AuthorAge
* drm: msm: Rely on the default ->best_encoder() behavior where appropriateBoris Brezillon2016-06-09
| | | | | | | | | | | | For all outputs except DSI we have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-9-git-send-email-boris.brezillon@free-electrons.com
* drm/msm: Centralize connector registration/unregistrationArchit Taneja2016-05-08
| | | | | | | | | | | | | | | | Move the drm_connector registration from the encoder(HDMI/DSI etc) drivers to the msm platform driver. This will simplify the task of ensuring that the connectors are registered only after the drm_device itself is registered. The connectors' destroy ops are made to use kzalloc instead of devm_kzalloc to ensure that that the connectors can be successfully unregistered when the msm driver module is removed. The memory for the connectors is unallocated when drm_mode_config_cleanup() is called during either during an error or during driver remove. Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/edp: Drop regulator_set_voltage callArchit Taneja2016-05-08
| | | | | | | | | | | | | The eDP driver tries to set a fixed voltage for one of its regulators(vdda) before enabling it. This shouldn't be done by the driver, the voltage constraints should be specified on the regulator via DT and managed by the regulator core. A driver should call regulator_set_voltage only if it needs to change the voltage during runtime. Drop the regulator_set_voltage call. Mention in a comment the voltage that the regulator expects. Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: Move call to PTR_ERR_OR_ZERO after reassignmentVaishali Thakkar2016-05-08
| | | | | | | | | | | | | | Here, a location is reset to NULL before being passed to PTR_ERR. So, PTR_ERR should be called before its argument is reassigned to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead of PTR_ERR and IS_ERR. Problem found using Coccinelle. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> [fixed fmt string warning (s/%ld/%d/)] Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: update generated headersRob Clark2016-03-03
| | | | | | Pull in additional regs needed for a430, etc. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: update generated headersRob Clark2015-10-22
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/dp: use flags argument of devm_gpiod_get to set directionUwe Kleine-König2015-08-15
| | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Use this to simplify the driver. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Acked-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: update generated headersRob Clark2015-08-15
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: drop redundant debug outputNicholas Mc Guire2015-06-11
| | | | | | | | | wait_for_completion_timeout returns 0 in case of timeout and never return < 0 so there is no additional information in printing the value of time_left here as it will always be 0, thus it can be dropped. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: wait_for_completion_timeout return is never negativeNicholas Mc Guire2015-06-11
| | | | | | | | | wait_for_completion_timeout returns >= 0 but never negative - so the error check should be against equality to 0 not <= 0. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: match wait_for_completion_timeout return typeNicholas Mc Guire2015-06-11
| | | | | | | | | return type of wait_for_completion_timeout is unsigned long not int, this patch assigns the return value of wait_for_completion_timeout to an appropriately typed and named variable. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm/edp: fix build warning - missing prototypeRob Clark2015-06-11
| | | | | | | | | | Fix build warning when building edp/edp_aux.o due to missing prototype for edp_aux_transfer. This function is only used in edp_aux.c so just make it static. Reported-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: drop redundant output in debug messageNicholas Mc Guire2015-06-11
| | | | | | | | wait_for_completion_timeout returns 0 in case of timeout so printing the return value here will always yield 0 and is therefor redundant - dropped. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: fix HZ dependency of timeoutNicholas Mc Guire2015-06-11
| | | | | | | | | | | | | The timeout is passed as a constant which makes it HZ dependent because jiffies are expected so it should be converted to jiffies. The actual value is not clear from the code - my best guess is that this should be 300 milliseconds given that other timeouts are in milliseconds based on looking at other drm drivers (e.g. exynos_drm_dsi.c:356 300ms, tegra/dpaux.c:188 250ms) - this needs to be confirmed by someone who knows the details of the driver. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: fixup wait_for_completion_timeout handlingNicholas Mc Guire2015-06-11
| | | | | | | | | | | | | | | | | | | | | | wait_for_completion_timeout return >= 0 but never negative so the check logic looks inconsistent. Further the return value of wait_for_completion_timeout was being passed up the call chain but the x call sites as drm_dp_i2c_do_msg()/drm_dp_dpcd_access() check for < 0 thus timeout was being treated as success case. <snip> drivers/gpu/drm/drm_dp_helper.c:drm_dp_i2c_do_msg() mutex_lock(&aux->hw_mutex); ret = aux->transfer(aux, msg); mutex_unlock(&aux->hw_mutex); if (ret < 0) { <snip> logic in edp_aux_transfer() seems incorrect as it could return 0 (timeout) but checks of <= 0 to indicate error so the return probably should be -ETIMEDOUT in case wait_for_completion_timeout returns 0 (timeout occurred). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: update generated headersRob Clark2015-06-11
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: Attach assigned encoder to eDP and DSI connectorsHai Li2015-05-14
| | | | | | | | | drm_mode_connector_attach_encoder() function call is missing during eDP and DSI connector initialization. As a result, no encoder is returned by DRM_IOCTL_MODE_GETCONNECTOR system call. This change is to fix this issue. Signed-off-by: Hai Li <hali@codeaurora.org>
* drm/msm/dp: fix error return codeJulia Lawall2015-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
* drm/msm: Fix a couple of 64-bit build warningsThierry Reding2015-05-14
| | | | | | | | | | Avoid casts from pointers to fixed-size integers to prevent the compiler from warning. Print virtual memory addresses using %p instead. Also turn a couple of %d/%x specifiers into %zu/%zd/%zx to avoid further warnings due to mismatched format strings. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* regulator: fixes for regulator_set_optimum_mode name changeStephen Rothwell2015-03-10
| | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@kernel.org>
* drm/msm/dp: use link power helpersRob Clark2015-02-01
| | | | | | | Now that we have a helper for drm_dp_link_power_down(), use dp helpers instead of rolling our own. Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: Initial add eDP support in msm drm driver (v5)Hai Li2015-02-01
| | | | | | | | | | | | | | | | | | | | | | | This change adds a new eDP connector in msm drm driver. With this change, eDP panel can work with msm platform under drm framework. v1: Initial change v2: Address Rob's comments Use generated header file for register definitions Change to devm_* APIs v3: Address Thierry's comments and rebase on top of atomic changes Remove edp_bridge_mode_fixup Remove backlight control code and rely on pwm-backlight Remove continuous splash screen support for now Change to gpiod_* APIs v4: Fix kbuild test issue Signed-off-by: Hai Li <hali@codeaurora.org> [robclark: v5: rebase on drm_bridge changes in drm-next] Signed-off-by: Rob Clark <robdclark@gmail.com>
* drm/msm: update generated headersRob Clark2015-02-01
Resync from rnndb database, to pull in register defines for: * eDP * HDMI/HDCP * mdp4/mdp5 YUV support * mdp5 hw cursor support Signed-off-by: Rob Clark <robdclark@gmail.com>