drm/tegra: dp: Turn link capabilities into booleans
Rather than storing capabilities as flags in an integer, use a separate boolean per capability. This simplifies the code that checks for these capabilities. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
@@ -7,16 +7,31 @@
|
||||
#ifndef DRM_TEGRA_DP_H
|
||||
#define DRM_TEGRA_DP_H 1
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct drm_dp_aux;
|
||||
|
||||
#define DP_LINK_CAP_ENHANCED_FRAMING (1 << 0)
|
||||
/**
|
||||
* struct drm_dp_link_caps - DP link capabilities
|
||||
*/
|
||||
struct drm_dp_link_caps {
|
||||
/**
|
||||
* @enhanced_framing:
|
||||
*
|
||||
* enhanced framing capability (mandatory as of DP 1.2)
|
||||
*/
|
||||
bool enhanced_framing;
|
||||
};
|
||||
|
||||
void drm_dp_link_caps_copy(struct drm_dp_link_caps *dest,
|
||||
const struct drm_dp_link_caps *src);
|
||||
|
||||
/**
|
||||
* struct drm_dp_link - DP link capabilities and configuration
|
||||
* @revision: DP specification revision supported on the link
|
||||
* @max_rate: maximum clock rate supported on the link
|
||||
* @max_lanes: maximum number of lanes supported on the link
|
||||
* @capabilities: bitmask of capabilities supported on the link
|
||||
* @caps: capabilities supported on the link (see &drm_dp_link_caps)
|
||||
* @rate: currently configured link rate
|
||||
* @lanes: currently configured number of lanes
|
||||
*/
|
||||
@@ -24,7 +39,8 @@ struct drm_dp_link {
|
||||
unsigned char revision;
|
||||
unsigned int max_rate;
|
||||
unsigned int max_lanes;
|
||||
unsigned long capabilities;
|
||||
|
||||
struct drm_dp_link_caps caps;
|
||||
|
||||
unsigned int rate;
|
||||
unsigned int lanes;
|
||||
|
Reference in New Issue
Block a user