]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd/display: use unsigned types for local pipe and REG_GET counters
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Tue, 2 Jun 2026 19:17:06 +0000 (15:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Jun 2026 19:24:45 +0000 (15:24 -0400)
commit1e815068fba5ea2684c146b445a3b1f6da7eddee
tree5855d98662083745c48bd96e656603879873ae36
parent1e13b7eb67f9118130571958fbf94944c71c32d1
drm/amd/display: use unsigned types for local pipe and REG_GET counters

Two small type fixes that match how the values are actually consumed:

- decide_zstate_support() iterates from 0 to pipe_count, which is
  unsigned. Make the loop index unsigned int.

- hpo_enc401_read_state() reads HDMI_PIXEL_ENCODING and
  HDMI_DEEP_COLOR_DEPTH via REG_GET_2(), which internally casts the
  output pointer to (uint32_t *). Passing the address of an int is a
  strict-aliasing wart even when the sizes match. Declare the locals
  as uint32_t.

No behavioural change since the values are only compared against small
non-negative constants.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
drivers/gpu/drm/amd/display/dc/hpo/dcn401/dcn401_hpo_frl_stream_encoder.c