mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-13 04:06:37 +07:00
amdgpu: fixup construct to void paths on some more dc objects.
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>
This commit is contained in:
parent
94de2bbdfa
commit
db6c3bdcfe
@ -245,7 +245,7 @@ void dal_ddc_aux_payloads_add(
|
||||
}
|
||||
}
|
||||
|
||||
static bool construct(
|
||||
static void construct(
|
||||
struct ddc_service *ddc_service,
|
||||
struct ddc_service_init_data *init_data)
|
||||
{
|
||||
@ -282,7 +282,6 @@ static bool construct(
|
||||
connector_id == CONNECTOR_ID_LVDS;
|
||||
|
||||
ddc_service->wa.raw = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
struct ddc_service *dal_ddc_service_create(
|
||||
@ -295,11 +294,8 @@ struct ddc_service *dal_ddc_service_create(
|
||||
if (!ddc_service)
|
||||
return NULL;
|
||||
|
||||
if (construct(ddc_service, init_data))
|
||||
return ddc_service;
|
||||
|
||||
kfree(ddc_service);
|
||||
return NULL;
|
||||
construct(ddc_service, init_data);
|
||||
return ddc_service;
|
||||
}
|
||||
|
||||
static void destruct(struct ddc_service *ddc)
|
||||
|
@ -56,7 +56,7 @@ static void update_stream_signal(struct dc_stream_state *stream)
|
||||
}
|
||||
}
|
||||
|
||||
static bool construct(struct dc_stream_state *stream,
|
||||
static void construct(struct dc_stream_state *stream,
|
||||
struct dc_sink *dc_sink_data)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
@ -104,7 +104,6 @@ static bool construct(struct dc_stream_state *stream,
|
||||
stream->status.link = stream->sink->link;
|
||||
|
||||
update_stream_signal(stream);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void destruct(struct dc_stream_state *stream)
|
||||
@ -142,25 +141,18 @@ struct dc_stream_state *dc_create_stream_for_sink(
|
||||
struct dc_stream_state *stream;
|
||||
|
||||
if (sink == NULL)
|
||||
goto alloc_fail;
|
||||
return NULL;
|
||||
|
||||
stream = kzalloc(sizeof(struct dc_stream_state), GFP_KERNEL);
|
||||
if (stream == NULL)
|
||||
return NULL;
|
||||
|
||||
if (NULL == stream)
|
||||
goto alloc_fail;
|
||||
|
||||
if (false == construct(stream, sink))
|
||||
goto construct_fail;
|
||||
construct(stream, sink);
|
||||
|
||||
atomic_inc(&stream->ref_count);
|
||||
|
||||
return stream;
|
||||
|
||||
construct_fail:
|
||||
kfree(stream);
|
||||
|
||||
alloc_fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct dc_stream_status *dc_stream_get_status(
|
||||
|
@ -34,12 +34,11 @@
|
||||
/*******************************************************************************
|
||||
* Private functions
|
||||
******************************************************************************/
|
||||
static bool construct(struct dc_context *ctx, struct dc_plane_state *plane_state)
|
||||
static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state)
|
||||
{
|
||||
plane_state->ctx = ctx;
|
||||
memset(&plane_state->hdr_static_ctx,
|
||||
0, sizeof(struct dc_hdr_static_metadata));
|
||||
return true;
|
||||
}
|
||||
|
||||
static void destruct(struct dc_plane_state *plane_state)
|
||||
@ -72,20 +71,12 @@ struct dc_plane_state *dc_create_plane_state(struct dc *dc)
|
||||
GFP_KERNEL);
|
||||
|
||||
if (NULL == plane_state)
|
||||
goto alloc_fail;
|
||||
|
||||
if (false == construct(core_dc->ctx, plane_state))
|
||||
goto construct_fail;
|
||||
return NULL;
|
||||
|
||||
construct(core_dc->ctx, plane_state);
|
||||
atomic_inc(&plane_state->ref_count);
|
||||
|
||||
return plane_state;
|
||||
|
||||
construct_fail:
|
||||
kfree(plane_state);
|
||||
|
||||
alloc_fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const struct dc_plane_status *dc_plane_get_status(
|
||||
|
Loading…
Reference in New Issue
Block a user