forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/amd/display/dc/core/dc_sink.c
....@@ -23,6 +23,8 @@
2323 *
2424 */
2525
26
+#include <linux/slab.h>
27
+
2628 #include "dm_services.h"
2729 #include "dm_helpers.h"
2830 #include "core_types.h"
....@@ -31,7 +33,7 @@
3133 * Private functions
3234 ******************************************************************************/
3335
34
-static void destruct(struct dc_sink *sink)
36
+static void dc_sink_destruct(struct dc_sink *sink)
3537 {
3638 if (sink->dc_container_id) {
3739 kfree(sink->dc_container_id);
....@@ -39,7 +41,7 @@
3941 }
4042 }
4143
42
-static bool construct(struct dc_sink *sink, const struct dc_sink_init_data *init_params)
44
+static bool dc_sink_construct(struct dc_sink *sink, const struct dc_sink_init_data *init_params)
4345 {
4446
4547 struct dc_link *link = init_params->link;
....@@ -52,6 +54,7 @@
5254 sink->ctx = link->ctx;
5355 sink->dongle_max_pix_clk = init_params->dongle_max_pix_clk;
5456 sink->converter_disable_audio = init_params->converter_disable_audio;
57
+ sink->is_mst_legacy = init_params->sink_is_legacy;
5558 sink->dc_container_id = NULL;
5659 sink->sink_id = init_params->link->ctx->dc_sink_id_count;
5760 // increment dc_sink_id_count because we don't want two sinks with same ID
....@@ -73,7 +76,7 @@
7376 static void dc_sink_free(struct kref *kref)
7477 {
7578 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount);
76
- destruct(sink);
79
+ dc_sink_destruct(sink);
7780 kfree(sink);
7881 }
7982
....@@ -89,7 +92,7 @@
8992 if (NULL == sink)
9093 goto alloc_fail;
9194
92
- if (false == construct(sink, init_params))
95
+ if (false == dc_sink_construct(sink, init_params))
9396 goto construct_fail;
9497
9598 kref_init(&sink->refcount);