diff options
author | Dave Airlie <airlied@redhat.com> | 2017-10-03 05:36:54 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-06 19:58:50 +0300 |
commit | 48aa3ddfd535a8e80b1b46da8a13920d9de8e5c5 (patch) | |
tree | 1ae35183738cf5a26ede2dc398f29eb005737cc5 /drivers/gpu/drm/amd/display/dc/basics | |
parent | d8c893b44b2199f5935fe8667708253c38353782 (diff) | |
download | linux-48aa3ddfd535a8e80b1b46da8a13920d9de8e5c5.tar.xz |
amdgpu/dc: inline dal grph object id functions.
This is worth 400 bytes.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c b/drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c index 9c80847d03a9..147822545252 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c +++ b/drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c @@ -26,7 +26,7 @@ #include "dm_services.h" #include "include/grph_object_id.h" -bool dal_graphics_object_id_is_valid(struct graphics_object_id id) +static bool dal_graphics_object_id_is_valid(struct graphics_object_id id) { bool rc = true; @@ -72,63 +72,4 @@ bool dal_graphics_object_id_is_equal( return false; } -/* Based on internal data members memory layout */ -uint32_t dal_graphics_object_id_to_uint(struct graphics_object_id id) -{ - uint32_t object_id = 0; - - object_id = id.id + (id.enum_id << 0x8) + (id.type << 0xc); - return object_id; -} - -/* - * ******* get specific ID - internal safe cast into specific type ******* - */ - -enum controller_id dal_graphics_object_id_get_controller_id( - struct graphics_object_id id) -{ - if (id.type == OBJECT_TYPE_CONTROLLER) - return id.id; - return CONTROLLER_ID_UNDEFINED; -} - -enum clock_source_id dal_graphics_object_id_get_clock_source_id( - struct graphics_object_id id) -{ - if (id.type == OBJECT_TYPE_CLOCK_SOURCE) - return id.id; - return CLOCK_SOURCE_ID_UNDEFINED; -} - -enum encoder_id dal_graphics_object_id_get_encoder_id( - struct graphics_object_id id) -{ - if (id.type == OBJECT_TYPE_ENCODER) - return id.id; - return ENCODER_ID_UNKNOWN; -} - -enum connector_id dal_graphics_object_id_get_connector_id( - struct graphics_object_id id) -{ - if (id.type == OBJECT_TYPE_CONNECTOR) - return id.id; - return CONNECTOR_ID_UNKNOWN; -} - -enum audio_id dal_graphics_object_id_get_audio_id(struct graphics_object_id id) -{ - if (id.type == OBJECT_TYPE_AUDIO) - return id.id; - return AUDIO_ID_UNKNOWN; -} - -enum engine_id dal_graphics_object_id_get_engine_id( - struct graphics_object_id id) -{ - if (id.type == OBJECT_TYPE_ENGINE) - return id.id; - return ENGINE_ID_UNKNOWN; -} |