Hi Thierry, Do you think while you are at it you could implement a set_scrambling() callback? It should be pretty straight forward: you read the SCDC_TMDS_CONFIG reg, do a mask, and then write it again. I think this is an important feature that we should have. Best regards, Jose Miguel Abreu On 02-12-2016 19:24, Thierry Reding wrote: > From: Thierry Reding <treding@xxxxxxxxxx> > > Sinks that support SCDC can optionally have the capability to initiate > read requests, which are a mechanism by which a sink can notify its > source that it should read the Update Flags. If either the sink or the > source are not Read Request capable, polling of the Update Flags shall > be employed. > > Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> > --- > Changes in v2: > - new patch > > drivers/gpu/drm/drm_edid.c | 36 ++++++++++++++++++++++++++++++++++++ > include/drm/drm_edid.h | 1 + > 2 files changed, 37 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 369961597ee5..8211cce3e09e 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -3736,6 +3736,42 @@ bool drm_detect_hdmi_scdc(struct edid *edid) > EXPORT_SYMBOL(drm_detect_hdmi_scdc); > > /** > + * drm_detect_hdmi_scdc_rr_capable - detect whether an HDMI sink is capable of > + * initiating an SCDC Read Request > + * @edid: sink EDID information > + * > + * Parse the CEA extension according to CEA-861-B to find an HF-VSDB as > + * defined in HDMI 2.0, section 10.3.2 "HDMI Forum Vendor Specific Data > + * Block" and checks if the RR_Capable bit (bit 6 of byte 6) is set. > + * > + * Returns: > + * True if the sink is capable of initiating an SCDC Read Request, false > + * otherwise. > + */ > +bool drm_detect_hdmi_scdc_rr_capable(struct edid *edid) > +{ > + unsigned int start, end, i; > + const u8 *cea; > + > + cea = drm_find_cea_extension(edid); > + if (!cea) > + return false; > + > + if (cea_db_offsets(cea, &start, &end)) > + return false; > + > + for_each_cea_db(cea, i, start, end) { > + if (cea_db_is_hdmi_forum_vsdb(&cea[i])) { > + if (cea[i + 6] & 0x40) > + return true; > + } > + } > + > + return false; > +} > +EXPORT_SYMBOL(drm_detect_hdmi_scdc_rr_capable); > + > +/** > * drm_detect_monitor_audio - check monitor audio capability > * @edid: EDID block to scan > * > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h > index 7ea7e90846d8..d1c29586035e 100644 > --- a/include/drm/drm_edid.h > +++ b/include/drm/drm_edid.h > @@ -441,6 +441,7 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match); > enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code); > bool drm_detect_hdmi_monitor(struct edid *edid); > bool drm_detect_hdmi_scdc(struct edid *edid); > +bool drm_detect_hdmi_scdc_rr_capable(struct edid *edid); > bool drm_detect_monitor_audio(struct edid *edid); > bool drm_rgb_quant_range_selectable(struct edid *edid); > int drm_add_modes_noedid(struct drm_connector *connector, _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel