diff options
author | Thierry Reding <treding@nvidia.com> | 2015-12-03 12:45:45 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2019-10-28 11:18:44 +0100 |
commit | 27ba465ce3397c4705f87c1f73e6d67c1b48ef0f (patch) | |
tree | 1f1931d9e690bf0e7c1c0070483de4253567cb30 /drivers/gpu/drm/tegra/dp.h | |
parent | drm/tegra: dp: Track link capabilities alongside settings (diff) | |
download | linux-27ba465ce3397c4705f87c1f73e6d67c1b48ef0f.tar.xz linux-27ba465ce3397c4705f87c1f73e6d67c1b48ef0f.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/tegra/dp.h')
-rw-r--r-- | drivers/gpu/drm/tegra/dp.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tegra/dp.h b/drivers/gpu/drm/tegra/dp.h index ec0342d4c95e..6246f9afb5fe 100644 --- a/drivers/gpu/drm/tegra/dp.h +++ b/drivers/gpu/drm/tegra/dp.h @@ -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; |