mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
drm/vc4: hdmi: Add a clear_infoframe hook
If you disable HDR metadata, then the hardware should stop sending the infoframe, and that is implemented by the clear_infoframe hook which wasn't implemented. Add it. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
9916ddd853
commit
28e50a3c46
@@ -709,6 +709,24 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int vc4_hdmi_clear_infoframe(struct drm_connector *connector,
|
||||
enum hdmi_infoframe_type type)
|
||||
{
|
||||
struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
|
||||
struct drm_device *drm = connector->dev;
|
||||
int ret;
|
||||
int idx;
|
||||
|
||||
if (!drm_dev_enter(drm, &idx))
|
||||
return 0;
|
||||
|
||||
ret = vc4_hdmi_stop_packet(vc4_hdmi, type, true);
|
||||
if (ret)
|
||||
drm_err(drm, "Failed to wait for infoframe to go idle: %d\n", ret);
|
||||
|
||||
drm_dev_exit(idx);
|
||||
return ret;
|
||||
}
|
||||
#define SCRAMBLING_POLLING_DELAY_MS 1000
|
||||
|
||||
static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder)
|
||||
@@ -1667,6 +1685,7 @@ vc4_hdmi_connector_clock_valid(const struct drm_connector *connector,
|
||||
static const struct drm_connector_hdmi_funcs vc4_hdmi_hdmi_connector_funcs = {
|
||||
.tmds_char_rate_valid = vc4_hdmi_connector_clock_valid,
|
||||
.write_infoframe = vc4_hdmi_write_infoframe,
|
||||
.clear_infoframe = vc4_hdmi_clear_infoframe,
|
||||
};
|
||||
|
||||
#define WIFI_2_4GHz_CH1_MIN_FREQ 2400000000ULL
|
||||
|
||||
Reference in New Issue
Block a user