Skip to content

Commit d313fc9

Browse files
6by9popcornmix
authored andcommitted
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 <[email protected]>
1 parent af28d49 commit d313fc9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/gpu/drm/display/drm_hdmi_state_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void __drm_atomic_helper_connector_hdmi_reset(struct drm_connector *connector,
2424
unsigned int max_bpc = connector->max_bpc;
2525

2626
new_conn_state->max_bpc = max_bpc;
27-
new_conn_state->max_requested_bpc = max_bpc;
27+
new_conn_state->max_requested_bpc = 8;
2828
new_conn_state->hdmi.broadcast_rgb = DRM_HDMI_BROADCAST_RGB_AUTO;
2929
}
3030
EXPORT_SYMBOL(__drm_atomic_helper_connector_hdmi_reset);

drivers/gpu/drm/drm_connector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,8 +2723,8 @@ int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
27232723
}
27242724

27252725
drm_object_attach_property(&connector->base, prop, max);
2726-
connector->state->max_requested_bpc = max;
2727-
connector->state->max_bpc = max;
2726+
connector->state->max_requested_bpc = min;
2727+
connector->state->max_bpc = min;
27282728

27292729
return 0;
27302730
}

0 commit comments

Comments
 (0)