drm/connector: Initialise max_bpc to the minimum value supported

Using increased bit depth for no reason increases power
consumption, and differs from the behaviour prior to the
conversion to use the HDMI helper functions.

Initialise the state max_bpc and requested_max_bpc to the
minimum value supported. This only affects Raspberry Pi,
as the other users of the helpers (rockchip/inno_hdmi and
sunx4i) only support a bit depth of 8.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This commit is contained in:
Dave Stevenson
2024-11-21 18:30:07 +00:00
committed by Dom Cobley
parent 79af6e883f
commit 501710350d
2 changed files with 3 additions and 3 deletions

View File

@@ -321,7 +321,7 @@ void __drm_atomic_helper_connector_hdmi_reset(struct drm_connector *connector,
unsigned int max_bpc = connector->max_bpc;
new_conn_state->max_bpc = max_bpc;
new_conn_state->max_requested_bpc = max_bpc;
new_conn_state->max_requested_bpc = 8;
new_conn_state->hdmi.broadcast_rgb = DRM_HDMI_BROADCAST_RGB_AUTO;
}
EXPORT_SYMBOL(__drm_atomic_helper_connector_hdmi_reset);

View File

@@ -2839,8 +2839,8 @@ int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
}
drm_object_attach_property(&connector->base, prop, max);
connector->state->max_requested_bpc = max;
connector->state->max_bpc = max;
connector->state->max_requested_bpc = min;
connector->state->max_bpc = min;
return 0;
}