diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-07-26 15:40:15 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-07-27 17:35:05 -0400 |
commit | aeb81b62c7fe4782198e9dd79c7d6cdf04d92586 (patch) | |
tree | 0a7bdaeeac1d86c787f6ee4303c3bb2cfc79b8f8 /drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | |
parent | 608d886c978cd5f3d8650630568d96c231845227 (diff) | |
download | lwn-aeb81b62c7fe4782198e9dd79c7d6cdf04d92586.tar.gz lwn-aeb81b62c7fe4782198e9dd79c7d6cdf04d92586.zip |
drm/amdgpu: convert bios_hardcoded_edid to drm_edid
Instead of manually passing around 'struct edid *' and its size,
use 'struct drm_edid', which encapsulates a validated combination of
both.
As the drm_edid_ can handle NULL gracefully, the explicit checks can be
dropped.
Also save a few characters by transforming '&array[0]' to the equivalent
'array' and using 'max_t(int, ...)' instead of manual casts.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h index d002b845d8ac..5e3faefc5510 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h @@ -51,6 +51,7 @@ struct amdgpu_encoder; struct amdgpu_router; struct amdgpu_hpd; struct edid; +struct drm_edid; #define to_amdgpu_crtc(x) container_of(x, struct amdgpu_crtc, base) #define to_amdgpu_connector(x) container_of(x, struct amdgpu_connector, base) @@ -326,8 +327,7 @@ struct amdgpu_mode_info { /* FMT dithering */ struct drm_property *dither_property; /* hardcoded DFP edid from BIOS */ - struct edid *bios_hardcoded_edid; - int bios_hardcoded_edid_size; + const struct drm_edid *bios_hardcoded_edid; /* firmware flags */ u32 firmware_flags; |