Ville Syrjälä
72bd9ea389
drm: Remove linux/media-bus-format.h from drm_crtc.h
...
drm_crtc.h has no need for linux/media-bus-format.h, so don't
include it. Avoids useless rebuilds of the entire universe when
touching linux/media-bus-format.h.
Quite a few placs do currently depend on linux/media-bus-format.h
without actually including it directly. All of those need to be
fixed up.
v2: Deal with ingenic as well
v3: Fix up mxsfb and remaining parts of imx
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220630195114.17407-4-ville.syrjala@linux.intel.com
2022-07-05 21:15:13 +03:00
Jiri Vanek
993a87917c
drm/bridge/tc358775: Fix DSI clock division for vsync delay calculation
...
Use the same PCLK divide option (divide DSI clock to generate pixel clock)
which is set to LVDS Configuration Register (LVCFG) also for a VSync delay
calculation. Without this change an auxiliary variable could underflow
during the calculation for some dual-link LVDS panels and then calculated
VSync delay is wrong. This leads to a shifted picture on a panel.
Tested-by: Jiri Vanek <jirivanek1@gmail.com >
Signed-off-by: Jiri Vanek <jirivanek1@gmail.com >
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-3-jirivanek1@gmail.com
2022-06-20 21:34:21 +02:00
Jiri Vanek
89fc846675
drm/bridge/tc358775: Return before displaying inappropriate error message
...
Function for reading from i2c device register displays error message even
if reading ends correctly. Add return to avoid falling through into
the fail label.
Signed-off-by: Jiri Vanek <jirivanek1@gmail.com >
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220615222221.1501-2-jirivanek1@gmail.com
2022-06-20 21:34:20 +02:00
Marek Vasut
c750c4ce1a
drm/bridge: tc358775: Fix drm_of_get_data_lanes_count_ep conversion
...
Initialize dsi_lanes to -1, so that in case the endpoint is missing,
probe would fail as it did before the conversion, instead of depending
on uninitialized variable and thus undefined behavior.
Fixes: 56426faa14 ("drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep")
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220612132152.91052-2-marex@denx.de
2022-06-12 16:07:06 +02:00
Marek Vasut
56426faa14
drm/bridge: tc358775: Convert to drm_of_get_data_lanes_count_ep
...
Convert driver to use this new helper to standardize
OF "data-lanes" parsing.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com >
Signed-off-by: Marek Vasut <marex@denx.de >
Cc: Andrzej Hajda <andrzej.hajda@intel.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Maxime Ripard <maxime@cerno.tech >
Cc: Robert Foss <robert.foss@linaro.org >
Cc: Sam Ravnborg <sam@ravnborg.org >
To: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220524010522.528569-7-marex@denx.de
2022-06-12 12:22:25 +02:00
Thomas Zimmermann
da68386d9e
drm: Rename dp/ to display/
...
Rename dp/ to display/ to account for additional display-related
helpers, such as HDMI. Update all related include statements. No
functional changes.
Various drivers, such as i915 and amdgpu, use similar naming scheme
by putting code for video-output standards into a local display/
directory. The new directory's name is aligned with this convention.
v2:
* update commit message (Javier)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220421073108.19226-3-tzimmermann@suse.de
2022-04-25 11:17:45 +02:00
José Expósito
aec9a8576e
drm/bridge: tc358775: switch to devm_drm_of_get_bridge
...
The function "drm_of_find_panel_or_bridge" has been deprecated in
favor of "devm_drm_of_get_bridge".
Switch to the new function and reduce boilerplate.
Signed-off-by: José Expósito <jose.exposito89@gmail.com >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20220228183537.24600-1-jose.exposito89@gmail.com
2022-03-08 12:07:57 +01:00
Thomas Zimmermann
5b529e8d9c
drm/dp: Move public DisplayPort headers into dp/
...
Move all public DisplayPort headers into dp/ and update users. No
functional changes.
v3:
* rebased onto latest drm-tip
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20220114114535.29157-5-tzimmermann@suse.de
2022-01-17 11:25:44 +01:00
Jiri Vanek
5313fb2c77
drm/bridge/tc358775: Fix for dual-link LVDS
...
Fixed wrong register shift for single/dual link LVDS output.
Tested-by: Jiri Vanek <jirivanek1@gmail.com >
Signed-off-by: Jiri Vanek <jirivanek1@gmail.com >
Reviewed-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20220106190027.1498-1-jirivanek1@gmail.com
2022-01-07 17:38:16 +01:00
Maxime Ripard
4d77688ff2
drm/bridge: tc358775: 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-20-maxime@cerno.tech
2021-10-27 22:07:58 +02:00
Maxime Ripard
526dcedf87
drm/bridge: tc358775: Switch to devm MIPI-DSI helpers
...
Let's switch to the new devm MIPI-DSI function to register and attach
our secondary device. This also avoids leaking the device when we detach
the bridge.
Acked-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Link: https://patchwork.freedesktop.org/patch/msgid/20211025151536.1048186-19-maxime@cerno.tech
2021-10-27 22:07:58 +02:00
Zheng Bin
c00579943c
drm/bridge/tc358775: Remove unneeded semicolon
...
Fixes coccicheck warning:
drivers/gpu/drm/bridge/tc358775.c:488:2-3: Unneeded semicolon
Signed-off-by: Zheng Bin <zhengbin13@huawei.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20200909121900.103712-1-zhengbin13@huawei.com
2020-09-10 08:46:24 +02:00
Vinay Simha BN
7f7fb53f62
drm/bridge/tc358775: Fix for PTR_ERR
...
passing zero to 'PTR_ERR'
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1597557042-5154-1-git-send-email-simhavcs@gmail.com
2020-08-23 17:04:16 +02:00
Vinay Simha BN
b26975593b
display/drm/bridge: TC358775 DSI/LVDS driver
...
This driver is tested with two panels individually with Apq8016-IFC6309 board
https://www.inforcecomputing.com/products/single-board-computers-sbc/qualcomm-snapdragon-410-inforce-6309-micro-sbc
1. 1366x768@60 auo,b101xtn01 data-mapping = "jeida-24"
2. 800x480@60 innolux,at070tn92 data-mapping = "vesa-24"
- power off sequence in proper order
- put_unaligned_be16, put_unaligned_le32 macros used
- static function for mode_valid
- len initialized
- MODE_CLOCK_HIGH handled properly
- bus_formats handled in mode_valid
- GENMASK and FIELD_PREP used
- Kconfig proper indentation
- error handling endpoint data-lanes
- check for bus_formats unsupported
- display_timings naming local variables
- help modified
- ~vsdelay dynamic value set based on the
calculation of dsi speed, output speed, blanking
- panel->connector_type removed
- dual port implemented
- devm_drm_panel_bridge_add method used instead of panel
description modified
- regulator enable and disable with proper orders and delays
as per the spec
- removed drm_connector_status
- added bus_formats
- mdelay to usleep_range
- magic number to macros for CLRSI and mux registers
description modified
- replaced u32 instead of uint32_t
- updated alphabetic order of headers
- added SPDX identifier license
Signed-off-by: Vinay Simha BN <simhavcs@gmail.com >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Signed-off-by: Sam Ravnborg <sam.ravnborg@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1594388491-15129-2-git-send-email-simhavcs@gmail.com
2020-08-10 19:46:06 +02:00