-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/connector: hdmi: Create an HDMI sub-state
The next features we will need to share across drivers will need to store some parameters for drivers to use, such as the selected output format. Let's create a new connector sub-state dedicated to HDMI controllers, that will eventually store everything we need. Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-3-c5af16c3aae2@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
- Loading branch information
Maxime Ripard
committed
May 28, 2024
1 parent
68aaa74
commit 54cb39e
Showing
5 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
#include <drm/drm_atomic.h> | ||
#include <drm/drm_connector.h> | ||
|
||
#include <drm/display/drm_hdmi_state_helper.h> | ||
|
||
/** | ||
* __drm_atomic_helper_connector_hdmi_reset() - Initializes all HDMI @drm_connector_state resources | ||
* @connector: DRM connector | ||
* @new_conn_state: connector state to reset | ||
* | ||
* Initializes all HDMI resources from a @drm_connector_state without | ||
* actually allocating it. This is useful for HDMI drivers, in | ||
* combination with __drm_atomic_helper_connector_reset() or | ||
* drm_atomic_helper_connector_reset(). | ||
*/ | ||
void __drm_atomic_helper_connector_hdmi_reset(struct drm_connector *connector, | ||
struct drm_connector_state *new_conn_state) | ||
{ | ||
} | ||
EXPORT_SYMBOL(__drm_atomic_helper_connector_hdmi_reset); | ||
|
||
/** | ||
* drm_atomic_helper_connector_hdmi_check() - Helper to check HDMI connector atomic state | ||
* @connector: DRM Connector | ||
* @state: the DRM State object | ||
* | ||
* Provides a default connector state check handler for HDMI connectors. | ||
* Checks that a desired connector update is valid, and updates various | ||
* fields of derived state. | ||
* | ||
* RETURNS: | ||
* Zero on success, or an errno code otherwise. | ||
*/ | ||
int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector, | ||
struct drm_atomic_state *state) | ||
{ | ||
return 0; | ||
} | ||
EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_check); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
#ifndef DRM_HDMI_STATE_HELPER_H_ | ||
#define DRM_HDMI_STATE_HELPER_H_ | ||
|
||
struct drm_atomic_state; | ||
struct drm_connector; | ||
struct drm_connector_state; | ||
|
||
void __drm_atomic_helper_connector_hdmi_reset(struct drm_connector *connector, | ||
struct drm_connector_state *new_conn_state); | ||
|
||
int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector, | ||
struct drm_atomic_state *state); | ||
|
||
#endif // DRM_HDMI_STATE_HELPER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters