Skip to content

Commit 584a014

Browse files
committed
drm: clarify adjusted_mode documentation for bridges
This patch clarifies the adjusted_mode documentation for bridges. Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180409152427.12449-1-philippe.cornu@st.com
1 parent aefff49 commit 584a014

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

include/drm/drm_bridge.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,22 @@ struct drm_bridge_funcs {
178178
* then this would be &drm_encoder_helper_funcs.mode_set. The display
179179
* pipe (i.e. clocks and timing signals) is off when this function is
180180
* called.
181+
*
182+
* The adjusted_mode parameter is the mode output by the CRTC for the
183+
* first bridge in the chain. It can be different from the mode
184+
* parameter that contains the desired mode for the connector at the end
185+
* of the bridges chain, for instance when the first bridge in the chain
186+
* performs scaling. The adjusted mode is mostly useful for the first
187+
* bridge in the chain and is likely irrelevant for the other bridges.
188+
*
189+
* For atomic drivers the adjusted_mode is the mode stored in
190+
* &drm_crtc_state.adjusted_mode.
191+
*
192+
* NOTE:
193+
*
194+
* If a need arises to store and access modes adjusted for other
195+
* locations than the connection between the CRTC and the first bridge,
196+
* the DRM framework will have to be extended with DRM bridge states.
181197
*/
182198
void (*mode_set)(struct drm_bridge *bridge,
183199
struct drm_display_mode *mode,

include/drm/drm_crtc.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,13 @@ struct drm_crtc_state {
134134
*
135135
* Internal display timings which can be used by the driver to handle
136136
* differences between the mode requested by userspace in @mode and what
137-
* is actually programmed into the hardware. It is purely driver
138-
* implementation defined what exactly this adjusted mode means. Usually
139-
* it is used to store the hardware display timings used between the
140-
* CRTC and encoder blocks.
137+
* is actually programmed into the hardware.
138+
*
139+
* For drivers using drm_bridge, this stores hardware display timings
140+
* used between the CRTC and the first bridge. For other drivers, the
141+
* meaning of the adjusted_mode field is purely driver implementation
142+
* defined information, and will usually be used to store the hardware
143+
* display timings used between the CRTC and encoder blocks.
141144
*/
142145
struct drm_display_mode adjusted_mode;
143146

0 commit comments

Comments
 (0)