#
ed486d15 |
| 10-Sep-2021 |
Maxime Ripard <maxime@cerno.tech> |
drm/bridge: Add a function to abstract away panels
[ Upstream commit 87ea95808d53e56b03e620e8f8f3add48899a88d ]
Display drivers so far need to have a lot of boilerplate to first retrieve either the
drm/bridge: Add a function to abstract away panels
[ Upstream commit 87ea95808d53e56b03e620e8f8f3add48899a88d ]
Display drivers so far need to have a lot of boilerplate to first retrieve either the panel or bridge that they are connected to using drm_of_find_panel_or_bridge(), and then either deal with each with ad-hoc functions or create a drm panel bridge through drm_panel_bridge_add.
In order to reduce the boilerplate and hopefully create a path of least resistance towards using the DRM panel bridge layer, let's create the function devm_drm_of_get_bridge() to reduce that boilerplate.
Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210910130941.1740182-2-maxime@cerno.tech Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v5.14.2, v5.10.63, v5.14.1, v5.10.62, v5.14, v5.10.61, v5.10.60, v5.10.53, v5.10.52, v5.10.51, v5.10.50, v5.10.49 |
|
#
3667bbd7 |
| 10-Jul-2021 |
Sam Ravnborg <sam@ravnborg.org> |
drm: bridge: Mark deprecated operations in drm_bridge_funcs
drm_bridge_funcs includes several duplicated operations as atomic variants have been added over time. New bridge drivers shall use the ato
drm: bridge: Mark deprecated operations in drm_bridge_funcs
drm_bridge_funcs includes several duplicated operations as atomic variants have been added over time. New bridge drivers shall use the atomic variants - mark the deprecated operations to try to avoid usage in new bridge drivers.
v2: - Drop out-dated comment about state in mode_set (Laurent) - Added missing "the" in a description
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Acked-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210710084240.281063-1-sam@ravnborg.org
show more ...
|
Revision tags: v5.13, v5.10.46, v5.10.43, v5.10.42, v5.10.41, v5.10.40, v5.10.39, v5.4.119, v5.10.36, v5.10.35, v5.10.34, v5.4.116, v5.10.33, v5.12, v5.10.32, v5.10.31, v5.10.30, v5.10.27, v5.10.26, v5.10.25, v5.10.24, v5.10.23, v5.10.22, v5.10.21, v5.10.20, v5.10.19, v5.4.101, v5.10.18, v5.10.17, v5.11, v5.10.16, v5.10.15, v5.10.14, v5.10, v5.8.17, v5.8.16, v5.8.15, v5.9, v5.8.14, v5.8.13, v5.8.12, v5.8.11, v5.8.10, v5.8.9, v5.8.8, v5.8.7, v5.8.6, v5.4.62, v5.8.5, v5.8.4, v5.4.61, v5.8.3, v5.4.60, v5.8.2, v5.4.59, v5.8.1, v5.4.58, v5.4.57, v5.4.56, v5.8, v5.7.12, v5.4.55, v5.7.11, v5.4.54, v5.7.10, v5.4.53, v5.4.52, v5.7.9 |
|
#
19d97fd6 |
| 15-Jul-2020 |
Randy Dunlap <rdunlap@infradead.org> |
drm: drm_bridge.h: delete duplicated word in comment
Drop doubled word "should" in a comment.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vett
drm: drm_bridge.h: delete duplicated word in comment
Drop doubled word "should" in a comment.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-2-rdunlap@infradead.org
show more ...
|
Revision tags: v5.7.8, v5.4.51, v5.4.50, v5.7.7, v5.4.49, v5.7.6, v5.7.5, v5.4.48, v5.7.4, v5.7.3, v5.4.47, v5.4.46, v5.7.2, v5.4.45, v5.7.1, v5.4.44, v5.7, v5.4.43 |
|
#
12c683e1 |
| 25-May-2020 |
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid()
When validating a mode, bridges may need to do so in the context of a display, as specified by drm_display_info. An example is th
drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid()
When validating a mode, bridges may need to do so in the context of a display, as specified by drm_display_info. An example is the meson dw-hdmi bridge that needs to consider the YUV 4:2:0 output format to perform clock calculations.
Bridges that need the display info currently retrieve it from the drm_connector created by the bridge. This gets in the way of moving connector creation out of bridge drivers. To make this possible, pass the drm_display_info to drm_bridge_funcs .mode_valid().
Changes to the bridge drivers have been performed with the following coccinelle semantic patch and have been compile-tested.
@ rule1 @ identifier funcs; identifier fn; @@ struct drm_bridge_funcs funcs = { ..., .mode_valid = fn };
@ depends on rule1 @ identifier rule1.fn; identifier bridge; identifier mode; @@ enum drm_mode_status fn( struct drm_bridge *bridge, + const struct drm_display_info *info, const struct drm_display_mode *mode ) { ... }
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Guido Günther <agx@sigxcpu.org> # for the nwl-dsi part: Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-11-laurent.pinchart+renesas@ideasonboard.com
show more ...
|
Revision tags: v5.4.42, v5.4.41, v5.4.40, v5.4.39, v5.4.38, v5.4.37, v5.4.36, v5.4.35, v5.4.34, v5.4.33, v5.4.32, v5.4.31, v5.4.30, v5.4.29, v5.6, v5.4.28, v5.4.27, v5.4.26, v5.4.25, v5.4.24, v5.4.23 |
|
#
a25b988f |
| 26-Feb-2020 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm/bridge: Extend bridge API to disable connector creation
Most bridge drivers create a DRM connector to model the connector at the output of the bridge. This model is historical and has worked pre
drm/bridge: Extend bridge API to disable connector creation
Most bridge drivers create a DRM connector to model the connector at the output of the bridge. This model is historical and has worked pretty well so far, but causes several issues:
- It prevents supporting more complex display pipelines where DRM connector operations are split over multiple components. For instance a pipeline with a bridge connected to the DDC signals to read EDID data, and another one connected to the HPD signal to detect connection and disconnection, will not be possible to support through this model.
- It requires every bridge driver to implement similar connector handling code, resulting in code duplication.
- It assumes that a bridge will either be wired to a connector or to another bridge, but doesn't support bridges that can be used in both positions very well (although there is some ad-hoc support for this in the analogix_dp bridge driver).
In order to solve these issues, ownership of the connector should be moved to the display controller driver (where it can be implemented using helpers provided by the core).
Extend the bridge API to allow disabling connector creation in bridge drivers as a first step towards the new model. The new flags argument to the bridge .attach() operation allows instructing the bridge driver to skip creating a connector. Unconditionally set the new flags argument to 0 for now to keep the existing behaviour, and modify all existing bridge drivers to return an error when connector creation is not requested as they don't support this feature yet.
The change is based on the following semantic patch, with manual review and edits.
@ rule1 @ identifier funcs; identifier fn; @@ struct drm_bridge_funcs funcs = { ..., .attach = fn };
@ depends on rule1 @ identifier rule1.fn; identifier bridge; statement S, S1; @@ int fn( struct drm_bridge *bridge + , enum drm_bridge_attach_flags flags ) { ... when != S + if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) { + DRM_ERROR("Fix bridge driver to make connector optional!"); + return -EINVAL; + } + S1 ... }
@ depends on rule1 @ identifier rule1.fn; identifier bridge, flags; expression E1, E2, E3; @@ int fn( struct drm_bridge *bridge, enum drm_bridge_attach_flags flags ) { <... drm_bridge_attach(E1, E2, E3 + , flags ) ...> }
@@ expression E1, E2, E3; @@ drm_bridge_attach(E1, E2, E3 + , 0 )
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-10-laurent.pinchart@ideasonboard.com
show more ...
|
#
64d05ff7 |
| 26-Feb-2020 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm/bridge: Add interlace_allowed flag to drm_bridge
In preparation for a connector creation helper based on a chain of bridges, add a flag to the drm_bridge structure to report support for interlac
drm/bridge: Add interlace_allowed flag to drm_bridge
In preparation for a connector creation helper based on a chain of bridges, add a flag to the drm_bridge structure to report support for interlaced modes. This will be used to set the connector's interlace_allowed flag.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-9-laurent.pinchart@ideasonboard.com
show more ...
|
#
11f6c4b1 |
| 26-Feb-2020 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm/bridge: Add connector-related bridge operations and data
To support implementation of DRM connectors on top of DRM bridges instead of by bridges, the drm_bridge needs to expose new operations an
drm/bridge: Add connector-related bridge operations and data
To support implementation of DRM connectors on top of DRM bridges instead of by bridges, the drm_bridge needs to expose new operations and data:
- Output detection, hot-plug notification, mode retrieval and EDID retrieval operations - Bitmask of supported operations - Bridge output type - I2C adapter for DDC access
Add and document these.
Three new bridge helper functions are also added to handle hot plug notification in a way that is as transparent as possible for the bridges.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-8-laurent.pinchart@ideasonboard.com
show more ...
|
#
282f713c |
| 26-Feb-2020 |
Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
drm/bridge: Fix atomic state ops documentation
The drm_bridge_funcs atomic_state_duplicate and atomic_state_destroy operations are erroneously documented as having a default implementation if not im
drm/bridge: Fix atomic state ops documentation
The drm_bridge_funcs atomic_state_duplicate and atomic_state_destroy operations are erroneously documented as having a default implementation if not implemented in bridge drivers. This isn't correct, fix the documentation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-6-laurent.pinchart@ideasonboard.com
show more ...
|
Revision tags: v5.4.22, v5.4.21 |
|
#
91ea8330 |
| 18-Feb-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Fix the bridge kernel doc
Commit 751465913f04 ("drm/bridge: Add a drm_bridge_state object") introduced new helpers and hooks but the kernel was slightly broken. Fix that now.
v2: * Fix
drm/bridge: Fix the bridge kernel doc
Commit 751465913f04 ("drm/bridge: Add a drm_bridge_state object") introduced new helpers and hooks but the kernel was slightly broken. Fix that now.
v2: * Fix the drm_atomic_add_encoder_bridges() doc
Fixes: 751465913f04 ("drm/bridge: Add a drm_bridge_state object") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200218151503.595825-1-boris.brezillon@collabora.com
show more ...
|
Revision tags: v5.4.20, v5.4.19, v5.4.18, v5.4.17, v5.4.16 |
|
#
f32df58a |
| 28-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add the necessary bits to support bus format negotiation
drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through th
drm/bridge: Add the necessary bits to support bus format negotiation
drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through the drm_bus_cfg struct which encodes the configuration of a physical bus between two components in an output pipeline, usually between two bridges, an encoder and a bridge, or a bridge and a connector.
The bus configuration is stored in drm_bridge_state separately for the input and output buses, as seen from the point of view of each bridge. The bus configuration of a bridge output is usually identical to the configuration of the next bridge's input, but may differ if the signals are modified between the two bridges, for instance by an inverter on the board. The input and output configurations of a bridge may differ if the bridge modifies the signals internally, for instance by performing format conversion, or*modifying signals polarities.
Bus format negotiation is automated by the core, drivers just have to implement the ->atomic_get_{output,input}_bus_fmts() hooks if they want to take part to this negotiation. Negotiation happens in reverse order, starting from the last element of the chain (the one directly connected to the display) up to the first element of the chain (the one connected to the encoder). During this negotiation all supported formats are tested until we find one that works, meaning that the formats array should be in decreasing preference order (assuming the driver has a preference order).
Note that the bus format negotiation works even if some elements in the chain don't implement the ->atomic_get_{output,input}_bus_fmts() hooks. In that case, the core advertises only MEDIA_BUS_FMT_FIXED and lets the previous bridge element decide what to do (most of the time, bridge drivers will pick a default bus format or extract this piece of information from somewhere else, like a FW property).
v10: * Add changelog to the commit message
v9: * No changes
v8: * Fix a test in drm_atomic_bridge_chain_select_bus_fmts() (Reported by Jonas)
v7: * Adapt the code to deal with the fact that not all bridges in the chain have a bridge state
v5 -> v6: * No changes
v4: * Enhance the doc * Fix typos * Rename some parameters/fields * Reword the commit message
v3: * Fix the commit message (Reported by Laurent) * Document the fact that bus formats should not be directly modified by drivers (Suggested by Laurent) * Document the fact that format order matters (Suggested by Laurent) * Propagate bus flags by default * Document the fact that drivers can tweak bus flags if needed * Let ->atomic_get_{output,input}_bus_fmts() allocate the bus format array (Suggested by Laurent) * Add a drm_atomic_helper_bridge_propagate_bus_fmt() * Mandate that bridge drivers return accurate input_fmts even if they are known to be the first element in the bridge chain
v2: * Rework things to support more complex use cases
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: fixed doc in include/drm/drm_bridge.h:69 fmt->format] Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-7-boris.brezillon@collabora.com
show more ...
|
#
5061b8a9 |
| 28-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add an ->atomic_check() hook
So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check
drm/bridge: Add an ->atomic_check() hook
So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check() hook) is called in place of drm_bridge_chain_mode_fixup() (when ->atomic_check() is not implemented, the core falls back on ->mode_fixup(), so the behavior should stay the same for existing bridge drivers).
v10: * Add changelog to the commit message
v8 -> v9: * No changes
v7: * Fix a NULL pointer dereference
v5 -> v6: * No changes
v4: * Add R-bs
v3: * No changes
v2: * Clarify the fact that ->atomic_check() is replacing ->mode_fixup()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-6-boris.brezillon@collabora.com
show more ...
|
#
41cf5712 |
| 28-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Patch atomic hooks to take a drm_bridge_state
This way the drm_bridge_funcs interface is consistent with the rest of the subsystem.
The drivers implementing those hooks are patched too.
drm/bridge: Patch atomic hooks to take a drm_bridge_state
This way the drm_bridge_funcs interface is consistent with the rest of the subsystem.
The drivers implementing those hooks are patched too.
v10: * Add changelog to the commit message
v8 -> v9: * No changes
v7: * Adjust things to the bridge_state changes
v6: * Also fixed rcar-du/rcar_lvds.c same as analogix/analogix_dp_core.c
v5: * No changes
v4: * Rename func params into old_bridge_state * Add Laurent's Rb
v3: * Old state clarification moved to a separate patch
v2: * Pass the old bridge state
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: renamed state as old_bridge_state in rcar_lvds_atomic_disable] Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-5-boris.brezillon@collabora.com
show more ...
|
#
75146591 |
| 28-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add a drm_bridge_state object
One of the last remaining objects to not have its atomic state.
This is being motivated by our attempt to support runtime bus-format negotiation between el
drm/bridge: Add a drm_bridge_state object
One of the last remaining objects to not have its atomic state.
This is being motivated by our attempt to support runtime bus-format negotiation between elements of the bridge chain. This patch just paves the road for such a feature by adding a new drm_bridge_state object inheriting from drm_private_obj so we can re-use some of the existing state initialization/tracking logic.
v10: * Add changelog to the commit message
v9: * Clarify the fact that the bridge->atomic_reset() and {connector,plane,crtc,...}->reset() semantics are different * Move the drm_atomic_private_obj_init() call back to drm_bridge_attach() * Check the presence of ->atomic_duplicate_state instead of ->atomic_reset in drm_atomic_add_encoder_bridges() * Fix copy&paste errors in the atomic bridge state helpers doc * Add A-b/R-b tags
v8: * Move bridge state helpers out of the CONFIG_DEBUGFS section
v7: * Move helpers, struct-defs, ... to atomic helper files to avoid the drm -> drm_kms_helper -> drm circular dep * Stop providing default implementation for atomic state reset, duplicate and destroy hooks (has to do with the helper/core split) * Drop all R-b/T-b as helpers have now be moved to other places
v6: * Made helpers private, removed doc and moved them to satisfy dependencies * Renamed helpers to _default_
v5: * Re-introduced the helpers from v4
v4: * Fix the doc * Kill default helpers (inlined) * Fix drm_atomic_get_bridge_state() to check for an ERR_PTR() * Add Neil's R-b
v3: * No changes
v2: * Use drm_for_each_bridge_in_chain() * Rename helpers to be more consistent with the rest of the DRM API * Improve/fix the doc
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200128135514.108171-2-boris.brezillon@collabora.com
show more ...
|
Revision tags: v5.5, v5.4.15, v5.4.14, v5.4.13, v5.4.12, v5.4.11, v5.4.10, v5.4.9 |
|
#
09912635 |
| 07-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
Revert "drm/bridge: Add a drm_bridge_state object"
This reverts commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") which introduced a circular dependency between drm.ko and drm_kms_he
Revert "drm/bridge: Add a drm_bridge_state object"
This reverts commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") which introduced a circular dependency between drm.ko and drm_kms_helper.ko. Looks like the helper/core split is not appropriate and fixing that is not simple.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-6-boris.brezillon@collabora.com
show more ...
|
#
b470743b |
| 07-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
Revert "drm/bridge: Patch atomic hooks to take a drm_bridge_state"
This reverts commit f7619a58ef92 ("drm/bridge: Patch atomic hooks to take a drm_bridge_state"). Commit 6ed7e9625fa6 ("drm/bridge: A
Revert "drm/bridge: Patch atomic hooks to take a drm_bridge_state"
This reverts commit f7619a58ef92 ("drm/bridge: Patch atomic hooks to take a drm_bridge_state"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-5-boris.brezillon@collabora.com
show more ...
|
#
8de679ab |
| 07-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
Revert "drm/bridge: Add an ->atomic_check() hook"
This reverts commit b86d895524ab ("drm/bridge: Add an ->atomic_check() hook"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") int
Revert "drm/bridge: Add an ->atomic_check() hook"
This reverts commit b86d895524ab ("drm/bridge: Add an ->atomic_check() hook"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-4-boris.brezillon@collabora.com
show more ...
|
#
3dfbf2d3 |
| 07-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
Revert "drm/bridge: Add the necessary bits to support bus format negotiation"
This reverts commit e351e4d5eaec ("drm/bridge: Add the necessary bits to support bus format negotiation"). Commit 6ed7e9
Revert "drm/bridge: Add the necessary bits to support bus format negotiation"
This reverts commit e351e4d5eaec ("drm/bridge: Add the necessary bits to support bus format negotiation"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-3-boris.brezillon@collabora.com
show more ...
|
#
e351e4d5 |
| 06-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add the necessary bits to support bus format negotiation
drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through th
drm/bridge: Add the necessary bits to support bus format negotiation
drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through the drm_bus_cfg struct which encodes the configuration of a physical bus between two components in an output pipeline, usually between two bridges, an encoder and a bridge, or a bridge and a connector.
The bus configuration is stored in drm_bridge_state separately for the input and output buses, as seen from the point of view of each bridge. The bus configuration of a bridge output is usually identical to the configuration of the next bridge's input, but may differ if the signals are modified between the two bridges, for instance by an inverter on the board. The input and output configurations of a bridge may differ if the bridge modifies the signals internally, for instance by performing format conversion, or*modifying signals polarities.
Bus format negotiation is automated by the core, drivers just have to implement the ->atomic_get_{output,input}_bus_fmts() hooks if they want to take part to this negotiation. Negotiation happens in reverse order, starting from the last element of the chain (the one directly connected to the display) up to the first element of the chain (the one connected to the encoder). During this negotiation all supported formats are tested until we find one that works, meaning that the formats array should be in decreasing preference order (assuming the driver has a preference order).
Note that the bus format negotiation works even if some elements in the chain don't implement the ->atomic_get_{output,input}_bus_fmts() hooks. In that case, the core advertises only MEDIA_BUS_FMT_FIXED and lets the previous bridge element decide what to do (most of the time, bridge drivers will pick a default bus format or extract this piece of information from somewhere else, like a FW property).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> [narmstrong: fixed doc in include/drm/drm_bridge.h:69 fmt->format] Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-5-narmstrong@baylibre.com
show more ...
|
#
b86d8955 |
| 06-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add an ->atomic_check() hook
So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check
drm/bridge: Add an ->atomic_check() hook
So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check() hook) is called in place of drm_bridge_chain_mode_fixup() (when ->atomic_check() is not implemented, the core falls back on ->mode_fixup(), so the behavior should stay the same for existing bridge drivers).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-4-narmstrong@baylibre.com
show more ...
|
#
f7619a58 |
| 06-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Patch atomic hooks to take a drm_bridge_state
This way the drm_bridge_funcs interface is consistent with the rest of the subsystem.
The only driver implementing those hooks (analogix DP
drm/bridge: Patch atomic hooks to take a drm_bridge_state
This way the drm_bridge_funcs interface is consistent with the rest of the subsystem.
The only driver implementing those hooks (analogix DP) is patched too.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> [narmstrong: renamed state as old_bridge_state in rcar_lvds_atomic_disable] Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-3-narmstrong@baylibre.com
show more ...
|
#
6ed7e962 |
| 06-Jan-2020 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add a drm_bridge_state object
One of the last remaining objects to not have its atomic state.
This is being motivated by our attempt to support runtime bus-format negotiation between el
drm/bridge: Add a drm_bridge_state object
One of the last remaining objects to not have its atomic state.
This is being motivated by our attempt to support runtime bus-format negotiation between elements of the bridge chain. This patch just paves the road for such a feature by adding a new drm_bridge_state object inheriting from drm_private_obj so we can re-use some of the existing state initialization/tracking logic.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-2-narmstrong@baylibre.com
show more ...
|
Revision tags: v5.4.8, v5.4.7, v5.4.6, v5.4.5, v5.4.4, v5.4.3 |
|
#
d383fb5f |
| 07-Dec-2019 |
Sam Ravnborg <sam@ravnborg.org> |
drm: get drm_bridge_panel connector via helper
The drm_connector created by drm_panel_bridge was accessed via drm_panel.connector. Avoid the detour around drm_panel by providing a simple get method.
drm: get drm_bridge_panel connector via helper
The drm_connector created by drm_panel_bridge was accessed via drm_panel.connector. Avoid the detour around drm_panel by providing a simple get method. This avoids direct access to the connector field in drm_panel in the two users.
The change is done in preparation for removal of drm_panel.connector.
Update pl111 and tve200 to use the new helper.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Jernej Skrabec <jernej.skrabec@siol.net> Cc: Eric Anholt <eric@anholt.net> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-5-sam@ravnborg.org
show more ...
|
Revision tags: v5.3.15, v5.4.2 |
|
#
f3fdbc72 |
| 03-Dec-2019 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Clarify the atomic enable/disable hooks semantics
The [pre_]enable/[post_]disable hooks are passed the old atomic state. Update the doc and rename the arguments to make it clear.
Signed
drm/bridge: Clarify the atomic enable/disable hooks semantics
The [pre_]enable/[post_]disable hooks are passed the old atomic state. Update the doc and rename the arguments to make it clear.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-8-boris.brezillon@collabora.com
show more ...
|
#
ac877c64 |
| 03-Dec-2019 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add the drm_bridge_get_prev_bridge() helper
The drm_bridge_get_prev_bridge() helper will be useful for bridge drivers that want to do bus format negotiation with their neighbours.
Signe
drm/bridge: Add the drm_bridge_get_prev_bridge() helper
The drm_bridge_get_prev_bridge() helper will be useful for bridge drivers that want to do bus format negotiation with their neighbours.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-7-boris.brezillon@collabora.com
show more ...
|
#
4ec5c905 |
| 03-Dec-2019 |
Boris Brezillon <boris.brezillon@collabora.com> |
drm/bridge: Add the drm_for_each_bridge_in_chain() helper
To iterate over all bridges attached to a specific encoder.
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-b
drm/bridge: Add the drm_for_each_bridge_in_chain() helper
To iterate over all bridges attached to a specific encoder.
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-6-boris.brezillon@collabora.com
show more ...
|