@@ -45,14 +45,14 @@
#include "dm_helpers.h"
#include "ddc_service_types.h"
-static u32 edid_extract_panel_id(struct edid *edid)
+static u32 edid_extract_panel_id(const struct edid *edid)
{
return (u32)edid->mfg_id[0] << 24 |
(u32)edid->mfg_id[1] << 16 |
(u32)EDID_PRODUCT_ID(edid);
}
-static void apply_edid_quirks(struct edid *edid, struct dc_edid_caps *edid_caps)
+static void apply_edid_quirks(const struct edid *edid, struct dc_edid_caps *edid_caps)
{
uint32_t panel_id = edid_extract_panel_id(edid);
@@ -94,7 +94,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
{
struct amdgpu_dm_connector *aconnector = link->priv;
struct drm_connector *connector = &aconnector->base;
- struct edid *edid_buf;
+ const struct edid *edid_buf;
struct cea_sad *sads;
int sad_count = -1;
int sadb_count = -1;
@@ -106,7 +106,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
if (!edid_caps || !edid)
return EDID_BAD_INPUT;
- edid_buf = (struct edid *)edid->raw_edid;
+ edid_buf = (const struct edid *)edid->raw_edid;
if (!drm_edid_is_valid(edid_buf))
result = EDID_BAD_CHECKSUM;
The argument edid is passed in as const. Preserve this constness through the edid_buf variable and the used helper functions. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)