Maxime Ripard
d89078c37b
drm/bridge: lt8912b: Register and attach our DSI device at probe
...
In order to avoid any probe ordering issue, the best practice is to move
the secondary MIPI-DSI device registration and attachment to the
MIPI-DSI host at probe time. Let's do this.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20211025151536.1048186-7-maxime@cerno.tech
2021-10-27 22:07:56 +02:00
Maxime Ripard
1fdbf66e3d
drm/bridge: lt8912b: Switch to devm MIPI-DSI helpers
...
Let's switch to the new devm MIPI-DSI function to register and attach
our secondary device.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20211025151536.1048186-6-maxime@cerno.tech
2021-10-27 22:07:56 +02:00
Nicolas Boichat
0f3b68b66a
drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features
...
Many of the DSI flags have names opposite to their actual effects,
e.g. MIPI_DSI_MODE_EOT_PACKET means that EoT packets will actually
be disabled. Fix this by including _NO_ in the flag names, e.g.
MIPI_DSI_MODE_NO_EOT_PACKET.
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Andrzej Hajda <andrzej.hajda@samsung.com >
Reviewed-by: Xin Ji <xji@analogixsemi.com > # anx7625.c
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org > # msm/dsi
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210727094435.v3.1.I629b2366a6591410359c7fcf6d385b474b705ca2@changeid
2021-07-27 09:48:24 +02:00
Linus Walleij
ef9e57cda5
drm/bridge: lt8912b: Drop unused includes
...
The Lontium bridge is including legacy header files for GPIO
but not using them. Delete the includes.
Cc: Adrien Grassein <adrien.grassein@gmail.com >
Cc: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Adren Grassein <adrien.grassein@gmail.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210529002759.468964-1-linus.walleij@linaro.org
2021-05-31 12:44:20 +02:00
Zou Wei
2986d2763d
drm/bridge: lt8912b: fix platform_no_drv_owner.cocci warnings
...
./drivers/gpu/drm/bridge/lontium-lt8912b.c:758:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Zou Wei <zou_wei@huawei.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1622109018-54648-1-git-send-email-zou_wei@huawei.com
2021-05-27 14:06:21 +02:00
Dave Airlie
a1a1ca70de
Merge tag 'drm-misc-next-fixes-2021-04-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
A few fixes for the next merge window, with some build fixes for anx7625
and lt8912b bridges, incorrect error handling for lt8912b and TTM, and
one fix for TTM page limit accounting.
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20210422163329.dvbuwre3akwdmzjt@gilmour
2021-04-23 13:53:07 +10:00
Adrien Grassein
5a7bd25992
drm/bridge: lt8912b: fix incorrect handling of of_* return values
...
A static analysis shows several issues in the driver code at
probing time.
DT parsing errors were bad handled and could lead to bugs:
- Bad error detection;
- Bad release of resources
Fixes: 30e2ae943c ("drm/bridge: Introduce LT8912B DSI to HDMI bridge")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210415183639.1487-1-rdunlap@infradead.org
Signed-off-by: Robert Foss <robert.foss@linaro.org >
2021-04-16 17:12:51 +02:00
Zhang Jianhua
7513ce4902
drm/bridge: lt8912b: Add header file <linux/gpio/consumer.h>
...
If CONFIG_DRM_LONTIUM_LT8912B=m, the following errors will be seen while
compiling lontium-lt8912b.c
drivers/gpu/drm/bridge/lontium-lt8912b.c: In function
‘lt8912_hard_power_on’:
drivers/gpu/drm/bridge/lontium-lt8912b.c:252:2: error: implicit
declaration of function ‘gpiod_set_value_cansleep’; did you mean
‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(lt->gp_reset, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
drivers/gpu/drm/bridge/lontium-lt8912b.c: In function ‘lt8912_parse_dt’:
drivers/gpu/drm/bridge/lontium-lt8912b.c:628:13: error: implicit
declaration of function ‘devm_gpiod_get_optional’; did you mean
‘devm_gpio_request_one’? [-Werror=implicit-function-declaration]
gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
^~~~~~~~~~~~~~~~~~~~~~~
devm_gpio_request_one
drivers/gpu/drm/bridge/lontium-lt8912b.c:628:51: error: ‘GPIOD_OUT_HIGH’
undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
^~~~~~~~~~~~~~
GPIOF_INIT_HIGH
Signed-off-by: Zhang Jianhua <zhangjianhua18@huawei.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210408093822.207917-1-zhangjianhua18@huawei.com
2021-04-08 11:44:07 +02:00
Adrien Grassein
30e2ae943c
drm/bridge: Introduce LT8912B DSI to HDMI bridge
...
Lontium LT8912B is a DSI to HDMI bridge.
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210326121955.1266230-3-adrien.grassein@gmail.com
2021-03-26 15:40:20 +01:00