Commit eebc1525 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/display: Clean up zero initializers



Just use a simple {} to zero initialize arrays/structs instead
of the hodgepodge of stuff we are using currently.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231012122442.15718-2-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 02c8d561
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ static acpi_handle intel_dsm_pci_probe(struct pci_dev *pdev)
static bool intel_dsm_detect(void)
{
	acpi_handle dhandle = NULL;
	char acpi_method_name[255] = { 0 };
	char acpi_method_name[255] = {};
	struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
	struct pci_dev *pdev = NULL;
	int vga_count = 0;
+1 −1
Original line number Diff line number Diff line
@@ -3009,7 +3009,7 @@ void intel_c10pll_state_verify(struct intel_atomic_state *state,
	struct drm_i915_private *i915 = to_i915(state->base.dev);
	const struct intel_crtc_state *new_crtc_state =
		intel_atomic_get_new_crtc_state(state, crtc);
	struct intel_c10pll_state mpllb_hw_state = { 0 };
	struct intel_c10pll_state mpllb_hw_state = {};
	const struct intel_c10pll_state *mpllb_sw_state = &new_crtc_state->cx0pll_state.c10;
	struct intel_encoder *encoder;
	enum phy phy;
+3 −3
Original line number Diff line number Diff line
@@ -1583,7 +1583,7 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector,
{
	struct drm_i915_private *i915 = to_i915(connector->base.dev);
	int i, num_bpc;
	u8 dsc_bpc[3] = {0};
	u8 dsc_bpc[3] = {};
	u8 dsc_max_bpc;

	dsc_max_bpc = intel_dp_dsc_max_src_input_bpc(i915);
@@ -2006,7 +2006,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
	u8 max_req_bpc = conn_state->max_requested_bpc;
	u8 dsc_max_bpc, dsc_max_bpp;
	u8 dsc_min_bpc, dsc_min_bpp;
	u8 dsc_bpc[3] = {0};
	u8 dsc_bpc[3] = {};
	int forced_bpp, pipe_bpp;
	int num_bpc, i, ret;

@@ -2940,7 +2940,7 @@ intel_edp_init_source_oui(struct intel_dp *intel_dp, bool careful)
{
	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
	u8 oui[] = { 0x00, 0xaa, 0x01 };
	u8 buf[3] = { 0 };
	u8 buf[3] = {};

	/*
	 * During driver init, we want to be careful and avoid changing the source OUI if it's
+2 −2
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ intel_dp_aux_hdr_get_backlight(struct intel_connector *connector, enum pipe pipe
	struct intel_panel *panel = &connector->panel;
	struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
	u8 tmp;
	u8 buf[2] = { 0 };
	u8 buf[2] = {};

	if (drm_dp_dpcd_readb(&intel_dp->aux, INTEL_EDP_HDR_GETSET_CTRL_PARAMS, &tmp) != 1) {
		drm_err(&i915->drm, "[CONNECTOR:%d:%s] Failed to read current backlight mode from DPCD\n",
@@ -204,7 +204,7 @@ intel_dp_aux_hdr_set_aux_backlight(const struct drm_connector_state *conn_state,
	struct intel_connector *connector = to_intel_connector(conn_state->connector);
	struct drm_device *dev = connector->base.dev;
	struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
	u8 buf[4] = { 0 };
	u8 buf[4] = {};

	buf[0] = level & 0xFF;
	buf[1] = (level & 0xFF00) >> 8;
+1 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
		&crtc_state->hw.adjusted_mode;
	int slots = -EINVAL;
	int i, num_bpc;
	u8 dsc_bpc[3] = {0};
	u8 dsc_bpc[3] = {};
	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
	u8 dsc_max_bpc;
	bool need_timeslot_recalc = false;
Loading