Merge tag 'drm-dp-quirk-for-v4.12-rc4' of git://people.freedesktop.org/~airlied/linux
Pull drm displayport quirk support: "DP quirk for usb c dongles. As mentioned I have a separate request for fixing a regression, but also keeping the broken hw working, for certain USB-C DP adapters they require a minimised n/m parameters, but an attempt to do this generically has failed, we need to quirk these specific adapters. However doing it generically regressed some eDP panels. This pull adds the infrastructure and a quirk for the adapter" * tag 'drm-dp-quirk-for-v4.12-rc4' of git://people.freedesktop.org/~airlied/linux: drm/i915: Detect USB-C specific dongles before reducing M and N drm/dp: start a DPCD based DP sink/branch device quirk database drm/i915: use drm DP helper to read DPCD desc drm/dp: add helper for reading DP sink/branch device desc from DPCD
This commit is contained in:
@@ -913,4 +913,55 @@ void drm_dp_aux_unregister(struct drm_dp_aux *aux);
|
||||
int drm_dp_start_crc(struct drm_dp_aux *aux, struct drm_crtc *crtc);
|
||||
int drm_dp_stop_crc(struct drm_dp_aux *aux);
|
||||
|
||||
struct drm_dp_dpcd_ident {
|
||||
u8 oui[3];
|
||||
u8 device_id[6];
|
||||
u8 hw_rev;
|
||||
u8 sw_major_rev;
|
||||
u8 sw_minor_rev;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct drm_dp_desc - DP branch/sink device descriptor
|
||||
* @ident: DP device identification from DPCD 0x400 (sink) or 0x500 (branch).
|
||||
* @quirks: Quirks; use drm_dp_has_quirk() to query for the quirks.
|
||||
*/
|
||||
struct drm_dp_desc {
|
||||
struct drm_dp_dpcd_ident ident;
|
||||
u32 quirks;
|
||||
};
|
||||
|
||||
int drm_dp_read_desc(struct drm_dp_aux *aux, struct drm_dp_desc *desc,
|
||||
bool is_branch);
|
||||
|
||||
/**
|
||||
* enum drm_dp_quirk - Display Port sink/branch device specific quirks
|
||||
*
|
||||
* Display Port sink and branch devices in the wild have a variety of bugs, try
|
||||
* to collect them here. The quirks are shared, but it's up to the drivers to
|
||||
* implement workarounds for them.
|
||||
*/
|
||||
enum drm_dp_quirk {
|
||||
/**
|
||||
* @DP_DPCD_QUIRK_LIMITED_M_N:
|
||||
*
|
||||
* The device requires main link attributes Mvid and Nvid to be limited
|
||||
* to 16 bits.
|
||||
*/
|
||||
DP_DPCD_QUIRK_LIMITED_M_N,
|
||||
};
|
||||
|
||||
/**
|
||||
* drm_dp_has_quirk() - does the DP device have a specific quirk
|
||||
* @desc: Device decriptor filled by drm_dp_read_desc()
|
||||
* @quirk: Quirk to query for
|
||||
*
|
||||
* Return true if DP device identified by @desc has @quirk.
|
||||
*/
|
||||
static inline bool
|
||||
drm_dp_has_quirk(const struct drm_dp_desc *desc, enum drm_dp_quirk quirk)
|
||||
{
|
||||
return desc->quirks & BIT(quirk);
|
||||
}
|
||||
|
||||
#endif /* _DRM_DP_HELPER_H_ */
|
||||
|
Reference in New Issue
Block a user