Commit 59c185ac authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Explicit casting for grph object ids

C++ compilers don't like the implicit conversion
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c42c275c
...@@ -248,7 +248,7 @@ static inline enum controller_id dal_graphics_object_id_get_controller_id( ...@@ -248,7 +248,7 @@ static inline enum controller_id dal_graphics_object_id_get_controller_id(
struct graphics_object_id id) struct graphics_object_id id)
{ {
if (id.type == OBJECT_TYPE_CONTROLLER) if (id.type == OBJECT_TYPE_CONTROLLER)
return id.id; return (enum controller_id) id.id;
return CONTROLLER_ID_UNDEFINED; return CONTROLLER_ID_UNDEFINED;
} }
...@@ -256,7 +256,7 @@ static inline enum clock_source_id dal_graphics_object_id_get_clock_source_id( ...@@ -256,7 +256,7 @@ static inline enum clock_source_id dal_graphics_object_id_get_clock_source_id(
struct graphics_object_id id) struct graphics_object_id id)
{ {
if (id.type == OBJECT_TYPE_CLOCK_SOURCE) if (id.type == OBJECT_TYPE_CLOCK_SOURCE)
return id.id; return (enum clock_source_id) id.id;
return CLOCK_SOURCE_ID_UNDEFINED; return CLOCK_SOURCE_ID_UNDEFINED;
} }
...@@ -264,7 +264,7 @@ static inline enum encoder_id dal_graphics_object_id_get_encoder_id( ...@@ -264,7 +264,7 @@ static inline enum encoder_id dal_graphics_object_id_get_encoder_id(
struct graphics_object_id id) struct graphics_object_id id)
{ {
if (id.type == OBJECT_TYPE_ENCODER) if (id.type == OBJECT_TYPE_ENCODER)
return id.id; return (enum encoder_id) id.id;
return ENCODER_ID_UNKNOWN; return ENCODER_ID_UNKNOWN;
} }
...@@ -272,7 +272,7 @@ static inline enum connector_id dal_graphics_object_id_get_connector_id( ...@@ -272,7 +272,7 @@ static inline enum connector_id dal_graphics_object_id_get_connector_id(
struct graphics_object_id id) struct graphics_object_id id)
{ {
if (id.type == OBJECT_TYPE_CONNECTOR) if (id.type == OBJECT_TYPE_CONNECTOR)
return id.id; return (enum connector_id) id.id;
return CONNECTOR_ID_UNKNOWN; return CONNECTOR_ID_UNKNOWN;
} }
...@@ -280,7 +280,7 @@ static inline enum audio_id dal_graphics_object_id_get_audio_id( ...@@ -280,7 +280,7 @@ static inline enum audio_id dal_graphics_object_id_get_audio_id(
struct graphics_object_id id) struct graphics_object_id id)
{ {
if (id.type == OBJECT_TYPE_AUDIO) if (id.type == OBJECT_TYPE_AUDIO)
return id.id; return (enum audio_id) id.id;
return AUDIO_ID_UNKNOWN; return AUDIO_ID_UNKNOWN;
} }
...@@ -288,7 +288,7 @@ static inline enum engine_id dal_graphics_object_id_get_engine_id( ...@@ -288,7 +288,7 @@ static inline enum engine_id dal_graphics_object_id_get_engine_id(
struct graphics_object_id id) struct graphics_object_id id)
{ {
if (id.type == OBJECT_TYPE_ENGINE) if (id.type == OBJECT_TYPE_ENGINE)
return id.id; return (enum engine_id) id.id;
return ENGINE_ID_UNKNOWN; return ENGINE_ID_UNKNOWN;
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment